Generating a default route in RIP.

There are several ways to generate a default route (0.0.0.0/0) as a RIP route and advertise it to other routers, as follows

  • Redistribute static default route to RIP
  • default-information originate command
  • ip default-network command

The ip default-network command does not advertise the default route 0.0.0.0/0 itself, but it allows it to play the same role as the default route.

In the following sections, we will explain a simple configuration example of redistributing the default route of a static route to RIP.

Redistribute static default route to RIP

Network diagram

図 RIPでのデフォルトルート生成の設定例 ネットワーク構成
Figure Network Diagram

Condition

  • Allow R2 to advertise the default route to R3 with RIP to ensure connectivity for all interfaces.
  • The default route generation is done by static route redistribution.

Initial Configuration

R1

interface Loopback0
 ip address 172.16.2.1 255.255.255.0 secondary
 ip address 172.16.1.1 255.255.255.0
!
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
!
ip route 192.168.0.0 255.255.0.0 192.168.12.2

R2

interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
!
interface Ethernet0/1
 ip address 192.168.23.2 255.255.255.0
!
router rip
 version 2
 network 192.168.23.0
 no auto-summary

R3

interface Loopback0
 ip address 192.168.3.3 255.255.255.0
!
interface Ethernet0/0
 ip address 192.168.23.3 255.255.255.0
!
router rip
 version 2
 network 192.168.3.0
 network 192.168.23.0
 no auto-summary

Step1: Configure static default route

Configure the default route as a static route on R2.

R2

ip route 0.0.0.0 0.0.0.0 192.168.12.1

Step2: Redistribute static routes to RIP

Redistribute the static route to RIP on R2 in order to make the default route as a RIP route.

R2

router rip
 redistribute static

When the redistribution source is static and connected, there is no need to specify a seed metric.

Step3: Verify default route

Verify that the default route is registered as a RIP route in the routing table on R3.

R3

R3#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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 192.168.23.2 to network 0.0.0.0

C    192.168.23.0/24 is directly connected, Ethernet0/0
C    192.168.3.0/24 is directly connected, Loopback0
R*   0.0.0.0/0 [120/1] via 192.168.23.2, 00:00:26, Ethernet0/0

Step4: Verify Communication

Execute ping from R3 to R1 to verify that communication is possible. Since there is a default route, the ping response will be returned successfully.

R3

R3#ping 172.16.1.1 source 192.168.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/20 ms
R3#ping 172.16.2.1 source 192.168.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/10/20 ms