C H A P T E R  7

Configuring VLANs

This chapter describes how to configure VLANs.

This chapter contains the following sections:



Note - If you change any of the VLAN configuration parameters, you must reboot the system before the changes take effect. If you make changes and do not reboot, you might experience configuration problems.



VLAN Overview

With multiple VLANs on an adapter, a server with a single adapter can have a logical presence on multiple IP subnets. By default, 128 VLANs can be defined for each VLAN-aware adapter on your server. However, this number can be increased by changing the system parameters.

If your network does not require multiple VLANs, you can use the default configuration, in which case no further configuration is necessary.

VLANs enable you to split your physical LAN into logical subparts, providing an essential tool for increasing the efficiency and flexibility of your network.

VLANs are commonly used to separate groups of network users into manageable broadcast domains, to create logical segmentation of workgroups, and to enforce security policies among each logical segment. Each defined VLAN behaves as its own separate network, with its traffic and broadcasts isolated from the others, increasing the bandwidth efficiency within each logical group.

Although VLANs are commonly used to create individual broadcast domains or separate IP subnets, it can be useful for a server to have a presence on more than one VLAN simultaneously. Several Sun products support multiple VLANs on a per-port or per-interface basis, allowing very flexible network configurations.

FIGURE 7-1 shows an example network that uses VLANs.

FIGURE 7-1 Example of Servers Supporting Multiple VLANs With Tagging Adapters


Illustration shows an example of servers supporting multiple VLANs with tagging adapters.

The example network has the following features:

The physical LAN network consists of a switch, two servers, and five clients. The LAN is logically organized into three different VLANs, each representing a different IP subnet.

The Main Server is a high-use server that needs to be accessed from all VLANs and IP subnets. The server has a Sun x4 PCI-Express Quad Gigabit Ethernet UTP Low Profile adapter installed. All three IP subnets are accessed by means of the single physical adapter interface. The server is attached to one of the switch’s Gigabit Ethernet ports, which is configured for VLANs 1, 2, and 3. Both the adapter and the connected switch port have tagging turned on. Because of the tagging VLAN capabilities of both devices, the sever is able to communicate on all three IP subnets in this network, but continues to maintain broadcast separation between all of those subnets. The following list describes the components of this network:

VLAN tagging is only required to be enabled on switch ports that create trunk links to other VLAN-aware Ethernet switches, or on ports connected to tag-capable end-stations, such as servers or workstations with VLAN-aware adapters.


Configuring VLANs

VLANs can be created according to various criteria, but each VLAN must be assigned a VLAN tag or VLAN ID (VID). The VID is a 12-bit identifier between 1 and 4094 that identifies a unique VLAN. For each network interface (e1000g0, e1000g1, e1000g2, and so on), 4094 possible VLAN IDs can be selected for each port.

Tagging an Ethernet frame requires the addition of a tag header to the frame. The header is inserted immediately following the destination MAC address and the source MAC address. The tag header consists of two bytes of Ethernet Tag Protocol identifier (TPID, 0x8100) and two bytes of tag control information (TCI). FIGURE 7-2 shows the Ethernet tag header format.

FIGURE 7-2 Ethernet Tag Header Format


By default a single VLAN is configured for every port, which groups all ports into the same broadcast domain, just as if there were no VLANs at all. This means that VLAN tagging for the switch port is turned off.



Note - If you configure a VLAN virtual device for an adapter, all traffic sent or received by that adapter must be in VLAN-tagged format.



procedure icon  To Configure Static VLANs in the Oracle Solaris x86 Environment

1. Create one hostname.e1000gnumber file for each VLAN that will be configured for each adapter on the server.

Use the following naming format, which includes both the VID and the physical point of attachment (PPA):

VLAN logical PPA = 1000 * VID + Device PPA
123000 = 1000*123 + 0
So the VLAN interface will be e1000g123000.

This format limits the maximum number of PPAs (instances) you can configure to 1000 in the /etc/path_to_inst file.

For example, on a server with the Sun x4 PCI-Express Quad Gigabit Ethernet UTP Low Profile adapter having an instance of 0, belonging to a member of two VLANs, with VID 123 and 224, you would use e1000123000 and e1000g224000, respectively, as the two VLAN PPAs.

2. Use the ifconfig(1M) to configure a VLAN virtual device, for example:


# ifconfig e1000g123000 plumb up
# ifconfig e1000g224000 plumb up

The output of ifconfig -a on a system having VLAN devices e1000g123000 and e1000g224000:


# ifconfig -a
e1000g224000: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 5
        inet 0.0.0.0 netmask ff000000 
        ether 0:3:ba:d8:d3:a6 
e1000123000: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
        inet 0.0.0.0 netmask ff000000 
        ether 0:3:ba:d8:d3:a6 

3. On the switch, set VLAN tagging and set VLAN ports to coincide with the VLANs you have set up on the server.

Using the examples in Step 2, you would set up VLAN ports 123 and 224 on the switch.

Refer to the documentation that came with your switch for specific instructions for setting VLAN tagging and ports.

 


procedure icon  To Configure VLANs in a Linux Environment

1. Ensure that the e1000g module is loaded:


modprobe e1000g

2. Plumb the Sun x4 PCI-Express Quad Gigabit Ethernet UTP Low Profile adapter interface:


ifconfig eth6 xxx.xxx.xx.xxx up

where xxx.xxx.xx.xxx = the IP address of the interface.

3. Add the VLAN instance (VID).

For example:


vconfig add eth6 5

where eth6 is the interface and 5 is the VID.



Note - In Linux system, you can use any single digit as the VID.


4. Configure the e1000 VLAN (eth2 in this example):


# ifconfig eth6.5 xxx.xxx.xx.xxx up

where xxx.xxx.xx.xxx = the IP address of the interface.


procedure icon  To Configure VLANs in a Microsoft Windows 2003 Environment

1. Click on Control Panel.

2. Click on Network Connection.

3. Click on the folder icon from the sub-manuel bar.

4. Right click on the Sun x4 PCI-Express Quad Gigabit Ethernet UTP Low Profile adapter port, then select Properties.

5. Click on Configure.

6. Click on VLAN, then click on New.

7. Enter the VLAN with ID, for example Vlan10

8. Click on Internet Protocol(TCP/IP).

9. Click on Use the following IP address.

10. Enter the IP address.

11. Click on Subnet Mask and 255.255.255.0 will show up.

12. Click on OK.

13. Repeat Step 3 through Step 10 until all the network ports are VLAN configured.



Note - Ensure that the firewall is turned off, or VLAN will not work.



Configuring Bonding for Multiple Interfaces


procedure icon  To Configure Bonding for Multiple e1000 Interfaces

1. Use the modprobe command to configure the mode:


modprobe bonding mode=balance-rr miimon=100 max_bonds=1

where:

2. Use the ifconfig command to create the bond:


ifconfig bond0   192.2.2.4 netmask 255.255.255.0 broadcast 192.2.2.255

where:

3. Configure the bond0 interface.

In this example, bond0 is the master of two slaves:.


ifenslave bond0 eth6 eth7 eth8 eth9
ifconfig bond0:1 193.2.2.4 netmask 255.255.255.0 broadcast
193.2.2.255
ifconfig bond0:2 194.2.2.4 netmask 255.255.255.0 broadcast
194.2.2.255

Refer to Linux documentation for more information.


procedure icon  To Remove Bonding:

single-step bullet  Use the rmmod command to remove bonding:


rmmod bonding