LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Network Interface problem: Sony Vaio VPCEG2DXF Running -13.37/x86_64 (3.2.7 kernel) (http://www.linuxquestions.org/questions/slackware-14/network-interface-problem-sony-vaio-vpceg2dxf-running-13-37-x86_64-3-2-7-kernel-939812/)

rshepard 04-14-2012 01:58 PM

Network Interface problem: Sony Vaio VPCEG2DXF Running -13.37/x86_64 (3.2.7 kernel)
 
When this laptop is at a wifi hot spot and wicd is run, the eth0 interface is not brought down so all packets try using that interface without a cable. I have the problem isolated and need help in fixing the issue.

To understand the problem requires comparison with a working portable, my Dell Latitude E5410. When the Dell boots with no ethernet cable attached 'route -n' shows eth0 UP but not running with the static IP address of my office network.

When I invoke 'wicd-client -n' /var/log/messages shows:
Apr 14 09:35:36 caddis dhcpcd[3096]: version 5.2.12 starting
Apr 14 09:35:36 caddis kernel: [ 1946.368876] ADDRCONF(NETDEV_CHANGE)
: wlan0: link becomes ready
Apr 14 09:35:36 caddis dhcpcd[3096]: wlan0: broadcasting for a lease
Apr 14 09:35:36 caddis dhcpcd[3096]: wlan0: offered 10.5.70.151 from
10.5.70.1
Apr 14 09:35:36 caddis dhcpcd[3096]: wlan0: acknowledged 10.5.70.151
from 10.5.70.1
Apr 14 09:35:36 caddis dhcpcd[3096]: wlan0: checking for 10.5.70.151
Apr 14 09:35:42 caddis dhcpcd[3096]: wlan0: leased 10.5.70.151 for 14
400 seconds
Apr 14 09:35:42 caddis dhcpcd[3096]: forked to background, child pid 3127
Apr 14 09:38:36 caddis ntpd[1671]: Listen normally on 5 wlan0 10.5.70.151
UDP 123
Apr 14 09:38:36 caddis ntpd[1671]: Listen normally on 6 wlan0
fe80::223:14ff:fe68:98e0 UDP 123
Apr 14 09:38:36 caddis ntpd[1671]: Deleting interface #3 eth0,
192.168.55.2#123, interface stats: received=0, sent=0, dropped=0,
active_time=2101 secs
Apr 14 09:38:36 caddis ntpd[1671]: peers refreshed

Note that dhcpcd forks to the background and ntpd listens on wlan0 before deleting eth0.

The problem with the Sony is that ntpd is not called. After dhcpcd forks to the background, nothing happens. Both the Sony and the Dell run the same Slackware and wicd versions and the .conf files are the same. Because eth0 is still in the kernel routing table packets try to go over that interface rather than the wlan0 interface that's connected to the WAP.

What might cause the process to stop on the Sony while completing on the Dell?

Rich

Didier Spaier 04-16-2012 02:11 AM

I would try "ifconfig eth0 down" and see what I come up with.

But you probably did try that already, then sorry for the noise.

rshepard 04-17-2012 11:14 AM

Didier,

I found this to work very early in the process of fixing the problem. It's not practical because I won't give root privileges to the user; it needs to be automated somehow, if that's possible.

More important is the question of why the Sony won't invoke ntpd to bring down eth0 after dhcpcd establishes a connection to the WAP while the Dell does. They both run the same distribution version, the same wicd version, and the only difference is the kernel (default in the Dell and 3.2.7 in the Sony to provide the ethernet driver for the newer network chip.

Thanks,

Rich

onebuck 04-18-2012 09:35 AM

Member response
 
Hi,

Try using;
Quote:

ifplugd <- 'ifplugd is a Linux daemon which will automatically configure your Ethernet device when a cable is plugged in and automatically un-configure it if the cable is pulled. This is useful on laptops with on-board network adapters, since it will only configure the interface when a cable is really connected. ifplugd interfaces with your distribution's native network configuration utilities.'

The above link and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

lazardo 05-02-2012 01:11 AM

I use /etc/wicd/scripts/{pre,post}* scripts.

wicd passes enough information to know if its wired or wireless.

Cheers,

rshepard 05-03-2012 10:54 AM

onebuck: I installed ifplugd but found it worked only when the system booted with an ethernet cable attached. Then it would bring down eth0 when the cable was removed and bring up eth0 when the cable was re-inserted. If the system booted with no attached cable eth0 came up, along with wlan0. I probably need to look more closely at man ifplug and see if I missed something critical.

lazardo: I will look at /etc/wicd/scripts/ and see how to use the pre- and post- scripts to address the issue.

Thanks, both of you. I'll post what I learn from both suggestions.

Rich

lazardo 05-04-2012 10:11 AM

Here's how my laptop is set up

$ cat /etc/wicd/scripts/postconnect/wicd_post
Code:

#!/bin/bash
#logger -st wicd_post "params: $1 $2 "

FW=yes

# check for known networks
case "$1" in
        wireless) NETDEV=wlan0
                [ "$2" = "Lot104" ] && FW=no                # home
                [ "$2" = "2WIRE962" ] && FW=no                # office
                ;;

        wired) NETDEV=eth0
                # ping and verify home gateway server               
                ping -c 2 -i .33 -w 1 192.168.1.251 > /dev/null
                if arp -n 192.168.1.251 | grep -q 00:23:69:50:4b:f3; then
                        FW=no
                fi
                # Intel 6200N
                logger -st wicd_post "killing wireless"
                for i in 0 1; do sudo rfkill block $i; done
                ;;

        *)
                logger -st wicd_post "network FAILED, $1, $2 "
                exit 1
esac

if [ "$FW" != "yes" ]; then
        logger -st wicd_post "no firewall for $2"
else
        sudo sh /etc/rc.d/rc.firewall start $NETDEV
        logger -st wicd_post "firewall started on $NETDEV"
fi



All times are GMT -5. The time now is 02:33 PM.