设为首页收藏本站language 语言切换
查看: 1711|回复: 0
收起左侧

[分享] 验证BGP路由黑洞&对等体组完成对等体全互联

[复制链接]
发表于 2023-6-15 18:37:58 | 显示全部楼层 |阅读模式
1)AS100内先完成环路【R1R4建立IBGP邻居,在R1引入EBGPIBGP
截图.png
实验BGP路由黑洞:
R1R4 建立iBGP邻居
R1
router bgp 100
neighbor 44.1.1.1 remote-as 100             //指定44.1.1.1为其邻居  as号码为100
neighbor 44.1.1.1 update-source Loopback0   //指定44.1.1.1更新源为loopback0
R4:
router bgp 100
neighbor 11.1.1.1 remote-as 100             //指定11.1.1.1为其邻居  as号码为100
neighbor 11.1.1.1 update-source Loopback0   //指定11.1.1.1更新源为loopback0
R4#show ip bgp summary                      //查看BGP邻居状态
BGP router identifier 44.1.1.1, local AS number 100
BGP table version is 13, main routing table version 13
5 network entries using 720 bytes of memory
5 path entries using 420 bytes of memory
3/3 BGP path/bestpath attribute entries using 480 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1644 total bytes of memory
BGP activity 7/2 prefixes, 7/2 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
11.1.1.1        4          100     432     430       13    0    0 06:29:00        3
R1ospf引入BGP路由
router bgp 100
bgp redistribute-internal      //使能 内部BGP(iBGP)路由重分发到IGP
router ospf 110
redistribute bgp 100 subnets  //ospf进程下引入BGP路由
R5上使用业务地址进行测试:
R5#traceroute 4.4.4.4 source 5.5.5.5
Type escape sequence to abort.
Tracing the route to 4.4.4.4
VRF info: (vrf in name/id, vrf out name/id)
  1 10.1.15.1 1 msec 0 msec 1 msec
  2 10.1.13.3 0 msec 1 msec 0 msec
  3 10.1.13.1 1 msec 0 msec 0 msec
  4 10.1.13.3 1 msec 0 msec 1 msec
  5 10.1.13.1 0 msec 1 msec 0 msec
  6 10.1.13.3 1 msec 0 msec 1 msec
  7 10.1.13.1 0 msec 1 msec 0 msec
  8 10.1.13.3 1 msec 1 msec 0 msec
  9 10.1.13.1 1 msec 0 msec 1 msec
10 10.1.13.3 1 msec 0 msec 0 msec
11 10.1.13.1 1 msec 1 msec 1 msec
12 10.1.13.3 1 msec 1 msec 1 msec
13 10.1.13.1 1 msec 1 msec 1 msec
14 10.1.13.3 1 msec 1 msec 1 msec
15 10.1.13.1 1 msec 1 msec 1 msec
16 10.1.13.3 1 msec 1 msec 1 msec
17 10.1.13.1 1 msec 1 msec 1 msec
18 10.1.13.3 1 msec 1 msec 2 msec
19 10.1.13.1 1 msec 1 msec 1 msec
20 10.1.13.3 2 msec 1 msec 1 msec
21 10.1.13.1 3 msec 1 msec 2 msec
22 10.1.13.3 1 msec 2 msec 1 msec
23 10.1.13.1 2 msec 2 msec 2 msec
24 10.1.13.3 2 msec 2 msec 1 msec
25 10.1.13.1 2 msec 1 msec 1 msec
26 10.1.13.3 2 msec 2 msec 2 msec
27 10.1.13.1 3 msec 2 msec 2 msec
28 10.1.13.3 1 msec 2 msec 1 msec
29 10.1.13.1 2 msec 2 msec 2 msec
30 10.1.13.3 1 msec 2 msec 2 msec
2)去掉R1的引入,在AS100内的R1R2上部署对等组,完成全互联
实验BGP全互联:
R1
router bgp 100
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor miqi peer-group               //创建名称为miqi的对等组模板
neighbor miqi remote-as 100            //指定miqi对等组模板的as号码为100
neighbor miqi update-source Loopback0  //指定miqi对等组使用loopbakc0为更新源
neighbor miqi next-hop-self            //指定miqi对等组 邻居从R1学到的路由 next-hopR1
neighbor 10.1.15.5 remote-as 200
neighbor 22.1.1.1 peer-group miqi      //指定邻居调用miqi对等体组
neighbor 33.1.1.1 peer-group miqi      //指定邻居调用miqi对等体
neighbor 44.1.1.1 peer-group miqi      //指定邻居调用miqi对等体
R1#show ip bgp summary                       //查看BGP邻居
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 16, main routing table version 16
7 network entries using 1008 bytes of memory
7 path entries using 588 bytes of memory
4/4 BGP path/bestpath attribute entries using 640 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2260 total bytes of memory
BGP activity 11/4 prefixes, 11/4 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.15.5       4          200      33      38       16    0    0 00:26:45        2
22.1.1.1        4          100      12      14       16    0    0 00:05:26        2
33.1.1.1        4          100       8      11       16    0    0 00:04:05        0
44.1.1.1        4          100     444     445       16    0    0 06:41:12        2
R2
router bgp 100
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor miqi peer-group                //创建名称为miqi的对等组模板
neighbor miqi remote-as 100             //指定miqi对等组模板的as号码为100
neighbor miqi update-source Loopback0   //指定miqi对等组使用loopbakc0为更新源
neighbor miqi next-hop-self             //指定miqi对等组 邻居从R2学到的路由 next-hopR2
neighbor 11.1.1.1 peer-group miqi        //指定邻居调用miqi对等体
neighbor 33.1.1.1 peer-group miqi        //指定邻居调用miqi对等体
neighbor 44.1.1.1 peer-group miqi        //指定邻居调用miqi对等体
neighbor 66.1.1.1 remote-as 200
neighbor 66.1.1.1 ebgp-multihop 2
neighbor 66.1.1.1 update-source Loopback0
R2#show ip bgp summary                       //查看BGP邻居
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 21, main routing table version 21
7 network entries using 1008 bytes of memory
7 path entries using 588 bytes of memory
4/4 BGP path/bestpath attribute entries using 640 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2260 total bytes of memory
BGP activity 12/5 prefixes, 12/5 paths, scan interval 60 secs
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
11.1.1.1        4          100      14      12       21    0    0 00:06:08        3
33.1.1.1        4          100      11      13       21    0    0 00:04:31        0
44.1.1.1        4          100      11      12       21    0    0 00:03:43        2
66.1.1.1        4          200     444     450       21    0    0 06:42:00        1
3AS100的业务接口可以5.5.5.5通信
全互联后测试as100内路由器的业务口是否都可以与5.5.5.5通信
R1
R1#ping 5.5.5.5 source 1.1.1.1           //测试业务是否可以与5.5.5.5通讯
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2
R2#ping 5.5.5.5 source 2.2.2.2           //测试业务是否可以与5.5.5.5通讯
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R3
R3#  ping 5.5.5.5 source 3.3.3.3           //测试业务是否可以与5.5.5.5通讯
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R4
R4#ping 5.5.5.5 source 4.4.4.4            //测试业务是否可以与5.5.5.5通讯
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

更多相关资料获取请加官方微信
鸿鹄论坛发文.png

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-1-31 12:52 , Processed in 0.063754 second(s), 14 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表