BGP 同行从 NOT AS 路径列表中删除私有号码 AS
12150
Created On 10/02/20 16:32 PM - Last Modified 06/05/23 07:36 AM
Symptom
BGP 同行确实 NOT AS 从路径列表中删除 AS 所有前缀的私有数字
Environment
拓扑:
+-----------+ +-----------+ +-----------+ +-----------+ | | | | | | | | | PA-820 +---------------------+ PA-850-1 +---------------------+ PA-850-2 +---------------------------+ PA-850-3 | | BGP 65003 | | BGP 65001 | | BGP 65002 | | BGP 123 | | | | | | | | | +-----------+ +-----------+ +-----------+ +-----------+
PA-820 BGP运行在 AS 65003-1
PA-850 运行 BGP 在 AS 65001-2
PA-850 运行 BGP 在 AS 65002-3
PA-850 运行 BGP 在 AS 123-2
PA-850 重新分配静态路由10.0。 0.0/8 进入 BGP 并宣传它到 PA-850 -1
PA-850 -3 重新分配静态路由 172.16.0/12 BGP 并将其广告到 PA-850 -2
Cause
- 场景 PA-850 1:-1已禁用"删除私有 AS "功能
如果我们查看 BGP 桌上的表格, PA-820 我们会看到 AS 两个前缀的完整路径:
admin@PA-820> show routing protocol bgp loc-rib VIRTUAL ROUTER: default (id 1) ========== Prefix Nexthop Peer Weight LocPrf Org MED flap AS-Path *10.0.0.0/8 192.168.1.1 BGP-65001 0 100 i/c 0 0 65001,65002 *172.16.0.0/12 192.168.1.1 BGP-65001 0 100 i/c 0 0 65001,65002,123
- 方案 PA-850 2:-1启用了"删除私 AS 有"功能:
如果我们查看 BGP 表格, PA-820 我们看到 AS 65002 从路径中剥离 AS 为前缀 10.0.0.0/8,但对于前缀 172.16.0.0/12,我们有一个完整的 AS 路径列表。 换句话说 AS ,65002没有从路径列表中删除 AS 。
admin@PA-820> show routing protocol bgp loc-rib VIRTUAL ROUTER: default (id 1) ========== Prefix Nexthop Peer Weight LocPrf Org MED flap AS-Path *10.0.0.0/8 192.168.1.1 BGP-65001 0 100 i/c 0 0 65001 *172.16.0.0/12 192.168.1.1 BGP-65001 0 100 i/c 0 0 65001,65002,123 <<<<
如果我们检查 BGP PA-820 广告路线从 PA-850 -1,我们可以确认前缀 10.0.0/8 AS 65002 被删除,而前缀 172.16.0.0/12 AS 路径不修改。
admin@PA-850-1> show routing protocol bgp rib-out VIRTUAL ROUTER: default (id 1) ========== Prefix Nexthop Peer Originator Adv Status Aggr Status AS-Path 10.0.0.0/8 192.168.1.1 BGP-PEER-65003 0.0.0.0 advertised no aggregation 65001 172.16.0.0/12 192.168.1.1 BGP-PEER-65003 0.0.0.0 advertised no aggregation 65001,65002,123
Resolution
这是预期的行为,根据RFC6996。此行为对供应商开放供解释。 其他供应商也以同样的方式实现了此功能。
如果AS_PATH包含私用和非私用 ASN 的混合物,则从AS_PATH中删除私用 ASN 的一些现有实施不会删除
私用 ASN。