Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jul 12, 2005 11:24 am 
Offline
Newbie

Joined: Tue Jul 12, 2005 11:15 am
Posts: 2
I'm trying to set ifupdown to use a static ip. Its not working.

relevant information:

uname -routput:
Code:
2.4.29-linode39-1um


etc/network/interfaces:
Code:
# 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
Code:
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:
Code:
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:
Code:
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.


Top
   
 Post subject:
PostPosted: Tue Jul 12, 2005 2:20 pm 
Offline
Senior Member

Joined: Sat Dec 04, 2004 5:36 pm
Posts: 145
You've got a typo.

Code:
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.


Top
   
 Post subject:
PostPosted: Tue Jul 12, 2005 2:33 pm 
Offline
Newbie

Joined: Tue Jul 12, 2005 11:15 am
Posts: 2
Thanks. That fixed it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group