【bgp综合小实验】

题目要求

 

ip地址规划 

R1:

R2:
R3:

R4:

R5:
R6:

R7:

R8:

配置IBGP
R2:
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r2-ospf-1-area-0.0.0.0]int lo1
[r2-LoopBack1]ospf network-type broadcast

R3:

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r3-ospf-1-area-0.0.0.0]int lo1
[r3-LoopBack1]ospf network-type broadcast

R4:

[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r4-ospf-1-area-0.0.0.0]int lo1
[r4-LoopBack1]ospf network-type broadcast

R5:

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r5-ospf-1-area-0.0.0.0]int lo1
[r5-LoopBack1]ospf network-type broadcast

R6:

[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r6-ospf-1-area-0.0.0.0]int lo1
[r6-LoopBack1]ospf network-type broadcast

R7:

[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r7-ospf-1-area-0.0.0.0]int lo1
[r7-LoopBack1]ospf network-type broadcast

配置BGP与联邦BGP
R1:

[r1]bgp 1
[r1-bgp]router-id 1.1.1.1

[r1-bgp]peer 12.1.1.2 as-number 2

R2:

[r2]bgp 64512
[r2-bgp]router-id 2.2.2.2
[r2-bgp]confederation id 2

[r2-bgp]peer 12.1.1.1 as-number 1
[r2-bgp]confederation peer-as 64513
[r2-bgp]undo peer 172.16.3.1
[r2-bgp]peer 172.16.1.3 as-number 64512
[r2-bgp]peer 172.16.1.3 connect-interface LoopBack 0
[r2-bgp]peer 172.16.1.5 as-number 64513
[r2-bgp]peer 172.16.1.5 connect-interface LoopBack 0
[r2-bgp]peer 172.16.1.5 ebgp-max-hop 2

R3:

[r3]bgp 64512
[r3-bgp]router-id 3.3.3.3
[r3-bgp]confederation id 2
[r3-bgp]peer 172.16.1.2 as-number 64512
[r3-bgp]peer 172.16.1.2 connect-interface LoopBack 0
[r3-bgp]peer 172.16.1.4 as-number 64512
[r3-bgp]peer 172.16.1.4 connect-interface LoopBack 0

R4:

[r4]bgp 64512
[r4-bgp]router-id 4.4.4.4
[r4-bgp]confederation id 2
[r4-bgp]confederation peer-as 64513
[r4-bgp]peer 172.16.1.3 as-number 64512
[r4-bgp]peer 172.16.1.3 connect-interface LoopBack 0
[r4-bgp]peer 172.16.1.7 as-number 64513
[r4-bgp]peer 172.16.1.7 connect-interface LoopBack 0
[r4-bgp]peer 172.16.1.7 ebgp-max-hop 2

R5:

[r5]bgp 64513
[r5-bgp]router-id 5.5.5.5
[r5-bgp]confederation id 2
[r5-bgp]confederation peer-as 64512
[r5-bgp]peer 172.16.1.2 as-number 64512
[r5-bgp]peer 172.16.1.2 connect-interface LoopBack 0
[r5-bgp]peer 172.16.1.2 ebgp-max-hop 2
[r5-bgp]peer 172.16.1.6 as-number 64513
[r5-bgp]peer 172.16.1.6 connect-interface LoopBack 0

R6:

[r6]bgp 64513
[r6-bgp]router-id 6.6.6.6
[r6-bgp]confederation id 2
[r6-bgp]peer 172.16.1.5 as-number 64513
[r6-bgp]peer 172.16.1.5 connect-interface LoopBack 0
[r6-bgp]peer 172.16.1.7 as-number 64513
[r6-bgp]peer 172.16.1.7 connect-interface LoopBack 0

R7:

[r7]bgp 64513
[r7-bgp]router-id 7.7.7.7
[r7-bgp]confederation id 2
[r7-bgp]peer 172.16.1.6 as-number 64513
[r7-bgp]peer 172.16.1.6 connect-interface LoopBack 0
[r7-bgp]confederation peer-as 64512
[r7-bgp]peer 172.16.1.4 as-number 64512
[r7-bgp]peer 172.16.1.4 connect-interface LoopBack 0
[r7-bgp]peer 172.16.1.4 ebgp-max-hop 2
[r7-bgp]peer 78.1.1.2 as-number 3

R8:

[r8]bgp 3
[r8-bgp]router-id 8.8.8.8
[r8-bgp]peer 78.1.1.1 as-number 2

宣告r1和r8的环回
R1:
[r1]bgp 1
[r1-bgp]network 1.1.1.0 24

R2:
[r2]bgp 64512
[r2-bgp]peer 172.16.1.3 next-hop-local
[r2-bgp]peer 172.16.1.5 next-hop-local

R8:
[r8]bgp 3
[r8-bgp]network 8.8.8.0 24

R7:
[r7]bgp 64513
[r7-bgp]peer 172.16.1.6 next-hop-local
[r7-bgp]peer 172.16.1.4 next-hop-local
此时因为IBGP的水平分割,只有R3R6有两条路由,所以我们还要再设置
RR反射器

设置RR反射器
[r3-bgp]peer 172.16.1.2 reflect-client
[r6-bgp]peer 172.16.1.7 reflect-client

汇总减少路由条目
R2:
[r2]ip route-static 172.16.0.0 21 NULL 0
[r2]bgp 64512
[r2-bgp]network 172.16.0.0 21

R7:
[r7]ip route-static 172.16.0.0 21 NULL 0
[r7]bgp 64513
[r7-bgp]network 172.16.0.0 21

 

 测试

 

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值