4

As I understand from Understanding Junos OS Routing Tables document, then bgp.l3vpn.0/bgp.l3vpn-inet6.0 or bgp.l2vpn.0 tables contain routes learned from other PE routers in Layer 3 or Layer 2 VPN environment respectively. Later, routes from those tables are copied to VRFs based on route-distinguisher. However, how does router distinguish that route is learned in Layer 3 or Layer 2 VPN environment so that it knows whether to put the route into bgp.l3vpn.0 table or bgp.l2vpn.0 table in the first place?

2

Great question!

When a route is distributed via MP-BGP, different route types are identified by their Address Family Identifier (AFI) and Subsequent Address Family Identifier (SAFI), attributes which are carried with the route between nodes.

For example L3VPN routes will have an AFI of 1 if they're IPv4, 2 if they're IPv6 and both will have a SAFI of 128 if they're Unicast routes.

L2VPN routes on the other hand will have an AFI of 25 and a SAFI of 65.

If you'd like some more detail, Juniper have a pretty good breakdown here:

https://www.juniper.net/documentation/en_US/junos/topics/usage-guidelines/routing-enabling-multiprotocol-bgp.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.