[ovs-discuss] dec_ttl action doesn't work and sorry for multiple posts.

Justin Pettit jpettit at nicira.com
Tue Feb 4 04:52:12 UTC 2014


Does it properly decrement the TTL if you don't modify the TOS?  Does it behave as you'd expect with OVS 2.0 (the latest release)?

--Justin


> On Feb 3, 2014, at 7:00 PM, Allan Jie <allanmcgrady at gmail.com> wrote:
> 
> I want to clarify the problem. And I don't why I cannot post that correctly.
> 
> Now here is the thing.
> I start a network like 4 host and 1 switches.
> h1,h2 and s1.
> 
> I know the dec_ttl action is for ipv4 packet and openflow 1.1+.
> 
> So I have finished this command.
> ovs-vsctl set bridge s1 protocols=OpenFlow10,OpenFlow12,OpenFlow13
> And also use -O OpenFlow13 in ovs-ofctl.
> Like the following line:
> ovs-ofctl -O OpenFlow13 add-flow s1 table=0,priority=65535,ip,in_port=1,vlan_tci=0x0000,dl_src=9e:60:7c:45:f2:b8,dl_dst=32:a2:19:d3:56:4f,nw_src=10.0.0.1,nw_dst=10.0.0.2,nw_proto=0,nw_tos=0,actions=output:2,dec_ttl
> 
> Then in h1, I use the command 
> h1 sendip -d dsf -p ipv4 -is 10.0.0.1 -id 10.0.0.2 10.0.0.2
> which will send an "ip packet" from h1 to h2.
> 
> And then in h2, I use this command to listen the port.
> tcpdump ip host 10.0.0.1 -v
> 
> But the result is I cannot see any changes of the ttl in the received packet. The ttl value is still 64.
> 
> 
> I have done that according to Justin information. But I still cannot get it work. I change the ovs-ofctl like this as you said. (position of dec_ttl and output)
> ovs-ofctl -O OpenFlow13 add-flow s1 table=0,priority=65535,ip,in_port=1,dl_src=3e:a4:62:46:92:28,dl_dst=86:9e:4b:4c:54:53,nw_src=10.0.0.1,nw_dst=10.0.0.2,nw_proto=0,nw_tos=0,actions=dec_ttl,output:2
> 
> However, when I also use another actions, it seems that it doesn't work too. Like I use this following actions
> actions=del_ttl,mod_nw_tos:0x08,output:2
> But I use tcpdump ip host 10.0.0.1 -v
> I cannot see any change of the "tos" value of the packet. Here comes the result of tcpdump
> ------------------------------------
> 10.0.0.1 > 10.0.0.2:  ip 3
> 17:57:42.921902 IP (tos 0xc0, ttl 64, id 56235, offset 0, flags [none], proto ICMP (1), length 51)
> --------------------------------
> My environment is mininet 2.1 and openvswitch 1.10. 
> 
> Maybe I will try to clarify my problem again.
> My setup is very simple. Using Mininet to configure this network.
> h1 (h1-eth0)----(s1-eth1)s1(s1-eth2)---(h1-eth0)h2.
> 
> I start the network using this command.
> sudo mn --switch ovsk --mac --custom ~/mininet/custom/LinkCustom.py --topo mytopo
> BTW, I try to use the following command to modify something.
> sudo ovs-ofctl -O OpenFlow13 add-flow s1 table=0,priority=65535,ip,in_port=1,dl_src=fe:81:d2:69:f6:74,dl_dst=de:dc:30:cd:6f:66,nw_src=10.0.0.1,nw_dst=10.0.0.2,nw_proto=0,nw_tos=0,actions=dec_ttl,mod_nw_dst:10.0.0.3,mod_dl_dst:00:00:00:00:00:11,output:2
> 
> And it did change the dst ip and dst mac. (I also use tcpdump command to monitor on the h2 side)
> However, dec_ttl still doesn't work. Can anybody help me out?
> 
> 
> -- 
> Research student, final-year undergraduate
> Extreme Scale Network Computing and service laboratory(http://www.cloud-uestc.cn/cloud-uestc-EN/index.html),
> School of Computer Science & Engineering,
> University of Electronic Science and Technology of China(http://www.oice.uestc.edu.cn/en/).
> Website: http://www.allanjie.ml/
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20140203/fc1cb151/attachment.html>


More information about the discuss mailing list