Dynamic Reconfiguration
This scenario shows how to create a GRE tunnel and perform some dynamic configuration changes on it.
Test Dynamic Changes On GRE Tunnel
Description
A tunnel interface is configured in each node and the ‘Ping’ command is used to check network connectivity (ICMP protocol). Afterwards, NHRP configuration is replaced by a fixed remote network and ICMP connectivy is checked again. Finally, initial configuration is restored to ensure NHRP is working fine.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 vif 100 address 192.168.100.10/24 set interfaces tunnel tun0 address 100.0.0.1/32 set interfaces tunnel tun0 encapsulation gre set interfaces tunnel tun0 local-address 192.168.100.10 set interfaces tunnel tun0 nhrp set protocols static route 0.0.0.0/0 next-hop 192.168.100.20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 vif 200 address 192.168.200.10/24 set interfaces tunnel tun0 address 200.0.0.1/32 set interfaces tunnel tun0 encapsulation gre set interfaces tunnel tun0 local-address 192.168.200.10 set interfaces tunnel tun0 nhrp nhs 100.0.0.1 nbma 192.168.100.10 set protocols static route 0.0.0.0/0 next-hop 192.168.200.20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Set the following configuration in DUT2
:
set interfaces ethernet eth0 vif 100 address 192.168.100.20/24 set interfaces ethernet eth1 vif 200 address 192.168.200.20/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 4: Ping IP address 192.168.200.20
from DUT0
:
admin@DUT0$ ping 192.168.200.20 count 1 size 56 timeout 1Show output
PING 192.168.200.20 (192.168.200.20) 56(84) bytes of data. 64 bytes from 192.168.200.20: icmp_seq=1 ttl=64 time=0.284 ms --- 192.168.200.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.284/0.284/0.284/0.000 ms
Step 5: Run command protocols ip show nhrp
at DUT0
and check if output matches the following regular expressions:
tun0\s+dynamic\s+200\.0\.0\.1Show output
Iface Type Protocol NBMA Claimed NBMA Expires(s) Flags Identity tun0 local 100.0.0.1 192.168.100.10 192.168.100.10 - - tun0 dynamic 200.0.0.1 192.168.200.10 192.168.200.10 7197 UTA
Step 6: Ping IP address 200.0.0.1
from DUT0
:
admin@DUT0$ ping 200.0.0.1 count 1 size 56 timeout 1Show output
PING 200.0.0.1 (200.0.0.1) 56(84) bytes of data. 64 bytes from 200.0.0.1: icmp_seq=1 ttl=64 time=0.610 ms --- 200.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.610/0.610/0.610/0.000 ms
Step 7: Modify the following configuration lines in DUT0
:
delete interfaces tunnel tun0 nhrp set interfaces tunnel tun0 remote-ip 192.168.200.10 set protocols static route 200.0.0.1/32 interface tun0
Step 8: Modify the following configuration lines in DUT1
:
delete interfaces tunnel tun0 nhrp set interfaces tunnel tun0 remote-ip 192.168.100.10 set protocols static route 100.0.0.1/32 interface tun0
Step 9: Ping IP address 200.0.0.1
from DUT0
:
admin@DUT0$ ping 200.0.0.1 count 1 size 56 timeout 1Show output
PING 200.0.0.1 (200.0.0.1) 56(84) bytes of data. 64 bytes from 200.0.0.1: icmp_seq=1 ttl=64 time=0.393 ms --- 200.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.393/0.393/0.393/0.000 ms
Step 10: Modify the following configuration lines in DUT0
:
delete interfaces tunnel tun0 remote-ip delete protocols static route 200.0.0.1/32 set interfaces tunnel tun0 nhrp
Step 11: Modify the following configuration lines in DUT1
:
delete interfaces tunnel tun0 remote-ip delete protocols static route 100.0.0.1/32 set interfaces tunnel tun0 nhrp nhs 100.0.0.1 nbma 192.168.100.10
Step 12: Run command protocols ip show nhrp
at DUT0
and check if output matches the following regular expressions:
tun0\s+dynamic\s+200\.0\.0\.1Show output
Iface Type Protocol NBMA Claimed NBMA Expires(s) Flags Identity tun0 local 100.0.0.1 192.168.100.10 192.168.100.10 - - tun0 dynamic 200.0.0.1 192.168.200.10 192.168.200.10 7198 UTA
Step 13: Ping IP address 200.0.0.1
from DUT0
:
admin@DUT0$ ping 200.0.0.1 count 1 size 56 timeout 1Show output
PING 200.0.0.1 (200.0.0.1) 56(84) bytes of data. 64 bytes from 200.0.0.1: icmp_seq=1 ttl=64 time=0.490 ms --- 200.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.490/0.490/0.490/0.000 ms