《电子技术应用》
您所在的位置:首页 > 通信与网络 > 设计应用 > 路由器SLA配置实例
路由器SLA配置实例
中国IT实验室
摘要: IP sla的功能是很强大的,这只是IP sla的一个小的功能。
关键词: SLA配置 路由器
Abstract:
Key words :

  IP sla的功能是很强大的,这只是IP sla的一个小的功能。
  举个例子,
  某公司拉了一条光纤专线,光纤进来后接收发器再接1841路由器,另外接了一条网通的线备份,正常情况下走电信,电信断了会走网通,通过浮动路由来实现,问题来了,如果电信的光纤在某个局点出了问题,但1841和收发器的连接是好的,即1841的连接电信的接口的1层2层全是OK的,那这时候是不会切换到网通的,如何实现备份呢???
  IP sla可以解决,一要路由可以track一个IP地址,可以通过向一个地址发送icmp包,如果尝试几次收不到回应后认为对方不存在,此路由失效。
  在1841上做的
  Building configuration...
  Current configuration : 1950
  bytes
  !
  version 12.4
  service timestamps debug datetime msec
  service
  timestamps log datetime msec
  service password-encryption
  !
  hostname
  !
  boot-start-marker
  boot-end-marker
  !
  logging buffered 4096
  debugging
  enable secret 5 $1$K9cw$ff4.SEldlX3TGV1x1qSdP0
  !
  no aaa
  new-model
  !
  resource policy
  !
  mmi polling-interval 60
  no mmi
  auto-configure
  no mmi pvc
  mmi snmp-timeout 180
  ip subnet-zero
  ip
  cef
  !
  !
  !
  !
  no ip domain
  lookup
  !-------------------------------------------------------------------------------------
建立 sla
  ip
  sla monitor 1
  type echo protocol ipIcmpEcho x.x.x.x
  request-data-size
  1400
  timeout 1000
  threshold 2
  frequency 3
  ip sla monitor schedule 1
  life forever start-time
  now
  !
  !
  !
  !
  !
  !
  !-------------------------------------------------------------------------------------
建立track
  track
  2 rtr 1
  !
  track 3 rtr 1
  reachability
  !
  !
  !
  !
  !
  !
  !
  !
  !
  interface
  FastEthernet0/0
  ip address x.x.x.x 255.255.255.252
  speed
  10
  half-duplex
  crypto map clientmap
  !
  interface
  FastEthernet0/1
  ip address 192.168.10.1 255.255.255.0
  duplex
  auto
  speed
  auto
  !-------------------------------------------------------------------------------------HSRP
  track
  standby 1 track 2
  standby 1 track 3
  !
  ip
  classless
  !-------------------------------------------------------------------------------------
路由
  track
  ip route 1.1.1.1 255.255.255.255 x.x.x.x track 2
  ip route 0.0.0.0
  0.0.0.0 x.x.x.x
  !
  ip http server
  no ip http
  secure-server
  !
  !-------------------------------------------------------------------------------------
策略路由
  track
  route-map test permit 10
  match ip address 1
  set ip next-hop
  verify-availability x.x.x.x 1 track
  2
  !
  !
  !
  control-plane
  !
  !
  line con 0
  line aux 0
  line
  vty 0 4
  exec-timeout 60 0
  password 7 104C0512030D0A4A464E
  login
  local
  !
  end

此内容为AET网站原创,未经授权禁止转载。