Hi,
I am having problems with assigning a static IP to my machine.
my /etc/network/interfaces looks like this
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.5
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
When the machine boots ifconfig gives this output
Code:
eth0 Link encap:Ethernet HWaddr 00:1c:c0:45:1d:f2
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask 255.255.255.0
inet6 addr: *BLAH*
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:4294967288 overruns:0 frame:0
TX packets:0 errors:0 dropped:138 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX Bytes:0 (0.0 B)
Interrupt:20 Base address:0xa000
and ping 192.168.1.1 gives
Code:
From 192.168.1.5 icmp_seq=2 Destination Host Unreachable
However if I change the /etc/network/interfaces file to read
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
everything works, and running
Code:
ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up
sets the static IP up and it works.
I don't understand what is going on here!