ovs tap “internal” vs tuntap tap












4














I'm building an SDN testbed consists of an OpenvSwitch switch installed on Linux Ubuntu 18.04 and 5 VMs (Linux Ubuntu 16.04 server) running on VirtualBox. The OVS is managed by OpenDaylight Boron.




  • When I use ip tuntap add mode tap tapN to create taps to link the VMs to OVS, everything works just fine and I can ping between VMs "within the same subnet". however when I try: ovs-ofctl -O OpenFlow13 dump-ports br0, statistics such as (rx pkts and tx pkts) show only Zeros on all ports except the LOCAL port.
    enter image description here


  • But when I use ovs-vsctl add-port br0 vnet0 -- set Interface tapN type=internal to create the taps, I can see statistics on all ports even if only one device pings another one.
    enter image description here
    My questions:




    1. Why (dump-ports) doesn't show statistics in the first case?


    2. Is it Ok to continue use (ovs internal taps) in my testbed as described in the second case?







Here is the complete OVS configuration case 1:



ovs-vsctl add-br br0

ip tuntap add mode tap vnet0
ip tuntap add mode tap vnet1
ip tuntap add mode tap vnet2
ip tuntap add mode tap vnet3
ip tuntap add mode tap vnet4
ip tuntap add mode tap vnet5

ip link set vnet0 up
ip link set vnet1 up
ip link set vnet2 up
ip link set vnet3 up
ip link set vnet4 up
ip link set vnet5 up


ovs-vsctl add-port br0 vnet0
ovs-vsctl add-port br0 vnet1
ovs-vsctl add-port br0 vnet2
ovs-vsctl add-port br0 vnet3
ovs-vsctl add-port br0 vnet4
ovs-vsctl add-port br0 vnet5

ifconfig br0 up
ovs-vsctl set bridge br0 protocols=OpenFlow13

ovs-vsctl set-controller br0 tcp:10.10.80.50:6633









share|improve this question
























  • What do you mean when you say you "see statistics in the LOCAL port"? Your ICMP packets shouldn't go through that port, right? Could you post the output of the dump-ports and dump-flows commands?
    – pchaigno
    Nov 23 at 18:37










  • I attached the output of the dump-ports, the dump-flows show nothing because the ODL is down. The VMs are in the same subnet, so they use ARP to communicate. If the ODL is up, nothing changes, however, dump-flows show default flows from each port to the other ports in addition to two new flows matched by MAC addresses in case two VMs are communicating.
    – Ahmed Sallam
    Nov 28 at 0:45












  • Thanks. It looks like traffic isn't leaving the VMs through the tap devices in case 1. How did you start the VMs and configure their network devices? How many interfaces do you see if you run ifconfig or ip a inside one VM?
    – pchaigno
    Nov 28 at 9:18










  • Each VM has 3 NICs, nat, tap attached to an OVS port, and vboxnet to talk to the host. I was able to establish different tcp connections between VMs (e.g. nc ) using the IPs of the NICs(taps), there are no default routes to go through different NIC, also I can see two flows matched by the taps MAC address if two VMs are communicating in case
    – Ahmed Sallam
    Nov 28 at 20:28
















4














I'm building an SDN testbed consists of an OpenvSwitch switch installed on Linux Ubuntu 18.04 and 5 VMs (Linux Ubuntu 16.04 server) running on VirtualBox. The OVS is managed by OpenDaylight Boron.




  • When I use ip tuntap add mode tap tapN to create taps to link the VMs to OVS, everything works just fine and I can ping between VMs "within the same subnet". however when I try: ovs-ofctl -O OpenFlow13 dump-ports br0, statistics such as (rx pkts and tx pkts) show only Zeros on all ports except the LOCAL port.
    enter image description here


  • But when I use ovs-vsctl add-port br0 vnet0 -- set Interface tapN type=internal to create the taps, I can see statistics on all ports even if only one device pings another one.
    enter image description here
    My questions:




    1. Why (dump-ports) doesn't show statistics in the first case?


    2. Is it Ok to continue use (ovs internal taps) in my testbed as described in the second case?







Here is the complete OVS configuration case 1:



ovs-vsctl add-br br0

ip tuntap add mode tap vnet0
ip tuntap add mode tap vnet1
ip tuntap add mode tap vnet2
ip tuntap add mode tap vnet3
ip tuntap add mode tap vnet4
ip tuntap add mode tap vnet5

ip link set vnet0 up
ip link set vnet1 up
ip link set vnet2 up
ip link set vnet3 up
ip link set vnet4 up
ip link set vnet5 up


ovs-vsctl add-port br0 vnet0
ovs-vsctl add-port br0 vnet1
ovs-vsctl add-port br0 vnet2
ovs-vsctl add-port br0 vnet3
ovs-vsctl add-port br0 vnet4
ovs-vsctl add-port br0 vnet5

ifconfig br0 up
ovs-vsctl set bridge br0 protocols=OpenFlow13

ovs-vsctl set-controller br0 tcp:10.10.80.50:6633









share|improve this question
























  • What do you mean when you say you "see statistics in the LOCAL port"? Your ICMP packets shouldn't go through that port, right? Could you post the output of the dump-ports and dump-flows commands?
    – pchaigno
    Nov 23 at 18:37










  • I attached the output of the dump-ports, the dump-flows show nothing because the ODL is down. The VMs are in the same subnet, so they use ARP to communicate. If the ODL is up, nothing changes, however, dump-flows show default flows from each port to the other ports in addition to two new flows matched by MAC addresses in case two VMs are communicating.
    – Ahmed Sallam
    Nov 28 at 0:45












  • Thanks. It looks like traffic isn't leaving the VMs through the tap devices in case 1. How did you start the VMs and configure their network devices? How many interfaces do you see if you run ifconfig or ip a inside one VM?
    – pchaigno
    Nov 28 at 9:18










  • Each VM has 3 NICs, nat, tap attached to an OVS port, and vboxnet to talk to the host. I was able to establish different tcp connections between VMs (e.g. nc ) using the IPs of the NICs(taps), there are no default routes to go through different NIC, also I can see two flows matched by the taps MAC address if two VMs are communicating in case
    – Ahmed Sallam
    Nov 28 at 20:28














4












4








4







I'm building an SDN testbed consists of an OpenvSwitch switch installed on Linux Ubuntu 18.04 and 5 VMs (Linux Ubuntu 16.04 server) running on VirtualBox. The OVS is managed by OpenDaylight Boron.




  • When I use ip tuntap add mode tap tapN to create taps to link the VMs to OVS, everything works just fine and I can ping between VMs "within the same subnet". however when I try: ovs-ofctl -O OpenFlow13 dump-ports br0, statistics such as (rx pkts and tx pkts) show only Zeros on all ports except the LOCAL port.
    enter image description here


  • But when I use ovs-vsctl add-port br0 vnet0 -- set Interface tapN type=internal to create the taps, I can see statistics on all ports even if only one device pings another one.
    enter image description here
    My questions:




    1. Why (dump-ports) doesn't show statistics in the first case?


    2. Is it Ok to continue use (ovs internal taps) in my testbed as described in the second case?







Here is the complete OVS configuration case 1:



ovs-vsctl add-br br0

ip tuntap add mode tap vnet0
ip tuntap add mode tap vnet1
ip tuntap add mode tap vnet2
ip tuntap add mode tap vnet3
ip tuntap add mode tap vnet4
ip tuntap add mode tap vnet5

ip link set vnet0 up
ip link set vnet1 up
ip link set vnet2 up
ip link set vnet3 up
ip link set vnet4 up
ip link set vnet5 up


ovs-vsctl add-port br0 vnet0
ovs-vsctl add-port br0 vnet1
ovs-vsctl add-port br0 vnet2
ovs-vsctl add-port br0 vnet3
ovs-vsctl add-port br0 vnet4
ovs-vsctl add-port br0 vnet5

ifconfig br0 up
ovs-vsctl set bridge br0 protocols=OpenFlow13

ovs-vsctl set-controller br0 tcp:10.10.80.50:6633









share|improve this question















I'm building an SDN testbed consists of an OpenvSwitch switch installed on Linux Ubuntu 18.04 and 5 VMs (Linux Ubuntu 16.04 server) running on VirtualBox. The OVS is managed by OpenDaylight Boron.




  • When I use ip tuntap add mode tap tapN to create taps to link the VMs to OVS, everything works just fine and I can ping between VMs "within the same subnet". however when I try: ovs-ofctl -O OpenFlow13 dump-ports br0, statistics such as (rx pkts and tx pkts) show only Zeros on all ports except the LOCAL port.
    enter image description here


  • But when I use ovs-vsctl add-port br0 vnet0 -- set Interface tapN type=internal to create the taps, I can see statistics on all ports even if only one device pings another one.
    enter image description here
    My questions:




    1. Why (dump-ports) doesn't show statistics in the first case?


    2. Is it Ok to continue use (ovs internal taps) in my testbed as described in the second case?







Here is the complete OVS configuration case 1:



ovs-vsctl add-br br0

ip tuntap add mode tap vnet0
ip tuntap add mode tap vnet1
ip tuntap add mode tap vnet2
ip tuntap add mode tap vnet3
ip tuntap add mode tap vnet4
ip tuntap add mode tap vnet5

ip link set vnet0 up
ip link set vnet1 up
ip link set vnet2 up
ip link set vnet3 up
ip link set vnet4 up
ip link set vnet5 up


ovs-vsctl add-port br0 vnet0
ovs-vsctl add-port br0 vnet1
ovs-vsctl add-port br0 vnet2
ovs-vsctl add-port br0 vnet3
ovs-vsctl add-port br0 vnet4
ovs-vsctl add-port br0 vnet5

ifconfig br0 up
ovs-vsctl set bridge br0 protocols=OpenFlow13

ovs-vsctl set-controller br0 tcp:10.10.80.50:6633






virtualbox sdn opendaylight openvswitch tun-tap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 at 0:41

























asked Nov 21 at 1:27









Ahmed Sallam

213




213












  • What do you mean when you say you "see statistics in the LOCAL port"? Your ICMP packets shouldn't go through that port, right? Could you post the output of the dump-ports and dump-flows commands?
    – pchaigno
    Nov 23 at 18:37










  • I attached the output of the dump-ports, the dump-flows show nothing because the ODL is down. The VMs are in the same subnet, so they use ARP to communicate. If the ODL is up, nothing changes, however, dump-flows show default flows from each port to the other ports in addition to two new flows matched by MAC addresses in case two VMs are communicating.
    – Ahmed Sallam
    Nov 28 at 0:45












  • Thanks. It looks like traffic isn't leaving the VMs through the tap devices in case 1. How did you start the VMs and configure their network devices? How many interfaces do you see if you run ifconfig or ip a inside one VM?
    – pchaigno
    Nov 28 at 9:18










  • Each VM has 3 NICs, nat, tap attached to an OVS port, and vboxnet to talk to the host. I was able to establish different tcp connections between VMs (e.g. nc ) using the IPs of the NICs(taps), there are no default routes to go through different NIC, also I can see two flows matched by the taps MAC address if two VMs are communicating in case
    – Ahmed Sallam
    Nov 28 at 20:28


















  • What do you mean when you say you "see statistics in the LOCAL port"? Your ICMP packets shouldn't go through that port, right? Could you post the output of the dump-ports and dump-flows commands?
    – pchaigno
    Nov 23 at 18:37










  • I attached the output of the dump-ports, the dump-flows show nothing because the ODL is down. The VMs are in the same subnet, so they use ARP to communicate. If the ODL is up, nothing changes, however, dump-flows show default flows from each port to the other ports in addition to two new flows matched by MAC addresses in case two VMs are communicating.
    – Ahmed Sallam
    Nov 28 at 0:45












  • Thanks. It looks like traffic isn't leaving the VMs through the tap devices in case 1. How did you start the VMs and configure their network devices? How many interfaces do you see if you run ifconfig or ip a inside one VM?
    – pchaigno
    Nov 28 at 9:18










  • Each VM has 3 NICs, nat, tap attached to an OVS port, and vboxnet to talk to the host. I was able to establish different tcp connections between VMs (e.g. nc ) using the IPs of the NICs(taps), there are no default routes to go through different NIC, also I can see two flows matched by the taps MAC address if two VMs are communicating in case
    – Ahmed Sallam
    Nov 28 at 20:28
















What do you mean when you say you "see statistics in the LOCAL port"? Your ICMP packets shouldn't go through that port, right? Could you post the output of the dump-ports and dump-flows commands?
– pchaigno
Nov 23 at 18:37




What do you mean when you say you "see statistics in the LOCAL port"? Your ICMP packets shouldn't go through that port, right? Could you post the output of the dump-ports and dump-flows commands?
– pchaigno
Nov 23 at 18:37












I attached the output of the dump-ports, the dump-flows show nothing because the ODL is down. The VMs are in the same subnet, so they use ARP to communicate. If the ODL is up, nothing changes, however, dump-flows show default flows from each port to the other ports in addition to two new flows matched by MAC addresses in case two VMs are communicating.
– Ahmed Sallam
Nov 28 at 0:45






I attached the output of the dump-ports, the dump-flows show nothing because the ODL is down. The VMs are in the same subnet, so they use ARP to communicate. If the ODL is up, nothing changes, however, dump-flows show default flows from each port to the other ports in addition to two new flows matched by MAC addresses in case two VMs are communicating.
– Ahmed Sallam
Nov 28 at 0:45














Thanks. It looks like traffic isn't leaving the VMs through the tap devices in case 1. How did you start the VMs and configure their network devices? How many interfaces do you see if you run ifconfig or ip a inside one VM?
– pchaigno
Nov 28 at 9:18




Thanks. It looks like traffic isn't leaving the VMs through the tap devices in case 1. How did you start the VMs and configure their network devices? How many interfaces do you see if you run ifconfig or ip a inside one VM?
– pchaigno
Nov 28 at 9:18












Each VM has 3 NICs, nat, tap attached to an OVS port, and vboxnet to talk to the host. I was able to establish different tcp connections between VMs (e.g. nc ) using the IPs of the NICs(taps), there are no default routes to go through different NIC, also I can see two flows matched by the taps MAC address if two VMs are communicating in case
– Ahmed Sallam
Nov 28 at 20:28




Each VM has 3 NICs, nat, tap attached to an OVS port, and vboxnet to talk to the host. I was able to establish different tcp connections between VMs (e.g. nc ) using the IPs of the NICs(taps), there are no default routes to go through different NIC, also I can see two flows matched by the taps MAC address if two VMs are communicating in case
– Ahmed Sallam
Nov 28 at 20:28

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404050%2fovs-tap-internal-vs-tuntap-tap%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404050%2fovs-tap-internal-vs-tuntap-tap%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen