To configure an edge router with a static default route (gateway of last resort) and have it automatically shared within RIP, the network administrator should do the following:
-
Configure the static default route on the edge router pointing to the external gateway. For example:
ip route 0.0.0.0 0.0.0.0 <next-hop-ip>
or on EdgeRouter CLI:
set protocols static route 0.0.0.0/0 next-hop <gateway-address> distance 1
commit; save
-
Enable RIP routing protocol on the router and include the relevant internal networks with the
network
command. -
Redistribute the static route into RIP so that the default route is advertised to RIP neighbors. This is done by adding the command:
redistribute static
inside the RIP routing configuration.
- Optionally, use the
passive-interface
command on the interface connected to the external network to prevent RIP updates from being sent out that interface.
Alternatively, in Cisco IOS, the command:
default-information originate
can be used within the RIP configuration to instruct the router to advertise the default static route.
Summary of key commands (Cisco IOS style):
ip route 0.0.0.0 0.0.0.0 <next-hop-ip>
router rip
version 2
network <internal-network>
redistribute static
passive-interface <external-interface>
default-information originate
This setup ensures that the static default route configured on the edge router is propagated automatically within RIP to internal routers, allowing them to use the edge router as the gateway of last resort
. For EdgeRouter (Ubiquiti) specifically, static routes are configured under the static routing section, and RIP redistribution of static routes would be done via CLI commands similar to Cisco's redistribute static in RIP configuration
. In brief:
To share a static default route within RIP, configure the static default
route, enable RIP, and use redistribute static
or default-information originate
in the RIP configuration on the edge router. This will propagate
the gateway of last resort to RIP neighbors automatically.