BGP基础实验

EBGP直连邻居建立

[R1]bgp 1

[R1-bgp]route-select

[R1-bgp]router-id 1.1.1.1

[R1-bgp]peer  12.0.0.2 as-number 2

对AS2进行OSPF配置,确保AS内部形成通路

[R2]ospf 1 router-id 2.2.2.2

[R2-ospf-1]area 0

[R2-ospf-1-area-0.0.0.0]network 23.0.0.0 0.0.0.255

[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

[R2]bgp 2

[R2-bgp]router-id 2.2.2.2

[R2-bgp]peer 12.0.0.1 as-number 1

进行IBGP对等体之间,使用环回接口建邻

[R4]bgp 2

[R4-bgp]router-id 4.4.4.4

[R4-bgp]peer 45.0.0.2 as-number 3

[R3-bgp]peer 2.2.2.2 connect-interface  LoopBack 0

[R3-bgp]peer 4.4.4.4 connect-interface LoopBack 0

[R5]bgp 3

[R5-bgp]router-id 5.5.5.5

[R5-bgp]peer 45.0.0.1 as-number 2

 

 

[R1-bgp]network 1.1.1.0 24

[R2-bgp]peer 3.3.3.3 next-hop-local

[R2-bgp]peer 4.4.4.4 next-hop-local

[R5]int l0

[R5-LoopBack0]ip add 10.0.0.1 24

[R5-LoopBack0]q

[R5]bgp 3

[R5-bgp]network 10.0.0.0 24

[R4-bgp]peer 3.3.3.3 next-hop-local

[R4-bgp]peer 2.2.2.2 next-hop-local

 

 

 [R1]int l1

[R1-LoopBack1]ip add 172.16.0.1 24

[R1-LoopBack1]int l2

[R1-LoopBack2]ip add 172.16.1.1 24

[R1]ip ip-prefix aa permit  172.16.0.0 16 greater-equal 24 less-equal  24

[R1]route-policy aa permit  node  10

[R1-route-policy]if-match ip-prefix aa

[R1-bgp]import-route direct  route-policy  aa

 

[R4]ip ip-prefix aa permit  172.16.0.0 24

[R4]route-policy aa permit  node  10

Info: New Sequence of this List.

[R4-route-policy]if-match ip-prefix aa

[R4]bgp 2

[R4-bgp]aggregate 172.16.0.0 23 suppress-policy  aa

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值