Static IP Example
The following example shows how to configure interface eth0 with a static IP address (script file ifcfg-eth0).
|
Parameter |
Description |
|---|---|
|
BOOTPROTO=static |
Enables 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 spoofed 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 |
Interface eth0 |
|
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. |
|
ONBOOT=yes |
Applies on start up |