Linux: setup static ip
From FVue
								
												
				Problem
Debian out of the box comes with DHCP installed. How can I modify this into a setup with a static ip-address?
Environment
- Debian
Solution
Modify /etc/network/interfaces, for example:
#iface eth0 inet dhcp
iface eth0 inet static
        address 192.168.123.9
        network 192.168.123.0
        netmask 255.255.255.0
        broadcast 192.168.123.255
        gateway 192.168.123.254
ifdown eth0 # You probably shouldn't do this if you're on a remote login ifup eth0
See also
- 10.6.1.1 Configuring an interface with a static IP address
- Debian Reference
Journal
20070209
- setting static ip
- Same forum question, with useful answers
Modified /etc/network/interfaces:
#iface eth0 inet dhcp
iface eth0 inet static
        address 192.168.123.9
        network 192.168.123.0
        netmask 255.255.255.0
        broadcast 192.168.123.255
        gateway 192.168.123.254
 Advertisement

