Hello,
On the configuration generated by Proxmox SDN, this one select as router-id/IP in route-map correct_src the only IPv4 available during installation.
Since then, I've added a loopback for redundancy, and would like use this for router-id/correct_src.
Because even if this loopback is announced by FRR's BGP himself, it is important at kernel level.
In fact, this src ip is pushed as "src" parameter in the kernel :
I get two default routes, via two different BGP sessions, but both are with the same src in the kernel. This source is the IP of the first physical interface.
The result is that when the first interface goes down, the second automatically takes over... but the host still tries to source each packet with the IP it has on the first interface.
If the external connections are working properly, any attempt to connect from the host will fail.
Except that I can't find where the choice of IPv4 for these parameters is made.
I don't seem to see anything like it in the GUI, or in the SDN configuration files.
I've tried overriding the “correct_src” route-map in the meantime (in frr.conf.local), but the result isn't what I expected.
It seems that the PVE parser is smart enough not to override it and adds it as a second rule. Which is never match
frr.conf.local
frr.conf generated
I have try to add "no route-map correct_src" in frr.conf.local with no more sucess. But I think it's because how work the PVE parser to merge configuration
I see the correc_src is apply on "ip protocol bgp route-map correct_src".
Okay, try to set src on another route-map and apply this route-map on BGP session directly?
Result :
The LP/metric have apply, but the src seems be just ignored in this way?
Does anyone know how to change/define the router-id/correct_src with a loopback?
Bonus : How apply different src for different BGP sessions? To avoid RFC1918 session have for src my public IP
Thanks!
On the configuration generated by Proxmox SDN, this one select as router-id/IP in route-map correct_src the only IPv4 available during installation.
Since then, I've added a loopback for redundancy, and would like use this for router-id/correct_src.
Because even if this loopback is announced by FRR's BGP himself, it is important at kernel level.
In fact, this src ip is pushed as "src" parameter in the kernel :
default nhid 282 via 213.152.X.A dev vmbr0.3 proto bgp src 213.152.X.B metric 20
I get two default routes, via two different BGP sessions, but both are with the same src in the kernel. This source is the IP of the first physical interface.
The result is that when the first interface goes down, the second automatically takes over... but the host still tries to source each packet with the IP it has on the first interface.
If the external connections are working properly, any attempt to connect from the host will fail.
Except that I can't find where the choice of IPv4 for these parameters is made.
I don't seem to see anything like it in the GUI, or in the SDN configuration files.
I've tried overriding the “correct_src” route-map in the meantime (in frr.conf.local), but the result isn't what I expected.
It seems that the PVE parser is smart enough not to override it and adds it as a second rule. Which is never match
frr.conf.local
Code:
route-map correct_src permit 1
match ip address prefix-list loopbacks_ips
set src 213.152.LOOP.BACK
exit
frr.conf generated
Code:
route-map correct_src permit 1
match ip address prefix-list loopbacks_ips
set src 213.152.PHY.INT <- IP on the first physical interface & router-id
exit
!
route-map correct_src permit 2
match ip address prefix-list loopbacks_ips
set src 213.152.LOOP.BACK
exit
I have try to add "no route-map correct_src" in frr.conf.local with no more sucess. But I think it's because how work the PVE parser to merge configuration
I see the correc_src is apply on "ip protocol bgp route-map correct_src".
Okay, try to set src on another route-map and apply this route-map on BGP session directly?
Code:
route-map PUBLIC_RING0_IN permit 1
match ip address prefix-list loopbacks_ips
set local-preference 100
set metric 100
set src 213.152.LOOP.BACK
exit
[...]
neighbor 213.152.X.Y route-map PUBLIC_RING0_IN in
default nhid 282 via 213.152.PHY.INT dev vmbr0.3 proto bgp src 213.152.PHY.GW metric 20
The LP/metric have apply, but the src seems be just ignored in this way?
Does anyone know how to change/define the router-id/correct_src with a loopback?
Bonus : How apply different src for different BGP sessions? To avoid RFC1918 session have for src my public IP
Code:
172.31.252.2/31 dev vmbr0.6 proto kernel scope link src 172.31.252.3
172.31.252.4/31 nhid 80 via 172.31.253.2 dev vmbr1.6 proto bgp src 213.152.PHY.INT metric 20
172.31.252.6/31 nhid 80 via 172.31.253.2 dev vmbr1.6 proto bgp src 213.152.PHY.INT metric 20
172.31.253.2/31 dev vmbr1.6 proto kernel scope link src 172.31.253.3
172.31.253.4/31 nhid 80 via 172.31.253.2 dev vmbr1.6 proto bgp src 213.152.PHY.INT metric 20
172.31.253.6/31 nhid 80 via 172.31.253.2 dev vmbr1.6 proto bgp src 213.152.PHY.INT metric 20
Thanks!