I use the first method.
I also want to create a GRE tunnel between VM in EC2 and a server in my lab.
In EC2 I create a bridge called OFSWITCH, and attach eth0 to it.
I also create a gre port and attach it to OFSWITCH.
It works.
Zhao Jun

Date: Mon, 13 Jul 2015 19:16:44 +0530
Subject: Re: [ovs-discuss] configure openvswitch in Amazon EC2
From: abhishekv.ve...@gmail.com
To: zhaoju...@outlook.com

Thanks Zhao!
I am trying to create a GRE tunnel to connect two VMs in EC2.
I was thinking of putting eth0 in one bridge (OFSWITCH in your example). Then 
do you create a GRE port on the same bridge or do you create a new bridge and 
use a OVS port patch to connect the two bridges to be able to send a recv 
traffic into the VM?
Thanks, Abhishek
On Mon, Jul 13, 2015 at 7:07 PM, 俊 赵 <zhaoju...@outlook.com> wrote:



For your reference.
Using the following commands.
systemctl start openvswitch && killall dhclient && ovs-vsctl add-br OFSWITCH -- 
set Bridge OFSWITCH other-config:hwaddr=06:a7:ea:7a:1e:11 && ovs-vsctl add-port 
OFSWITCH eth0 && ifconfig eth0 0.0.0.0 && dhclient OFSWITCH && service network 
restart
These commands are tested on RHEL7.1 and make sure that setting the MAC address 
of newly created bridge the same as eht0.
EC2 uses dhcp to assign private address and public address, so you should also 
using dhcp to acquire IP address for newly created bridge.
Thanks.


Zhao Jun

From: zhaoju...@outlook.com
To: discuss@openvswitch.org
Subject: configure openvswitch in Amazon EC2
Date: Tue, 7 Jul 2015 21:04:01 +0800




hi, all
i have installed openvswitch-2.3.2 in Amazon EC2, and want to use openvswitch 
to build a gre tunnel with other PC.
this is the ifconfig output








[root@ip-172-31-30-157 openvswitch]# ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001

        inet 172.31.30.157  netmask 255.255.240.0  broadcast 172.31.31.255

        inet6 fe80::47b:d1ff:fe65:5a6d  prefixlen 64  scopeid 0x20<link>

        ether 06:7b:d1:65:5a:6d  txqueuelen 1000  (Ethernet)

        RX packets 573591  bytes 200865634 (191.5 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 496014  bytes 101375588 (96.6 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0




lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 3669  bytes 1032693 (1008.4 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 3669  bytes 1032693 (1008.4 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


and route output


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         ip-172-31-16-1. 0.0.0.0         UG    100    0        0 eth0
172.31.16.0     0.0.0.0         255.255.240.0   U     0      0        0 eth0













172.31.16.0     0.0.0.0         255.255.240.0   U     100    0        0 eth0




and i use the following commands


ovs-vsctl add-br OVS-SWITCH && ovs-vsctl add-port OVS-SWITCH eth0 && ifconfig 
eth0 0 && ifconfig OVS-SWITCH 172.31.30.157 netmask 255.255.240.0 && route add 
default gw 172.31.16.1 dev OVS-SWITCH


but after i execute these commands, i lose the connection with my ec2.


does anyone have deployed openvswitch in amazon ec2, and could you please give 
me some suggestions.


Many thanks!


Zhao Jun                                                                        
          

_______________________________________________

discuss mailing list

discuss@openvswitch.org

http://openvswitch.org/mailman/listinfo/discuss



                                          
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to