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 eth0.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
Step 2: Set the following configuration in DUT1
:
set interfaces eth0.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
Step 3: Set the following configuration in DUT2
:
set interfaces eth0.100 address 192.168.100.20/24 set interfaces eth1.200 address 192.168.200.20/24
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.496 ms --- 192.168.200.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.496/0.496/0.496/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 7199 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.477 ms --- 200.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.477/0.477/0.477/0.000 ms
Step 7: Set the following configuration in DUT0
:
del 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: Set the following configuration in DUT1
:
del 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.580 ms --- 200.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.580/0.580/0.580/0.000 ms
Step 10: Set the following configuration in DUT0
:
del protocols static route 200.0.0.1/32 del interfaces tunnel tun0 remote-ip set interfaces tunnel tun0 nhrp
Step 11: Set the following configuration in DUT1
:
del protocols static route 100.0.0.1/32 del interfaces tunnel tun0 remote-ip 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.552 ms --- 200.0.0.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.552/0.552/0.552/0.000 ms