22-8
Cisco ASA 5500 Series Configuration Guide using the CLI
Chapter22 Configuring Static and Default Routes
Configuration Examples for Static or Default Routes
Configuration Examples for Static or Default Routes
The following example shows how to create a static route that sends all traffic destined for 10.1.1.0/24
to the router 10.1.2.45, which is connected to the inside interface, defines three equal cost static routes
that direct traffic to three different gateways on the outside interface, and adds a default route for
tunneled traffic. The ASA then distributes the traffic among the specified gateways:
hostname(config)# route inside 10.1.1.0 255.255.255.0 10.1.2.45 1
hostname(config)# route outside 10.10.10.0 255.255.255.0 192.168.2.1
hostname(config)# route outside 10.10.10.0 255.255.255.0 192.168.2.2
hostname(config)# route outside 10.10.10.0 255.255.255.0 192.168.2.3
hostname(config)# route outside 0 0 192.168.2.4 tunneled
Unencrypted traffic received by the ASA for which there is no static or learned route is distributed among
the gateways with the IP addresses 192.168.2.1, 192.168.2.2, and 192.168.2.3. Encrypted traffic received
by the ASA for which there is no static or learned route is passed to the gateway with the IP address
192.168.2.4.
The following example creates a static route that sends all traffic destined for 10.1.1.0/24 to the router
(10.1.2.45) connected to the inside interface:
hostname(config)# route inside 10.1.1.0 255.255.255.0 10.1.2.45 1
Feature History for Static and Default Routes
Table22-1 lists each feature change and the platform release in which it was implemented.
Example:
hostname(config)# interface phy_if
hostname(config-if)# dhcp client route
track track_id
hostname(config-if)# ip address dhcp
setroute
hostname(config-if)# exit
Tracks a default route obtained through DHCP,
Remember that you must use the setroute keyword with the ip
address dhcp command to obtain the default route using DHCP.
Example:
hostname(config)# interface phy_if
hostname(config-if)# pppoe client route
track track_id
hostname(config-if)# ip address pppoe
setroute
hostname(config-if)# exit
Tracks a default route obtained through PPPoE.
You must use the setroute keyword with the ip address pppoe
command to obtain the default route using PPPoE.
Command Purpose
Table22-1 Feature History for Static and Default Routes
Feature Name
Platform
Releases Feature Information
Routing 7.0(1) Static and default routing were introduced.
We introduced the route command.