Ok, now we can reset back to some basic stuff – NHRP or VRRP!
Before beginning, reset all configs back to rescue/base.
Junos only supports the standard NHRP, VRRP. For this lab we will configure a VRRP address of 192.168.23.23 on the link between J2 and J3. We will then PING that address from R4 to validate traffic. In order to test failover, we will deactivate an interface on J2 (Master VRRP) and check that J3 is now the active VRRP device.
Ok, basics first – let’s get OSPF configured on this network.
R4:
R4(config)#router ospf 1
R4(config-router)#no au
R4(config-router)#net 0.0.0.0 255.255.255.255 a 0
R4(config-router)#^Z
Now onto J1:
[edit]
jfry@J1# edit protocols ospf area 0
[edit protocols ospf area 0.0.0.0]
jfry@J1# set interface fe-0/0/7
[edit protocols ospf area 0.0.0.0]
jfry@J1# set interface ge-0/0/0
[edit protocols ospf area 0.0.0.0]
jfry@J1# set interface fe-0/0/2
[edit protocols ospf area 0.0.0.0]
jfry@J1# set interface lo0 passive
[edit protocols ospf area 0.0.0.0]
jfry@J1# commit and-quit
Now J2:
[edit]
jfry@J2# edit protocols ospf area 0
[edit protocols ospf area 0.0.0.0]
jfry@J2# set interface ge-0/0/0
[edit protocols ospf area 0.0.0.0]
jfry@J2# set interface ge-0/0/1
[edit protocols ospf area 0.0.0.0]
jfry@J2# set interface lo0 passive
[edit protocols ospf area 0.0.0.0]
jfry@J2# commit and-quit
And J3:
[edit]
jfry@J3# edit protocols ospf area 0
[edit protocols ospf area 0.0.0.0]
jfry@J3# set interface fe-0/0/1
[edit protocols ospf area 0.0.0.0]
jfry@J3# set interface fe-0/0/2
[edit protocols ospf area 0.0.0.0]
jfry@J3# set interface lo0 passive
[edit protocols ospf area 0.0.0.0]
jfry@J3# commit and-quit
Ok, time to test ping from J3 to R4:
jfry@J3> ping 4.4.4.4 source 3.3.3.3 rapid
PING 4.4.4.4 (4.4.4.4): 56 data bytes
!!!!!
— 4.4.4.4 ping statistics —
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.052/3.154/3.334/0.110 ms
jfry@J3>
Good, now for VRRP. J2 up first since that will be the master.
For J2 I will use all set based commands from the top, and for J3 I will navigate to the interface.
First we will define our VRRP address of 192.168.23.23
[edit]
jfry@J2# set interface ge-0/0/1 unit 0 family inet address 192.168.23.2/24 vrrp-group 1 virtual-address 192.168.23.23
Now we will configure a higher priority to make sure we are the master:
[edit]
jfry@J2# set interface ge-0/0/1 unit 0 family inet address 192.168.23.2/24 vrrp-group 1 priority 150
We will configure preempt to make sure we are always the master:
[edit]
jfry@J2# set interface ge-0/0/1 unit 0 family inet address 192.168.23.2/24 vrrp-group 1 preempt
And finally we need to tell Junos that we will respond to that address via ICMP and SNMP:
[edit]
jfry@J2# set interface ge-0/0/1 unit 0 family inet address 192.168.23.2/24 vrrp-group 1 accept-data
[edit]
jfry@J2# commit and-quit
Ok, let us check it quick and make sure we are master:
jfry@J2> show vrrp
Interface State Group VR state VR Mode Timer Type Address
ge-0/0/1.0 up 1 master Active A 0.495 lcl 192.168.23.2
vip 192.168.23.23
jfry@J2>
Good, we are master!
and now for J3:
jfry@J3> edit
Entering configuration mode
Now we can navigate to the interface:
[edit]
jfry@J3# edit interface fe-0/0/1 unit 0 family inet address 192.168.23.3/24
Good, now we can edit our vrrp-group:
[edit interfaces fe-0/0/1 unit 0 family inet address 192.168.23.3/24]
jfry@J3# edit vrrp-group 1
And now just do the set based commands for VRRP!
[edit interfaces fe-0/0/1 unit 0 family inet address 192.168.23.3/24 vrrp-group 1]
jfry@J3# set virtual-address 192.168.23.23
[edit interfaces fe-0/0/1 unit 0 family inet address 192.168.23.3/24 vrrp-group 1]
jfry@J3# set accept-data
[edit interfaces fe-0/0/1 unit 0 family inet address 192.168.23.3/24 vrrp-group 1]
jfry@J3# commit and-quit
commit complete
Exiting configuration mode
Good, now we can check our VRRP on J3:
jfry@J3> show vrrp
Interface State Group VR state VR Mode Timer Type Address
fe-0/0/1.0 up 1 backup Active D 3.455 lcl 192.168.23.3
vip 192.168.23.23
mas 192.168.23.2
jfry@J3>
Good, we are in backup state and 192.168.23.2 is master.
Time to ping from R4:
R4#ping 192.168.23.23
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.23, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R4#
Now we can deactivate the interface on J2 and make J3 active:
[edit]
jfry@J2# deactivate interfaces ge-0/0/1
[edit]
jfry@J2# commit and-quit
And back to J3 to check VRRP status:
jfry@J3> show vrrp
Interface State Group VR state VR Mode Timer Type Address
fe-0/0/1.0 up 1 master Active A 0.163 lcl 192.168.23.3
vip 192.168.23.23
jfry@J3>
Good, we are master since J2 is now longer active.
Time to ping from R4:
R4#ping 192.168.23.23
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.23, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms
R4#
And now let’s reactivate J2 interface:
[edit]
jfry@J2# activate interfaces ge-0/0/1
[edit]
jfry@J2# commit and-quit
Now J3 should be in backup again and J2 should be master:
jfry@J3> show vrrp
Interface State Group VR state VR Mode Timer Type Address
fe-0/0/1.0 up 1 backup Active D 2.893 lcl 192.168.23.3
vip 192.168.23.23
mas 192.168.23.2
jfry@J3>
And that is VRRP in a nutshell!
Rati B. Jokhadze said:
NHRP? i guess you mean FHRP 😛