锐捷BGP基础实验+命令解释

要求:

1.R1、R2、R3建立IBGP对等体AS号为65001。R1、R3、R4建立

EBGP对等体,R4对等体号为65002。

2.IBGP使用环回口建立邻居,EBGP使用直连接口建立邻居

3.R2的192.168.2.1网段去往R4的192.168.1.1网段下一跳需要为R1

 1.基础配置:

R1 ip地址配置
int g0/0
no swi 
ip a 12.0.0.1 24
int g0/1
no swi 
ip a 14.0.0.1 24
int l 0 
ip a 1.1.1.1 32
R2 ip地址配置
int g0/0
no swi 
ip a 12.0.0.2 24
int g0/1
no swi 
ip a 23.0.0.1 24
int l 0 
ip a 2.2.2.2 32
R3 ip地址配置
int g0/1
no swi 
ip a 23.0.0.2 24
int g0/2
no swi 
ip a 34.0.0.1 24
int l 0 
ip a 3.3.3.3 32
R4 ip地址配置
int g0/1
no swi 
ip a 14.0.0.2 24
int g0/2
no swi 
ip a 34.0.0.2 24
int l 0 
ip a 4.4.4.4 32

int l 1 
ip a 192.168.1.1 24

2.使用ospf使得IBGP对等体环回口可达

R1 ospf配置
router ospf 1
 graceful-restart
 network 1.1.1.1 0.0.0.0 area 0
 network 12.0.0.0 0.0.0.3 area 0
R2 ospf配置
router ospf 1
 graceful-restart
 network 2.2.2.2 0.0.0.0 area 0
 network 12.0.0.0 0.0.0.3 area 0
 network 23.0.0.0 0.0.0.3 area 0
R2 ospf配置
router ospf 1
 graceful-restart
 network 3.3.3.3 0.0.0.0 area 0
 network 23.0.0.0 0.0.0.3 area 0

以R1测试ping通R2、R3环回口可达

 3.BGP配置

R1

router bgp 65001
 neighbor 2.2.2.2 remote-as 65001
 neighbor 2.2.2.2 update-source Loopback 0
 neighbor 3.3.3.3 remote-as 65001
 neighbor 3.3.3.3 update-source Loopback 0
 neighbor 14.0.0.2 remote-as 65002
 R2

router bgp 65001
 neighbor 1.1.1.1 remote-as 65001
 neighbor 1.1.1.1 update-source Loopback 0
 neighbor 3.3.3.3 remote-as 65001
 neighbor 3.3.3.3 update-source Loopback 0
 network 192.168.2.0 mask 255.255.255.0

R3

router bgp 65001
 neighbor 1.1.1.1 remote-as 65001
 neighbor 1.1.1.1 update-source Loopback 0
 neighbor 2.2.2.2 remote-as 65001
 neighbor 2.2.2.2 update-source Loopback 0
 neighbor 34.0.0.2 remote-as 65002

R4

route bgp 65002
 neighbor 14.0.0.1 remote-as 65001
 neighbor 34.0.0.1 remote-as 65001
 network 192.168.1.0 mask 255.255.255.0

此时因为IBGP特性,从EBGP学到的路由传递给IBGP时,不会修改下一跳属性,所以在R2上查看路由可以发现下一跳为R4的接口,此时是不能通信的

 需要在R1上的BGP中新增一条命令

neighbor 2.2.2.2  next-hop-self          #修改下一跳属性为自己

此时在R2上可以发现,下一跳为1.1.1.1,别*>表示有效最佳状态

此时完成了R2去往R4下一跳为R1

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

成全101

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值