IBGP cannot import prefixs with its as_path
智慧雨泽
zhihuiyuze at gmail.com
Mon Sep 20 17:18:04 CEST 2021
Hi,
I use ibgp to transport full tables in my network. iBGP delete my
ASN but I use my ASN to identify my prefixes.
So I added this code to my ibgp import filter
if bgp_path ~ [= =] then {
#bgp_path.prepend(LOCAL_ASN);
if my_opt_prefix() then bgp_path.prepend(LOCAL_ASN);
}
It works when 2 servers connect, but when I have 3 servers, the third
server can not import my first server's prefixed with my ASN.
At the first server
bird> show route export HOME_1_ARCH
Table master6:
2a0c:e640:1017::/48 unreachable [BGP_Prefix 22:12:23.507] * (200)
2602:feda:ab9::/48 unreachable [BGP_Prefix 22:12:23.507] * (200)
At the second server
bird> show route for 2a0c:e640:1017:: export Aperture_IX all
Table master6:
2a0c:e640:1017::/48 unicast [ZHYZ_PC 14:53:29.056] * (100) [AS141011i]
via 2a0c:e640:1017::1 on zhyz_pc
Type: BGP univ
BGP.origin: IGP
BGP.as_path: 141011
BGP.next_hop: 2a0c:e640:1017::1
BGP.local_pref: 100
At the third server
bird> show route for 2a0c:e640:1017::/48 protocol HOME_1_ARCH all
Table master6:
::/0 unicast [HOME_1_ARCH 06:10:14.802] * (100) [AS134835i]
via 2602:feda:ab5::1 on home_1_arch
Type: BGP univ
BGP.origin: IGP
BGP.as_path: 134835
BGP.next_hop: 2602:feda:ab5::1
BGP.local_pref: 100
BGP.community: (65530,2000)
HOME_1_ARCH BGP --- up 06:10:14.802 Established
Description: HOME_1_ARCH BGP
BGP state: Established
Neighbor address: 2602:feda:ab5::1%home_1_arch
Neighbor AS: 141011
Local AS: 141011
Neighbor ID: 192.168.117.52
Local capabilities
Multiprotocol
AF announced: ipv6
Route refresh
Graceful restart
Restart time: 120
AF supported: ipv6
AF preserved:
4-octet AS numbers
Enhanced refresh
Long-lived graceful restart
Neighbor capabilities
Multiprotocol
AF announced: ipv6
Route refresh
Graceful restart
Restart time: 120
AF supported: ipv6
AF preserved:
4-octet AS numbers
Enhanced refresh
Long-lived graceful restart
Session: internal route-reflector AS4
Source address: 2602:feda:ab7::1
Hold timer: 183.267/240
Keepalive timer: 63.087/80
Channel ipv6
State: UP
Table: master6
Preference: 100
Input filter: (unnamed)
Output filter: (unnamed)
Routes: 2560 imported, 129220 exported, 2557 preferred
Route change stats: received rejected filtered ignored
accepted
Import updates: 266057 0 0 5170
260887
Import withdraws: 261009 0 --- 5382
255627
Export updates: 681596 17838 129330 ---
534428
Export withdraws: 3020 --- --- ---
131521
BGP Next hop: 2602:feda:ab7::1
You could see the third server cannot import 2a0c:e640:1017::/48
But when I deleted this code on the second server.
if bgp_path ~ [= =] then {
#bgp_path.prepend(LOCAL_ASN);
if my_opt_prefix() then bgp_path.prepend(LOCAL_ASN);
}
it has been successful import
bird> show route for 2a0c:e640:1017::/48 protocol HOME_1_ARCH all
Table master6:
2a0c:e640:1017::/48 unicast [HOME_1_ARCH 07:14:07.526] * (100) [AS141011i]
via 2602:feda:ab5::1 on home_1_arch
Type: BGP univ
BGP.origin: IGP
BGP.as_path: 141011
BGP.next_hop: 2602:feda:ab5::1
BGP.local_pref: 100
BGP.originator_id: 172.16.229.1
BGP.cluster_list: 192.168.117.52
I know that maybe no one will use ibgp like this, but why it won't work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20210920/59f42cc8/attachment.htm>
More information about the Bird-users
mailing list