I have a debian box running as a simple server at home and I want to give it a static ip address, I can't seem to find any simple guides on how exactly to accomplish this. So far I have modified the /etc/network/interfaces from:
Code:
iface eth0 inet dhcp
auto eth0
to:
Code:
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
#network 192.168.1.0
gateway 98.229.96.1
and here are the new results of ifconfig:
Code:
chris@debian:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:95:31:90:37
inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::207:95ff:fe31:9037/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1276 errors:0 dropped:0 overruns:0 frame:0
TX packets:528 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:118934 (116.1 KiB) TX bytes:66310 (64.7 KiB)
Interrupt:5 Base address:0xcc00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 B) TX bytes:560 (560.0 B)
The result:
Code:
chris@debian:~$ ping google.com
ping: unknown host google.com
chris@debian:~$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=3.04 ms
This was working when it was using DHCP. Sorry if this is a simple fix but I have looked all over and can't figure out what the problem is.