[ovs-discuss] Internal interfaces and route - question?

Jesse Gross jesse at nicira.com
Sun Jan 9 17:22:38 UTC 2011


On Sat, Jan 8, 2011 at 12:55 PM, Admin HRD.pl <admin at hrd.pl> wrote:
> Hi all
>
> I create 3 Internal interfaces
> vPort0
> vPort1
> vPort3
>
> External interfaces is named eth0
> And bridge is vSwitch0
> All internal intefaces I connect to vSwitch0
> using command:
> ovs-vsctl add-br vSwitch0
> ovs-vsctl add-port vSwitch0 vPort0 -- set interface vPort0 type=internal
> ovs-vsctl add-port vSwitch0 vPort1 -- set interface vPort1 type=internal
> ovs-vsctl add-port vSwitch0 vPort3 -- set interface vPort3 type=internal
> ovs-vsctl add-port vSwitch0 eth0
>
> Question: for eth0 i should use another command??

No, that's the right command.

>
> I use dhcp in network, on debian i have this configuration:
>
> debian-93:~# ip route show
> 192.168.0.0/24 dev vPort3  proto kernel  scope link  src 192.168.0.19
> 192.168.0.0/24 dev vPort1  proto kernel  scope link  src 192.168.0.18
> 192.168.0.0/24 dev vPort0  proto kernel  scope link  src 192.168.0.17
> default via 192.168.0.1 dev vPort3
> default via 192.168.0.1 dev vPort1
> default via 192.168.0.1 dev vPort0
>
> Machine have one external interface eth0 connected to Open vSwitch :
> vSwitch0
> eth0 didn't have IP and is in promiscuous mode
>
> debian-93:~# ip address show
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>    inet 127.0.0.1/8 scope host lo
>    inet6 ::1/128 scope host
>       valid_lft forever preferred_lft forever
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
> UP qlen 1000
>    link/ether 00:0c:29:f3:3b:25 brd ff:ff:ff:ff:ff:ff
>    inet6 fe80::20c:29ff:fef3:3b25/64 scope link
>       valid_lft forever preferred_lft forever
> 3: vSwitch0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
> noqueue state UNKNOWN
>    link/ether 00:0c:29:f3:3b:25 brd ff:ff:ff:ff:ff:ff
>    inet6 fe80::20c:29ff:fef3:3b25/64 scope link
>       valid_lft forever preferred_lft forever
> 4: vPort0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
> UNKNOWN
>    link/ether 00:23:20:ee:6c:ac brd ff:ff:ff:ff:ff:ff
>    inet 192.168.0.17/24 brd 192.168.0.255 scope global vPort0
>    inet6 fe80::223:20ff:feee:6cac/64 scope link
>       valid_lft forever preferred_lft forever
> 5: vPort1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
> UNKNOWN
>    link/ether 00:23:20:ce:79:d7 brd ff:ff:ff:ff:ff:ff
>    inet 192.168.0.18/24 brd 192.168.0.255 scope global vPort1
>    inet6 fe80::223:20ff:fece:79d7/64 scope link
>       valid_lft forever preferred_lft forever
> 6: vPort3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
> UNKNOWN
>    link/ether 00:23:20:e6:72:2a brd ff:ff:ff:ff:ff:ff
>    inet 192.168.0.19/24 brd 192.168.0.255 scope global vPort3
>    inet6 fe80::223:20ff:fee6:722a/64 scope link
>       valid_lft forever preferred_lft forever
>
> I Have question:
>
> defailt route is set from DHCP to:
> default via 192.168.0.1 dev vPort3
> default via 192.168.0.1 dev vPort1
> default via 192.168.0.1 dev vPort0
>
> is OK in your opinion?
> Or the default route should be set to eth0 or vSwitch0?

No, this doesn't make much sense.  In Linux, IP addresses belong to
the host, not the interface.  When you send traffic the OS is free to
choose any valid interface (which is all of them in this case).
Similarly, it is free to receive traffic on any interface.  As has
been suggested before, there are other approaches which are probably
better suited to your goals.




More information about the discuss mailing list