Thursday, March 24, 2011

To get a Static IP Address from a DHCP Server (On Linux)

Thanks to Ivan.


Edit /etc/network/interfaces

Change settings to:

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.35
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.1.255
gateway 192.168.1.254

No comments: