拓扑图如下:

spacer.gifimage.png

实验目的:RI 和 R3互通


首先当然是配置IP啦~

R1:

spacer.gifimage.png

R2:

spacer.gifimage.png

R3:

spacer.gifimage.png


OSPF宣告:

R1:

spacer.gifimage.png

R2:

spacer.gifimage.png

R3:

spacer.gifimage.png



R1:

  bgp 64512

  confederation id 200  # BGP联盟的号码,表示的是 大AS

  peer 10.10.2.2 as-number 64512

  peer 10.10.2.2 connect-interface loopback 10

(在此处用OSPF声明本地IP以及lo 0;并用BGP声明lo 100)

spacer.gifimage.png

  

R2:

  bgp 64512

  confederation id 200

  confederation peer-as 64513

  peer 10.10.1.1 as-number 64512  #与R1为内部邻居,所以使用小AS

  peer 10.10.1.1 connect-interface loopback 0

  

  peer 10.10.3.3 as-number 64513  #联盟内部的特殊的外部邻居,使用小AS

  peer 10.10.3.3 connect-interface loopback 0

  peer 10.10.3.3 ebgp-max-hop

  spacer.gifimage.png

(在此处用OSPF声明本地IP及lo 0)

  peer 192.168.24.4  as-number 400  # 此时与R4建立邻居使用的是大AS

  

R3:

  bgp 64513

  confederation id 200

  confederation peer-as 64512

  peer 10.10.2.2 as-number 64512

  peer 10.10.2.2 connect-interface loopback 10

  peer 10.10.2.2 ebgp-max-hop  

(在此处用OSPF声明本地IP以及lo 0;并用BGP声明lo 200)

spacer.gifimage.png



验证,测试:

spacer.gifimage.png

spacer.gifimage.png

spacer.gifimage.png