BGP 综合大实验

一、IP配置

R1:

R2:

R3:

R4:

R5:

R6:

R7:

R8:

二、OSPF

LSDB表:

三、BGP建邻

R1:

[R1]bgp 1

[R1-bgp]peer 12.1.1.2 as-number 2

R2:

[R2]bgp 64512    
[R2-bgp]confederation id 2
[R2-bgp]confederation peer-as 64513    
[R2-bgp]peer 12.1.1.1 as-number 1        
[R2-bgp]peer 3.3.3.3 as-number 64512
[R2-bgp]peer 3.3.3.3 connect-interface  l0 
[R2-bgp]peer 3.3.3.3 next-hop-local     
[R2-bgp]peer 5.5.5.5 as-number 64513    
[R2-bgp]peer 5.5.5.5 connect-interface  l0
[R2-bgp]peer 5.5.5.5 next-hop-local 
[R2-bgp]peer 5.5.5.5 ebgp-max-hop

R3:


[R3]bgp 64512    
[R3-bgp]confederation id 2    
[R3-bgp]peer 2.2.2.2 as-number 64512
[R3-bgp]peer 2.2.2.2 connect-interface l0    
[R3-bgp]peer 4.4.4.4 as-number 64512    
[R3-bgp]peer 4.4.4.4 connect-interface l0

R4:

[R4]bgp 64512

[R4-bgp]con

[R4-bgp]confederation id 2

[R4-bgp]peer 3.3.3.3 as-number 64512

[R4-bgp]peer 3.3.3.3 connect-interface l0

R5:

[R5]bgp 64513
[R5-bgp]confederation id  2
[R5-bgp]confederation peer-as 64512    
[R5-bgp]peer 2.2.2.2 as-number 64512
[R5-bgp]peer 2.2.2.2 connect-interface  l0    
[R5-bgp]peer 2.2.2.2 next-hop-local    
[R5-bgp]peer 2.2.2.2 ebgp-max-hop     
[R5-bgp]peer 6.6.6.6 as-number 64513
[R5-bgp]peer 6.6.6.6 connect-interface  l0        
[R5-bgp]peer 6.6.6.6 next-hop-local

R6:

[R6]bgp 64513    
[R6-bgp]peer 5.5.5.5 as-number 64513    
[R6-bgp]peer 5.5.5.5 connect-interface l0    
[R6-bgp]confederation id 2    
[R6-bgp]peer 7.7.7.7 as-number 64513    
[R6-bgp]peer 7.7.7.7 connect-interface  l0

R7:

[R7]bgp 64513
[R7-bgp]confederation id 2    
[R7-bgp]peer 6.6.6.6 as-number 64513    
[R7-bgp]peer 6.6.6.6 connect-interface l0
[R7-bgp]peer 6.6.6.6 next-hop-local    
[R7-bgp]peer 34.1.1.2 as-number 3

R8:

[R8]bgp 3

[R8-bgp]peer 34.1.1.1 as-number 2

四、宣告环回:

[R1-bgp]net 1.1.1.1 32

[R8-bgp]net 8.8.8.8 32

五、设置反射器

[R3-bgp]peer 4.4.4.4 reflect-client

[R6-bgp]peer 7.7.7.7 reflect-client

六、宣告业务网段

[R3-bgp]net 172.16.3.0 24

[R4-bgp]net 172.16.4.0 24

[R5-bgp]net 172.16.5.0 24

[R6-bgp]net 172.16.6.0 24

[R7-bgp]net 172.16.7.0 24

七、手动聚合路由


[R3-bgp]aggregate 172.16.0.0 16 detail-suppressed 
 
[R4-bgp]aggregate 172.16.0.0 16 detail-suppressed
 
[R5-bgp]aggregate 172.16.0.0 16 detail-suppressed 
 
[R6-bgp]aggregate 172.16.0.0 16 detail-suppressed 
 
[R7-bgp]aggregate 172.16.0.0 16 detail-suppressed

八、防环

[R3]ip route-static 172.16.0.0 16 NULL 0
 
[R4]ip route-static 172.16.0.0 16 NULL 0
 
[R5]ip route-static 172.16.0.0 16 NULL 0
 
[R6]ip route-static 172.16.0.0 16 NULL 0
 
[R7]ip route-static 172.16.0.0 16 NULL 0

九、利用隧道让R1和R8的业务网段ping通

   
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre     
[R1-Tunnel0/0/0]source 1.1.1.1
[R1-Tunnel0/0/0]destination 8.8.8.8
 
[R8]int Tunnel 0/0/0
[R8-Tunnel0/0/0]ip add 10.1.1.2 24
[R8-Tunnel0/0/0]tunnel-protocol gre     
[R8-Tunnel0/0/0]source 8.8.8.8
[R8-Tunnel0/0/0]destination 1.1.1.1
 
[R1]ip route-static 192.168.2.0 24 10.1.1.2
[R8]ip route-static 192.168.1.0 24 10.1.1.1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值