If multiple vswitches exist on the same host, how about the routes on the host?

by the way, can i consult another question? Why did OVS introduce two
internal devices for each vswitch?
ovs-dpctl show
system@ovs-system:
    lookups: hit:2635398 missed:145705 lost:0
    flows: 12
    port 0: ovs-system (internal)
    port 1: br0 (internal)
    port 2: em1



On Fri, May 31, 2013 at 6:26 AM, Ben Pfaff <b...@nicira.com> wrote:
> Q: I created a bridge and added my Ethernet port to it, using commands
>    like these:
>
>        ovs-vsctl add-br br0
>        ovs-vsctl add-port br0 eth0
>
>    and as soon as I ran the "add-port" command I lost all connectivity
>    through eth0.  Help!
>
> A: 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.
>
>    You can restore functionality by moving the IP address to an Open
>    vSwitch "internal" device, such as the network device named after
>    the bridge itself.  For example, assuming that eth0's IP address is
>    192.168.128.5, you could run the commands below to fix up the
>    situation:
>
>        ifconfig eth0 0.0.0.0
>        ifconfig br0 192.168.128.5
>
>    (If your only connection to the machine running OVS is through the
>    IP address in question, then you would want to run all of these
>    commands on a single command line, or put them into a script.)  If
>    there were any additional routes assigned to eth0, then you would
>    also want to use commands to adjust these routes to go through br0.
>
>    If you use DHCP to obtain an IP address, then you should kill the
>    DHCP client that was listening on the physical Ethernet interface
>    (e.g. eth0) and start one listening on the internal interface
>    (e.g. br0).  You might still need to manually clear the IP address
>    from the physical interface (e.g. with "ifconfig eth0 0.0.0.0").
>
>    There is no compelling reason why Open vSwitch must work this way.
>    However, this is the way that the Linux kernel bridge module has
>    always worked, so it's a model that those accustomed to Linux
>    bridging are already used to.  Also, the model that most people
>    expect is not implementable without kernel changes on all the
>    versions of Linux that Open vSwitch supports.
>
>    By the way, this issue is not specific to physical Ethernet
>    devices.  It applies to all network devices except Open vswitch
>    "internal" devices.
>
> On Fri, May 31, 2013 at 06:19:19AM +0800, Zhi Yong Wu wrote:
>> Yes
>>
>> # ovs-vsctl show
>> a9dc55a3-6755-4b91-957a-75cd9f27692e
>>     Bridge "br0"
>>         Port "em1"
>>             Interface "em1"
>>         Port "br0"
>>             Interface "br0"
>>                 type: internal
>>
>>
>> On Fri, May 31, 2013 at 6:17 AM, Ben Pfaff <b...@nicira.com> wrote:
>> > Is em1 on bridge br0?
>> >
>> > On Fri, May 31, 2013 at 05:59:32AM +0800, Zhi Yong Wu wrote:
>> >> I tried to install OVS on my workstation, before starting kvm guest,
>> >> its route table is below:
>> >> default via 9.115.122.1 dev em1
>> >> 9.115.122.0/24 dev em1  scope link
>> >>
>> >> then i started kvm guest:
>> >> qemu-system-x86_64 -drive
>> >> file=/home/zwu/misc/image/debian_squeeze_i386_desktop.qcow2,if=virtio
>> >> -kernel arch/x86/boot/bzImage -append root=/dev/vda1 rw console=ttyS0
>> >> -drive file=/btrfs.img,if=virtio -drive file=/btrfs1.img,if=virtio
>> >> -drive file=/btrfs2.img,if=virtio -drive file=/btrfs3.img,if=virtio
>> >> -nographic -S -s -m 10240M
>> >>
>> >> After kvm guest is started up, i tried to ping the host in kvm guest,
>> >> but it failed.
>> >> After i changed its route on the host as below:
>> >> default via 9.115.122.1 dev br0
>> >> 9.115.122.0/24 dev br0  scope link
>> >> I again tried the host in kvm guest, and it can work.
>> >>
>> >> Is it clear to you?
>> >>
>> >>
>> >> On Fri, May 31, 2013 at 5:47 AM, Ben Pfaff <b...@nicira.com> wrote:
>> >> > I don't know.  I think that you would have to describe your scenario,
>> >> > before we can say what (if anything) you are doing wrong.
>> >> >
>> >> > On Fri, May 31, 2013 at 05:45:06AM +0800, Zhi Yong Wu wrote:
>> >> >> If i don't add such a route, it seem to not work, do i miss other 
>> >> >> something?
>> >> >>
>> >> >> On Fri, May 31, 2013 at 2:23 AM, Ben Pfaff <b...@nicira.com> wrote:
>> >> >> > On Thu, May 30, 2013 at 06:40:26PM +0800, zwu.ker...@gmail.com wrote:
>> >> >> >> From: Zhi Yong Wu <wu...@linux.vnet.ibm.com>
>> >> >> >>
>> >> >> >>   Add some tips for kvm guest; You know, it is a bit difficult
>> >> >> >> to play for one starter if no such tips exist.
>> >> >> >>
>> >> >> >> Signed-off-by: Zhi Yong Wu <wu...@linux.vnet.ibm.com>
>> >> >> >
>> >> >> > It isn't normally necessary to add such a route.
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Regards,
>> >> >>
>> >> >> Zhi Yong Wu
>> >>
>> >>
>> >>
>> >> --
>> >> Regards,
>> >>
>> >> Zhi Yong Wu
>>
>>
>>
>> --
>> Regards,
>>
>> Zhi Yong Wu



-- 
Regards,

Zhi Yong Wu
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to