|
Home > Archive > Red Hat Networking > January 2004 > wlan0 answers for unplugged eth0
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
wlan0 answers for unplugged eth0
|
|
| Hendrik-Jan Agterkamp 2004-01-23, 7:48 pm |
| This is strange. Take my laptop, RH9, with eth0 say 192.168.1.100
and wlan0 say 192.168.1.101. The eth0 is not plugged in. However, from my
server I can ping 192.168.1.100 and the first hit takes 30 to 100ms and the
second and thereafter take 2ms ... but the eth0 is not plugged in so ping
should fail - really. Then if I plug in eth0 and ping again it actually
takes about 1ms or so, a lot faster. Then I unplug the eth0 again and try
pinging 192.168.1.100 again and it fails .... this behaviour is consistent
after every reboot. /sbin/arp on the server confirms that wlan0 answers the
ping for the .100 address. I have the masks set to 255.255.255.0 for all.
So how do I avoid the initial "incorrect behaviour". My wlan0 driver is
hostap, could it be that the redhat network scripts don't like the wlan0
id? SHould I have a go with the iptables on my laptop perhaps ..
Hendrik
| |
| Hendrik-Jan Agterkamp 2004-01-23, 7:48 pm |
| Hendrik-Jan Agterkamp wrote:
quote:
> This is strange. Take my laptop, RH9, with eth0 say 192.168.1.100
> and wlan0 say 192.168.1.101. The eth0 is not plugged in. However, from my
> server I can ping 192.168.1.100 and the first hit takes 30 to 100ms and
> the second and thereafter take 2ms ... but the eth0 is not plugged in so
> ping should fail - really. Then if I plug in eth0 and ping again it
> actually takes about 1ms or so, a lot faster. Then I unplug the eth0 again
> and try pinging 192.168.1.100 again and it fails .... this behaviour is
> consistent after every reboot. /sbin/arp on the server confirms that wlan0
> answers the ping for the .100 address. I have the masks set to
> 255.255.255.0 for all.
>
> So how do I avoid the initial "incorrect behaviour". My wlan0 driver is
> hostap, could it be that the redhat network scripts don't like the wlan0
> id? SHould I have a go with the iptables on my laptop perhaps ..
Cool, answer to myself ;-)
On the laptop I do
/sbin/iptables --flush
/sbin/iptables -A INPUT -i wlan0 -d ! 192.168.1.101 -j DROP
/sbin/iptables -A INPUT -i wlan0 -d 192.168.1.101 -j ACCEPT
/sbin/iptables -A INPUT -i eth0 -d ! 192.168.1.100 -j DROP
/sbin/iptables -A INPUT -i eth0 -d 192.168.1.100 -j ACCEPT
which has the desired effect but one problem remaining.
With eth0 unplugged, server's arp cache pick's up the wrong
hwaddr when I ping the .100 address on the server. A remedy
to that is to do on the server
/sbin/arp -d laptop-eth0
or on the laptop do
ping -I eth0 -c 1 server
The latter is nice, but how to automate it, not using cron?
Almost happy
Hendrik
|
|
|
|
|