Part II: Apple iPads, Apple TVs, Bonjour & AirPlay Across Subnets Using Open-Source Software

VMware ESXi Host Server Network Configuraton

In the "Basic Information" section of this howto above, the VMware ESXi host server was defined as follows: "One (physical) VMware ESXi host server with a minimum of four ethernet interfaces."

Open the VMware vSphere client, and connect to your server.

In FIGURE 2 below, there is one ESXi host server "" with several virtual machines configured on it. The Configuration tab is displayed, and "Networking" has been selected in the Hardware box.

Virtual switch "vSwitch0" is connected to the first ethernet interface (vmnic0), and only has a "VMkernel port" defined on it. This ethernet interface (vmnic0) and vSwitch pair is reserved ONLY for management traffic to/from the ESXi host itself. No additional Ports, nor Port Groups will be configured on vSwitch0 and no virtual machines will ever be conected to vSwitch0. This type of configuration will guarantee that traffic to/from your virtual machines will never be in contention with the management traffic to/from the ESXi host server.

The next three ethernet interfaces (vmnic1 - vmnic3) will be bonded together in a LAGG and connected to the core switch. This will provide the virtual servers with a shared bandwidth of 3Gbps to the network.


To get started with the 3Gbps LAGG, click the "Add Networking" link in the top right corner.

You will be presented with the following dialog box:


Choose "Virtual Machine" and click "Next."


Select the "Create a virtual switch" radio button, and check the boxes next to vmnic1, vmnic2, and vmnic3.

Click "Next."


Change the Network Label to "ALL VLANS", and choose "All (4095)" from the VLAN ID dropdown selector.

Click "Next."


The Summary dialog box shows that a "Virtual Machine Port Group" using three ethernet interfaces in a 3Gbps LAGG, has been created and it has ALL VLANS tagged on it.

Click "Finish" and you will be returned to the Networking Configuration page of the ESXi host server, and your new vSwitch1 will be displayed under the Management vSwitch0.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

CentOS 6

I wanted to show my thanks for this post by giving you my steps in setting up centos 6. Feel free to add/delete/modify whatever you want.

Comparison to Gentoo: Initial installation of the OS is MUCH easier. Setting up the vlans involves 3 files per vlan. So I suppose it's a tossup as far as time. My vlan11 is servers, 10 is workstations, 50 is wifi. For now I'm just joining workstations to wifi

Get the centos installer (I used current which is 6.5)
##make a vm with dvd1 mounted at startup
##choose minimal install (this is different than using the minimal iso as that doesn't even have cron
##reboot and login as root
##Ensure that the module is loaded by entering the following command:
lsmod | grep 8021q
#If the module is not loaded, load it with the following command:
modprobe 8021q
vi /etc/sysconfig/network-scripts/ifcfg-eth0
##press i for insert mode. esc to exit insert mode.
##make it like this
:x to save and exit
vi /etc/sysconfig/network-scripts/ifcfg-vlan11

##repeat for vlan10, vlan50
##then you have to add a route and rule or cenos tries to send traffic from one vlan out the wrong vlan
##this is what I followed:
vi /etc/iproute2/rt_tables
#add the following lines
11 vlan11
50 vlan50
10 vlan10

#then add /etc/sysconfig/network-scripts/route-vlan11 with:
default table vlan11 via
#then add /etc/sysconfig/network-scripts/rule-vlan11 with:
from table vlan11
#repeat for other vlans
#so with 1 network adapter and 3 vlans I have 10 files. lame
#maybe someone can figure out a cleaner way to do this, but my way works!

##continue on to my normal centos setup notes:
#Allow root ssh so you can get out of the stupid vmconsole
vi /etc/ssh/sshd_config
#uncomment the
PermitRootLogin yes

#iptables and SElinux are on. You may need to turn these off.
service iptables stop
vi /etc/sysconfig/selinux

//more good stuff before moving on to app installation///
//get the epel repo up
cd ~
rpm -ivh epel-release-6-8.noarch.rpm
#get git for scripts, zip and unzip are handy too
sudo yum install git zip unzip

/////////VMWARE Tools install////////////////
su root
yum install gcc kernel-devel perl make openssh-clients wget
//Mount the VMWare Tools ISO in the gui
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/VMwareTools*.gz /tmp
cd /tmp
tar -C /tmp -zxvf VMwareTools*.gz
cd vmware-tools-distrib
//accept the defaults
//then run the config thing
umount /mnt/cdrom

/////////avahi install///////
#basically I followed your simple steps, only thing was I got a dbus error when starting until I figured out I had to start the messagebus service:

yum install avahi

service messagebus start
service avahi-daemon start
chkconfig --add messagebus
chkconfig --add avahi-daemon

Thanks for the feedback

I approved your post because you obviously put some thought into it and I am sure it will help a CentOS user from the future. :)

I would argue though, that leaving "PermitRootLogins = yes" is a no-no, and would recommend that you instead create a user while logged in via the VMware console, and then ssh in as that user. I would also recommend allowing ssh logins via public key only.

Also, I rarely actually have to install Gentoo these days. I keep a "Gentoo64bitTemplate" (mostly) up to date on each of our clients' VMware systems, so deploying a new Gentoo Linux server is a couple clicks, and then a name-changing script away.

And one helpful hint: To su to root and inherit all of root's environment just do:

$ su -

Or if you feel that must enter an account name:

$ su - root

also works.



Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <b> <i> <u> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Enter the code without spaces and pay attention to upper/lower case.