3-12
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter3 Configuring the Switch for the First Time
Configuring the Switch
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 switch with a subnet mask and IP address 172.20.3.35 of the forwarding
router:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip route 171.10.5.10 255.255.255.255 172.20.3.35
Switch(config)# end
Switch#
This example shows how to use the show running-config command to confirm the configuration of the
static route:
Switch# show running-config
Building configuration...
.
<...output truncated...>
.
ip default-gateway 172.20.52.35
ip classless
ip route 171.10.5.10 255.255.255.255 172.20.3.35
no ip http server
!
line con 0
transport input none
line vty 0 4
exec-timeout 0 0
password lab
login
transport input lat pad dsipcon mop telnet rlogin udptn nasi
!
end
Switch#
This example shows how to use the ip route command to configure the static route IP address 171.20.5.3
with subnet mask and connected over VLAN 1 to a workstation on the switch:
Switch# configure terminal
Switch(config)# ip route 171.20.5.3 255.255.255.255 vlan 1
Switch(config)# end
Switch#
This example shows how to use the show running-config command to confirm the configuration of the
static route:
Switch# show running-config
Building configuration...
.
<...output truncated...>
.
Command Purpose
Step1 Switch(config)# ip route
dest_IP_address mask
{
forwarding_IP
| vlan
vlan_ID
}
Configures a static route to the remote network.
Step2 Switch# show running-config Verifies that the static route is displayed correctly.