BGP实验

在这里插入图片描述在这里插入图片描述
AR1
[Huawei]int lo0
[Huawei-LoopBack0]ip add 192.168.1.1 24
[Huawei-LoopBack0]int lo1
[Huawei-LoopBack1]ip add 10.1.1.1 24
[Huawei-LoopBack1]sysname r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1]ping 12.1.1.2
PING 12.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 12.1.1.2: bytes=56 Sequence=1 ttl=255 time=130 ms
Reply from 12.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 12.1.1.2: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 12.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 12.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms

— 12.1.1.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/40/130 ms

[r1]bgp 1
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 2
[r1]bgp 1
[r1-bgp]network 10.1.1.0 24

[r1]ping -a 10.1.1.1 10.1.2.1
PING 10.1.2.1: 56 data bytes, press CTRL_C to break
Reply from 10.1.2.1: bytes=56 Sequence=1 ttl=251 time=150 ms
Reply from 10.1.2.1: bytes=56 Sequence=2 ttl=251 time=50 ms
Reply from 10.1.2.1: bytes=56 Sequence=3 ttl=251 time=70 ms
Reply from 10.1.2.1: bytes=56 Sequence=4 ttl=251 time=50 ms
Reply from 10.1.2.1: bytes=56 Sequence=5 ttl=251 time=50 ms

— 10.1.2.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/74/150 ms
在这里插入图片描述
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 10.1.3.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 10.1.1.1
[r1-Tunnel0/0/0]destination 10.1.2.1
[r1]ip route-static 192.168.2.0 24 Tunnel 0/0/0
在这里插入图片描述在这里插入图片描述
AR2
[r2]int lo0
[r2-LoopBack0]ip add 172.16.2.1 24
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 12.1.1.2 24
[r2-GigabitEthernet0/0/1]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 172.16.0.1 30
[r2]int g0/0/2
[r2-GigabitEthernet0/0/2]ip add 172.16.0.9 30
[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]bgp 64512
[r2-bgp]confederation id 2
[r2-bgp]confederation peer-as 64513
[r2-bgp]peer 172.16.3.1 as-number 64512
[r2-bgp]peer 172.16.3.1 connect-interface lo0
[r2-bgp]peer 172.16.5.1 connect-interface lo0
[r2-bgp]peer 172.16.5.1 ebgp-max-hop 2
[r2]bgp 64512
[r2-bgp]peer 12.1.1.1 as-number 1
[r2-bgp]peer 172.16.3.1 next-hop-local
[r2-bgp]peer 172.16.5.1 next-hop-local
[r2]ip route-static 172.16.0.0 21 NULL 0
[r2]bgp 64512
[r2-bgp]network 172.16.0.0 21
在这里插入图片描述

AR3
[r3]int lo0
[r3-LoopBack0]ip add 172.16.3.1 24
[r3-GigabitEthernet0/0/1]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 172.16.0.5 30
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 172.16.0.2 30
[r3]ping 172.16.0.6
PING 172.16.0.6: 56 data bytes, press CTRL_C to break
Reply from 172.16.0.6: bytes=56 Sequence=1 ttl=255 time=170 ms
Reply from 172.16.0.6: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 172.16.0.6: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 172.16.0.6: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 172.16.0.6: bytes=56 Sequence=5 ttl=255 time=20 ms

— 172.16.0.6 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/54/170 ms
[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]bgp 64512
[r3-bgp]confederation id 2
[r3-bgp]peer 172.16.2.1 as-number 64512
[r3-bgp]peer 172.16.2.1 connect-interface lo0
[r3-bgp]peer 172.16.4.1 as-number 64512
[r3-bgp]peer 172.16.2.1 connect-interface lo01 connect-interface lo0
[r3-bgp]peer 172.16.4.1 connect-interface lo0
[r3-bgp]peer 172.16.2.1 reflect-client在这里插入图片描述
AR4
在这里插入图片描述
AR5
在这里插入图片描述
AR6
在这里插入图片描述
AR7
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值