VLAN and DHCP Example

The following example shows how to configure VLAN ID 25 on logical interface eth0 for DHCP (script file ifcfg-eth0.25).

Parameter

Description

BOOTPROTO=dhcp

Enables DHCP

HWADDR=4C:02:89:00:F3:90

Replace the MAC value with the actual MAC address of the card.

MACADDR=4C:02:89:00:F3:26

Include this line only if you want to have a spoof MAC address.

NM_CONTROLLED=yes

Set to no if you do not want to allow changes from the web interface.

TYPE=Ethernet

Set the interface type to ethernet.

IPV6INIT=no

Set to IPv4

DEVICE=eth0.25

Set the VLAN ID to 25

DEFROUTE=no

DEFROUTE must be no to keep the default route out of the default routing table.

VLAN=yes

Enables VLAN

ONBOOT=yes

Applies at start up