--- wikisrc/users/kefren/mpls.mdwn 2010/07/04 20:33:18 1.2 +++ wikisrc/users/kefren/mpls.mdwn 2012/11/01 09:21:52 1.3 @@ -1,7 +1,7 @@ #Some quick info about MPLS: You need to compile your kernel with options MPLS and psuedo-device ifmpls -For pure LSR - that only switch labels without encap/decap from other protocols (e.g. INET) you need only to work on routing table. For example: +For pure LSR - that only switch labels without encap/decap from other protocols (e.g. INET) - you need to work on routing table, ONLY. For example:
# route add -mpls 41 -tag 25 -inet 193.28.151.97
 add host 41: gateway 193.28.151.97
@@ -10,7 +10,7 @@ add host 42: gateway 193.28.151.97
 # route add -mpls 51 -tag 25 -inet 193.28.151.97
 add host 51: gateway 193.28.151.97
-Translation of first line: if it receives an MPLS frame with label 41 forward it to INET next-hop 193.28.151.97, tagged with label 25 +Translation of first line: if it receives an MPLS frame with label 41 forward it to INET next-hop 193.28.151.97, but switch (change) label 41 with label 25 You also need to tweak sysctl to accept and forward MPLS: @@ -33,14 +33,14 @@ Destination Gateway Fl #Interacting with other protocols -If you want to also decapsulate/encapsulate from MPLS to some other protocol (like INET or INET6), you have to create an mpls interface and put in up. +If you want to also decapsulate/encapsulate from MPLS to some other protocol (like INET or INET6), then you have to create an mpls interface and put in up state.
 # ifconfig mpls0 create up
 
-After that create routes like this - use -ifa flag in order to avoid self-generated packets having source address 1.1.1.1, but route them through mpls0 interface. +After that, create routes using ifa flag in order to specify the source interface (used for source IP Address of host generated packets), but route them through mpls0 interface.
 # route add 204.152.190.0/24 -ifa 193.28.151.105 -ifp mpls0 -tag 25 -inet 193.28.151.97
@@ -94,4 +94,4 @@ traceroute to 204.152.190.12 (204.152.19
 16  www.netbsd.org (204.152.190.12)  199.676 ms  201.652 ms  201.673 ms
 
-I'm working on [[LDP]] daemon, it should be available in src tree in a couple of months. You may still want to test the beta. +See also [[LDP]] wiki page.