Category Archives: Networking

NetworkManager and virtual interfaces, again.

Zeus has a point in his comment, I should blog more often.

Here’s the first: NetworkManager again. I noticed that it doesn’t bring my interface alias up anymore. Must have happened after some upgrade. I am not sure.

As I was trying to figure out what’s going on, I opened the network management interface and looked at various things – and it started to work after that. Kind of frightening.

Even more frightening is looking at /etc/sysconfig/network-scripts/ifup-aliases. Looks like there are people who need such a large number of network interfaces, that they needed to assign them in ranges, hence the ifcfg-$DEV-range* files.

OK, this is not that exciting of a post. I’ll do better next time.

NetworkManager and virtual interfaces

My wireless router is an old Linksys BEFW11S4 (801b). I wouldn’t ask for more in terms of speed, when I’m working from the laptop the bottleneck is the upstream Internet provider (cable), and if I have to transfer massive amounts of data between the laptop and the home computer, I can connect directly into the router with a wire and get 100Mbit.

But there is something my router doesn’t have: static DHCP assignment of addresses. I hate it when I’m on the laptop and I don’t know the IP address of the home computer. I could configure the IP address on the home computer statically, but since I also have to use OpenVPN I’d have to set up dnsmasq so I can get the proper DNS server when connecting to the VPN. Or I could use NetworkManager which would take care of switching the name servers for me.
One solution I found was to have the eth0 interface on the home computer be assigned by the router via DCHP, and have a virtual interface (alias) eth0:0 configured with a static address that I can ssh into.

OK, so I’ve set up the alias in /etc/sysconfig/network-scripts/ifcfg-eth0:0 (I’m not a GUI guy when it comes to configuring the networking, I prefer to go directly on the filesystem and write the file myself – nevertheless, using system-config-network would do the same thing for you).

Except that NetworkManager will not bring the interface alias up. It will bring the main interface up, but not the alias.
After digging a bit, it turns out NetworkManagerDispatcher is at fault, and this is the solution I found:

  • mkdir -p /etc/NetworkManager/dispatcher.d (on a newly installed system it was not created by default)
  • Add this eth-subinterfaces file to /etc/NetworkManager/dispatcher.d:



if [ "$iface" = "eth0" -a "$action" = "up" ]; then
/sbin/ifup eth0:0
  • Make sure you chmod 0755 /etc/NetworkManager/dispatcher.d/eth-subinterfaces
  • You may or may not have to restart NetworkManagerDispatcher (I think it just worked for me):
    • /sbin/service NetworkManagerDispatcher restart
  • Click on the NetworkManager icon, disable networking and re-enable it.

At this point, ifconfig should show the interface alias.

… And the week after the week of vacation

First week at the new company (rPath). Not a lot of comments, other than I am trying to learn as fast as I can.

I’ve started by installing rPath Linux on the laptop, and just finished reinstalling it with Foresight Linux, mostly because I was looking for more recent versions of NetworkManager, XChat and a working suspend-to-RAM. Plus, Foresight has a lot more desktop goodies.
After using Foresight for about half an hour, I can say I got 33% of what I wanted. XChat has been replaced with xchat-gnome, and suspend didn’t work in different ways (no kernel support – easily fixed by running the rPath Linux kernel). Another thing is the music player: Foresight comes with Banshee whereas Fedora Core 5 comes with Rhythmbox. Apparently I will have to look at Amarok too.

I did spend some of my time with paperwork, inherrent to getting a new job (new health insurance plan etc.).

Hopefully I will not be subject to the viruses that are affecting some of my friends (no, not computer viruses, I’m talking about cold/flu), and the weather on Sunday will hold for the orienteering event.