网络通信 频道

方案:边界路由与ISP网络的负载共享

  2. 单台边界路由连接到单一ISP环境中的负载共享

  本场景展示了当在远程AS和本地AS之间存在多条链路时如何完成负载共享。链路建立在本地AS中的一个路由器和远程AS中的多个路由器之间。
  拓扑图如下:

  默认情况下BGP只从可能存在的等价路径中选择出一条非常好的的路径,通过命令maximum-path对可选择的等价路径数目(1~6)进行修改。
  配置如下:
  RouterA
  RouterA (config)#int s1/0

  RouterA (config-if)#ip add 160.20.20.1 255.255.255.0

  RouterA (config-if)#no sh

  RouterA (config)#int s1/2

  RouterA (config-if)#ip add 150.10.10.1 255.255.255.0

  RouterA (config-if)#no sh

  RouterA (config-if)#int lo0

  RouterA (config-if)#ip add 1.1.1.1 255.255.255.0

  RouterA (config-if)#router bgp 11

  RouterA (config-router)#network 1.0.0.0

  RouterA (config-router)#neighbor 150.10.10.2 remote-as 10

  RouterA (config-router)#neighbor 160.20.20.2 remote-as 10

  RouterA (config-router)#maximum-paths 2
  RouterB
  RourterB(config)#int s1/2

  RourterB(config-if)#ip add 160.20.20.2 255.255.255.0

  RourterB(config-if)#no sh

  RourterB(config-if)#int fa0/0

  RourterB(config-if)#ip add 2.2.2.1 255.255.255.0

  RourterB(config-if)#no sh

  RourterB(config)#router bgp 10

  RourterB(config-router)#network 2.0.0.0

  RourterB(config-router)#neighbor 160.20.20.1 remote-as 11

  RourterB(config-router)#auto-summary
  RouterC
  RourterB(config)#int s1/2

  RourterB(config-if)#ip add 150.10.10.2 255.255.255.0

  RourterB(config-if)#no sh

  RourterB(config-if)#int fa0/0

  RourterB(config-if)#ip add 2.2.2.2 255.255.255.0

  RourterB(config-if)#no sh

  RourterB(config)#router bgp 10

  RourterB(config-router)#network 2.0.0.0

  RourterB(config-router)#neighbor 150.10.10.1 remote-as 11

  RourterB(config-router)#auto-summary
  验证:
  RouterA# sh ip bgp
  BGP table version is 5, local router ID is 1.1.1.1
  Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
  Origin codes: i - IGP, e - EGP, ? - incomplete

  ? ?Network? ?? ?? ? Next Hop? ?? ?? ?? ?Metric LocPrf Weight Path
  *> 1.0.0.0? ?? ?? ? 0.0.0.0? ?? ?? ?? ?? ?? ?0? ?? ?? ?32768 i
  *> 2.0.0.0? ?? ?? ? 160.20.20.2? ?? ?? ?? ???0? ?? ?? ?? ? 0 10 i
  *? ?? ?? ?? ?? ?? ? 150.10.10.2? ?? ?? ?? ???0? ?? ?? ?? ? 0 10 i
  `````````````````````````````````````````````````````````````````````````````````````````
  RouterA#sh ip ro
  Gateway of last resort is not set

   1.0.0.0/24 is subnetted, 1 subnets
  C 1.1.1.0 is directly connected, Loopback0
  B  2.0.0.0/8 [20/0] via 150.10.10.2, 00:16:32
              [20/0] via 160.20.20.2, 00:15:47
   160.20.0.0/24 is subnetted, 1 subnets
  C  160.20.20.0 is directly connected, Serial1/0
   150.10.0.0/24 is subnetted, 1 subnets
  C   150.10.10.0 is directly connected, Serial1/2
  `````````````````````````````````````````````````````````````````````````````````````````
  RouterA#
  RouterA#traceroute 2.2.2.2

  Type escape sequence to abort.
  Tracing the route to 2.2.2.2

   1 150.10.10.2 64 msec
  160.20.20.2 92 msec *

  ``````````````````````````````````````````````````````````````````````````````````

0
相关文章