From: Zebee Johnstone on
In comp.os.linux.hardware on Mon, 14 Jun 2010 10:07:16 +0200
Arun Vidarjee <nospam(a)examle.com> wrote:
>
> Tried that with no success:
> # ifconfig eth0 192.168.1.110
> # ifconfig eth0
> ...
> inet addr: 192.168.1.110 Bcast:192.168.1.255 Mask: 255.255.255.0
>
> # route
> 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0

Did you do ifconfig eth0 up ?

If you run tcpdump in another shell, see anything interesting?

tcpdump -i eth0

should be enough to see ping packets and arp packets.

so..

# ifconfig eth0 192.168.1.110 netmask 255.255.255.0 up

(being sure that nothing else is using that address)

# route add default gw 192.168.1.1.

(not really required but I find it helps)

# ping 192.168.1.1

should give you arp req and pings:

tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
22:17:16.234911 arp who-has 192.168.1.253 tell 192.168.1.222
22:17:16.235926 arp reply 192.168.1.253 is-at 00:30:0a:77:d2:43 (oui
Unknown)
22:17:16.235940 IP 192.168.1.222 > 192.168.1.253: ICMP echo request,
id 5401, seq 1, length 64
22:17:16.239458 IP 192.168.1.253 > 192.168.1.222: ICMP echo reply, id
5401, seq 1, length 64


If you aren't seeing anything leaving then there's a serious problem.
If you see the arp who-has but no reply then your router's ignoring
you. Check your DHCP table to make sure it doesn't think something
else has that address.



Zebee
From: Arun Vidarjee on
Hi

Am 14.06.2010 14:24, schrieb Zebee Johnstone:
> In comp.os.linux.hardware on Mon, 14 Jun 2010 10:07:16 +0200
> Arun Vidarjee<nospam(a)examle.com> wrote:
>>
>> Tried that with no success:
>> # ifconfig eth0 192.168.1.110
>
> Did you do ifconfig eth0 up ?
>
> # ifconfig eth0 192.168.1.110 netmask 255.255.255.0 up

That was it, thanks a log! I should have known, it was the
same thing years ago with a wireless interface.

Setting network manually to a static ip is OK now. Still
can't get it from the DHCP-server. As I said earlier, the
server side is OK, the same laptop in the same network,
gets it network configuration from the same DHCP-server
without a hitch.

best regards
Arun
From: Pascal Hambourg on
Hello,

Arun Vidarjee a �crit :
>
> Am 14.06.2010 14:24, schrieb Zebee Johnstone:
>> In comp.os.linux.hardware on Mon, 14 Jun 2010 10:07:16 +0200
>> Arun Vidarjee<nospam(a)examle.com> wrote:
>>> Tried that with no success:
>>> # ifconfig eth0 192.168.1.110
>> Did you do ifconfig eth0 up ?
>>
>> # ifconfig eth0 192.168.1.110 netmask 255.255.255.0 up
>
> That was it, thanks a log! I should have known, it was the
> same thing years ago with a wireless interface.

That really surprises me. From the first article in this thread eth0 was
already up, and IME configuring an address on an interface with ifconfig
implicitly sets it up. Besides, the "route" command output showed that a
route to the subnet via eth0 existed, which can not happen when the
interface is not up. Last, the error message "Destination Host
Unreachable" indicates a problem with ARP resolution, which can only
happen when the interface is up (the kernel won't even try to do ARP
resolution if the interface is down).

> Setting network manually to a static ip is OK now. Still
> can't get it from the DHCP-server. As I said earlier, the
> server side is OK, the same laptop in the same network,
> gets it network configuration from the same DHCP-server
> without a hitch.

From the messages of dhcpcd, it seems that it gets a lease but for some
reason does not configure the interface. Could you try another DHCP
client such as pump or dhclient from ISC dhcp3 ?
From: Arun Vidarjee on
Am 14.06.2010 17:07, schrieb Pascal Hambourg:
>
> Arun Vidarjee a �crit :
>>
>> Am 14.06.2010 14:24, schrieb Zebee Johnstone:
>>> Did you do ifconfig eth0 up ?
>>>
>>> # ifconfig eth0 192.168.1.110 netmask 255.255.255.0 up
>>
>> That was it, thanks a log! I should have known, it was the
>> same thing years ago with a wireless interface.
>
> That really surprises me. From the first article in this thread eth0 was
> already up, and IME configuring an address on an interface with ifconfig
> implicitly sets it up. Besides, the "route" command output showed that a
> route to the subnet via eth0 existed, which can not happen when the
> interface is not up. Last, the error message "Destination Host
> Unreachable" indicates a problem with ARP resolution, which can only
> happen when the interface is up (the kernel won't even try to do ARP
> resolution if the interface is down).

Good observation. This box is set to get a dhcp address during
boot up which I can confirm because I see a dhcp-dialog identical
to the one I posted in the OP. The ifconfig in that posting was
the result of that. But there was no route to eth0, and the
result to ping command was "Network not reachable". They came
after I tried the static address manually, without "up".

>> Setting network manually to a static ip is OK now. Still
>> can't get it from the DHCP-server. As I said earlier, the
>> server side is OK, the same laptop in the same network,
>> gets it network configuration from the same DHCP-server
>> without a hitch.
>
> From the messages of dhcpcd, it seems that it gets a lease but for some
> reason does not configure the interface. Could you try another DHCP
> client such as pump or dhclient from ISC dhcp3 ?

Yes it could be the dhcp client. I'll try an alternative and
come back.

Arun
From: Arun Vidarjee on
Hi all

Am 14.06.2010 20:06, schrieb Arun Vidarjee:
> Am 14.06.2010 17:07, schrieb Pascal Hambourg:
>>
>> Arun Vidarjee a �crit :
>>>
>>> Setting network manually to a static ip is OK now. Still
>>> can't get it from the DHCP-server. As I said earlier, the
>>> server side is OK, the same laptop in the same network,
>>> gets it network configuration from the same DHCP-server
>>> without a hitch.
>>
>> From the messages of dhcpcd, it seems that it gets a lease but for some
>> reason does not configure the interface. Could you try another DHCP
>> client such as pump or dhclient from ISC dhcp3 ?
>
> Yes it could be the dhcp client. I'll try an alternative and
> come back.

This is weird. I setup the boot up so that no dhcp-address is
requested. After a fresh reboot:

# ifconfig eth0
eth0 Link encap:Ethernet HWaddr ...
BROADCAST MULTICAST MTU:1500 Metric:1
RX ...

# route
loopback * 255.0.0.0 U 0 0 0 lo

# dhclient eth0
# ifconfig eth0
eth0 Link:...
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr:...
....
# route
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1. 0.0.0.0 UG 0 0 0 eth0
# cat resolv.conf
nameserver MY.ISP.NAME.SERVER1
nameserver MY.ISP.NAME.SERVER2

everything is perfectly configured! I reboot

# dhcpcd eth0
dhcpcd: version 5.2.2 starting
dhcpcd: eth0: waiting for carrier
dhcpcd: eth0: carrier acquired
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 86400 seconds
dhcpcd: eth0: MTU set to 1492
dhcpcd: forking to background

# ifconfig eth0
eth0 Link encap:Ethernet HWaddr ...
BROADCAST MULTICAST MTU:1500 Metric:1
RX ...

No IP-address!
resolv.conf empty

So dhcpcd or dhclient makes the differnce! As noted above
dhcpcd is version 5.2.2. The distribution is Slackware 13.1
64bit.

Arun