Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links the VRF to the session #127

Conversation

clementtrebuchet
Copy link

@clementtrebuchet clementtrebuchet commented Jan 16, 2023

Description

With this feature, you can link a VRF object to a BGPSession object.
As with the dcim.devices view, adds a view, and links between the ipam.vrfs view and the bgp.sessions view.
For example, manage BGP border peering in an EVPN VRF, when you want to view sessions transported across an EVPN fabric in a VRF.

router bgp 65011.102
  vrf my-vrf-01
     [output]
     neighbor 2001:db8::6 remote-as 65011.2
     address-family ipv4
          neighbor 2001:db8::6 activate

image

image

@balpoint
Copy link

balpoint commented Jan 27, 2023

maybe it would be nice if this pull request gets implemented that we add the following to the form fields for the bgpsession when selecting the local_address that only ip's from the selected vrf can be used.

    local_address = DynamicModelChoiceField(
        queryset=IPAddress.objects.all(),
        query_params={
            'device_id': '$device',
            'vrf_id': '$vrf'
        }
    )

it could potentially be further customised with interface selection field and add this to the local_address query params:

    interface = DynamicModelChoiceField(
       queryset=Interface.objects.all(),
       required=False,
       query_params={
           'device_id': '$device'
       }
   )
   local_address = DynamicModelChoiceField(
       queryset=IPAddress.objects.all(),
       query_params={
           'device_id': '$device',
           'vrf_id': '$vrf',
           'interface_id': '$interface'
       }
   )

@k01ek
Copy link
Collaborator

k01ek commented Apr 21, 2023

I don't think this is a good idea link VRF to BGP Session. Local IP address already has this link, so you can use it.

@ryanmerolle
Copy link

I am torn, I agree with @k01ek that it is ultimately the IP that is linked to a VRF, but in all network os implementation, you do not have to specify the local IP to peer a neighbor with. It will assume some default in vrf you assign the bgp session to.

@clementtrebuchet clementtrebuchet deleted the ctt/feature-vrf branch June 28, 2023 13:21
@pl0xym0r pl0xym0r mentioned this pull request Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants