setting a static IP

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

setting a static IP

Postby orco » Tue Feb 11, 2014 1:19 pm

Hello, I'm using Goflex Home 1TB device and I'm having some problems after installing Archlinux | ARM.

First thing is that I can't set static IP, each time I try doing that I end up losing SSH access and I need to reinstall arch all over again (did that like 10 times already).

I understand I need to disable first the dhcp and use netctl profile to set a static IP.

could anyone explain to me what am I doing wrong? because I'm tired of restoring goflex and installing arch twice a day! :oops:
orco
 
Posts: 8
Joined: Tue Feb 11, 2014 1:10 pm

Re: setting a static IP

Postby WarheadsSE » Tue Feb 11, 2014 2:38 pm

See /etc/netctl/examples/ethernet-static

netctl disable <dhcpprofile>
netctl enable <staticprofile>
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: setting a static IP

Postby orco » Tue Feb 11, 2014 3:00 pm

Are those the only steps I should do? Because I believe I did that and lost the connection.
This is how I edited the profile:


$this->bbcode_second_pass_code('', 'Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('10.0.0.1/24')
#Routes=('192.168.0.0/24 via 192.168.1.2') * I have no idea what to do in this line.
Gateway='10.0.0.138'
DNS=('8.8.8.8 '8.8.4.4'')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'')
orco
 
Posts: 8
Joined: Tue Feb 11, 2014 1:10 pm

Re: setting a static IP

Postby pepedog » Tue Feb 11, 2014 3:12 pm

All you need have done (if your rootfs is not old stock) is edit file /etc/netctl/eth0
Your config looks ok, except for an odd extra '
DNS=('8.8.8.8 '8.8.4.4'')
Only have one file in that folder where Interface=eth0
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: setting a static IP

Postby orco » Tue Feb 11, 2014 3:20 pm

Doing that lost me the connection.
so maybe my rootfs is an old stack.
I just installed arch like this guide:
http://archlinuxarm.org/platforms/armv5 ... oflex-home

could it be that my rootfs is and old stack?
orco
 
Posts: 8
Joined: Tue Feb 11, 2014 1:10 pm

Re: setting a static IP

Postby pepedog » Tue Feb 11, 2014 3:43 pm

You can tell if it's new, like other V5
$this->bbcode_second_pass_code('', '# ls /etc/systemd/system/multi-user.target.wants/net*
/etc/systemd/system/multi-user.target.wants/netctl-ifplugd@eth0.service')
Did you remove extra quote?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: setting a static IP

Postby orco » Tue Feb 11, 2014 5:32 pm

removed the last quote.
the dns line is like this right now
$this->bbcode_second_pass_code('', 'DNS=('8.8.8.8' '8.8.4.4')')
still no good.


i ran this line
$this->bbcode_second_pass_code('', 'ls /etc/systemd/system/multi-user.target.wants/net*')

and got this result
$this->bbcode_second_pass_code('', '/etc/systemd/system/multi-user.target.wants/netctl-ifplugd@eth0.service')

does that mean it's new. and if it is why doesn't it work? :(
orco
 
Posts: 8
Joined: Tue Feb 11, 2014 1:10 pm

Re: setting a static IP

Postby pepedog » Tue Feb 11, 2014 6:51 pm

Yes, new
Which means edit that one file /etc/netctl/eth0
Make sure there is only one file in that folder (directories are ok)
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: setting a static IP

Postby orco » Tue Feb 11, 2014 7:33 pm

yeah that's the only file in there........ is there a way to see right away if it works without rebooting?
orco
 
Posts: 8
Joined: Tue Feb 11, 2014 1:10 pm

Re: setting a static IP

Postby pepedog » Tue Feb 11, 2014 8:12 pm

Are you worried about file system corruption if you pull power?
You can do this
$this->bbcode_second_pass_code('', 'ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target')
That's it, attached USB keyboard CtrlAltDel now powers off instead of reboot

Or get a second nic, USB to Ethernet dongle
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 3 guests