Re: [mpls-linux-general] Does mpls-linux support for add label to normal IP packet?
Status: Beta
Brought to you by:
jleu
From: 刘磊 <orp...@ms...> - 2008-04-23 09:58:07
|
Thank You. I have do that you said. BUT I'm in HOST B, LER2. My ip address is 192.168.99.4/24 and 10.0.0.2. -bash-3.2# dmesg MPLS: version 1.958 MPLS: protocol driver interface - MPLS: IPv4 over MPLS support -bash-3.2# -bash-3.2# lsmod Module Size Used by Not tainted mpls4 3904 0 mpls 67240 1 mpls4 pcnet32 27332 0 e100 28620 0 e1000 105024 0 e1000e 80932 0 -bash-3.2# -bash-3.2# ip r 10.0.0.1 via 172.16.0.2 dev eth1 mpls 0x3 172.16.0.0/24 dev eth1 proto kernel scope link src 172.16.0.3 192.168.99.0/24 dev eth2 proto kernel scope link src 192.168.99.3 -bash-3.2# -bash-3.2# mpls nhlfe show NHLFE entry key 0x00000003 mtu 1496 propagate_ttl push gen 2000 set eth1 ipv4 172.16.0.2 (0 bytes, 0 pkts) NHLFE entry key 0x00000002 mtu 1500 propagate_ttl set eth2 ipv4 192.168.1.4 (0 bytes, 0 pkts) And after I had a ping in 10.0.0.2 -bash-3.2# ip r 10.0.0.1 via 172.16.0.2 dev eth1 mpls 0x3 172.16.0.0/24 dev eth1 proto kernel scope link src 172.16.0.3 192.168.99.0/24 dev eth2 proto kernel scope link src 192.168.99.3 -bash-3.2# mpls nhlfe show NHLFE entry key 0x00000003 mtu 1496 propagate_ttl push gen 2000 set eth1 ipv4 172.16.0.2 (0 bytes, 0 pkts) NHLFE entry key 0x00000002 mtu 1500 propagate_ttl set eth2 ipv4 192.168.1.4 (0 bytes, 0 pkts) -bash-3.2# -bash-3.2# ifconfig eth1 Link encap:Ethernet HWaddr 00:C0:5C:12:C4:0D inet addr:172.16.0.3 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:214 errors:0 dropped:0 overruns:0 frame:0 TX packets:44 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:17444 (17.0 KiB) TX bytes:4298 (4.1 KiB) Base address:0xc400 Memory:ff780000-ff7a0000 eth2 Link encap:Ethernet HWaddr 00:C0:5C:12:C4:0E inet addr:192.168.99.3 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1025 errors:0 dropped:0 overruns:0 frame:0 TX packets:263 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:77966 (76.1 KiB) TX bytes:49836 (48.6 KiB) Base address:0xc000 Memory:ff740000-ff760000 And tcpdump in LER2's eth1 (to LER1's 172.16.0.2) 00:20:18.333708 IP 10.0.0.2> 10.0.0.1: ICMP echo request, id 59752, seq 27, length 64 0x0000: 4500 0054 0000 4000 3f01 27a7 0a00 0002 0x0010: 0a00 0001 0800 df87 e968 001b 5f05 0f48 0x0020: c9a3 0c00 0809 0a0b 0c0d 0e0f 1011 1213 0x0030: 1415 1617 1819 00:20:19.321941 arp who-has 172.16.0.2 tell 172.16.0.3 0x0000: 0001 0800 0604 0001 00c0 5c12 c40d ac10 0x0010: 0003 0000 0000 0000 ac10 0002 00:20:19.322301 arp reply 172.16.0.2 is-at 00:0c:29:ef:a2:98 0x0000: 0001 0800 0604 0002 000c 29ef a298 ac10 0x0010: 0002 00c0 5c12 c40d ac10 0003 0000 0000 0x0020: 0000 0000 0000 0000 0000 0000 0000 00:20:19.333624 IP 10.0.0.2> 10.0.0.1: ICMP echo request, id 59752, seq 28, length 64 0x0000: 4500 0054 0000 4000 3f01 27a7 0a00 0002 0x0010: 0a00 0001 0800 de86 e968 001c 6005 0f48 0x0020: c9a3 0c00 0809 0a0b 0c0d 0e0f 1011 1213 0x0030: 1415 1617 1819 There was no MPLS-DATA in the packet, and the packet forward to 172.16.0.2 in original IP packet. ________________________________ > Date: Wed, 23 Apr 2008 11:37:57 +0300 > From: adr...@gm... > To: orp...@ms... > Subject: Re: [mpls-linux-general] Does mpls-linux support for add label to normal IP packet? > CC: mpl...@li... > > Ok, concentrate on LER1; > It will encapsulate in MPLS only packets that go to 10.0.0.2/32. The rest of the traffic will be plain IP. > > Try again and look for error messages after each command. Make sure you're running the mpls-enabled kernel (dmesg | grep mpls) and also that you have the mpls4 module loaded (lsmod | grep mpls). > > After starting a ping to 10.0.0.2 issue these commands on ler1: > mpls nhlfe show > ip route show > > If all is setup correctly, tcpdump will show the MPLS header between Ethernet and IP. > > You only need iptables if you want to create more specific rules to use for MPLS. Something like you want only FTP traffic to go through MPLS or you want traffic from source X to go through MPLS, etc. You can use iproute to specify that you want traffic going to destination X to go through MPLS. > > Cheers, > Adrian > > 2008/4/23 刘磊 <orp...@ms...>: > > Hello > Thank You first. > I had tried "IPv4 over MPLS: two LER example for mpls-linux-1.95x", same as the example. > BUT, I had not find in the packets(above the ether layer, and below the IP layer) out from LER1's eth2 by tcpdump. > Does it's MUST with iptables to do this? > > ________________________________ >> Date: Wed, 23 Apr 2008 09:25:18 +0300 >> From: adr...@gm... >> To: orp...@ms... >> Subject: Re: [mpls-linux-general] Does mpls-linux support for add label to normal IP packet? >> CC: mpl...@li... >> >> Hello, >> >> The mpls command allows you to create labels and the route/iptables commands allow you to map certain IP flows to created labels. >> Please, better explain your problem (which example you used), and what was the problem so that we can better help. >> >> For a small overview of what mpls-linux does and how to use it, look here: >> http://mpls-linux.sourceforge.net/ >> http://www.elcom.pub.ro/~adrian.popa/mpls-linux/mpls-linux-docs/ >> >> Cheers, >> Adrian >> >> 2008/4/23 刘磊 <orp...@ms...>: >> >> Hi all: >> I'm a new bie. >> And I had some problem in MPLS-Linux. >> Does mpls-linux support for add label to normal IP packet? >> I'm failed with "Links to examples", because the LER1 doesn't add label to the normal IP packets. >> Which function will do that in the source code? >> _________________________________________________________________ >> 新年换新颜,快来妆扮自己的MSN给心仪的TA一个惊喜! >> http://im.live.cn/emoticons/?ID=18 >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save $100. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ >> mpls-linux-general mailing list >> mpl...@li... >> https://lists.sourceforge.net/lists/listinfo/mpls-linux-general > > _________________________________________________________________ > 多个邮箱同步管理,live mail客户端万人抢用中 > http://get.live.cn/product/mail.html > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general _________________________________________________________________ 用手机MSN聊天写邮件看空间,无限沟通,分享精彩! http://mobile.msn.com.cn/ |