FW: BIRD is not prepending ASN on EBGP export.
Hi, We have observed strange behavior where BIRD is not adding ASN on EBGP export. Route is received on IBGP session within AS20940: r04.border01.lon03.fab > bird show config template bgp 4INTERECOR_ROUTERS template bgp '4INTERECOR_ROUTERS' { local as 20940; neighbor as 20940; r04.border01.lon03.fab> show route protocol 23.210.49.60__r24.lon02.ien for 20.135.0.0/16 all Executing "/usr/sbin/birdc show route protocol '23.210.49.60__r24.lon02.ien' for 20.135.0.0/16 all" Table master4: 20.135.0.0/16 unicast [23.210.49.60__r24.lon02.ien 2024-10-07] (100) [AS8075i] via 23.210.49.60 on ae1 Type: BGP univ BGP.origin: IGP BGP.as_path: 8075 BGP.next_hop: 23.210.49.60 BGP.med: 4294967294 BGP.local_pref: 350 Route ASPATH: 8075 which is expected. We are exporting this route on EBGP session from private ASN 4290006033 <-> to private ASN: 4290006002: r04.border01.lon03.fab> show route export 2a02:26f0:1880:3702::1__r01.stem01 for 20.135.0.0/16 all Executing "/usr/sbin/birdc show route export '2a02:26f0:1880:3702::1__r01.stem01' for 20.135.0.0/16 all" Table master4: 20.135.0.0/16 unicast [2.22.144.250__r01.sdn 2024-10-07 from 2.22.144.250] * (100) [AS8075i] via 23.210.49.60 on ae1 Type: BGP univ BGP.origin: IGP BGP.as_path: 8075 BGP.next_hop: 23.210.49.60 BGP.med: 4294967294 BGP.local_pref: 777 Route is received on 4290006002: r01.stem01.lon03.fab> show route protocol 2a02:26f0:1880:3702::__r04.border01 for 20.135.0.0/16 all Executing "/usr/sbin/birdc show route protocol '2a02:26f0:1880:3702::__r04.border01' for 20.135.0.0/16 all" Table master4: 20.135.0.0/16 unicast [2a02:26f0:1880:3702::__r04.border01 2024-10-07] * (100) [AS8075i] via 2a02:26f0:1880:3702:: on ae4 Type: BGP univ BGP.origin: IGP BGP.as_path: 4290006033 8075 BGP.next_hop: 2a02:26f0:1880:3702:: fe80::b6db:91ff:fe8b:1eb4 BGP.local_pref: 100 ASPATH: 4290006033 8075 We are missing AS 20940 on which essentially this prefix is received in our network!? Is this behavior expected? Kind Regards, Radek Ochalski
Hi Radoslaw, Do I get it right, that you have 2 bgp peerings here. First your route passes this peering: AS8075 <-> AS20940 then it passes other peering: AS4290006033 <-> AS4290006002 Then it is an expected behaviour. Because the ASN is prepended when route is exported over eBGP session. And the local ASN is prepended. So you see that when you receive the route over the first peering, it is prepended with AS8075. Then it goes over the second peering, where it is prepended with AS4290006033. Regards, Alexander On Tue, Oct 8, 2024 at 4:33 PM Ochalski, Radoslaw via Bird-users <bird-users@network.cz> wrote:
Hi,
We have observed strange behavior where BIRD is not adding ASN on EBGP export.
Route is received on IBGP session within AS20940:
r04.border01.lon03.fab > bird show config template bgp 4INTERECOR_ROUTERS
template bgp '4INTERECOR_ROUTERS' {
local as 20940;
neighbor as 20940;
r04.border01.lon03.fab> show route protocol 23.210.49.60__r24.lon02.ien for 20.135.0.0/16 all
Executing "/usr/sbin/birdc show route protocol '23.210.49.60__r24.lon02.ien' for 20.135.0.0/16 all"
Table master4:
20.135.0.0/16 unicast [23.210.49.60__r24.lon02.ien 2024-10-07] (100) [AS8075i]
via 23.210.49.60 on ae1
Type: BGP univ
BGP.origin: IGP
BGP.as_path: 8075
BGP.next_hop: 23.210.49.60
BGP.med: 4294967294
BGP.local_pref: 350
Route ASPATH: 8075 which is expected.
We are exporting this route on EBGP session from private ASN 4290006033 <-> to private ASN: 4290006002:
r04.border01.lon03.fab> show route export 2a02:26f0:1880:3702::1__r01.stem01 for 20.135.0.0/16 all
Executing "/usr/sbin/birdc show route export '2a02:26f0:1880:3702::1__r01.stem01' for 20.135.0.0/16 all"
Table master4:
20.135.0.0/16 unicast [2.22.144.250__r01.sdn 2024-10-07 from 2.22.144.250] * (100) [AS8075i]
via 23.210.49.60 on ae1
Type: BGP univ
BGP.origin: IGP
BGP.as_path: 8075
BGP.next_hop: 23.210.49.60
BGP.med: 4294967294
BGP.local_pref: 777
Route is received on 4290006002:
r01.stem01.lon03.fab> show route protocol 2a02:26f0:1880:3702::__r04.border01 for 20.135.0.0/16 all
Executing "/usr/sbin/birdc show route protocol '2a02:26f0:1880:3702::__r04.border01' for 20.135.0.0/16 all"
Table master4:
20.135.0.0/16 unicast [2a02:26f0:1880:3702::__r04.border01 2024-10-07] * (100) [AS8075i]
via 2a02:26f0:1880:3702:: on ae4
Type: BGP univ
BGP.origin: IGP
BGP.as_path: 4290006033 8075
BGP.next_hop: 2a02:26f0:1880:3702:: fe80::b6db:91ff:fe8b:1eb4
BGP.local_pref: 100
ASPATH: 4290006033 8075
We are missing AS 20940 on which essentially this prefix is received in our network!?
Is this behavior expected?
Kind Regards,
Radek Ochalski
On Tue, Oct 08, 2024 at 04:46:07PM +0200, Alexander Zubkov via Bird-users wrote:
Hi Radoslaw,
Do I get it right, that you have 2 bgp peerings here. First your route passes this peering: AS8075 <-> AS20940 then it passes other peering: AS4290006033 <-> AS4290006002
Then it is an expected behaviour. Because the ASN is prepended when route is exported over eBGP session. And the local ASN is prepended. So you see that when you receive the route over the first peering, it is prepended with AS8075. Then it goes over the second peering, where it is prepended with AS4290006033.
Yes, that is true. I would add that one is not supposed to have different local ASNs for different BGP instances that form coherent BGP router, unless it is configured as BGP confederation or manually patched by filters. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
participants (3)
-
Alexander Zubkov -
Ochalski, Radoslaw -
Ondrej Zajicek