Managing a MPLS Connection

From AVNOC

MPLS Instructions

MPLS offers a network method to bridge ip networks through a connection by creating a virtual network that is used by the kernel to route packets to and from the agent.

Enable MPLS

As root on agent

modprobe mpls_router modprobe mpls_gso modprobe mpls_iptunnel

Setup veth to communicate wtih veth1

ip link add veth0 type veth peer name veth1

sysctl -w net.mpls.conf.veth0.input=1 sysctl -w net.mpls.conf.lo.input=1 sysctl -w net.mpls.platform_labels=1000001

Configure MPLS

The MPLS configuration requires 2 endpoints using predefined labels (security)

The labels assigned define the pathways between the two hosts. They must be distinct label for each connection.

host 1 ---> host 2 label 1000001 host 2 ---> host 1 label 1000002

This example is for single node connections.

Execute as root.

Create the veth0 (local) to veth1 (remote)

ifconfig veth0 10.2.2.216/24 up

ip netns add host1

ip netns exec host1 ifconfig lo 10.2.2.217.1/32 up

ip netns exec host1 ifconfig veth1 10.3.3.2/24 up