BGP这个协议真的熟的不能再熟了,但他的自动汇总,真的不是想的那么简单。
很简单的图,看一下R2的配置:
router rip
version 2
network 12.0.0.0
no auto-summary
router bgp 2
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 10.1.1.0 mask 255.255.255.0
network 10.2.1.0 mask 255.255.255.0
redistribute rip metric 10
neighbor 23.23.23.3 remote-as 3
auto-summary
问题:R3上的路由表构成?
答案:
R3#sh ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
B 1.0.0.0/8 [20/10] via 23.23.23.2, 00:01:05
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, FastEthernet0/0
B 172.16.0.0/16 [20/10] via 23.23.23.2, 00:01:05
10.0.0.0/24 is subnetted, 2 subnets
B 10.2.1.0 [20/0] via 23.23.23.2, 00:01:36
B 10.1.1.0 [20/0] via 23.23.23.2, 00:02:06
B 12.0.0.0/8 [20/0] via 23.23.23.2, 00:01:05
为什么呢?让我们来看一看文档上的说法。
Autosummary does not apply to routes injected into BGP via the network command or through IBGP or EBGP.When auto-summary is enabled, routes injected into BGP via redistribution are summarized on a classful boundary.
说明BGP的自动汇总并不会对宣告进BGP协议的路由做汇总,也就是她为什么默认关闭的原因。因为自动汇总并不自动。BGP的自动汇总会把别的协议重分发进来的协议进行汇总,其实BGP的自动汇总就是网络边界的重分发汇总,达到减小BGP表项的功能。
转载于:https://blog.51cto.com/ramboking/1259218