Cisco WS-C2960-24PC-L Software Guide - Page 51
Command, Step 1
UPC - 882658169328
View all Cisco WS-C2960-24PC-L manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 51 highlights
Chapter 3 Configuring the Switch IP Address and Default Gateway Configuring Default Gateways Note In some cases, you might want to configure static IP routes in addition to default gateways. For information on configuring static routes, see the "Configuring Static Routes" section on page 27-9. You can define up to three default IP gateways. Use the primary keyword to make a gateway the primary gateway. If you do not specify a primary default gateway, the first gateway that is configured is the primary gateway. If more than one gateway is designated as primary, the last primary gateway that is configured is the primary default gateway. The switch sends all off-network IP traffic to the primary default gateway. If connectivity to the primary gateway is lost, the switch attempts to use the backup gateways in the order they were configured. The switch sends periodic ping messages to determine whether each default gateway is up or down. If connectivity to the primary gateway is restored, the switch resumes sending traffic to the primary. If both the in-band (sc0) and management Ethernet (me1) interfaces are configured when you specify default gateways, then the switch software automatically determines through which interface each default gateway can be reached. To specify one or more default gateways, perform this task in privileged mode: Step 1 Step 2 Step 3 Task Command Configure a default IP gateway address for the set ip route default gateway [metric] [primary] switch. (Optional) Configure additional default gateways set ip route default gateway [metric] [primary] for the switch. Verify that the default gateways appear correctly show ip route in the IP routing table. To remove default gateway entries, perform one of these tasks in privileged mode: Task Clear an individual default gateway entry. Clear all default gateways and static routes. Command clear ip route default gateway clear ip route all This example shows how to configure three default gateways on the switch and how to verify the default gateway configuration: Console> (enable) set ip route default 10.1.1.10 Route added. Console> (enable) set ip route default 10.1.1.20 Route added. Console> (enable) set ip route default 10.1.1.1 primary Route added. Console> (enable) show ip route Fragmentation Redirect Unreachable enabled enabled enabled The primary gateway: 10.1.1.1 Destination Gateway default 10.1.1.1 default 10.1.1.20 RouteMask ---------0x0 0x0 Flags ----UG G Use -------6 0 Interface --------- sc0 sc0 78-15486-01 Catalyst 4500 Series, Catalyst 2948G, Catalyst 2980G Switches Software Configuration Guide-Release 8.1 3-7