3-12
Cisco 7600 Series Router Cisco IOS Software Configuration Guide, Release 12.2SX
OL-4266-08
Chapter 3 Configuring the Router for the First Time
Configuring the Router
Configuring a Default Gateway
Note
The router uses the default gateway only when it is not configured to route.
To send data to another subnet when the router is not configured with a routing protocol, configure a
default gateway. The default gateway must be the IP address of an interface on a router in the same
subnet.
To configure a default gateway, perform this task:
This example shows how to configure a default gateway and how to verify the configuration:
Router#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
ip default-gateway 172.20.52.35
Router(config)#
end
3d17h: %SYS-5-CONFIG_I: Configured from console by console
Router#
show ip route
Default gateway is 172.20.52.35
Host Gateway Last Use Total Uses Interface
ICMP redirect cache is empty
Router#
Configuring a Static Route
If your Telnet station or SNMP network management workstation is on a different network from your
router and a routing protocol has not been configured, you might need to add a static routing table entry
for the network where your end station is located.
To configure a static route, perform this task:
This example shows how to use the
ip route
command to configure a static route to a workstation at IP
address 171.10.5.10 on the router with a subnet mask and IP address 172.20.3.35 of the forwarding
router:
Router#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
ip route 171.10.5.10 255.255.255.255 172.20.3.35
Router(config)#
end
Router#
Command
Purpose
Step 1
Router(config)#
ip default-gateway
A.B.C.D
Configures a default gateway.
Step 2
Router#
show ip route
Verifies that the default gateway appears correctly in the
IP routing table.
Command
Purpose
Step 1
Router(config)#
ip route
dest_IP_address mask
{
forwarding_IP
|
vlan
vlan_ID
}
Configures a static route.
Step 2
Router#
show running-config
Verifies the static route configuration.