Default Router

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

../../../../_images/topology37.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 interfaces cellular cell0 address dhcp
set interfaces cellular cell0 dhcp client receive default-router distance 200
set interfaces cellular cell0 encrypted-pin U2FsdGVkX19i00/RVYD156zlCNMaDj3A0gVTdfbHZpM=
set interfaces cellular cell0 profile CELPROFILE
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Run command protocols ip show route at DUT0 and check if 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 176.82.50.114, cell0, weight 1, 00:00:04
C>* 176.82.50.112/30 is directly connected, cell0, weight 1, 00:00:04
K * 176.82.50.112/30 [0/0] is directly connected, cell0, weight 1, 00:00:04
L>* 176.82.50.113/32 is directly connected, cell0, weight 1, 00:00:04

Step 3: Ping 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=171 ms

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