Configuring a Static Default Route

This is an example how to make static routing between two networks: 192.168.0.0/24 and 192.168.1.0/24. Connection between two routers is made using serial ports Serial 0/1/0 on both routers.

16042101

 

Router1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2 all unknown IP addresses route to 10.0.0.2 – IP address of next hop
or
Router1(config)#ip route 0.0.0.0 0.0.0.0 Serial 0/1/0 – all unknown IP addresses route to Serial 0/1/0 – port connected to next hop

Router2(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.1
or
Router2(config)#ip route 0.0.0.0 0.0.0.0 Serial 0/1/0

To check IP route:

Router1#sh 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 0.0.0.0 to network 0.0.0.0
* 0.0.0.0/32 is subnetted, 1 subnets
S* 0.0.0.0 [1/0] via 10.0.0.2
10.0.0.0/30 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Serial0/1/0
C 192.168.0.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 is directly connected, Serial0/1/0
Router1#