Hi Csikor, thanks for your helpful reply.
Let me be honest, im doing my university graduation thesis as I also have
to work full-time, so i dont have much time to deal with this, sorry for
this late reply :(
I've been doing with Static Entry Push API to add some flows into each ovs
bridge.
I did the following:
(Assume that ovsbr1's MAC=01 and ovsbr2's MAC=02, h1 connects ovsbr1 on
port 1, the same with h2 on ovsbr2)
curl -X POST -d '{"switch":"00:00:00:00:00:00:00:01", "name":"flow-mod-1",
"cookie":"0", "priority":"32768", "in_port":"1","active":"true",
"actions":"output=normal"}' http://127.0.0.1:8080/wm/staticentrypusher/json
curl -X POST -d '{"switch":"00:00:00:00:00:00:00:02", "name":"flow-mod-2",
"cookie":"0", "priority":"32768", "in_port":"1","active":"true",
"actions":"output=normal"}' http://127.0.0.1:8080/wm/staticentrypusher/json
Then I used ovs-appctl ofproto/trace to see what happen when I ping h2 from
h1:
ovs-appctl ofproto/trace ovsbr1 in_port=1,icmp,nw_dst=172.16.2.10
--------------------------------------------------------------------------------------
Flow:
icmp,in_port=1,vlan_tci=0x0000,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,nw_src=0.0.0.0,nw_dst=172.16.2.10,nw_tos=0,nw_ecn=0,nw_ttl=0,icmp_type=0,icmp_code=0
bridge("ovsbr1")
----------------
0. in_port=1, priority 32768, cookie 0xa000004039d1a6
NORMAL
-> no learned MAC for destination, flooding
bridge("ovsbr2")
----------------
0. priority 0
CONTROLLER:65535
--------------------------------------------------------------------------------------------
Is the problem that my ovs bridge did not enable the MAC learning function?
If that, how do I know that the function is disable and how to enable it.
FYI, my container h1 and h2 does not have any record except the MAC of
their only NIC.
Honestly thanks,
Tu
Vào Th 6, 12 thg 4, 2019 vào lúc 09:26 Levente Csikor <[email protected]>
đã viết:
> Hi,
>
> it seems the communication then was only available through docker0
> bridge, and even if you have other interfaces connected via OVS, the
> default communications were done via the docker0.
>
> On the other hand, how did you do the pinging process?
> Did you ping 172.16.2.10 from 172.16.1.10, or you were using alias
> names?
>
> Did you have any flow rules in OVS? As Guru Shetty also mentioned, in
> order to connect to different networks, the default NORMAL operation of
> OVS won't do the job for you (that's only for L2/Switch-based
> forwarding!
> You need to remove that default flow rules and add the respective ones
> into your switches!
> I am not really confident about your setup, but you might need proper
> ARP rules as well (not sure as assinging IP addresses to the ovs
> bridges means that they will reply to ARP by default - someone needs to
> justify this, sorry).
>
> and in order to avoid any networking namespace related issue on your
> host machine, I would recommend to use patch ports OVS provides you for
> connecting your bridges!
> Than everything which is related to OVS will be done via OVS itself ->
> this just reduces the number of problems you might encounter in the
> future.
>
> I hope this helps!
>
> Cheers,
> Levi
>
>
>
> On Sat, 2019-04-06 at 23:08 +0700, Tu Nguyen Phuoc wrote:
> > Hi OVS Community.
> > I have 1 Physical host which had docker and ovs installed.
> > I want to set up 2 ovs bridges (ovsbr1 and ovsbr2), each bridge has 1
> > container connects to (h1 and h2), here is my set up:
> > #### On Physical host ####
> > *** Create 2 bridges ***
> > # ovs-vsctl add-br ovsbr1
> > # ovs-vsctl add-br ovsbr2
> > *** Set ip for bridges ****
> > # ifconfig ovsbr1 172.16.1.1 netmask 255.255.255.0 up
> > # ifconfig ovsbr2 172.16.2.1 netmask 255.255.255.0 up
> > *** Connect 2 containers to 2 bridges ***
> > # ovs-docker add-port ovs-br1 eth1 h1 --ipaddress=172.16.1.10/24
> > # ovs-docker add-port ovs-br2 eth1 h2 --ipaddress=172.16.2.10/24
> > *** Create link (for LLDP SDN) between ovsbr1 - ovsbr2 ***
> > # ip link add veth1 type veth peer name veth2
> > # ifconfig veth1 up
> > # ifconfig veth2 up
> > # ovs-vsctl add-port ovsbr1 veth1
> > # ovs-vsctl add-port ovsbr2 veth2
> >
> > I've connected 2 ovs bridges to Floodlight and they worked fine. But
> > when i removed docker0 (default docker NIC) on each container, the
> > containers cannot ping each other through eth1.
> >
> > What is my mistake? How can the containers communicate through the
> > NIC eth1 that ovs-docker command added on them?
> >
> > Thanks in advance. I appreciate any response (sorry my my bad English
> > btw)
> > _______________________________________________
> > discuss mailing list
> > [email protected]
> > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss