Pros and cons
There is no obvious speed disadvantage in using DHCP. The use of static IP is, however, mandatory in some server setups, such as DHCP server and DNS server. Some may argue that static IP makes it possible to get on-line when the router is down. That is true if only one host is connecting to the internet.
Webmin method
Log in to Webmin (https://localhost:10000).
Click Networking icon.
Click Network Configuration link.
Click Network Interfaces link.
Look for Interface activated at boot time
Click eth0 link.
Check (tick) the radio button next to Static.
Key in your preferred private IP, e.g. 192.168.1.101.
Click Save and apply.
Return to Network Configuration page.
Click Apply Configuration .
Alternative
The alternative is to locate ifcfg.eth0 in /etc/sysconfig (could be further in) and edit it to:
-
You have to be root to do this.
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.101
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes
METRIC=10
|
Restart network:
-
# /etc/init.d/network restart
|
- or
-
# /etc/rc.d/init.d/network restart
|
|