Static Network Address, Routing Issue
Joe Zicarelli
joe.zicarelli at gmail.com
Sun Nov 21 20:43:40 UTC 2004
Hello,
I have just done a fresh Custom (minimal) Warty install. Using DHCP,
networking works fine. However, I wish to give it a static IP
address. After reading 'man interfaces', I thus edited my
/etc/network/interfaces: (Note that I have added line numbers here)
01 # This file describes the network interfaces available on your system
02 # and how to activate them. For more information, see interfaces(5).
03
04 # The loopback network interface
05 auto lo
06 iface lo inet loopback
07
08 # The primary network interface
09 auto eth0
10 #iface eth0 inet dhcp
11 iface eth0 inet static
12 address 192.168.1.2
13 netmask 225.225.225.0
14 gateway 192.168.1.1
However, at this point, 'sudo ifup eth0' fails: (Again, added line numbers)
1 jdz at Artemis:~ $ sudo ifup eth0
2 Error for wireless request "Set Encode" (8B2A) :
3 SET failed on device eth0 ; Operation not supported.
4 SIOCSIFNETMASK: Invalid argument
5 Failed to bring up eth0.
A little googling leads me to believe that lines 2-3 are Wireless
related, and harmless in my case, as I am not using wireless with this
box. I do not understand line 4, and suspect it to be bad. Line 5 is
obviously bad.
Now checking 'ifconfig': eth0 has been assigned the above address.
The box is able to ping other boxen on the same subnet. However, it
is not able to ping boxen beyond the local subnet (example: the
Internet). Checking 'route' shows no routing rules for eth0.
My best guess would be that ifup is failing before it gets a chance to
set up routing.
If I manualy add the default gateway, 'sudo route add default gw
192.168.1.1 dev eth0' -- everything works: the box can now ping the
Internet, and has a static address -- which was my goal to start out
with.
I wish though to understand why ifup and /etc/init.d/networking fail.
I feel that I must be doing something foolish. I have two questions:
First, "SIOCSIFNETMASK: Invalid argument", from line 4 of ifup: What
does this mean?
Also, does anyone see any mistakes in the box's
/etc/network/interfaces that would be causing ifup to fail?
Thanks,
Joe Zicarelli
More information about the ubuntu-users
mailing list