Syntax: default-router [ip-address]
Usage: The default-router command is used to configure a default router for a Cisco router. The default router is the router that the router will use to forward packets that are not destined for any of the directly connected networks.
Effect: The default-router command adds the specified IP address to the routing table as a default route. This means that the router will send any packets that are not destined for any of the directly connected networks to the specified router.
Equipment: The default-router command can be used on all Cisco routers.
Configuration: To configure a default router, enter the following command in configuration mode:
default-router [ip-address]
For example, to configure the router to use the router with the IP address 10.0.0.1 as the default router, enter the following command:
default-router 10.0.0.1
Verification: To verify that the default router has been configured correctly, enter the following command in privileged EXEC mode:
show ip route
The output of the show ip route command will include a route to the default router. The route to the default router will have a destination of 0.0.0.0 and a next hop of the IP address of the default router.
Troubleshooting: If you are having problems configuring a default router, check the following:
- Make sure that the IP address of the default router is correct.
- Make sure that the default router is reachable from the router.
- Make sure that the default route is not being overridden by a more specific route.
default-router [ip address] Usage Examples
Thedefault-router [ip address]
command specifies the IP address of the default next-hop router to use for forwarding packets outside of the local network. This command can be used on the following interfaces:
- Ethernet
- ATM
- Frame Relay
- PPP
- Serial
- ISDN
The following are examples of thedefault-router [ip address]
command:
- To specify the default router IP address on Ethernet interface
Ethernet0/1
:interface Ethernet0/1 default-router 192.168.1.254
- To specify the default router IP address on ATM interface
ATM0/1
:interface ATM0/1 default-router 172.16.1.254
- To specify the default router IP address on Frame Relay interface
Frame-Relay0/1
:interface Frame-Relay0/1 default-router 10.0.0.254
- To specify the default router IP address on PPP interface
PPP0
:interface PPP0 default-router 203.0.113.1
- To specify the default router IP address on Serial interface
Serial0/0
:interface Serial0/0 default-router 192.0.2.254
- To specify the default router IP address on ISDN interface
ISDN0
:interface ISDN0 default-router 192.168.2.254