Hi Tarek, 
Here are a couple of examples defining per port IPv4 TEP src/dst in the
OVSDB tables statically and a per flow setup in case it helps. Its an
exciting topic so pardon, the verbosity.

Host1
-------
ovs-vsctl add-br br0
ovs-vsctl set bridge br0 protocols=OpenFlow13
ovs-vsctl add-port br0 vxlan -- set Interface vxlan type=gre
options:key=flow options:local_ip=192.168.1.180
options:remote_ip=192.168.1.181 ofport_request=10
<add flowmods to get pings working>

Host2
-------
ovs-vsctl add-br br0
ovs-vsctl set bridge br0 protocols=OpenFlow13
ovs-vsctl add-port br0 vxlan -- set Interface vxlan type=gre
options:key=flow options:local_ip=192.168.1.180
options:remote_ip=192.168.1.181 ofport_request=10
<add flowmods to get pings working>

Linking to a post on how to manually setup an overlay using the ovs client I
did a while back since it would be too much to put into an email here.
Manually setting it up is a great way for folks to really understand the
inner workings of overlays in case it helps you get started.
http://networkstatic.net/setting-overlays-open-vswitch/

Another option that is quite elegant is to define per/flow TEPs alleviating
the need for a logical port per TEP and simply using one generic port for
ingress/egress tunnel related flows. I have half of a post finished but here
are the basics:

#Per flow v4 src/dst/tunD, OF port is 10 and VM port is 2 (sudo ovs-ofctl -O
OpenFlow13 dump-ports <bridgeName>):

Host1
-------
ovs-vsctl add-port lib gre -- set Interface gre type=gre options:key=flow
options:remote_ip=flow ofport_request=10
ovs-ofctl -O OpenFlow13 add-flow lib "in_port=10 actions=output:2"
ovs-ofctl -O OpenFlow13 add-flow lib "in_port=2
actions=set_field:10->tun_id,set_field:192.168.1.180->tun_dst,output:10"

Host2
-------
ovs-vsctl add-port lib gre -- set Interface gre type=gre options:key=flow
options:remote_ip=flow ofport_request=10
ovs-ofctl -O OpenFlow13 add-flow lib "in_port=10 actions=output:2"
ovs-ofctl -O OpenFlow13 add-flow lib "in_port=2
actions=set_field:10->tun_id,set_field:192.168.1.181->tun_dst,output:10"

# IP address on bridge:
As Fred pointed out for testing etc, you can remove your eth(n) IP address
and bind it to the bridge interface  ' ifconfig eth0 0 && ifconfig br0
x.x.x.x ' Don¹t forget to change your default gw address also and keep in
mind if its the only NIC it will clip your connectivity. This is covered in
the excellent OVS FAQ.

#Inband TEP reachability is also covered in the FAQ. You can view these
hidden flows via the following command:
ovs-appctl bridge/dump-flows <bridge-name>

Cheers,
-Brent

From:  Tarek Watfa <[email protected]>
Date:  Wednesday, June 11, 2014 at 3:48 PM
To:  <[email protected]>
Subject:  [ovs-discuss] OpenVswitch GRE to physical interface

Hello,

i have to test OpenVswitch on lab to study openvswitch GRE

I have 2 openvswitch server on 2 Fedora 18

this is the configuration of the first one

52c4e81c-4d75-4118-81c0-e0d0055202ad
    Bridge virtualSwitch
        Port "tep01"
           Interface "tep01"
               type: internal
        Port "p16p1"
           Interface "p16p1"
        Port virtualSwitch
           Interface virtualSwitch
               type: internal
    Bridge "br-int1"
        Port "br-int1"
           Interface "br-int1"
               type: internal
        Port "gre01"
           Interface "gre01"
               type: gre
                options: {remote_ip="172.16.254.2"}
   ovs_version: "1.11.0"

the second one



90cb7b34-f474-477a-bc56-6361420e82ca
    Bridge "virtualSwitch2"
        Port "tep02"
           Interface "tep02"
               type: internal
        Port "p16p1"
           Interface "p16p1"
        Port "virtualSwitch2"
           Interface "virtualSwitch2"
               type: internal
    Bridge "br-int2"
        Port "gre02"
           Interface "gre02"
               type: gre
               options: {remote_ip="172.16.254.1"}
        Port "br-int2"
           Interface "br-int2"
                type: internal
   ovs_version: "1.11.0"


the link between the 2 OVS server is interface p16p1<--->p16p1
the ip on p16p1 on the first ovs is 172.16.254.1 and second one 172.16.254.2

on the interface p16p2 on first ovs serveri have a pc with 10.10.10.1 and on
the second one 10.10.10.2

i can't ping from 10.10.10.2 to 10.10.10.1

and when i start ovs service on one of ovs the ping from 172.16.254.1 to
172.16.254.2 are down.


can you help us?
can we link a physical interface to a gre link bridge?

regards.

_______________________________________________ discuss mailing list
[email protected] http://openvswitch.org/mailman/listinfo/discuss

_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to