You are not logged in.

#1 2009-07-21 09:45:11

onguarde
Member
Registered: 2008-09-14
Posts: 144

Static IP Stopped working - Dhcp Works

Peace all!

I'm not sure when it started, but I noticed recently that I have to type the command below upon every restart.

# dhcpcd eth0
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: rebinding lease of 192.168.1.103
dhcpcd: eth0: acknowledged 192.168.1.103 from 192.168.1.1
dhcpcd: eth0: checking for 192.168.1.103
dhcpcd: eth0: leased 192.168.1.103 for 172800 seconds
dhcpcd: forking to background

The weird thing is, b4 and after dhcpd output of ifconfig is equivalent.

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:41:25:BE:64
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1168 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1389 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:676797 (660.9 Kb)  TX bytes:153832 (150.2 Kb)
          Interrupt:19 Base address:0xc800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          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:400 (400.0 b)  TX bytes:400 (400.0 b)

At first, I thought it's due to the hibernate script in pm-utils but this also occurs on normal boot.

Here's my rc.conf,

lo="lo 127.0.0.1"
eth0="eth0 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(eth0 lo)

gateway="default gw 192.168.1.1"
ROUTES=(gateway)

When I killall dhcpd-eth0, ping www.google.com seems to be replaced by dhcpd but why doesn't the same resolv.conf work with static ip??

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
nameserver 202.156.1.78
nameserver 202.156.1.68
nameserver 218.186.1.88
# /etc/resolv.conf.tail can replace this line

I'm stumped!

Last edited by onguarde (2009-07-21 09:59:30)

Offline

#2 2009-07-21 10:58:11

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Static IP Stopped working - Dhcp Works

Don't double-post.

Closed.

Offline

Board footer

Powered by FluxBB