[ovs-dev] ovs and gre tunnel configuration

ravi kerur rkerur at gmail.com
Tue Jun 5 17:31:02 UTC 2012


1. if i configure gre port with the following option(local_ip)

ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre
options:local_ip=10.0.0.3,remote_ip=10.0.0.7

ovs-vsctl show command, shows gre0 port configured.

ovs-dpctl and ovs-ofctl show br0 commands, do not show gre0 port
configured, at least from the output I am assuming gre0 port is not
seen by ovs-ofctl and ovs-dpctl.

Is this normal or is it a bug? this is from latest ovs git. Generally
tunnel interface is configured with both source and destination IP,
just wanted to check. if local_ip option is removed, all 3 dp/of/vs
commands are in sync.

2. tcpdmp on eth0 doesn't capture any packets so none of the packets
are going out.

3. reduced the flow configuration to just match IP(no vlan as before)
still same problem.

4. ovs-dpctl dump-flows br0 shows

in_port(0),eth(src=00:27:13:67:b9:9b,dst=00:24:7e:68:ae:46),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.7,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0),
packets:5, bytes:490, used:0.728s, actions:set(tun_id(0x6f)),2


On Mon, Jun 4, 2012 at 8:07 PM, Jesse Gross <jesse at nicira.com> wrote:
> On Tue, Jun 5, 2012 at 5:26 AM, ravi kerur <rkerur at gmail.com> wrote:
>> Hi, I see some discussion on ovs + gre but not sure what the solution
>> is. I am facing some what similar issue w.r.t configuration and flow
>> matching.
>>
>> On host-1, gre0 interface is configured via
>>
>> ovs-vsctl add-br br0
>> ovs-vsctl add-port br0 eth0
>> ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre
>> options:remote_ip=10.0.0.7
>>
>> ifconfig eth0 0
>> ifconfig br0 10.0.0.3 netmask 255.255.255.0 up
>>
>> gre0 is added to br0 port table and I have verified using
>> ovs-[vs/dp/of]ctl show commands
>>
>> however, gre0 interface is not in the interface table i.e. if I do
>> "ifconfig -a" I don't see gre interface.
>
> It's not supposed to be.  You can run tcpdump on the physical interface.
>
>> Now, I configure flows for transmit and receive packets via gre0
>> tunnel as follows
>>
>> on host-1:
>>
>> ovs-ofctl add-flow br0
>> priority=104,idle_timeout=50000,dl_type=0x0800,nw_proto=1,nw_src=10.0.0.3/32,nw_dst=10.0.0.7/32,actions=mod_vlan_vid:300,mod_vlan_pcp:3,set_tunnel:111,2
>>
>> ovs-ofctl add-flow br0
>> priority=104,idle_timeout=50000,tun_id=222,dl_vlan=200,actions=strip_vlan,NORMAL
>>
>> on host-2:
>>
>> ovs-vsctl add-br br0
>> ovs-vsctl add-port br0 eth0
>> ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre
>> options:remote_ip=10.0.0.3
>>
>> ifconfig eth0 0
>> ifconfig br0 10.0.0.7 netmask 255.255.255.0 up
>>
>> ovs-ofctl add-flow br0
>> priority=104,idle_timeout=50000,dl_type=0x0800,nw_proto=1,nw_src=10.0.0.7/32,nw_dst=10.0.0.3/32,actions=mod_vlan_vid:200,mod_vlan_pcp:3,set_tunnel:222,2
>>
>> ovs-ofctl add-flow br0
>> priority=104,idle_timeout=50000,tun_id=111,dl_vlan=300,actions=strip_vlan,NORMAL
>>
>>
>> When I ping from host-1 to host-2,
>>
>> on host-1, i see ICMP packets matching first entry, however, I am not
>> able to capture packets going out since tcpdump won't work due to gre0
>> not in interface table.
>>
>> on host-2, packets are not matched at all.
>>
>> My question is, any additional configuration needed to get icmp
>> packets go through tunnel interface?
>
> What do you see if you run tcpdump on eth0 on the receiving system?
> What about ovs-dpctl dump-flows?  If you're having a matching problem
> you should try simplifying your flows to isolate the problem.



More information about the dev mailing list