Hi Iwase

You're right that GoBGP assigns a label of zero in its code.

Didn’t know someone had submitted a PR for auto assignment of labels. Can 
someone comment on why this request was not merged?

Good question about received routes with labels. I'm not sure what the right 
treatment is in general. But for a BGP/MPLS PE, if a received VPNv4 route is 
selected as best route, then GoBGP should install the associated prefix in 
FRR/Zebra with the instruction of encapsulating the packet with the label of 
the route.

Specifying a label for a VRF through CLI, and then associating that label to 
the VRF at the time of creation is a possible solution. However, it puts the 
burden on person writing configuration to ensure that label is unique per VRF.

What's the best way to proceed further?

thx
aman

-----Original Message-----
From: Iwase Yusuke [mailto:iwase.yusu...@gmail.com] 
Sent: Thursday, January 25, 2018 11:37 PM
To: SHAIKH, AMAN (AMAN) <asha...@research.att.com>
Cc: gobgp-devel@lists.sourceforge.net
Subject: Re: [GoBGP-devel] MPLS label issue with VPNv4 routes

Hi again Aman,

Thank you for your reporting.

Hmmm... I read some GoBGP's source codes and (as far as I read) GoBGP does not 
have feature for auto MPLS labels assignment.
GoBGP assigns always zero label when paths are imported from VRF to global RIB.
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_osrg_gobgp_blob_b391322bcbf56d623ca0a6b667c026b92f1e9e4d_table_path.go-23L1149&d=DwIDaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=I_2UmL83HQfOEoCVzChS_fiJdy8vxHF4_JM0AhcKK4Y&m=XsNqliUbM-wXJ4BIRg17Ql3I4zlbKtrslZXuwiiSSj0&s=BcbeyetoCSSUtbWvGqWD07P1sRBpcVKiWhrYZ2CYP0M&e=
In other words, it seems that GoBGP assumes that MPLS labels should be 
specified through APIs.

FYI, the auto assignment feature seems to be posted, but not merged.
(sorry, I don't know why...)
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_osrg_gobgp_pull_366&d=DwIDaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=I_2UmL83HQfOEoCVzChS_fiJdy8vxHF4_JM0AhcKK4Y&m=XsNqliUbM-wXJ4BIRg17Ql3I4zlbKtrslZXuwiiSSj0&s=BuzaMx-UPDZUk8TQkyyyrRJMDX5faq5YG3mVHMetuLs&e=
 

A part from the auto assignment feature, the problem is there is no way to 
assign MPLS labels for the received routes, right?
If we can assign MPLS labels when VRF creation, does it solve this problem?
For example,
   # Specify MPLS label(s) which assigned to paths on this VRF
   $ gobgp vrf add blue rd 65000:100 rt both 65000:100 label 100

Thanks,
Iwase

On 2018年01月26日 01:29, SHAIKH, AMAN  (AMAN) wrote:
> Hi
> 
> I have noticed that GoBGP is assigning MPLS label of zero to all VPNv4 
> routes that are imported from VRF RIBs into the default RIB.
> 
> In my testbed, I have a PE (vsp-west-pe) connected to two CEs in two 
> different VRFs named ‘blue’ and ‘red’. Each CE sends a route to the PE 
> for prefix 192.168.0.0/24.
> 
> Here’s the RIB for blue VRF on vsp-west-pe:
> 
> [ashaikh@vsp-vpe-west ~]$ gobgp vrf blue rib
> 
>     Network              Next Hop             AS_PATH              Age        
> Attrs
> 
>     192.168.0.0/24       10.200.0.2           65001                00:51:30   
> [{Origin: i} {Med: 0}]
> 
> Similarly, here’s the RIB for red VRF:
> 
> [ashaikh@vsp-vpe-west ~]$ gobgp vrf red rib
> 
>     Network              Next Hop             AS_PATH              Age        
> Attrs
> 
>     192.168.0.0/24       10.201.0.3           65003                00:52:22   
> [{Origin: i} {Med: 0}]
> 
> Finally, here’s the list of VPNv4 routes in the default RIB:
> 
> [ashaikh@vsp-vpe-west ~]$ gobgp global rib -a vpnv4
> 
>     Network              Labels     Next Hop             AS_PATH              
> Age        Attrs
> 
> *> 100:1:192.168.0.0/24 [0]        10.200.0.2           65001                
> 00:53:05   [{Origin: i} {Med: 0} {Extcomms: [100:1]}]
> 
> *> 100:2:192.168.0.0/24 [0]        10.201.0.3           65003                
> 00:53:05   [{Origin: i} {Med: 0} {Extcomms: [100:2]}]
> 
> As you can see the label stack for each route has a single label whose 
> value is zero.
> 
> thx
> 
> aman
> 
> 
> 
> ----------------------------------------------------------------------
> -------- Check out the vibrant tech community on one of the world's 
> most engaging tech sites, Slashdot.org! 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot&;
> d=DwIDaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=I_2UmL83HQfOEoCVzChS_fiJdy8vxHF4_J
> M0AhcKK4Y&m=XsNqliUbM-wXJ4BIRg17Ql3I4zlbKtrslZXuwiiSSj0&s=SZQBLGTxOcpe
> -HsHL4fxHUDpCPrFUUrcnmDWzm06fjY&e=
> 
> 
> 
> _______________________________________________
> gobgp-devel mailing list
> gobgp-devel@lists.sourceforge.net
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge
> .net_lists_listinfo_gobgp-2Ddevel&d=DwIDaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=
> I_2UmL83HQfOEoCVzChS_fiJdy8vxHF4_JM0AhcKK4Y&m=XsNqliUbM-wXJ4BIRg17Ql3I
> 4zlbKtrslZXuwiiSSj0&s=M9YKLS1qe0QScqBMHztadD4trPDCszsU40nKsj0POF8&e=
> 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gobgp-devel mailing list
gobgp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gobgp-devel

Reply via email to