Topology:
The purpose of this article is to provide basic understanding about the OSPF configuration on a Juniper switch. In this Example 2 VLANs are used, VLAN 10 and VLAN 20.
root@JNP-sw-01> show interfaces irb.10 terse
Interface Admin Link Proto Local Remote
irb.10 up up inet 172.17.10.100/24
root@JNP-SW-02> show interfaces irb.20 terse
Interface Admin Link Proto Local Remote
irb.20 up up inet 172.17.20.100/24
Interface Admin Link Proto Local Remote
irb.20 up up inet 172.17.20.100/24
root@JNP-sw-01> show vlans
Routing instance VLAN name Tag Interfaces
default-switch default 1 default-switch vlan10 10 xe-0/0/1.0*
Routing instance VLAN name Tag Interfaces
default-switch default 1 default-switch vlan10 10 xe-0/0/1.0*
root@JNP-SW-02> show vlans
Routing instance VLAN name Tag Interfaces
default-switch default 1
default-switch vlan20 20 xe-0/0/1.0*
Lets Configure OSPF on JNP-SW-01. Let's make the configuration changes at [edit protocols ospf] hierarchy level and commit the changes.
root@JNP-SW-01# edit protocols ospf
root@JNP-SW-01# set area 0 interface xe-0/0/11.0
root@JNP-SW-01# set area 0 interface irb.10
root@JNP-SW-01# commit
Lets make the same changes on JNP-SW-02.
root@JNP-SW-02# edit protocols ospf
root@JNP-SW-02# set area 0 interface xe-0/0/11.0
root@JNP-SW-02# set area 0 interface irb.20
root@JNP-SW-02# commitLet's Verify the OSPF Neighbor Status on both Switches.
root@JNP-SW-01> show ospf neighbor
Address Interface State ID Pri Dead
10.10.10.2 xe-0/0/11.0 Full 10.10.10.2 128 37
root@JNP-SW-02> show ospf neighbor
Address Interface State ID Pri Dead
10.10.10.1 xe-0/0/11.0 Full 10.10.10.1 128 37
Let's Verify the Routing table on both switches.
root@JNP-SW-01> show route protocol ospf
172.17.20.0/24 *[OSPF/10] 00:11:35, metric 2
> to 10.10.10.2 via xe-0/0/11.0
root@JNP-SW-02> show route protocol ospf
172.17.10.0/24 *[OSPF/10] 00:13:20, metric 2
> to 10.10.10.1 via xe-0/0/11.0
Let's Ping and confirm the connectivity between both PCs.
PC-01> show
NAME IP/MASK GATEWAY
PC-01 172.17.10.1/24 172.17.10.100
PC-01> ping 172.17.20.1
84 bytes from 172.17.20.1 icmp_seq=1 ttl=62 time=151.380 ms
84 bytes from 172.17.20.1 icmp_seq=2 ttl=62 time=124.210 ms
PC-02> show
NAME IP/MASK GATEWAY
PC-02 172.17.20.1/24 172.17.20.100
PC-02> ping 172.17.10.1
84 bytes from 172.17.10.1 icmp_seq=1 ttl=62 time=420.303 ms
84 bytes from 172.17.10.1 icmp_seq=2 ttl=62 time=223.631 ms
0 Comments