Hi, Alex,  

I tried your suggestion, it seems that the problem is still there

In host 1: I have the tunnel ready

zhunan@zhunan-PowerEdge-R210-II:~$ sudo ovs-vsctl show
[sudo] password for zhunan: 
01db97ba-8174-40f6-9648-f8f14a317e2b
    Bridge "br0"
        Port "tunnel_to_host1"
            Interface "tunnel_to_host1"
                type: gre
                options: {remote_ip="192.168.2.2"}
        Port "br0"
            Interface "br0"
                type: internal


and the routing table looks like

zhunan@zhunan-PowerEdge-R210-II:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.55.1    0.0.0.0         UG    100    0        0 br0
link-local      *               255.255.0.0     U     1000   0        0 br0
192.168.2.0     *               255.255.255.0   U     1      0        0 eth1


where 192.168.55.1 is the gateway to access internet

the devices are :

br0       Link encap:Ethernet  HWaddr d4:ae:52:c7:cf:08  
          inet addr:192.168.55.142  Bcast:192.168.55.255  Mask:255.255.255.0
          inet6 addr: fe80::d6ae:52ff:fec7:cf08/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12580 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5038 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3489191 (3.4 MB)  TX bytes:587503 (587.5 KB)

eth0      Link encap:Ethernet  HWaddr d4:ae:52:c7:cf:08  
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:14272 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5189 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3849980 (3.8 MB)  TX bytes:626608 (626.6 KB)
          Interrupt:16 Memory:c0000000-c0012800 

eth1      Link encap:Ethernet  HWaddr d4:ae:52:c7:cf:09  
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::d6ae:52ff:fec7:cf09/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:419 errors:0 dropped:0 overruns:0 frame:0
          TX packets:265 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:170132 (170.1 KB)  TX bytes:31063 (31.0 KB)
          Interrupt:17 Memory:c2000000-c2012800 


In host2:

I also build the tunnel:

cpslab@cpslab-cluster-2:~$ sudo ovs-vsctl show
[sudo] password for cpslab: 
32e9ab76-35d0-497d-ab85-92635120756a
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "tunnel_to_host0"
            Interface "tunnel_to_host0"
                type: gre
                options: {remote_ip="192.168.2.1"}


the routing table looks like:

cpslab@cpslab-cluster-2:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.55.1    0.0.0.0         UG    0      0        0 eth1
192.168.2.0     *               255.255.255.0   U     0      0        0 eth0
192.168.55.0    *               255.255.255.0   U     0      0        0 eth1
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0


where eth0 is connected with eth1 in host1

the devices are: 

cpslab@cpslab-cluster-2:~$ ifconfig
br0       Link encap:Ethernet  HWaddr 2e:c7:d9:bb:a8:4e  
          inet6 addr: fe80::a0bf:33ff:fe8f:496c/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:2242 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:199301 (199.3 KB)  TX bytes:468 (468.0 B)

eth0      Link encap:Ethernet  HWaddr d4:ae:52:c7:cf:5c  
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::d6ae:52ff:fec7:cf5c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:141142 errors:0 dropped:46 overruns:0 frame:0
          TX packets:72565 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:156095422 (156.0 MB)  TX bytes:6468753 (6.4 MB)

eth1      Link encap:Ethernet  HWaddr d4:ae:52:c7:cf:5d  
          inet addr:192.168.55.190  Bcast:192.168.55.255  Mask:255.255.255.0
          inet6 addr: fe80::d6ae:52ff:fec7:cf5d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:860696 errors:0 dropped:5 overruns:0 frame:0
          TX packets:288683 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:809776734 (809.7 MB)  TX bytes:22582079 (22.5 MB)



I think everything should be ready:

but when I'm in the VM running on host1, it still fails to ping 192.168.2.2~~

zhunan@vm0:~$ ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_req=1 ttl=64 time=0.132 ms
64 bytes from 192.168.2.1: icmp_req=2 ttl=64 time=0.260 ms
^C
--- 192.168.2.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.132/0.196/0.260/0.064 ms
zhunan@vm0:~$ ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
^C
--- 192.168.2.2 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms


the routing table in VM0 looks like:

zhunan@vm0:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.55.142  0.0.0.0         UG    0      0        0 eth0
192.168.55.0    *               255.255.255.0   U     0      0        0 eth0


any further suggestion? Thank you

Best,

-- 
Nan


On Friday, 18 October, 2013 at 7:15 PM, Alex Wang wrote:

> Well, as the FAQ says,
> 
> """
> A physical Ethernet device that is part of an Open vSwitch bridge should not 
> have an IP address.  If one does, then that IP address will not be fully 
> functional.
> 
> """
> 
> The eth1 on br0 still has address "192.168.2.1". 
> 
> If you still want eth0 on br0 and eth1 having address "192.168.2.1", one 
> feasible configuration is to use tunnel. E.g. 
> 
> On host1:
> ovs-vsctl del-port eth1
> ovs-vsctl add-port tunnel_to_host2 -- set interface tunnel_to_host2 type=gre 
> options:remote_ip=192.168.2.2 
> 
> On host2:
> ovs-vsctl del-port eth1
> ovs-vsctl add-port tunnel_to_host1 -- set interface tunnel_to_host1 type=gre 
> options:remote_ip=192.168.2.1 
> 
> This is actually a common solution for directing traffic to corresponding 
> physical interface. 
> 
> Thanks, 

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

Reply via email to