Static IP Lockout?

This forum is for all other ARMv5 devices

Static IP Lockout?

Postby diego898 » Thu Feb 23, 2012 3:50 am

Hello all,

I've come across posts saying you can edit /etc/rc.conf directly placing your static ip information in there. However, some also recommend installing the netcfg package and doing it that way. What is the current best practice?

Also, I want to run this on a university campus where static Ip addresses are assigned to specific mac addresses so I've had one assigned to the pogo plug. I then took it home to actually connect to the internet and put arch linux on it. I now want to set it up so its ready for me to take to campus tomorrow with the static IP. However I'm afraid that once I do that I won't have anyway to connect to it from my home - which is fine assuming it works when I just plug it in to campus tomorrow. However if it doesn't, how can I ssh back into it to fix something? Won't I essentially have locked myself out of the pogoplug?

Thanks
diego898
 
Posts: 6
Joined: Thu Feb 23, 2012 1:54 am

Re: Static IP Lockout?

Postby WarheadsSE » Thu Feb 23, 2012 4:03 am

That depends on having SSH access to that IP from home.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Static IP Lockout?

Postby diego898 » Thu Feb 23, 2012 4:05 am

when I assign the static ip/netmask/gateway, etc they will all be for my campus network. That means it will not be available to me from home. The issue is, once I set this and reboot the machine, it will no longer be able to connect to my homenetwork and I can't connect to it. My only hope is to plug it in on campus and hope everything goes smoothly. If it doesn't however, what do I do then?
diego898
 
Posts: 6
Joined: Thu Feb 23, 2012 1:54 am

Re: Static IP Lockout?

Postby WarheadsSE » Thu Feb 23, 2012 4:13 am

Look into setting up a second IP on the same interface with the home 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: Static IP Lockout?

Postby diego898 » Thu Feb 23, 2012 4:49 am

Ok so I have to install netcfg and use something like outlined here:

https://bbs.archlinux.org/viewtopic.php ... 5#p1036395

where my profile would be my school info, and the post_down directive would be what? I want the post down directive to be something like "just try and connect like you normally would through dhcp don't assume/request any ip/gateway/etc.". How can I set the POST_DOWN to do something like that?

In other words, I want to set it up to try and request for the static ip. If that doesn't work, forget about it and do what it would have done had I not told it to request the static ip.
diego898
 
Posts: 6
Joined: Thu Feb 23, 2012 1:54 am

Re: Static IP Lockout?

Postby diego898 » Thu Feb 23, 2012 5:42 am

So I tried setting up to netcfg profiles in /etc/netword.d/

One was the static profile: mystatic and the other was the regular naked dhcp profile: mydhcp

In /etc/rc.conf I replaced the networking deamon with net-profiles and uncommented the NETWORKS line and added those two network profiles there.

It mentioned in the documentation about how it would try to do the dhcp profile first, then the static one automatically upon reboot. So I rebooted it - the light on the pogoplug turned solid green, but when I checked my routers dhcp table it wasn't assigned one of my networks ips - it wasn't connected to my network (it was directly connected to my router though). So I pinged the static ip I had filled out on mystatic profile - it wasn't up. So I'm confused as to how that light turned green and where it was actually connected to...

Also, what I was afraid of happened! I seem to be locked out of the pogoplug. What should I do now?
diego898
 
Posts: 6
Joined: Thu Feb 23, 2012 1:54 am

Re: Static IP Lockout?

Postby WarheadsSE » Thu Feb 23, 2012 12:18 pm

Use a linux PC or live cd/usb to edit the contents of the rc.conf on the drive used for the device.

And green doesn't mean "connected" in Arch Linux ARM, it means the device is online, without major issue. You're definition of major is going to be different, but look at it this way: your system is working, just not talking.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 46 guests