Cisco WS-C4003 Software Guide - Page 347
Configuring Static Routes
View all Cisco WS-C4003 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 347 highlights
Chapter 26 Administering the Switch Configuring Static Routes Console> (enable) show arp ARP Aging time = 300 sec + - Permanent Arp Entries * - Static Arp Entries + 10.1.1.1 * 20.1.1.1 Console> (enable) Configuring Static Routes at 00-80-1c-93-80-60 on vlan 1 at 00-80-1c-93-80-40 on vlan 1 Note For information on configuring a default gateway (default route), see the "Configuring Default Gateways" section on page 3-7. In some situations, you might need to add a static routing table entry for one or more destination networks. Static route entries consist of the destination IP network address, the IP address of the next-hop router, and the metric (hop count) for the route. In software release 5.1 and later releases, you can configure Classless InterDomain Routing (CIDR) routes, such as IP supernets, in the switch IP routing table. You can specify the subnet mask for a destination network using the number of subnet bits or using the subnet mask in dotted decimal format. If no subnet mask is specified, the default (classful) mask is used. The switch uses the longest-match network address in the IP routing table to determine which gateway to use to forward IP traffic. In releases prior to software release 5.1, the switch always uses the classful subnet mask for IP routing table entries. The switch forwards IP traffic generated by the switch using the longest address match in the IP routing table. The switch does not use the IP routing table to forward traffic from connected devices, only to forward IP traffic generated by the switch itself (for example, Telnet, TFTP, and ping). In software releases prior to software release 5.1, the classful subnet mask is always used (you cannot specify the subnet mask for the destination network). To configure a static route, perform this task in privileged mode: Step 1 Step 2 Task Command Configure a static route to the remote network. set ip route destination[/netmask] gateway [metric] Verify that the static route appears correctly in the show ip route IP routing table. This example shows how to configure a static route on the switch and how to verify that the route is configured properly in the routing table: Console> (enable) set ip route 172.16.16.0/20 172.20.52.127 Route added. Console> (enable) show ip route Fragmentation Redirect Unreachable enabled enabled enabled The primary gateway: 172.20.52.121 Destination Gateway RouteMask Flags ----- Use Interface 78-12647-02 Software Configuration Guide-Catalyst 4000 Family, Catalyst 2948G, Catalyst 2980G, Releases 6.3 and 6.4 26-9