ifupdown (Debian Sarge) woes

I'm trying to set ifupdown to use a static ip. Its not working.

relevant information:

uname -routput:

2.4.29-linode39-1um

etc/network/interfaces:

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

# The following is automatically put in there, but incorrect
# eth0 uses dhcp
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
    address 66.160.141.163
    network 66.160.141.0
    netmask 255.255.255.0
    broadcast 66.140.141.255
    gateway 66.140.141.1
#auto eth0:1
#iface eth0:1 inet static
#       address 66.160.141.167
#       netmask 255.255.255.0

ifup -a -v output

ifup: interface lo already configured
Configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d

ifconfig eth0 66.160.141.163 netmask 255.255.255.0 broadcast 66.140.141.255             up
 route add default gw 66.140.141.1  eth0
SIOCADDRT: Network is unreachable
Failed to bring up eth0.

ifconfig after ifup:

eth0      Link encap:Ethernet  HWaddr FE:FD:42:A0:8D:A3
          inet addr:66.160.141.163  Bcast:66.140.141.255  Mask:255.255.255.0
          inet6 addr: fe80::fcfd:42ff:fea0:8da3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:798 errors:0 dropped:0 overruns:0 frame:0
          TX packets:238 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:376593 (367.7 KiB)  TX bytes:25280 (24.6 KiB)
          Interrupt:5

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

route -n after ifup:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
66.160.141.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

Is it just me, or is ifupdown bugged?

Thanks in advance for any help.

2 Replies

You've got a typo.

iface eth0 inet static
    address 66.160.141.163
    network 66.160.141.0
    netmask 255.255.255.0
    broadcast 66.140.141.255
    gateway 66.140.141.1 

Look at address/network – they reference 66.160, but broadcast/gateway references 66.140.

You need to make them all match.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct