can't configure networking for static IP address
My problem may sound familiar to some of you, because I have raised it
before in this forum. I still haven't solved it, so I am going to
present it again (trying to be more systematic and methodical this
time). For those of you tried to help me before: Thank you. If you
will try again, I will be very grateful for your perseverance.
I installed Debian on my Dell Dimension 4100 and, with networking
configured for DHCP, I am able to connect to the Internet, ftp, http,
etc.
I am building an internet server, so I need to reconfigure networking
to use a static IP address. I edited /etc/network/interfaces, using
the static IP address leased to me by my RCN (and the other network
parameters RCN provided).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
I edited /etc/network/interfaces to look like this:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
# configured for DHCP during Debian installation
# iface eth0 int dhcp
iface eth0 inet static
address 207.237.37.110
netmask 255.255.255.224
network 207.237.37.96
broadcast 207.237.37.127
gateway 207.237.37.97
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
jupiter:~# /etc/init.d/networking restart
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
I edited /etc/resolv.conf to include addresses of nameservers provided
by RCN.
search
nameserver 207.172.3.8 # ns1.dns.rcn.net
nameserver 207.172.3.9 # ns2.dns.rcn.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
I edited /etc/hosts to include my hostname and domain:
127.0.0.1 localhost.localdomain localhost jupiter
207.237.37.110 jupiter.obliqueuniverse.org jupiter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
jupiter:~# echo jupiter.obliqueuniverse.org > /etc/hostname
jupiter:~# /bin/hostname –F /etc/hostname
jupiter:~# hostname
jupiter.obliqueuniverse.org # shouldn't this be *just* the host
name?
jupiter:~# hostname -f
jupiter.obliqueuniverse.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Now, I test the network configuration:
jupiter:~# ping 209.200.229.100
From 207.237.37.110 icmp_seq Destination Host Unreachable
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Relevant observation:
With the network configured for DHCP, I can run lynx:
jupiter:~# lynx ipchicken.com
Current IP Address: 207.237.37.110
(Of course, I can't run lynx with the static configuration until I get
that configuration working!)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Relevant observation:
With the network configured for DHCP, when I run ifconfig I get:
Inet addr: 192.168.2.3
Bcast: 192.168.2.255
Mask: 255.255.255.0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Full Disclosure
I am running Debian sarge, because that is the version that was used
in the book I am following to learn how to build an internet server.
I realize this raises security issues, but I am not building a
production server, only a *training* server.
More to the point: Although sarge is no longer state-of-the-art, I
assume it should still be possible to configure it as an internet
server with a static IP address!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Again, many thanks if you have read this far! I am grateful for any
insight the Debian community can offer on this problem.
Best Regards,
Vwaju
New York City
Reply to: