Bridges over Kilimanjaro

The Kilimanjaro

I am always kinda freakish with my distro stickiness. That meant I was moving to some other distro of Linux all the time. I have used Ubuntu, Sabayon, Ubuntu, Linuxmint in just the last 12 months – in that order. But again the worm in my head started wriggling, and the time had come to move to another distro. But this time I had two be very clear the choice of Distro should have a solid community, and should have fantastic server tools giving enough for a good UI(otherwise my wife would kill me).

I had a pretty horrid time figuring out the decoupling the eth0 from NetworkManager, on Linuxmint, to setup my bridge; so I could get vagrant instances tp launch with the DHCP addresses served from my router. This part of the reason I was looking get some distro that could help me to play tunes rather it playing its own.

Manjaro(named after famed African mountains) an Archlinux distro with a prebuild or pre configured XFCE desktop. Had a used Archlinux a long time back(2009) when I had bought my first laptop. And I as pretty impressed by its toolset. And whatmore Majaro had all the sugar of Archlinux unadulterated. This was exactly what I wanted… as did not want to burn my midnight oil with just to configure a desktop; but yet give me the right tools for my exploration.

Archlinux has a fantastic Package Management system with a wide range of repositories… but also giving me the ability to build packages from rpm’s as well. This was awesome as this allowed for great flexibility. For example google-chrome does not have a direct port for Archlinux. So I have to do is this…

$ wget http://aur.archlinux.org/packages/go/google-chrome/google-chrome.tar.gz
$ tar -xvf google-chrome.tar.gz
$ cd google-chrome
$ makepkg -s
$ sudo pacman -U google-chrome-29.0.1547.57-1-x86_64.pkg.tar

And I had google-chrome installed on my system. That is how simple it is- for me at least. So this meant I got hold of some pretty basic stuff. But my intentions of moving were pretty clear, to get some server side functionalities working like bridging and virtualization.

Building Bridges

As mentioned earlier Archlinux ports with some pretty nifty tools. Other thing about Archlinux is the documentation, and the community it has- just amazing. Most of the stuff did here is a cumulative effect of reading their wiki.

To get the bridge working I had to install two tools brige-utils and netctl. Bridge-utils is defacto utility on linux to create and manage bridges, that enables setting up of networks for VM. And netctl is an Archlinux utility to manage network profiles, which was on the system by default. So to install bridge-utils I just used the package manager.

$ pacman -S bridge-utils

Now I had to setup a network profile to manage the bridge. Archlinux provides many sample profiles at /etc/netctl/examples and its had one for a bridge which by default looked like this

Description=“Example Bridge connection”
Interface=br0
Connection=bridge
BindsToInterfaces=(eth0 eth1 tap0)
IP=dhcp
## sets forward delay time
#FwdDelay=0
## sets max age of hello message
#MaxAge=10

Just copied this to /etc/netctl directory

$ cp /etc/netclt/examples/bridge /etc/netctl

And edited it to look like this.

Description=“Example Bridge connection”
Interface=br0
Connection=bridge
BindsToInterfaces=(enet0)
IP=dhcp

But here was the trick – Archlinux udev system manages the device naming conventions and by default would use random yet predictable naming convention provided as part of systemd. So had to change this default and name my ethernet interface enet0 and wireless interface wnet0. All I had to do is follow this, and my /etc/net/rules.d/10-network.rules looked like this.

SUBSYSTEM==“net”, ACTION==“add”, ATTR{address}==“aa:bb:cc:dd:ee:ff”, NAME=“enet0
SUBSYSTEM==“net”, ACTION==“add”, ATTR{address}==“aa:bb:cc:dd:ee:ff”, NAME=“wnet0

Then rebooted my system for these to take effect. Nice, now I had ethernet interface name as I had it in the bridge profile. Now all I had to do enable that netclt profile.

$ sudo netctl enable bridge

I prefer to reboot for any system changes. I could just as well do this

$ sudo netctl start bridge

Now I had my bridge setup at br0. So cool. Next up was to have Vagrant up on Manjaro so I could install Vagrant and spawn multiple VM’s on it.

Show Comments