这是一个好的网络配置吗?

网络工程 思科 路由器 纳特 跟踪路由 访问控制
2022-02-09 20:34:12

我正在尝试为非定向链接配置 ip sla。我已配置静态路由以到达非定向链接

1 configured track
2 configured ip sla
3 configured access-list
4 configured NAT
5 configured Event Manager (eem)

在此处输入图像描述

使可达性

  ip route 1.1.1.0 255.255.255.252 Serial4/1 //to reachable the ip sla ping to 1.1.1.0

ip SLA 配置

  track 88 ip sla 44 reachability
  ip sla 44
  icmp-echo 1.1.1.1
  frequency 5
  ip sla schedule 44 life forever start-time now

轨道配置

  track 88 ip sla 44 reachability
  ip route 0.0.0.0 0.0.0.0 10.0.0.2 track 88
  ip route 0.0.0.0 0.0.0.0 20.0.0.2 10

访问列表配置

  access-list 100 permit ip 192.168.8.0 0.0.0.255 any

事件管理器配置

      event manager applet abc
      event track 88 state up
      action 1   cli command "enable"
      action 1.1 cli command " clear ip nat translation * "
      action 2   cli command "config t"
      action 3   cli command " no ip nat insid source list 100 int 4/0 over"
      action 4   cli command "ip nat inside source list 100 int s4/1 over"
      action 5   syslog msg "track up"

     event manager applet abcd
     event track 88 state down
     action 1   cli command "enable"
     action 1.1 cli command " clear ip nat translation * "
     action 2   cli command "config t"
     action 3   cli command "no ip nat inside source list 100 int s4/1 over"
     action 4   cli command "ip nat inside source list 100 int s4/0 over"
     action 5   syslog msg "track down"

请向我推荐这个配置,它运行完美,但我有点困惑,它会更长。或者你可以建议我更好的方法谢谢。

1个回答

有几件事:

  1. 您不需要 eem 脚本。您可以配置两种转换,数据包将根据使用的接口正确转换。
  2. 根据故障情况,可以通过 R3-R4 访问 1.1.1.1。因此,您的 SLA 将不断上下波动。
  3. 您还可以在路由器上运行路由协议,这将消除对 IP SLA 的需求。