Default Router

This scenario shows how to configure a cellular interface and assign a distance to the default route obtained via DHCP.

../../../../_images/google.svg

Test DHCP Default Route Distance

Description

DUT0 is connected to the WAN side through the cellular cell0 interface. Additionally, distance of default route obtained via DHCP client is configured.

Scenario

Step 1: Set the following configuration in DUT0 :

set cellular profile CELPROFILE apn movistar.es
set controllers cellular wwan0 encrypted-pin U2FsdGVkX1+6lh3WtqqtmyDnud6yd8VsEop89kZwwxk=
set controllers cellular wwan0 pdp 1 profile CELPROFILE
set interfaces cellular cell0 address dhcp
set interfaces cellular cell0 dhcp client receive default-router distance 200
set interfaces cellular cell0 phy wwan0 pdp 1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Run the command controllers cellular wwan0 pdp 1 show network-data-connection on DUT0 and check whether the output matches the following regular expressions:

Connection status\s* = connected
Show output
Connection status               = connected
Traffic channel status          = active
Max. TX channel rate (bps)      = 50000000
Max. RX channel rate (bps)      = 300000000
IPv4 address                    = 2.143.48.122
IPv4 mask                       = 255.255.255.252
IPv4 gateway                    = 2.143.48.121
IPv4 primary DNS                = 80.58.61.248
IPv4 secondary DNS              = 80.58.61.249

Step 3: Run the command protocols ip show route on DUT0 and check whether the output matches the following regular expressions:

S>.*0\.0\.0\.0\/0 \[200\/0\] via .* cell0,.*
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv4 unicast VRF default:
S>* 0.0.0.0/0 [200/0] via 2.143.48.121, cell0, weight 1, 00:00:01
C>* 2.143.48.120/30 is directly connected, cell0, weight 1, 00:00:01
L>* 2.143.48.122/32 is directly connected, cell0, weight 1, 00:00:01

Step 4: Ping the IP address 8.8.8.8 from DUT0:

admin@DUT0$ ping 8.8.8.8 count 1 size 56 timeout 1
Show output
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=41.2 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 41.232/41.232/41.232/0.000 ms

Step 1: Set the following configuration in DUT0 :

set cellular profile CELPROFILE apn movistar.es
set controllers cellular wwan0 sim select socket_1
set controllers cellular wwan0 sim socket socket_1 encrypted-pin U2FsdGVkX19bXDVnUFqN0qlxKI/k/t7iCHaAtVqJfnU=
set controllers cellular wwan0 sim socket socket_1 pdp 1 profile CELPROFILE
set interfaces cellular cell0 address dhcp
set interfaces cellular cell0 dhcp client receive default-router distance 200
set interfaces cellular cell0 phy wwan0 pdp 1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Run the command controllers cellular wwan0 pdp 1 show network-data-connection on DUT0 and check whether the output matches the following regular expressions:

Connection status\s* = connected
Show output
Connection status               = connected
Traffic channel status          = active
Max. TX channel rate (bps)      = 0
Max. RX channel rate (bps)      = 0
IPv4 address                    = 5.205.224.147
IPv4 mask                       = 255.255.255.248
IPv4 gateway                    = 5.205.224.148
IPv4 primary DNS                = 80.58.61.248
IPv4 secondary DNS              = 80.58.61.249

Step 3: Run the command protocols ip show route on DUT0 and check whether the output matches the following regular expressions:

S>.*0\.0\.0\.0\/0 \[200\/0\] via .* cell0,.*
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv4 unicast VRF default:
S>* 0.0.0.0/0 [200/0] via 5.205.224.148, cell0, weight 1, 00:00:01
C>* 5.205.224.144/29 is directly connected, cell0, weight 1, 00:00:01
L>* 5.205.224.147/32 is directly connected, cell0, weight 1, 00:00:01

Step 4: Ping the IP address 8.8.8.8 from DUT0:

admin@DUT0$ ping 8.8.8.8 count 1 size 56 timeout 1
Show output
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=160 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 160.464/160.464/160.464/0.000 ms

Step 1: Set the following configuration in DUT0 :

set cellular profile CELPROFILE apn movistar.es
set controllers cellular wwan0 sim select socket_1
set controllers cellular wwan0 sim socket socket_1 encrypted-pin U2FsdGVkX18PQLM/nzAHy3dJmclB5J6Ge93K6slTPg0=
set controllers cellular wwan0 sim socket socket_1 pdp 1 profile CELPROFILE
set interfaces cellular cell0 address dhcp
set interfaces cellular cell0 dhcp client receive default-router distance 200
set interfaces cellular cell0 phy wwan0 pdp 1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Run the command controllers cellular wwan0 pdp 1 show network-data-connection on DUT0 and check whether the output matches the following regular expressions:

Connection status\s* = connected
Show output
Connection status               = connected
Traffic channel status          = active
Max. TX channel rate (bps)      = 0
Max. RX channel rate (bps)      = 0
IPv4 address                    = 2.143.51.53
IPv4 mask                       = 255.255.255.252
IPv4 gateway                    = 2.143.51.54
IPv4 primary DNS                = 80.58.61.248
IPv4 secondary DNS              = 80.58.61.249

Step 3: Run the command protocols ip show route on DUT0 and check whether the output matches the following regular expressions:

S>.*0\.0\.0\.0\/0 \[200\/0\] via .* cell0,.*
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv4 unicast VRF default:
S>* 0.0.0.0/0 [200/0] via 2.143.51.54, cell0, weight 1, 00:00:01
C>* 2.143.51.52/30 is directly connected, cell0, weight 1, 00:00:01
L>* 2.143.51.53/32 is directly connected, cell0, weight 1, 00:00:01

Step 4: Ping the IP address 8.8.8.8 from DUT0:

admin@DUT0$ ping 8.8.8.8 count 1 size 56 timeout 1
Show output
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=146 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 146.386/146.386/146.386/0.000 ms

Step 1: Set the following configuration in DUT0 :

set cellular profile CELPROFILE apn movistar.es
set controllers cellular wwan0 sim select socket_1
set controllers cellular wwan0 sim socket socket_1 encrypted-pin U2FsdGVkX1+3QUZWJ9k65YvQEhIG52mindv2yTIGkxw=
set controllers cellular wwan0 sim socket socket_1 pdp 1 profile CELPROFILE
set interfaces cellular cell0 address dhcp
set interfaces cellular cell0 dhcp client receive default-router distance 200
set interfaces cellular cell0 phy wwan0 pdp 1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Run the command controllers cellular wwan0 pdp 1 show network-data-connection on DUT0 and check whether the output matches the following regular expressions:

Connection status\s* = connected
Show output
Connection status               = connected
Traffic channel status          = active
Max. TX channel rate (bps)      = 0
Max. RX channel rate (bps)      = 0
IPv4 address                    = 37.12.33.88
IPv4 mask                       = 255.255.255.240
IPv4 gateway                    = 37.12.33.89
IPv4 primary DNS                = 80.58.61.248
IPv4 secondary DNS              = 80.58.61.249

Step 3: Run the command protocols ip show route on DUT0 and check whether the output matches the following regular expressions:

S>.*0\.0\.0\.0\/0 \[200\/0\] via .* cell0,.*
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv4 unicast VRF default:
S>* 0.0.0.0/0 [200/0] via 37.12.33.89, cell0, weight 1, 00:00:02
C>* 37.12.33.80/28 is directly connected, cell0, weight 1, 00:00:02
L>* 37.12.33.88/32 is directly connected, cell0, weight 1, 00:00:02

Step 4: Ping the IP address 8.8.8.8 from DUT0:

admin@DUT0$ ping 8.8.8.8 count 1 size 56 timeout 1
Show output
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=168 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 168.019/168.019/168.019/0.000 ms