【实验9.11.4d】 BGP对等体组【IEEEnjoy.L.ZH】

来源:互联网 发布:轩辕剑1 知乎 编辑:程序博客网 时间:2024/05/01 16:45

实验9.11.4d BGP对等体组

一、实验拓扑图:

二、具体实验:

 

实验需求:

ITAA是国际大型互联网技术培训中心,与之相连的有很多对等体,而这些对等体都是同等地位的,也就是说,对于这些对等体的邻居配置是相同的。所以为了简化配置过程,且便于管理,ITAA采用对等体组的配置方案。

 

基本配置:

R1:

SUB_A#sh run

Building configuration...

 

Current configuration : 1336 bytes

!

version 12.3

hostname SUB_A

 

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

!

interface Serial1/0

 ip address 10.0.0.1 255.255.255.0

 serial restart-delay 0

!

router bgp 100

 no synchronization

 bgp log-neighbor-changes

 network 1.1.1.0 mask 255.255.255.0

 neighbor 10.0.0.2 remote-as 200

 no auto-summary

!        

end

R2:

ITAA#sh run

Building configuration...

 

Current configuration : 1590 bytes

!

version 12.3

hostname ITAA

interface Loopback0

 ip address 2.2.2.2 255.255.255.0

!      

interface Serial1/0

 ip address 20.0.0.2 255.255.255.0

 serial restart-delay 0

!

interface Serial1/1

 ip address 10.0.0.2 255.255.255.0

 serial restart-delay 0

!

end

R3:

SUB_B#sh run

Building configuration...

 

Current configuration : 1295 bytes

!

version 12.3

hostname SUB_B

interface Serial1/1

 ip address 20.0.0.3 255.255.255.0

 serial restart-delay 0

!

router bgp 300

 no synchronization

 bgp log-neighbor-changes

 network 3.3.3.0 mask 255.255.255.0

 neighbor 20.0.0.2 remote-as 200

 no auto-summary

!       

end

 

连通性测试:

ITAA#ping 10.0.0.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 92/189/316 ms

ITAA#ping 20.0.0.3

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 20.0.0.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 24/105/200 ms

 

 

配置对等体组:

ITAA(config)#router bgp 200

ITAA(config-router)#bgp log-neighbor-changes

ITAA(config-router)#network 2.2.2.0 mask 255.255.255.0

ITAA(config-router)# neighbor GROUP peer-group

ITAA(config-router)# neighbor GROUP send-community

ITAA(config-router)# neighbor GROUP route-map LIMIT out

ITAA(config-router)# neighbor 10.0.0.1 remote-as 100

ITAA(config-router)# neighbor 10.0.0.1 peer-group GROUP

ITAA(config-router)# neighbor 20.0.0.3 remote-as 300

ITAA(config-router)# neighbor 20.0.0.3 peer-group GROUP

ITAA(config)#route-map LIMIT permit 10

ITAA(config)# set community 40

ITAA(config)#exit

 

对等体配置验证(客户端):

SUB_A#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,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*> 1.1.1.0/24       0.0.0.0                  0         32768 i

*> 2.2.2.0/24       10.0.0.2                 0             0 200 i

SUB_A#sh ip bgp 2.2.2.0

BGP routing table entry for 2.2.2.0/24, version 5

Paths: (1 available, best #1, table Default-IP-Routing-Table)

  Not advertised to any peer

  200

    10.0.0.2 from 10.0.0.2 (2.2.2.2)

      Origin IGP, metric 0, localpref 100, valid, external, best

      Community: 40

    重点突出的部分就是验证的结果,在ITAA的其他对等体上已经可以收到2.2.2.0的路由条目,并且团体属性值也为40.

对等体配置验证(ITAA发布端):

ITAA#sh ip bgp nei

BGP neighbor is 10.0.0.1,  remote AS 100, external link

 Member of peer-group GROUP for session parameters

  BGP version 4, remote router ID 1.1.1.1

 ……….

BGP neighbor is 20.0.0.3,  remote AS 300, external link

 Member of peer-group GROUP for session parameters

  BGP version 4, remote router ID 20.0.0.3

 ……….