操作篇 bgp协议了解与学习

前言

一:了解什么是bgp

二:实验目的

三:实验过程(3种方法)

1.1 :路由器R1

<Huawei>sys
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 30
[R1-GigabitEthernet0/0/0]int loo0
[R1-LoopBack0]ip add 1.1.1.1 32
[R1]router id 1.1.1.1
[R1]bgp 100
[R1-bgp]peer 2.2.2.2 as-number 100
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R1-bgp]network 12.0.0.0 30
[R1-bgp]network 1.1.1.1 32
[R1]ip route-static 2.2.2.2 32 12.0.0.2

1.2 :路由器R2

<Huawei>sys
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 30
[R2-GigabitEthernet0/0/0]int loo0
[R2-LoopBack0]ip add 2.2.2.2 32
[R2]router id 2.2.2.2
[R2]bgp 100    开启bgp
[R2-bgp]peer 1.1.1.1 as-number 100  环回口建立邻居关系
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0 用自己的环回地址和你建立关系
[R2-bgp]network 12.0.0.0 30
[R2-bgp]network 2.2.2.2 32
[R2]ip route-static 1.1.1.1 32 12.0.0.1 这里用的是默认路由连接

四:实验结果和方法

4.1:用默认路由连接通信

imagee9b9e582b1f6e7fb.png

4.2:起vrp完成建立

路由器R1配置

[R1]rip
[R1-rip-1]v 2
[R1-rip-1]undo summary
[R1-rip-1]network 1.0.0.0
[R1-rip-1]network 12.0.0.0

路由器R2配置

[R2]rip
[R2-rip-1]v 2
[R1-rip-1]undo summary
[R2-rip-1]network 2.0.0.0
[R2-rip-1]network 12.0.0.0
imaged144a8d0fd02cc4a.png

4.3:bgp直连

建立一个业务

image5f0bded087599f7a.png

路由器 R1配置

[R1]int loo0
[R1-LoopBack1]ip add 4.0.0.1 24
[R1]bgp 100
[R1-bgp]import-route direct  bdp宣告直连

0
[R1-LoopBack1]ip add 4.0.0.1 24
[R1]bgp 100
[R1-bgp]import-route direct bdp宣告直连


<a href="https://sbimg.cn/image/kbN4T"><img src="https://wx1.sbimg.cn/2020/06/08/image380c0a7f380122fc.png" alt="image380c0a7f380122fc.png" border="0" /></a>

猜你喜欢

转载自blog.csdn.net/weixin_47151717/article/details/106631334
今日推荐