VLAN with Static IP Example
The following example shows how to configure VLAN ID 25 on eth0 with a static IP address (script file ifcfg-eth0.25).
|
Parameter |
Description |
|---|---|
|
BOOTPROTO=static |
Enables the static IP address. |
|
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 |
|
IPADDR=192.168.1.10 |
Set to the required IP address (IPv4). |
|
NETMASK=255.255.255.0 |
Set to the required netmask. |
|
BROADCAST=192.168.1.255 |
|
|
NETWORK=192.168.1.0 |
|
|
GATEWAY=”” |
Set this parameter to null to keep the default gateway out of the default routing table. |