juniper jncia – juniper ospf route configuration

18
Juniper JNCIA Juniper OSPF Route Configuration ASM EDUCATIONAL CENTER INC. (ASM) WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGE CHECK OUT OUR JUNIPER TRAINING VIDEOS: WWW.ASMED.COM/J1

Upload: hamed-moghaddam

Post on 16-Apr-2017

429 views

Category:

Education


19 download

TRANSCRIPT

Page 1: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper JNCIJuniper OSPF Route Configuration

Juniper JNCIAJuniper OSPF Route Configuration

ASM EDUCATIONAL CENTER INC. (ASM)WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGECHECK OUT OUR JUNIPER TRAINING VIDEOS: WWW.ASMED.COM/J1

Page 2: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Page 3: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

In here R1 and R2 are connected via cable e3 to e3 is 40.40.40.1/24 40.40.40.2/24

Goal is to that R1 will be able go to Loopback address of R2=2.2.2.2 via OSPF And R2 be able to Ping Loopback of R1=1.1.1.1 Here I will give IP address to R1 em3 and Lo0 root@R1# set interfaces em3 unit 0 family inet address 40.40.40.1/24 root@R1# set interfaces lo0 unit 0 family inet address 1.1.1.1/24 Here are R1 Configuration

Page 4: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

root@R1> show configuration interfaces { em3 { unit 0 { family inet { address 40.40.40.1/24; } } } lo0 { unit 0 { family inet { address 1.1.1.1/24; } } } }

Page 5: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Here I will give IP address to R2 em3 and Lo0 root@R2# set interfaces em3 unit 0 family inet address 40.40.40.2/24 root@R2# set interfaces lo0 unit 0 family inet address 2.2.2.2/24 root@R2# show interfaces em3 { unit 0 { family inet { address 40.40.40.2/24; } } } lo0 { unit 0 { family inet { address 2.2.2.2/24; } } }

Page 6: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Now seated at R1 I cannot ping Loopback address of R2=2.2.2.2 Why? Since Network 2.2.2.0 is not inside the routing table, root@R1> show route inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1.1.1.0/24 *[Direct/0] 00:12:59 > via lo0.0 1.1.1.1/32 *[Local/0] 00:12:59 Local via lo0.0 40.40.40.0/24 *[Direct/0] 00:12:59 > via em3.0 40.40.40.1/32 *[Local/0] 00:12:59 Local via em3.0

Page 7: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

As we see the network 2.2.2.0/24 is not inside the Routing table ; So I will configure it with OSPF on both R1 and R2 . Remember you need always advertise connected interface on the OSPF. root@R1# set protocols ospf area 0.0.0.0 interface em3 root@R1# set protocols ospf area 0.0.0.0 interface lo0 Here is my show commands to check it: root@R1# show protocols ospf area 0.0.0.0 { interface em3.0; interface lo0.0;

Page 8: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Now I will do same concept in R2, that is advertise each interface em3 and lo0 inside the OSPF root@R2# set protocols ospf area 0.0.0.0 interface em3 root@R2# set protocols ospf area 0.0.0.0 interface lo0 root@R2# show protocols ospf area 0.0.0.0 { interface em3.0; interface lo0.0;

Page 9: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Now in same way that we use to see my neighbors I will be able to see my neighbors root@R1> show ospf neighbor Address Interface State ID Pri Dead 40.40.40.2 em3.0 Full 2.2.2.2 128 35 Here is my routing table on R1 root@R1> show route inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both

Page 10: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

1.1.1.0/24 *[Direct/0] 00:30:07 > via lo0.0 1.1.1.1/32 *[Local/0] 00:30:07 Local via lo0.0 2.2.2.0/24 *[OSPF/10] 00:05:56, metric 1 > to 40.40.40.2 via em3.0 2.2.2.2/32 *[OSPF/10] 00:05:56, metric 1 > to 40.40.40.2 via em3.0 40.40.40.0/24 *[Direct/0] 00:30:07 > via em3.0 40.40.40.1/32 *[Local/0] 00:30:07 Local via em3.0 224.0.0.5/32 *[OSPF/10] 00:12:24, metric 1 MultiRecv

Page 11: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Now since I see network 2.2.2.0/24 on my tables I can ping 2.2.2.2 root@R1> ping 2.2.2.2 PING 2.2.2.2 (2.2.2.2): 56 data bytes 64 bytes from 2.2.2.2: icmp_seq=0 ttl=64 time=0.557 ms 64 bytes from 2.2.2.2: icmp_seq=1 ttl=64 time=0.418 ms 64 bytes from 2.2.2.2: icmp_seq=2 ttl=64 time=0.372 ms 64 bytes from 2.2.2.2: icmp_seq=3 ttl=64 time=0.714 ms ^C

Page 12: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Now lets check the routing table on R2, R2 should be able to see the loopback of R1=1.1.1.0 inside his routing table.

root@R2> show ospf neighbor Address Interface State ID Pri Dead 40.40.40.1 em3.0 Full 1.1.1.1 128 34 root@R2> show route inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both

Page 13: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

1.1.1.0/24 *[OSPF/10] 00:04:04, metric 1 > to 40.40.40.1 via em3.0 1.1.1.1/32 *[OSPF/10] 00:04:04, metric 1 > to 40.40.40.1 via em3.0 2.2.2.0/24 *[Direct/0] 00:33:38 > via lo0.0 2.2.2.2/32 *[Local/0] 00:33:38 Local via lo0.0 40.40.40.0/24 *[Direct/0] 00:33:38 > via em3.0 40.40.40.2/32 *[Local/0] 00:33:38 Local via em3.0 224.0.0.5/32 *[OSPF/10] 00:08:29, metric 1 MultiRecv Now since 1.1.1.0 is inside the table I should be able to ping 1.1.1.1 from R2

Page 14: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

1.1.1.0/24 *[OSPF/10] 00:04:04, metric 1 > to 40.40.40.1 via em3.0 1.1.1.1/32 *[OSPF/10] 00:04:04, metric 1 > to 40.40.40.1 via em3.0 2.2.2.0/24 *[Direct/0] 00:33:38 > via lo0.0 2.2.2.2/32 *[Local/0] 00:33:38 Local via lo0.0 40.40.40.0/24 *[Direct/0] 00:33:38 > via em3.0 40.40.40.2/32 *[Local/0] 00:33:38 Local via em3.0 224.0.0.5/32 *[OSPF/10] 00:08:29, metric 1 MultiRecv Now since 1.1.1.0 is inside the table I should be able to ping 1.1.1.1 from R2

Page 15: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

root@R2> ping 1.1.1.1 PING 1.1.1.1 (1.1.1.1): 56 data bytes 64 bytes from 1.1.1.1: icmp_seq=0 ttl=64 time=0.471 ms 64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.836 ms 64 bytes from 1.1.1.1: icmp_seq=2 ttl=64 time=1.159 ms 64 bytes from 1.1.1.1: icmp_seq=3 ttl=64 time=0.843 ms So summary : make sure always advertise directkty connected inside the OPSF

Page 16: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Here is R1#: root@R1> show configuration interfaces { em3 { unit 0 { family inet { address 40.40.40.1/24; } } } lo0 { unit 0 { family inet { address 1.1.1.1/24; } } } } protocols { ospf { area 0.0.0.0 { interface em3.0; interface lo0.0; } } }

Page 17: Juniper JNCIA – Juniper OSPF Route Configuration

Juniper OSPF Route Configuration

Here is R2 Configuration: root@R2> show configuration interfaces { em3 { unit 0 { family inet { address 40.40.40.2/24; } } } lo0 { unit 0 { family inet { address 2.2.2.2/24; } } } } protocols { ospf { area 0.0.0.0 { interface em3.0; interface lo0.0; } } }

Page 18: Juniper JNCIA – Juniper OSPF Route Configuration

ASM EDUCATIONAL CENTER INC. (ASM)WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGEWWW.ASMED.COM