8873Re: help with setup static ip address on pogo
- Feb 5 1:32 PMDid you reboot after making those modifications? Where there any error messages while you were performing the modifications? Are you able to ssh back in to your plug after making those modifications?
If you didn't reboot, then the modifications won't take place.
If there were error messages, then the instructions probably were not carried out successfully.
If you can't ssh back into your plug after making the modification and rebooting the plug, then you need to solve that problem first.
If everything is working fine and you have a static ip, then you don't need to do anything.
If everything is working fine and you don't have a static ip, then continue.
What is described below is actually just a variation of that article you followed, except that if no usb drive is seen, then it acts "stock" obtaining the ip information with dhcp. All this adds is a statement after mounting the /opt drive to change to a static ip.
The is just the same as typing on the command line "ifconfig eth0 192.168.xxx.xxx" where 192.168.xxx.xxx is the static ip address you desire. If you are still connected by ssh after typing above statement, you can verify this information by typing "ifconfig" which should show eth0 to have your desired static ip. If not, then the method below and that article you cited won't work.
Do this at your own risk! No warranty implied.
Be careful, modifying you rcS can "brick/break" the plug!
If you don't feel comfortable doing this then don't.
If you don't know how to edit the file, then don't.
Make sure that you read everything below before doing anything and that you know how to perform the modifications. If not, don't.
You should also make a backup of your rcS.
A little trick is to leave the rcS as it is, so remove your modifications. Let "udhcpc" get most of the information and create the resolv.conf so that in case parameters change with your network, you can recover. Assuming you are using Optware, create a file in "/opt/etc/init.d called S22static, with the contents between the lines (you need to modify aaa.aaa with the pertinent information for your static ip and bbb.bbb with the pertinent information for your local dns server):
/sbin/ifconfig eth0 192.168.aaa.aaa
echo "nameserver 192.168.bbb.bbb" >> /tmp/resolv.conf
## Uncomment the lines below to activate Google's public name servers.
#echo "nameserver 22.214.171.124" >> /tmp/resolv.conf
#echo "nameserver 126.96.36.199" >> /tmp/resolv.conf
You need to make this file executable with "chmod 755 /opt/etc/init.d/S22static".
You then add the line "/opt/etc/init.d/S22static" after you mount your /opt usb drive. This way, if you boot up without the usb drive, it can still get the dhcp info like the stock setup, in case your network parameters change (change subnet, replace router, etc.).
A problem you may have is that the instructions on that site you followed, probably deleted the soft link from "/etc/resolv.conf" to "/tmp/resolv.conf". Verify with "ls -l /etc/resolve.conf". It should look approximately like:
lrwxrwxrwx 1 root root 16 Dec 31 1999 /etc/resolv.conf -> /tmp/resolv.conf
The date and size does not matter. If not, you have to recreate the link.
--- In firstname.lastname@example.org, "Jackie" wrote:
> I followed this article but it didn't work
> Does anyone else have a way to give a static ip address to pogoplug?
- << Previous post in topic Next post in topic >>