All of lore.kernel.org
 help / color / mirror / Atom feed
* MPLS decap with iproute2
@ 2015-12-07 19:42 Sam Russell
  2015-12-07 21:42 ` Robert Shearman
  2015-12-08  2:37 ` roopa
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Russell @ 2015-12-07 19:42 UTC (permalink / raw)
  To: netdev

Hi,

I've had success with the iproute2 manpage example for encapsulating
outgoing traffic in MPLS, but I've not found a way to add decap routes
inbound.

I've tried "ip route -f mpls add 100 dev lo" and other variations, but I
get netlink errors back.

Has this been built yet? Is there sample config that I can try out? I'm
running a home-built 4.3 kernel + iproute2 built from head (on ubuntu
15.10) and am comfortable with perf and splashing around in the codebase if
need be.

Cheers
Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MPLS decap with iproute2
  2015-12-07 19:42 MPLS decap with iproute2 Sam Russell
@ 2015-12-07 21:42 ` Robert Shearman
  2015-12-07 21:50   ` Sam Russell
  2015-12-08  2:37 ` roopa
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Shearman @ 2015-12-07 21:42 UTC (permalink / raw)
  To: Sam Russell, netdev

On 07/12/15 19:42, Sam Russell wrote:
> Hi,
>
> I've had success with the iproute2 manpage example for encapsulating
> outgoing traffic in MPLS, but I've not found a way to add decap routes
> inbound.
>
> I've tried "ip route -f mpls add 100 dev lo" and other variations, but I
> get netlink errors back.
>
> Has this been built yet? Is there sample config that I can try out? I'm
> running a home-built 4.3 kernel + iproute2 built from head (on ubuntu
> 15.10) and am comfortable with perf and splashing around in the codebase if
> need be.

Hi Sam,

This certainly works on net-next, albeit with a bug on the subsequent 
"ip route -f mpls list" that I'll shortly be sending a patch for.

Have you first set an appropriate label table size? E.g.:

   $ sysctl net.mpls.platform_labels=1048575

If you intend to receive non-BOS traffic over your route above, then you 
should also make sure to enable mpls input on lo (and your actual input 
interfaces), otherwise the traffic will be dropped.

Thanks,
Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MPLS decap with iproute2
  2015-12-07 21:42 ` Robert Shearman
@ 2015-12-07 21:50   ` Sam Russell
  2015-12-08 21:45     ` David Ahern
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Russell @ 2015-12-07 21:50 UTC (permalink / raw)
  To: Robert Shearman; +Cc: netdev

Hi Robert,

Thanks for the tip, I'll give it a shot when I get home this evening (UTC+13).
I'm planning to put together a blog on how to manually string up an
MPLS l3vpn, to help people start playing with the new MPLS support now
that it's finally in the mainline kernel.

Cheers
Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MPLS decap with iproute2
  2015-12-07 19:42 MPLS decap with iproute2 Sam Russell
  2015-12-07 21:42 ` Robert Shearman
@ 2015-12-08  2:37 ` roopa
  2015-12-08  7:26   ` Sam Russell
  1 sibling, 1 reply; 6+ messages in thread
From: roopa @ 2015-12-08  2:37 UTC (permalink / raw)
  To: Sam Russell; +Cc: netdev

On 12/7/15, 11:42 AM, Sam Russell wrote:
> Hi,
>
> I've had success with the iproute2 manpage example for encapsulating
> outgoing traffic in MPLS, but I've not found a way to add decap routes
> inbound.
>
> I've tried "ip route -f mpls add 100 dev lo" and other variations, but I
> get netlink errors back.
>
> Has this been built yet? Is there sample config that I can try out? I'm
> running a home-built 4.3 kernel + iproute2 built from head (on ubuntu
> 15.10) and am comfortable with perf and splashing around in the codebase if
> need be.
>
Example below should work
 ip -f mpls route add 100 as 200 via inet 10.1.1.2 dev eth0

You have to enable mpls on the interface first:
echo 1 > /proc/sys/net/mpls/conf/eth0/input

multipath iproute2 patches are not in yet. Will submit them soon.

let me know if you still get errors.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MPLS decap with iproute2
  2015-12-08  2:37 ` roopa
@ 2015-12-08  7:26   ` Sam Russell
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Russell @ 2015-12-08  7:26 UTC (permalink / raw)
  To: roopa; +Cc: netdev

Thanks all for your help, I got it working with Robert and Roopa's
sysctl settings, the following works:

ip route -f mpls add 100 dev lo

On 8 December 2015 at 15:37, roopa <roopa@cumulusnetworks.com> wrote:
> On 12/7/15, 11:42 AM, Sam Russell wrote:
>> Hi,
>>
>> I've had success with the iproute2 manpage example for encapsulating
>> outgoing traffic in MPLS, but I've not found a way to add decap routes
>> inbound.
>>
>> I've tried "ip route -f mpls add 100 dev lo" and other variations, but I
>> get netlink errors back.
>>
>> Has this been built yet? Is there sample config that I can try out? I'm
>> running a home-built 4.3 kernel + iproute2 built from head (on ubuntu
>> 15.10) and am comfortable with perf and splashing around in the codebase if
>> need be.
>>
> Example below should work
>  ip -f mpls route add 100 as 200 via inet 10.1.1.2 dev eth0
>
> You have to enable mpls on the interface first:
> echo 1 > /proc/sys/net/mpls/conf/eth0/input
>
> multipath iproute2 patches are not in yet. Will submit them soon.
>
> let me know if you still get errors.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MPLS decap with iproute2
  2015-12-07 21:50   ` Sam Russell
@ 2015-12-08 21:45     ` David Ahern
  0 siblings, 0 replies; 6+ messages in thread
From: David Ahern @ 2015-12-08 21:45 UTC (permalink / raw)
  To: Sam Russell, Robert Shearman; +Cc: netdev

On 12/7/15 2:50 PM, Sam Russell wrote:
> Hi Robert,
>
> Thanks for the tip, I'll give it a shot when I get home this evening (UTC+13).
> I'm planning to put together a blog on how to manually string up an
> MPLS l3vpn, to help people start playing with the new MPLS support now
> that it's finally in the mainline kernel.
>

FWIW, I have demo of this topology with MPLS + VRFs for the VRF tutorial 
at netdev1.1:

h       +--------+                                    +--------+      h
o  -----|        |                                    |        |----- o
s   ... |  c1e1  |-----+                        +-----|  c1e2  | ...  s
t  -----|        |     |                        |     |        |----- t
s       +--------+     |                        |     +--------+      s
                     +-------+              +-------+
                     |       |   +------+   |       |
                     |  pe1  |---|  pe  |---|  pe2  |
                     |       |   +------+   |       |
                     +-------+              +-------+
h       +--------+     |                        |     +--------+      h
o  -----|        |     |                        |     |        |----- o
s   ... |  c2e1  |-----+                        +-----|  c2e2  | ...  s
t  -----|        |                                    |        |----- t
s       +--------+      \----------------------/      +--------+      s
                            provider backbone

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-08 21:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 19:42 MPLS decap with iproute2 Sam Russell
2015-12-07 21:42 ` Robert Shearman
2015-12-07 21:50   ` Sam Russell
2015-12-08 21:45     ` David Ahern
2015-12-08  2:37 ` roopa
2015-12-08  7:26   ` Sam Russell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.