装备根本的bgp51CTO博客 - 乐橙lc8

装备根本的bgp51CTO博客

2019年02月23日12时47分00秒 | 作者: 怀寒 | 标签: 装备,宋体,街坊 | 浏览: 2709

      这几天由于去学历考试,几天没写博客了。今日把bgp做了一下,装备比较简略,但傍边有一些细节仍是值得看的,好了下面就来做一下bgp的试验:     一、拓扑图:   二、具体装备及阐明:
1、装备各路由器的IP地址,保证直连链路的直通性,保证有TCP的衔接
2、在R1上的装备:
R1(config)#router bgp 64600 (启用bgp) R1(config-router)#nei 172.16.255.2 remote 64600 (指定bgp 对端街坊,加AS号为了区别ibgp和ebgp) R1(config-router)#net 172.16.255.0 mask 255.255.255.252(注入直连网络,无类地址中带掩码发布) R1(config-router)#net 172.16.1.0 mask 255.255.255.0 R1(config-router)#net 172.16.2.0 mask 255.255.255.0 R1(config-router)#net 172.16.3.0 mask 255.255.255.0
3、在R2上的装备,由于R2有两个直连的路由,所以要指定两个街坊:
R2(config-router)#nei 172.16.255.1 remote 64600 R2(config-router)#nei 10.1.255.2 remote 64800 R2(config-router)#net 172.16.255.0 mask 255.255.255.252(无类地址带有掩码发布) R2(config-router)#network 10.1.255.0 mask 255.255.255.252
4、在R3上的装备:
R3(config)#router bgp 64513 R3(config-router)#neighbor 10.1.255.1 remote-as 64800 R3(config-router)#network 10.1.255.0 mask 255.255.255.252 R3(config-router)#network 192.168.0.0  (有类地址,我没有带掩码发布) R3(config-router)#network 192.168.1.0 R3(config-router)#network 192.168.2.0 R3(config-router)#network 192.168.3.0  
5、在R2上检查一下bgp的路由表:
R2#sh ip route bgp      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks B       172.16.0.0/24 [200/0] via 172.16.255.1, 00:08:50 B       172.16.1.0/24 [200/0] via 172.16.255.1, 00:08:50 B       172.16.2.0/24 [200/0] via 172.16.255.1, 00:08:50 B       172.16.3.0/24 [200/0] via 172.16.255.1, 00:08:50 B    192.168.0.0/24 [20/0] via 10.1.255.2, 00:07:32 B    192.168.1.0/24 [20/0] via 10.1.255.2, 00:07:32 B    192.168.2.0/24 [20/0] via 10.1.255.2, 00:07:32 B    192.168.3.0/24 [20/0] via 10.1.255.2, 00:07:32
6、检查一下简略的bgp汇总信息:
R2#sh ip bgp summary BGP router identifier 172.16.255.2, local AS number 64600 BGP table version is 11, main routing table version 11 10 network entries using 1170 bytes of memory 12 path entries using 624 bytes of memory 4/3 BGP path/bestpath attribute entries using 496 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 2314 total bytes of memory BGP activity 10/0 prefixes, 12/0 paths, scan interval 60 secs   Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd 10.1.255.2      4 64800      33      34       11    0    0 00:28:14        5 172.16.255.1    4 64600      34      35       11    0    0 00:29:31        5(经过街坊学到的路由数量。)
7、在BGP中clear ip bgp * 会形成街坊的down 然后再up的进程。但可以用clear ip bgp *soft 软铲除指令去涮新bgp路由表而不会重置街坊联系,由于BGP树立街坊是要根据TCP衔接的,所以TCP衔接不会重置。
R1#clear ip bgp * R1# *Mar  1 00:52:32.927: %BGP-5-ADJCHANGE: neighbor 172.16.255.2 Down User reset R1# *Mar  1 00:52:33.959: %BGP-5-ADJCHANGE: neighbor 172.16.255.2 Up     (街坊联系重置了)   R1#clear ip bgp * soft R1#                               (街坊联系没有重置)
  8、检查bgp的街坊:
R1#show ip bgp neighbors BGP neighbor is 172.16.255.2,  remote AS 64600, internal link(指出了bgp街坊和AS号且是IBGP)   BGP version 4, remote router ID 172.16.255.2   BGP state = Established, up for 00:25:06  (街坊联系的状况已树立)   Last read 00:00:06, last write 00:00:06, hold time is 180, keepalive interval is 60 seconds   Neighbor capabilities:     Route refresh: advertised and received(old & new)     Address family IPv4 Unicast: advertised and received   Message statistics:     InQ depth is 0     OutQ depth is 0                          Sent       Rcvd     Opens:                  2          2     Notifications:          0          0     Updates:                3          6     Keepalives:            67         67     Route Refresh:          1          0     Total:                 73         75               (bgp几种数据包发送和接纳数量)   Default minimum time between advertisement runs is 0 seconds …………………… R1#
三、经过上面的装备,咱们了解了bgp的根本装备以及怎么去检查一些bgp的路由特性。
版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表乐橙lc8立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章