Skip to content

Commit 4088875

Browse files
jbemmelcursoragent
andcommitted
Fix BIRD VRF BGP router IDs
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 9bdd34d commit 4088875

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

docs/caveats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ nodes:
8787
* You must build the BIRD container image with the **netlab clab build bird** command. See [](build-bird) for build targets and version options.
8888
* BIRD is implemented as a pure control-plane daemon running as a container with a single external interface. You can set the node **role** to **router** to turn a BIRD instance into a more traditional networking device with a loopback interface.
8989
* _netlab_ installs BIRD software in a container image running Ubuntu 24.04 when you use the default **netlab clab build bird** target (~2.14). Other build targets install different BIRD releases — see [](build-bird).
90-
* BIRD supports a single router ID used for BGP and OSPF.
90+
* BIRD uses the node BGP router ID as the default router ID for BGP and OSPF protocol instances.
9191
* The VM or container running BIRD in host mode starts with static routes pointing to one of the adjacent routers (see [](linux-forwarding)). After establishing routing adjacencies, BIRD copies BGP and OSPF into the kernel IP routing table.
9292

9393
### OSPF Caveats

netsim/daemons/bird/bgp.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ function {{ func_name }}( bool originate_default; bool rem_private_as ) {
130130
protocol bgp bgp_{{ ('vrf_' + vrf_name + '_') if vrf_name else '' }}{{ n.name }}_{{ af }} {
131131
{% if vrf_name %}
132132
vrf "{{ vrf_name }}";
133+
{% if 'router_id' in vrf_data.bgp %}
134+
router id {{ vrf_data.bgp.router_id }};
135+
{% endif %}
133136
{% endif %}
134137
{% set loopback = loopback|default({}) %}
135138
{% set local = namespace(ip=loopback[af]|default('')) %}

netsim/validate/eos.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ def valid_ping(
4646
msg += f' size {pkt_len}'
4747

4848
if expect == 'fail':
49-
if not _result.stdout.strip():
50-
return msg+' failed as expected'
5149
for kw in ("0 packets received","0 received","unreachable"):
5250
if kw in _result.stdout:
5351
return msg+' failed as expected'

netsim/validate/linux.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ def valid_ping(
6868
for kw in ("0 packets received","0 received","unreachable"):
6969
if kw in _result.stdout:
7070
return msg+' failed as expected'
71-
if f"{ pkt_len + 8 if pkt_len else 64 } bytes from" not in _result.stdout:
72-
return msg+' failed as expected'
7371
raise Exception(msg+' did not fail')
7472
else:
7573
if f"{ pkt_len + 8 if pkt_len else 64 } bytes from" in _result.stdout:

0 commit comments

Comments
 (0)