cisco c9300 config default route
- User
cisco c9300 config default route
Assistant
To configure a default route on a Cisco Catalyst 9300 switch, you can use the following commands in global configuration mode:
Method 1: Using
ip route(Static Default Route)enable configure terminal ip route 0.0.0.0 0.0.0.0 <next-hop-IP> [permanent] [tag <tag>] end write memory<next-hop-IP>: The IP address of the next-hop router (e.g.,192.168.1.1).permanent(optional): Keeps the route in the routing table even if the next hop is unreachable.tag <tag>(optional): Assigns an administrative tag to the route.
Example:
enable configure terminal ip route 0.0.0.0 0.0.0.0 192.168.1.1 end write memoryMethod 2: Using an Exit Interface (Instead of Next-Hop IP)
If you want to specify an exit interface instead of a next-hop IP:
ip route 0.0.0.0 0.0.0.0 <exit-interface><exit-interface>: The interface leading to the next-hop router (e.g.,GigabitEthernet1/0/1).
Example:
enable configure terminal ip route 0.0.0.0 0.0.0.0 GigabitEthernet1/0/1 end write memoryVerification:
To check if the default route is configured correctly:
show ip routeLook for an entry like:
Gateway of last resort is 192.168.1.1 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 192.168.1.1Notes:
- Ensure the switch has IP routing enabled (if not already):
configure terminal ip routing end - If using VRFs, specify the VRF name:
ip route vrf <VRF-Name> 0.0.0.0 0.0.0.0 <next-hop>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.