实验五、BGP

一、要求

二、拓扑图

三、步骤

1.划分子网

2.配置IP地址

3.配置OSPF

4.建邻

5.在R2更改R3、R5下一跳为R2;将R3、R6设为反射器(RR)

6.在R7上更改R4、R6下一跳为R7

7.减少路由条目(汇总)

8.将R1、R8的192.168.0.0 部分网段做通(gre)

四、具体

1.划分子网

172.16.0.0/16

  • 172.16.0.0/17
    • 172.16.0.0/30
    • 172.16.0.4/30
    • 172.16.0.8/30
    • 172.16.0.12/30
    • 172.16.0.16/30
    • 172.16.0.20/30
  • 172.16.128.0/17
    • 172.16.128.0/20
    • 172.16.144.0/20
    • 172.16.160.0/20
    • 172.16.176.0/20
    • 172.16.192.0/20
    • 172.16.208.0/20

2.配置IP地址

3.配置OSPF

[r2-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255

4.建邻

1)R1、R2;R7、R8直连EBGP建邻

2)IBGP建邻

声明小AS

[r2]bgp 64512

[r2-bgp]router-id 2.2.2.2

[r2-bgp]confederation id 2

AS1建邻

[r2-bgp]peer 12.1.1.1 as-number 1

R3建邻

[r2-bgp]peer 172.16.144.1 as-number 64512

[r2-bgp]peer 172.16.144.1 connect-interface LoopBack 0

告知与联邦建邻

[r2-bgp]confederation peer-as 64513

R5EBGP建邻

[r2-bgp]peer 172.16.176.1 as-number 64513

[r2-bgp]peer 172.16.176.1 connect-interface LoopBack 0

[r2-bgp]peer 172.16.176.1 ebgp-max-hop 2

声明小AS

[r3]bgp 64512

[r3-bgp]router-id 3.3.3.3

[r3-bgp]confederation id 2

R2建邻

[r3-bgp]peer 172.16.128.1 as-number 64512

[r3-bgp]peer 172.16.128.1 connect-interface LoopBack 0

2.2.2.2成为本地的客户端,同时本地成为RR

[r3-bgp]peer 172.16.128.1 reflect-client

R4建邻

[r3-bgp]peer 172.16.160.1 as-number 64512

[r3-bgp]peer 172.16.160.1 connect-interface LoopBack 0

声明小AS

[r4]bgp 64512

[r4-bgp]router-id 4.4.4.4

[r4-bgp]confederation id 2

R3建邻

[r4-bgp]peer 172.16.144.1 as-number 64512

[r4-bgp]peer 172.16.144.1 connect-interface LoopBack 0

告知与联邦建邻

[r4-bgp]confederation peer-as 64513

R7EBGP建邻

[r4-bgp]peer 172.16.208.1 as-number 64513

[r4-bgp]peer 172.16.208.1 connect-interface LoopBack 0

[r4-bgp]peer 172.16.208.1 ebgp-max-hop 2

声明小AS

[r5]bgp 64513

[r5-bgp]router-id 5.5.5.5

[r5-bgp]confederation id 2

告知与联邦建邻

[r5-bgp]confederation peer-as 64512

R2EBGP建邻

[r5-bgp]peer 172.16.128.1 as-number 64512

[r5-bgp]peer 172.16.128.1 connect-interface LoopBack 0

[r5-bgp]peer 172.16.128.1 ebgp-max-hop 2

R6建邻

[r5-bgp]peer 172.16.192.1 as-number 64513

[r5-bgp]peer 172.16.192.1 connect-interface LoopBack 0

声明小AS

[r6]bgp 64513

[r6-bgp]router-id 6.6.6.6

[r6-bgp]confederation id 2

R5建邻

[r6-bgp]peer 172.16.176.1 as-number 64513

[r6-bgp]peer 172.16.176.1 connect-interface LoopBack 0

5.5.5.5成为本地的客户端,同时本地成为RR

[r6-bgp]peer 172.16.176.1 reflect-client

R7建邻

[r6-bgp]peer 172.16.208.1 as-number 64513
[r6-bgp]peer 172.16.208.1 connect-interface LoopBack 0

声明小AS

[r7]bgp 64513

[r7-bgp]router-id 7.7.7.7

[r7-bgp]confederation id 2

R6建邻

[r7-bgp]peer 172.16.192.1 as-number 64513

[r7-bgp]peer 172.16.192.1 connect-interface LoopBack 0

告知与联邦建邻

[r7-bgp]confederation peer-as 64512

R4EBGP建邻

[r7-bgp]peer 172.16.160.1 as-number 64512

[r7-bgp]peer 172.16.160.1 connect-interface LoopBack 0

[r7-bgp]peer 172.16.160.1 ebgp-max-hop 2

AS3建邻

[r7-bgp]peer 23.1.1.2 as-number 3

5.在R2更改R3、R5下一跳为R2;

[r2-bgp]peer 172.16.144.1 next-hop-local

[r2-bgp]peer 172.16.176.1 next-hop-local

变化

将R3、R6设为反射器(RR)

[r3-bgp]peer 2.2.2.2 reflect-client

[r6-bgp]peer 5.5.5.5 reflect-client

6.在R7上更改R4、R6下一跳为R7

[r7-bgp]peer 172.16.160.1 next-hop-local

[r7-bgp]peer 172.16.192.1 next-hop-local

7.减少路由条目(汇总)

空接口

[r2]ip route-static 172.16.0.0 20 NULL 0

宣告

边缘做相同操作

[r7]ip route-static 172.16.0.0 20 NULL 0

8.将R1、R8的192.168.0.0 部分网段做通(gre)

写入静态路由

[r1]ip route-static 192.168.2.0 24 10.1.3.2

[r8]ip route-static 192.168.1.0 24 10.1.3.1

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值