• 在R1上设置对R2设置:neighbor 10.12.1.2 maximum-prefix 6
    • show ip bgp nei 10.12.1.2 received-routes 可以用于查看从10.12.1.2 收到的路由,前提是需要配置 soft-reconfiguration
    1. R1#show ip bgp neighbors 10.12.1.2 received-routes
    2. % Inbound soft reconfiguration not enabled on 10.12.1.2
    3. R1#conf t
    4. Enter configuration commands, one per line. End with CNTL/Z.
    5. R1(config)#router bgp 65100
    6. R1(config-router)#neighbor 10.12.1.2 soft-reconfiguration inbound
    • 超限(>不是达到=)后,Session 被置为Idle状态。R1(设置端)的状态是 Idle(PfxCt),而R2端只有Idle

    实验01 - Maximum Prefix Count - 图1

    • 此时R1的BGP Table里,只剩下他自己宣告的1个接口

    实验01 - Maximum Prefix Count - 图2

    • 变为Idle 状态后,不会自动恢复。对接口shutdown / no shut 无效,执行 soft 重启也无效。可以 clear IP bgp * 硬重启
    • R2 向R1 发送7条路由,包含1条来自65100的

    实验01 - Maximum Prefix Count - 图3

    • R2 会过滤掉那条来自65100(即他自己),此时只有6条。但是在BGP Table中会包含这条

    实验01 - Maximum Prefix Count - 图4

    • 此时R1 会发出提醒,但不会有任何动作

    实验01 - Maximum Prefix Count - 图5

    • 我们从R3上增加1个接口,在R1上立刻会有反应

    实验01 - Maximum Prefix Count - 图6