Pogoplug 4 Network Issues at Work

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Pogoplug 4 Network Issues at Work

Postby jonnojohnson » Tue Apr 23, 2013 6:14 pm

I'm having real trouble with the networking on my PPv4 at my work where I have very little information about the network config (we are a remote office connected over a VPN to the corporate network).

Without ALARM installed the PP LED is red and the device does not show up on my.pogoplug.com. However it does show up on a network scan with Advanced IP Scan (IPv4 = xxx.30.240.151 at the moment) and I can ssh into it. Whenever I attempt to use wget though I get a bad address message for the tld.

I've installed ALARM successfully (on my home network) and when I bring it to my work network I get a solid green LED. However it does not show up on an IP or SSH scan so I'm stuck trying to find it.

Since I'm stuck while ALARM is installed I reverted to the stock firmware and have tried to analyze the network config.
Pogoplug uses udhcpc and I assume runs the script /usr/share/udhcpc/default.script (shown at bottom of this post).
I don't understand all the script does but it creates /etc/resolv.conf which on my work network looks like:
$this->bbcode_second_pass_code('', 'nameserver xxx.29.152.21 #eth0
nameserver xxx.29.152.76 #eth0')

The output of /sbin/ifconfig (first nibble redacted as xxx but it's the same everywhere) is:
$this->bbcode_second_pass_code('', '
/etc # /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:25:31:04:FB:D1
inet addr:xxx.30.240.151 Bcast:xxx.30.240.191 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:418 errors:0 dropped:0 overruns:0 frame:0
TX packets:299 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:42190 (41.2 KiB) TX bytes:40873 (39.9 KiB)
Interrupt:11

eth0:0 Link encap:Ethernet HWaddr 00:25:31:04:FB:D1
inet addr:169.254.251.209 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11

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:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:203 (203.0 B) TX bytes:203 (203.0 B)

xce0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.67.101.1 P-t-P:10.67.101.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1350 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:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
')

Finally if it's any use my dhcp configured Win7 machine on the same network is configured:
$this->bbcode_second_pass_code('', '
IPv4 = xxx.30.240.170
IPv4 SubMask = 255.255.255.192
IPv4 DefGateway = xxx.30.240.1
IPv4 DHCP Server = xxx.29.64.128
IPv4 DNS Servers = xxx.30.248.11, xxx.30.248.14
')

If anyone can point me to something I should change I'd really appreciate it. Step 1 would be to at least get wget working on the stock firmware. I assume that something is not right with the dns settings that come out of default.script

default.script:
$this->bbcode_second_pass_code('', '#!/bin/sh

#LOGFILE="/tmp/dhcp_`date '+%Y%m%d%H%M'`.log"
LOGFILE="/dev/null"
/bin/echo "DHCP COMMAND '$1'" > $LOGFILE
/bin/date >> $LOGFILE
/bin/echo >> $LOGFILE
/bin/echo "ENVIRONMENT: " >> $LOGFILE
/usr/bin/env >> $LOGFILE
/bin/echo >> $LOGFILE

hwaddrbytes=`/sbin/ifconfig $interface | /bin/grep 'HWaddr' | /usr/bin/awk '/HWaddr/ {print $5}' | /usr/bin/tr '[A-Z]' '[a-z]' | /bin/sed 's/:/ 0x/g'`
pip0=`/bin/echo $hwaddrbytes | /usr/bin/awk '/.*/ {print $5+0}'`
pip1=`/bin/echo $hwaddrbytes | /usr/bin/awk '/.*/ {print $6+0}'`

/bin/echo HWADDR $hwaddrbytes
/bin/echo PIP0 $pip0
/bin/echo PIP1 $pip1

[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"

/bin/echo "PRE-SETUP ifconfig: " >> $LOGFILE
/sbin/ifconfig >> $LOGFILE
/bin/echo >> $LOGFILE
/bin/echo "PRE-SETUP route: " >> $LOGFILE
/sbin/route >> $LOGFILE
/bin/echo >> $LOGFILE
/bin/echo "PRE-SETUP dns: " >> $LOGFILE
/bin/cat /etc/resolv.conf >> $LOGFILE
/bin/echo >> $LOGFILE

deconfig()
{
# first remove all default routes via this interface
while /sbin/route del default gw 0.0.0.0 dev $interface ; do
:
done

# remove all name servers from this interface
/bin/grep -v $interface /etc/resolv.conf > /tmp/resolv.conf.bak
/bin/cat /tmp/resolv.conf.bak > /etc/resolv.conf
/bin/rm /tmp/resolv.conf.bak

# revert to auto-ip
/sbin/ifconfig $interface 0.0.0.0
/sbin/ifconfig $interface:0 169.254.$pip0.$pip1
}

bound()
{
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
if [ -n "$router" ] ; then
# first remove all default routes via this interface
while /sbin/route del default gw 0.0.0.0 dev $interface ; do
:
done

# add the new ones back in now
for i in $router ; do
/sbin/route add default gw $i dev $interface
done
fi

if [ -n "$dns" ] ; then
# remove all name servers from this interface
/bin/grep -v $interface /etc/resolv.conf > /tmp/resolv.conf.bak
/bin/cat /tmp/resolv.conf.bak > /etc/resolv.conf
/bin/rm /tmp/resolv.conf.bak

# adding all dns values
for i in $dns ; do
/bin/echo "nameserver $i #$interface" >> /etc/resolv.conf
done
fi

# also bind to auto-ip interface
/sbin/ifconfig $interface:0 169.254.$pip0.$pip1
}

case "$1" in
renew|bound)
bound
;;
deconfig)
deconfig
;;
*)
/bin/echo "Unexpected Argument: $1" >> $LOGFILE
;;
esac

/bin/echo "POST-SETUP ifconfig: " >> $LOGFILE
/sbin/ifconfig >> $LOGFILE
/bin/echo >> $LOGFILE
/bin/echo "POST-SETUP route: " >> $LOGFILE
/sbin/route >> $LOGFILE
/bin/echo >> $LOGFILE
/bin/echo "POST-SETUP dns: " >> $LOGFILE
/bin/cat /etc/resolv.conf >> $LOGFILE
/bin/echo >> $LOGFILE
')
jonnojohnson
 
Posts: 16
Joined: Tue Apr 23, 2013 5:26 pm

Re: Pogoplug 4 Network Issues at Work

Postby jonnojohnson » Tue Apr 23, 2013 9:06 pm

I've confirmed on another Linux machine using DHCP here that the DNS servers should be xxx.30.248.11 & xxx.30.248.14 like the Windows machine gets.
Seems like the default.script is not getting the right dns servers to put into resolv.conf
I can't tell why yet.
jonnojohnson
 
Posts: 16
Joined: Tue Apr 23, 2013 5:26 pm

Re: Pogoplug 4 Network Issues at Work

Postby moonman » Wed Apr 24, 2013 8:59 am

Why don't you try using dhcpc instead of netcfg?

$this->bbcode_second_pass_code('', 'systemctl disable netcfg
systemctl enable dhcpcd@eth0')

and reboot
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Pogoplug 4 Network Issues at Work

Postby dhead666 » Wed Apr 24, 2013 10:31 am

You can log to http://ip/sqdiag/Logging/ with root:ceadmin to get your logs.
edit: I've re-read your 1st post, it won't help much if you don't know your ip.
Pogoplug Series 4 - Network Storage and Music Server: NFS/TVHeadend
Cubox-i2 - Applications Server: Lighttpd/CherryMusic/HTPCManager/Transmission/Couchpotato/SickBeard/OpenVPN
Samsung Chromebook: Chroach in ChromeOS
dhead666
 
Posts: 116
Joined: Sat Aug 11, 2012 10:25 pm

Re: Pogoplug 4 Network Issues at Work

Postby moonman » Wed Apr 24, 2013 10:35 am

$this->bbcode_second_pass_quote('dhead666', 'Y')ou can log to http://ip/sqdiag/Logging/ with root:ceadmin to get your logs.
edit: I've re-read your 1st post, it won't help much if you don't know your ip.


And it won't work because this is only for Pogoplug stock os, while he's having trouble with alarm.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Pogoplug 4 Network Issues at Work

Postby jonnojohnson » Wed Apr 24, 2013 11:58 am

For clarity:

Stock Pogoplug:
* Red LED
* CAN see IP
* Can SSH
* Wrong DNS servers in resolv.conf
* Can't wget

ALARM installed:
* Green LED
* Can't see IP on network

Moonman, are you saying that netcfg is used by the Pogoplug stock firmware?

Guess I should also run this by Pogoplug support.
jonnojohnson
 
Posts: 16
Joined: Tue Apr 23, 2013 5:26 pm

Re: Pogoplug 4 Network Issues at Work

Postby moonman » Wed Apr 24, 2013 1:32 pm

No netcfg is a script for network connections in ALARM, not stock OS. It is used by default in ALARM, but as an alternative you can use dhcp client daemon (aka dhcpcd).
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Pogoplug 4 Network Issues at Work

Postby jonnojohnson » Wed Apr 24, 2013 1:38 pm

Ok I'll try that when I revert to ALARM.

I'm going to continue to try to figure out why the stock PP firmware is messing up DNS for the moment.
jonnojohnson
 
Posts: 16
Joined: Tue Apr 23, 2013 5:26 pm

Re: Pogoplug 4 Network Issues at Work

Postby WarheadsSE » Wed Apr 24, 2013 4:24 pm

Could it be your dhcp server is sending sf different information?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Pogoplug 4 Network Issues at Work

Postby jonnojohnson » Wed Apr 24, 2013 5:11 pm

Argh, upon the direction of PP support I tried to revert to the original bootloader using this:
$this->bbcode_second_pass_code('', '/usr/local/cloudengines/bin/./blparam 'bootcmd=run bootcmd_original'')

Now I'm stuck with blinking green led and no IP. I'll try it on the home network later but based on what some others have posted I think I might be stuck without hooking up a serial cable and trying to re-install everything which is gonna take me forever to learn how to do.

I had been looking more carefully at the script and although that script does write the dns servers to resolv.conf the script itself doesn't create them. I'm guessing that udhcpc is what actually gets the values somehow. Don't know why they would be wrong.
I had tried restarting udhcpc with the same parameters as were visible in top and noticed I got a few errors but I didn't make note of them before I messed with the bootloader :(
jonnojohnson
 
Posts: 16
Joined: Tue Apr 23, 2013 5:26 pm

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 8 guests