Leaflet
11-45
思科 ASA 系列命令参考,A 至 H 命令
第 11 章 database path 至 dhcp-server 命令
dhcp client route distance
dhcp client route distance
要为通过 DHCP 获知的路由配置管理距离,请在接口配置模式下使用 dhcp client route distance
命令。要恢复默认设置,请使用此命令的 no 形式。
dhcp client route distance distance
no dhcp client route distance distance
语法说明
默认值 默认情况下,为通过 DHCP 获知的路由提供的管理距离为 1。
命令模式 下表展示可输入此命令的模式:
命令历史
使用指南 仅当从 DHCP 获知路由时,才检查 dhcp client route distance 命令。如果在从 DHCP 获知路由后
输入 dhcp client route distance 命令,则指定的管理距离不影响现有已获知的路由。仅输入该命
令后获知的路由才具有指定的管理距离。
必须在 ip address dhcp 命令中指定 setroute 选项才可通过 DHCP 获取路由。
如果已在多个接口上配置 DHCP,则您必须在每个接口上使用 dhcp client route distance 命令来指
示已安装路由的优先级。
示例 以下示例在千兆位以太网 0/2 接口上通过 DHCP 获得默认路由。通过跟踪条目对象 1 可跟踪路
由。SLA 操作可监控外部接口外 10.1.1.1 网关的可用性。如果 SLA 操作失败,则会在
GigabitEthernet0/3 上使用通过 DHCP 获取的备用路由。为备用路由分配的管理距离为 254。
ciscoasa(config)# sla monitor 123
ciscoasa(config-sla-monitor)# type echo protocol ipIcmpEcho 10.1.1.1 interface outside
ciscoasa(config-sla-monitor-echo)# timeout 1000
ciscoasa(config-sla-monitor-echo)# frequency 3
ciscoasa(config)# sla monitor schedule 123 life forever start-time now
ciscoasa(config)# track 1 rtr 123 reachability
ciscoasa(config)# interface GigabitEthernet0/2
ciscoasa(config-if)# dhcp client route track 1
ciscoasa(config-if)# ip address dhcp setroute
distance
应用于通过 DHCP 获知的路由的管理距离。有效值为从 1 到 255。
命令模式
防火墙模式 安全情景
路由 透明 单个
多个
情景 系统
接口配置
• 是
—
• 是
— —
版本 修改
7.2(1)
引入了此命令。