Diff for /wikisrc/users/kefren/mpls.mdwn between versions 1.2 and 1.3

version 1.2, 2010/07/04 20:33:18 version 1.3, 2012/11/01 09:21:52
Line 1 Line 1
 #Some quick info about MPLS:  #Some quick info about MPLS:
   
 You need to compile your kernel with options MPLS and psuedo-device ifmpls  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:
   
 <pre># route add -mpls 41 -tag 25 -inet 193.28.151.97  <pre># route add -mpls 41 -tag 25 -inet 193.28.151.97
 add host 41: gateway 193.28.151.97  add host 41: gateway 193.28.151.97
Line 10  add host 42: gateway 193.28.151.97 Line 10  add host 42: gateway 193.28.151.97
 # route add -mpls 51 -tag 25 -inet 193.28.151.97  # route add -mpls 51 -tag 25 -inet 193.28.151.97
 add host 51: gateway 193.28.151.97</pre>  add host 51: gateway 193.28.151.97</pre>
   
 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:  You also need to tweak sysctl to accept and forward MPLS:
   
Line 33  Destination        Gateway            Fl Line 33  Destination        Gateway            Fl
   
 #Interacting with other protocols  #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.
   
   
 <pre>  <pre>
 # ifconfig mpls0 create up  # ifconfig mpls0 create up
 </pre>  </pre>
   
 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.
   
 <pre>  <pre>
 # route add 204.152.190.0/24 -ifa 193.28.151.105 -ifp mpls0 -tag 25 -inet 193.28.151.97  # route add 204.152.190.0/24 -ifa 193.28.151.105 -ifp mpls0 -tag 25 -inet 193.28.151.97
Line 94  traceroute to 204.152.190.12 (204.152.19 Line 94  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  16  www.netbsd.org (204.152.190.12)  199.676 ms  201.652 ms  201.673 ms
 </pre>  </pre>
   
 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.

Removed from v.1.2  
changed lines
  Added in v.1.3


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb