Skip to content

[BUG] bgp.local_as not working with VLAN #2615

@ssasso

Description

@ssasso

Describe the bug

When vlans are in use together with "vlan level" bgp.local_as, local config is good, but peer config still have the "previous" AS number.

To Reproduce

Topology:

provider: clab
defaults.device: frr
module: [ bgp ]

nodes:
  r1:
    module: [ vlan, bgp ]
    bgp.as: 65000
    vlans:
      red:
        bgp.local_as: 65001
  r2:
    bgp.as: 65002
  r3:
    bgp.as: 65003

vlans:
  red:
  green:

links:
- r1:
    vlan.access: red
  r2:
- r1:
    vlan.access: green
  r3:

netlab inspect --node r2 | yq .bgp.neighbors[0]:

{
  "ifindex": 1,
  "name": "r1",
  "as": 65000,
  "type": "ebgp",
  "ipv4": "172.16.0.1",
  "activate": {
    "ipv4": true
  }
}

generated R2 config:

router bgp 65002
 neighbor 172.16.0.1 remote-as 65000
 neighbor 172.16.0.1 description r1

generated R1 config:

router bgp 65000
 neighbor 172.16.0.2 remote-as 65002
 neighbor 172.16.0.2 local-as 65001 no-prepend replace-as
 neighbor 172.16.0.2 description r2

Expected behavior

R2 config:

router bgp 65002
 neighbor 172.16.0.1 remote-as 65001
 neighbor 172.16.0.1 description r1

Version

dev

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions