cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
139579
Views
483
Helpful
30
Replies

When to use BGP address-family?

jwbensley
Level 1
Level 1

I commonly see BGP configured on a provider (P/PE) router like this (this is a real router snippet just anonymised);

 

router bgp 12345

neighbour 1.1.1.1 remote-as 12345     ! iBGP peer

address-family ipv4

neighbour 1.1.1.1 remote-as 12345     ! iBGP peer

address-family vpnv4

neighbour 1.1.1.1 remote-as 12345     ! iBGP peer

address-family ipv4 vrf Customer1

neighbour 10.0.0.1 remote-as 67890    ! eBGP peer





  • I understand the CE peering defined under "address-family ipv4 vrf Customer1" because we are placing their routes into that VRF
  • I understand that "address-family vpnv4" is used to define provider iBGP peers to which other CE's are going to be attached, carrying this customer VRF
  • Finally, I understand that a provider router is an iBGP peer so it is defined directly under "router bgp 12345"

 

What is the need for "address-family ipv4" (without vrf) here, or ever?

 

What does it provies that "normal" "neighbour" definitions (those directly under "router bgp 12345") and "vpnv4 neighbour" definitions, don't provide?

30 Replies 30

I would like to thank you for this brilliant explanation..

 Very helpul post.

Hello team - Resurrecting this old post.

 

@Peter Paluch you have provided an awesome explanation about "address-family ipv4", but now can you please also help me to understand "address-family vpnv4"?

 

Kind Regards,

Hello Alexandro,

Thank you very much for your kind words!

The "VPNv4 address family" is used in MPLS Layer3 VPN deployments. It allows a Provider Edge (PE) router with multiple VRFs to collect all IPv4 routes from all local VRFs en-masse, advertise them to other PE routers, and also learn about VRF routes from these other PE routers and sort them into local VRFs. These routes that are placed into VRFs and can be exchanged with other PEs, along with additional attributes in BGP that allow these routes to be uniquely distinguished and imported into proper VRFs, including MPLS labels, are called "VPNv4 routes" in short for IPv4, and "VPNv6 routes" for IPv6.

As with "address-family ipv4" for plain IPv4 routes, the "address-family vpnv4" section contains a list or neighbors you want to exchange these VPNv4 routes with. Just defining a neighbor at the global BGP level does not allow your router to immediately exchange VPNv4 routes with that neighbor - since that neighbor may not be a PE router at all. If you know that the neighbor is indeed a PE router and if you want to exchange VPNv4 routes with that neighbor, you need to activate it in the "address-family vpnv4" section.

Please feel free to ask further!

Best regards,
Peter

Thank you Peter for such a clear and concise explanation of address families.

Thanks for the detailed clarification.

Thank you Peter!

Great explanation for us to understand :-)

Thank you for the clear and concise answer! Well done!

wonderful thanks

Naveen Gurjar
Level 1
Level 1

This is indeed a great explanation. I just have one small lingerging doubt w.r.t to "ipv4 address family"...

 

What is the need to explicity define an "ipv4 address family" (automatic or otherwise)?

for ex ...If you are adding a static route, you just meniton "ip route"...

you do not mention "ipv4 route"....

 

meaning ipv4 is ominipresent...in the same way...there MUST NOT be any "ipv4 address families"...at ALL...

whatever I define directly under router bgp process MUST BE  TAKEN AS "ipv4 address family" (no need to auto add this)...

Meaning "ipv4 address family" pre-exists....

So my quesiton is...I disable "bgp default ipv4-unicast" and WILL NOT MANUALLY add the "ipv4 address family"..it must still work on the global level...please clarify...

Hi Naveen,

 

Thank you for joining.

 

What is the need to explicity define an ipv4 address family (automatic or otherwise)?

for ex ...If you are adding a static route, you just meniton ip route...

you do not mention ipv4 route....

 

Regarding the non-BGP-related commands such as "ip route, ip address, ip summary-address, ip access-group, ip proxy-arp, ip split-horizon" etc., the use of the ip keyword is purely historical. All these commands have been supported in IOS long before IPv6 existed, so there was no reason to force the "v4" into the ip keyword, as the IPv4 was the only IP version in use. And today, no one is going to even suggest to change the syntax of all existing ip commands to ipv4 - it would definitely case backward compatibility issues (you would still have to support the ip keyword to process old configurations gracefully), and it would definitely alienate many users who are accustomed to use ip for IPv4, and ipv6 for IPv6.

 

Meaning ipv4 address family pre-exists....

 

With the non-BGP ip commands, it is not about the "pre-existence of the IPv4 address family", rather, it is about accepting the very simple fact that the ip commands have been created and added to IOS and widely used before IPv6 came to being.

 

The "pre-existence of the IPv4 address family" as discussed here is related exclusively to BGP configuration.

 

So my quesiton is...I disable "bgp default ipv4-unicast" and WILL NOT MANUALLY add the "ipv4 address family"..it must still work on the global level ...please clarify...

 

I believe you are confusing the BGP configuration with use of IPv4/IPv6 in global configuration. All discussion about the address families in this thread were relevant and related only to BGP configuration in particular. Other parts of IOS configuration are not affected by it.

 

I am not sure if this actually clarifies your question but I needed to make sure you understand this first. If you still have doubts please feel welcome to ask further!

 

Best regards,

Peter

I happened to run across this post and couldn't be more thankful to Peter for such an amazing explanation!

rocko2006
Level 1
Level 1

Wow what a great explanation! Thank you sir!


 

tommy
Level 1
Level 1

Thank you Peter:)

Edgar Almonte
Level 1
Level 1

Great answer!

Review Cisco Networking for a $25 gift card