Wednesday, December 5, 2018

Static Routing : 3. Default Route

When there is no other known route exists for a given destination address. All the unknown destination address is sent to the default route.

If the default route is configured, and the route to the destination is not available in the routing table, packet is transferred to the next router based on the default route.


 Any packet whose destination IP address is not known uses default route and forwarded to next router. The next router verifies the packet and treats it in the same way if it does not know the destination address. This process is repeated until the packet reaches the destination.


Default Route

Default Route


PC1:

C:\>ping 51.1.1.2

Pinging 51.1.1.2 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 51.1.1.2:

Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

R1:

R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    10.0.0.0/8 is directly connected, FastEthernet0/0
C    20.0.0.0/8 is directly connected, Serial2/0
C    49.0.0.0/8 is directly connected, Serial3/0


So there is no route in R1 to reach 51.1.1.2.

The route to the destination is not available in the routing table, now we are adding Default Route in R1. If the packet with unknown destination reaches to router R1, packet will be transferred to the next router based on the default route.

R1(config)#ip route 0.0.0.0 0.0.0.0 49.7.5.2 (Adding Default Route)



R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 49.7.5.2 to network 0.0.0.0

C    10.0.0.0/8 is directly connected, FastEthernet0/0
C    20.0.0.0/8 is directly connected, Serial2/0
C    49.0.0.0/8 is directly connected, Serial3/0

S*   0.0.0.0/0 [1/0] via 49.7.5.2 (Default Route Added)


PC1:

C:\>ping 51.1.1.2

Pinging 51.1.1.2 with 32 bytes of data:

Reply from 51.1.1.2: bytes=32 time=2ms TTL=253
Reply from 51.1.1.2: bytes=32 time=2ms TTL=253
Reply from 51.1.1.2: bytes=32 time=8ms TTL=253
Reply from 51.1.1.2: bytes=32 time=2ms TTL=253

Ping statistics for 51.1.1.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 8ms, Average = 3ms


Now the packet transferred to next router using default route. The next router knows the destination. So the packet reached to destination.


No comments:

Post a Comment