On 2/10/2019 11:45 PM, Boris Ouretskey wrote:
Hi I am trying to set up GRE tunnel between OVS switches on a single machine. For that I have run simple *_mininet topology _*with two hosts running in container connected to two different OVS switches.

Outside of container, I have configured GRE endpoint for each switch created by mininet and assigned ip's to internal switch ports.

In general it looks like theat

[h1 host mininet container ip = 10.0.0.1]-->s1 switch[s1 port ip = 12.0.0.1, gre:remote_ip=12.0.0.2] [h2 host mininet container ip = 10.0.0.2]-->s2 switch[s2 port ip = 12.0.0.2, gre:remote_ip=12.0.0.1]

I would expect GRE encapsulated packets to be routed from s1 to s2 and vice versa. However the behavior that I observe is that GRE encapsulated the packets (eventually ARP) _have the same source and destination ip address_ (if pinging from h2 it would be 12.0.0.1) and not reaching anywhere.

@ubuntu:~$ sudo ovs-vsctl show
...

    Bridge "s2"
        fail_mode: standalone
        Port "gre2"
            Interface "gre2"
                type: gre
                options: {remote_ip="12.0.0.1"}
        Port "s2"
            Interface "s2"
                type: internal
        Port "s2-eth1"
            Interface "s2-eth1"
    Bridge "s1"
        fail_mode: standalone
        Port "gre1"
            Interface "gre1"
                type: gre
                options: {remote_ip="12.0.0.2"}
        Port "s1-eth1"
            Interface "s1-eth1"
        Port "s1"
            Interface "s1"
                type: internal
    ovs_version: "2.10.90"

@ubuntu:~$ ifconfig s2
s2        Link encap:Ethernet  ...
          inet addr:12.0.0.2 Bcast:0.0.0.0  Mask:255.255.255.0

@ubuntu:~$ ifconfig s1
s1        Link encap:Ethernet  ...
          inet addr:12.0.0.1 Bcast:0.0.0.0  Mask:255.255.255.0

I can see GRE packets in wireshark but only when listening on any interface where it appears as "Linux cooked capture"



It doesn't appear to me that you have the ip addresses for s1 and s2 isolated to a container.  IP addresses belong to the system, not the interface so that's your problem.

Check system-traffic.at for examples on how to isolate interfaces to namespaces (containers), that will help you out.

- Greg




_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to