Do my ESXi hosts have the same VLANs?

In a small vSphere environment that I’ve recently been working on, I started to notice that some of my VMs were disappearing off the network from time to time. Reboots of the VM didn’t seem to fix the issue but a quick vMotion of the VM to another host did. If you haven’t figured it out yet, one of my hosts was missing a VLAN and VMs connected to a certain portgroup were affected whenever they ran on the host. vSphere will warn you if a host that you’re trying to migrate a VM to doesn’t have the right portgroup and host profiles (if you’re using Enterprise Plus licensing) will alert you to the fact that a portgroup isn’t configured with the right VLAN ID but nowhere in vSphere will you get an alert if a required VLAN is not […]

Read More

Creating VLANs in DD-WRT (Part 3)

In the second part of this post I completed the setup of VLANs on my WNR3500L router. To make them available to hosts (and VMs) I now have to configure my Cisco SLM2008 switches. Fortunately that turns out to be fairly simple. The SLM 2008 has a web-based GUI that does the job nicely. Once logged in it’s a matter of opening the VLAN >> VLAN Settings page. Then just tap in the VLAN ID that you want to create and click “Add”. This then drops you into an additional page where you choose which ports to associate the VLAN with. I picked all of the ports on this switch (where my ESX hosts are located). Then I clicked “Save”. It’s just then a case of repeating for the other VLANs that are required. And that’s the switches done. The default configuration […]

Read More

Creating VLANs in DD-WRT (Part 2)

In the first part of this post I created some VLANs on my NetGear WNR3500L router that I’ve flashed with DD-WRT firmware. In this second part of the post I will be assigning IP address ranges to those VLANs and configuring the router’s firewall. I want the VLANs that I setup previously to use separate IP Address ranges. To do this it’s back into to the telnet session and enter the following command: [text]nvram set rc_startup=’ #!/bin/ash PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}" ifconfig vlan6 192.168.6.254 netmask 255.255.255.0 ifconfig vlan7 192.168.7.254 netmask 255.255.255.0 ifconfig vlan8 192.168.8.254 netmask 255.255.255.0 ifconfig vlan9 192.168.9.254 netmask 255.255.255.0 ifconfig vlan10 192.168.10.254 netmask 255.255.255.0 ifconfig vlan11 192.168.11.254 netmask 255.255.255.0 ifconfig vlan12 192.168.12.254 netmask 255.255.255.0 ifconfig vlan13 192.168.13.254 netmask 255.255.255.0 ifconfig vlan14 192.168.14.254 netmask 255.255.255.0 ifconfig vlan15 192.168.15.254 netmask 255.255.255.0 ifconfig vlan6 up ifconfig vlan7 up ifconfig vlan8 up ifconfig vlan9 up […]

Read More

Creating VLANs in DD-WRT (Part 1)

I’m breaking this post up into 3 parts because it does go on a bit. Part 1 – An overview of what I’m trying to do and creating VLANs on the router Part 2 – Configuring IP ranges and the router’s firewall Part 3 – Configuring VLANs on the SLM2008 switches Recently I have flashed my home router (a NetGear WNR3500L) with DD-WRT firmware and performed some basic and intermediate configuration to connect it to the internet and direct DNS queries for my lab domain to the correct DNS server. Now though I want to setup some VLANs. I want to be able to make use of some of the more advanced networking features in vSphere in my lab and this was one of the primary drivers for me selecting the router that I did. I already have two Cisco […]

Read More

PowerCLI: Adding New PortGroups

I’m sure that someone somewhere has written a script exactly like this in the past but I wanted to write my own for a number of reasons. While I’ll probably never be a PowerCLI hero, it really doesn’t hurt to keep in practice and hone your skills.

Let’s start with what I want to accomplish. I’m working with an ESX 3.5 web hosting environment and there’s a new project in the pipelines. A brace of new servers are required and they’ll be on a new VLAN. The VLAN has been created and configured on the various switches that the ESX hosts connect to but now of course a corresponding PortGroup is required. (Actually two are needed – complex project.) Now we’re not talking about a huge number of hosts here. It would probably only take 10 minutes to do it by hand using the VI client. It’ll take me longer to write this post! However, it is something that happens relatively often in this environment so it’s worth taking the time to write a script. (more…)

Read More