Re: [mpls-linux-general] Examples for nffwd command
Status: Beta
Brought to you by:
jleu
|
From: James R. L. <jl...@mi...> - 2005-06-16 02:30:54
|
On Fri, Jun 03, 2005 at 10:55:36AM +0200, Bertrand Lemaitre wrote: > Hi, >=20 > Is it possible to have an example for the use of the nffws instruction ? > Moreover, can you send an example for a stack of two labels with a tunnel= ? Here is an example that creates a label stack by utilizing a tunnel interfa= ce. The tunnel NHLFE always pushed label 10000, then based on the NF mark assigned by iptables, it will push either 21000 or 20000. mpls nhlfe add key 0 instructions push gen 20000 nexthop eth0 ipv4 192.168.= 2.1 (creates key 0x2) mpls nhlfe add key 0 instructions push gen 21000 nexthop eth0 ipv4 192.168.= 2.1 (creates key 0x3) mpls nhlfe add key 0 instructions push gen 10000 nffwd 0x2 0x0 0x2 0x1 0x2 = 0x2 0x3 0x3 0x3 (creates key 0x4) mpls tunnel add dev mpls0 key 0x4 ip addr add 10.0.0.1/24 dev mpls0 ip route add 1.1.1.1/32 via 10.0.0.2 ip route add 2.2.2.2/32 via 10.0.0.2 ip route add 3.3.3.3/32 via 10.0.0.2 iptables -t mangle -I OUTPUT -d 1.1.1.1/32 -j MARK --set-mark 1 iptables -t mangle -I OUTPUT -d 2.2.2.2/32 -j MARK --set-mark 2 Traffic going to: - 1.1.1.1 gets label stack 10000:20000 - 2.2.2.2 gets label stack 10000:21000 - 3.3.3.3 gets label stack 10000:20000 I hope this helps! >=20 > Thanks ! >=20 > Bertrand Lemaitre >=20 > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=3Doffad-ysdn-ostg-q22= 005 > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general --=20 James R. Leu jl...@mi... |