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
')