Help understanding "virtual netwoks", please...

Hi,

I am building a machine (13.1) that has Oracle VirtualBox (4.3.14) and a 3-port bridged network.
However, the network won’t start until a cable is plugged into one specific port?

On investigation I note this information:

myNewRouter:/home/mprowe # brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.0004239f26e2       no              enp1s5f0
                                                        enp1s5f1
                                                        enp3s0
myNewRouter:/home/mprowe # 

…this looks good. Just as I would expect. Then:

myNewRouter:/home/mprowe # ifconfig
br0       Link encap:Ethernet  HWaddr 00:04:23:9F:26:E2  
          inet addr:192.168.0.12  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1581 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:155756 (152.1 Kb)  TX bytes:106030 (103.5 Kb)

enp1s5f0  Link encap:Ethernet  HWaddr 00:04:23:9F:26:E2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

enp1s5f1  Link encap:Ethernet  HWaddr 00:04:23:9F:26:E3  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:586 (586.0 b)  TX bytes:0 (0.0 b)

enp3s0    Link encap:Ethernet  HWaddr 08:60:6E:75:90:2D  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1584 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1401 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:180446 (176.2 Kb)  TX bytes:102161 (99.7 Kb)

enp3s0:av Link encap:Ethernet  HWaddr 08:60:6E:75:90:2D  
          inet addr:169.254.6.189  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:144 errors:0 dropped:0 overruns:0 frame:0
          TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:15244 (14.8 Kb)  TX bytes:15244 (14.8 Kb)

myNewRouter:/home/mprowe #

…again (generaly) good. But wait! What is that penultimate interface?

The port enp3s0, is the port into which a cable has to be plugged for the network to start, so I’m guessing that who ever owns/created enp3s0:ev is waiting for something.
A bit of Googling, has told me that <portname>:<number> is the format for a virtual network port.

Can anyone tell me how to find out who owns it (so that I can decide if I want it) and why is it attached to enp3s0 and not one of the other ports? Lastly, why that IP address?

Best regards, Martin

I suspect xxx:av has something to do with Avahi autoconfiguration. Not that I use it myself, so cannot tell more. Try to stop and disable it to see if something changes.

Thank you. Good pointer.

One quick correction to earlier observation. When I said that the network starting was due to a cable in a port. I was wrong.
I just seemed that way, due to coincidence! It is just time dependant — minuets! Not quite 10 min to start the network, but not far off. This can’t be right!!

Anyway, after a day, stopping/starting uninstalling/reinstalling various avahi/network components, I’m pretty sure that that it is a combination of the avahi-autoip package AND a bridge.

Can anyone offer any information/contradiction on this assumption. What am I missing out on, if I keep avahi-autoip uninstalled?

Best regards, Martin

First,
You’re going to have to clean up your nomenclature so that what you’re describing is easily understood. When you use the word “port” incorrectly, it potentially causes misunderstanding.

Port = A number associated which in combination with the IP address describes a network socket
Network Device = Sometimes referred to as a “NIC” is the physical network device
Hardware Port = Typically only when describing connections on network switches. Not on routers or ordinary machines.
Network Interface = The software network layer associate with a Network Device. The Network Interface can have any number of network addresses and ports assigned to it.
Network = Can be defined as the physical connections or software. If software, any number of networks and subnets can be configured running on the same physical network.
Virtual Networks = Is often used to describe different software networks, for example VLANs, different networks typically associated with Linux Bridge Devices(objects that represent various networks), sometimes multiple ordinary networks on the same physical network.

So, in your post you seem to be asking about virtual networks associated with a Linux Bridge Device (br0). As you’ve seen a LBD must be bound to virtual or physical network interfaces. If a virtual network interface, that in turn needs to be bound eventually to a physical network interface.

Unfortunately on my VBox machine I’m also running 2 other virtualization technologies so I have <many> bridge devices configured and can’t compare to what you’re describing on your own machine.

But, in general…

  • AFAIK VBox should be like most other virtualization technologies, there ought to be multiple LBD, each configured for a different type of networking (Typically on VBox = Host Only, Bridging, NAT, NAT-network). But, that doesn’t have to be the case. Some virtualization seem to manage network parameters in their own layer above the LBD so a single LBD can be used for all network types. I’m purely guessing, but that could be the reason for the three network interfaces assigned to br0.

  • virtual interfaces rely on the physical interface they are bound to. If you are operating a “sometimes disconnected” machine(typically a laptop) then you need to turn off the auto-sensing feature of the required NIC. This is simple on a Windows machine, requires a bit more investigation on Linux (I don’t remember what I did years ago when I had to do this, I just know it had to be done).

  • I don’t know what the “:av” means but the full name suggests it’s associated with the other network interface. And the “169.x.y.z” IP address strongly suggests that the interface is configured with DHCP and isn’t able to obtain an address so has assigned itself a non-routable address.

So,
Either you don’t have all your cables plugged in when they are supposed to
or Virtualbox is mis-configured, bound to the wrong network interfaces.

HTH,
TSU

Thank you for taking the time to offer your comments. Re: above observation, I am using the word “port” in the same context as that described in various papers discussing "Consistent Network Device Naming", see Consistent Network Device Naming - Wikipedia. So my problem (I thought) was associated with the virtual port <:ev> attached to <pci slot number - enp3><port number - s0>

However, I have satisfied myself that my problems are a result of using a Bridge (my actions) and avahi-autoip service (a default service in 13.1). As I hope to be able to manage the IP address within my network, I’m happy to disable the avahi-autoip service. So far, no problems with this decision.

Best regards, Martin

I see.
I believe the misunderstanding is your wikipedia reference describes how the various names (including interface names) are derived, but that does <not> mean that the name then is the hardware it’s derived from. Rather, the name references a software object usually describing the <interface> that is only associated with (and is not actually) the underlying hardware.

So, in your description
enp3s0 is an interface name.
An interface is a software object that describes software network object associated with underlying hardware (NIC)
It is not a port or the actual NIC hardware itself.
The interface name was created by probing and identifying the hardware the interface is associated with, then appending a number (zero)

And, then the question is whether this is important?
Yes, because you can actually have multiple network interfaces associated with the same underlying network hardware, and each network interface has its own configuration. Your observation that one interface is a “virtual” interface (I wouldn’t know exactly how true this may be) may be an example of multiple interfaces built on the same hardware.

TSU