3

I am trying to set up a Linux bridge to connect a physical radio (N210) to ns3 via a TAP. The radio is plugged into Ethernet (epn0s25) and I have tried the following console commands:

sudo brctl addbr bridge0
sudo tunctl -t tap0
sudo ifconfig tap0 hw ether 00:00:00:00:00:01
sudo ifconfig tap0 0.0.0.0 up
sudo brctl addif bridge0 tap0
sudo brctl addif bridge0 epn0s25
sudo ifconfig mybridge 10.1.1.1 netmask 255.255.255.0 up

However pinging epn0s25 or bridge0 results in no activity on the other side. showstp on bridge0 shows tap0 is disabled so I think that may be the problem but I am unsure how to fix it.

5
  • I'm stuck in the same boat; for a moment I thought I needed to create a nmcli ethernet adapter using tap0 as the device - buut that doesn't seem to work- between network manager, brctl, and iptools2, i dont really understand what the heck Commented Apr 21, 2018 at 18:06
  • 1
    @ThorSummoner A tap interface is one end of an application which processes network packets. Which application do you plan to connect to the tap interface? The question looks a bit like you are trying to do something else, what exactly is your goal? Is ns3 a network namespace? If yes, what prevents you from just moving epn0s25 into the network namespace?
    – dirkt
    Commented Apr 21, 2018 at 20:10
  • @dirkt I was hoping to attach NetworkManager to tap0 so my host could communicate over the bridge. HostA has eth0 and 10gbe eth1, where eth1 is a link to a single HostB, I want HostB to be on the same network as HostA, (currently I am nat'ing HostB into the network via HostA). so eth0 and eth1 are bridged, HostA has tap0. What does it take to connect HostA to the network (without a loopback cable since I dont have a pair of 10ge interfaces to phyisically loop back into HostA) Commented Apr 21, 2018 at 20:48
  • @ThorSummoner: Sorry, something is very confused here. NetworkManager manages the interfaces, it certainly isn't the endpoint of any tap-interface. Endpoints of tap interfaces are tunnels like OpenVPN, virtual machines, etc. Also, your situation seems to different from the one in this question. Please make a new question, describe your situation in detail (what do you mean by "HostA has tap0"? Did you create it there? Can you draw a diagram of your network?). You can ping me in the comments. If you just want HostA and HostB to be in the same network, a simple bridge is enough.
    – dirkt
    Commented Apr 22, 2018 at 9:36
  • groan I think all my issues have been NetworkManager bugs, or "features" as it-were; basically I dont think network manager can do bridges yet (in ubuntu 16.04), using /etc/network/interfaces (a la wiki.debian.org/…) and sudo ifup br0, it worked the first time, no issues Commented Apr 29, 2018 at 6:30

1 Answer 1

1
+100

You need to give the tap the IP address. Or, if it's the host end of a virtual machine interface, then you would rather give the IP address to the virtual machine interface.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .