c
Configuring Default Routes
KHAWAR BUTT
CCIE # 12353 [R/S, SECURITY, SP, DC, VOICE, STORAGE & CCDE]
Overview
Default Route Overview
Syntax
Configuration c
Lab Diagram
PC PC PC
c
Switch Switch Switch
192.168.1.0/24 192.168.2.0/24 192.168.3.0/24
E 0/0 E 0/0 E 0/0
Serial 1/0 Serial 1/0
Serial 1/1 Serial 1/0
R1 192.168.12.0/24 R2 192.168.23.0/24 R3
Default Routes
Default routes define a router as the default gateway for your router.
When there is no entry for the destination network in a routing table, the router will forward the packet to its default router.
Default routes help in reducing the size of your routing table.
c
The default route is essentially a static route with a special Destination Network and Network Mask.
The Special Destination Network is “0.0.0.0”. The special Network Mask is “0.0.0.0”.
IP route 0.0.0.0 0.0.0.0 [Default Router]
For our network, if R1 wants to reach any of the networks thru R2, I can create a default route using the following:
Ip route 0.0.0.0 0.0.0.0 192.168.12.2
Default Route Syntax
The syntax for the Static Route Command [IP Route] is :
Ip route 0.0.0.0 0.0.0.0 [Next Hop Router]
c
For our network, if R1 wants to reach the 192.168.2.0/24 network, which is
behind R2, you would create a static route using the following:
Ip route 0.0.0.0 0.0.0.0 192.168.12.2
Next Router IP to reach any destination is 192.168.12.2
Configuring Default Routes
We will delete all the routes configured in the previous lab on R1 & R3.
R1 only has one way to reach any network, that is thru R2. Similarly, R3
c
only has one way to reach any network, that is thru R2.
We will configure a single default route on R1 & R3 pointing towards R2.
R2 becomes the Default Gateway for R1 & R3.
Configuring Static Routes
Router Configurations
R1
R1(config)#no IP route 192.168.2.0 255.255.255.0c 192.168.12.2
R1(config)#no IP route 192.168.3.0 255.255.255.0 192.168.12.2
R1(config)#no IP route 192.168.23.0 255.255.255.0 192.168.12.2
R1(config)#IP route 0.0.0.0 0.0.0.0 192.168.12.2
R3
R3(config)#no IP route 192.168.1.0 255.255.255.0 192.168.23.2
R3(config)#no IP route 192.168.2.0 255.255.255.0 192.168.23.2
R3(config)#no IP route 192.168.12.0 255.255.255.0 192.168.23.2
R3(config)#no IP route 0.0.0.0 0.0.0.0 192.168.23.2
Whiteboard