Configuring Default Gateways - Cisco WS-C4003 - Catalyst 4000 Chassis Switch Software Configuration Manual

Software guide
Table of Contents

Advertisement

Chapter 3
Configuring the Switch IP Address and Default Gateway

Configuring Default Gateways

The supervisor engine sends IP packets destined for other IP subnets to the default gateway (typically a
router interface in the same network or subnet as the switch IP address). The switch does not use the IP
routing table to forward traffic from connected devices, only IP traffic generated by the switch itself (for
example, Telnet, TFTP, and ping).
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
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 configured is the primary
gateway. If more than one gateway is designated as primary, the last primary gateway 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 when, 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:
Task
Step 1
Configure a default IP gateway address for the
switch.
Step 2
(Optional) Configure additional default gateways
for the switch.
Step 3
Verify that the default gateways appear correctly
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.
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
78-12647-02
Redirect
Unreachable
Software Configuration Guide—Catalyst 4000 Family, Catalyst 2948G, Catalyst 2980G, Releases 6.3 and 6.4
"Configuring Static Routes" section on page
Command
set ip route default gateway [metric] [primary]
set ip route default gateway [metric] [primary]
show ip route
Command
clear ip route default gateway
clear ip route all
Configuring Default Gateways
26-9.
3-7

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 4000 seriesCatalyst 2948gCatalyst 2980g

Table of Contents