sdjf
Posts: 1388
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Ethernet on Arch: netctl with openresolv

Fri Apr 19, 2013 3:52 am

Lots of questions! I am trying to get ethernet running between my Pi and my Zaurus sl6000 PDA, I have installed netctl and it's dependency openresolv. I also installed ifplugd because something (pacman?) said that is needed for wired connections. I decided I needed to use netctl to assign a static IP address for ethernet, instead of doing so in cmdline.txt, because I need to continue to use the IP settings in cmdline.txt for my usb0 connection for my other Zaurus, the sl5500.

But I am finding the documentation about how to do this to be as clear as mud. How many things do I need to do and files do I need to create, to get ethernet working? systemd service files may also be required? That makes it even more confusing.

The Zaurus ethernet adapter has automatically attached to a driver (kaweth), but I am clueless about how to get ethernet going on both ends without using cmdline.txt and lsusb. My understanding is that the Zaurus waits until it sees eth0 enabled by the Pi before I can bring ethernet up on it with ifconfig.

Configuration of hardware is:

Zaurus --> USB Ethernet Adapter --> Ethernet cable --> Pi ethernet port

Please do not tell me to use netcfg instead, for those of you who do not yet know, netctl is about to replace netcfg in Arch Linux, so there is no sense using it. Netctl has it's own arch wiki page and is available in the ArchLinuxArm repositories.

I need help understanding what to change the addresses to in the sample ethernet-static file for netctl. It contains the following, and the 4th and 6th lines seem inappropriate since I am only doing ethernet between two devices without a router.

INTERFACE='eth0'
IP='static'
ADDR='192.168.1.23'
##ROUTES=('192.168.0.0/24 via 192.168.1.2')
GATEWAY='192.168.1.1'
DNS=('192.168.1.1')

Can I comment out the "gateway" and "dns" lines? Primary and secondary DNS servers are set by ppp and ethernet has nothing to do with my internet access. The Pi has it's own dialup modem, and there is no gateway as far as I know.

But where do I put the IP of the sl6000 that is the destination? I had to declare the sl5500 IP address in setting up usb0 networking, shouldn't the sl6000 IP be declared somewhere on the pi as well for the ethernet connection, since there is no router involved?

I did run "netctl start ethernet" and it told me to look at a bunch of output that made no sense. Except it said "No connection on eth0". Not pasteing full output here as it is long and my Pi has no internet access right now, but I will try to transfer the output later. How do I make there be an eth0 connection?

thanks!
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || My 512MB Model B only runs Arch.

pepedog
Posts: 1044
Joined: Fri Oct 07, 2011 9:55 am

Re: Ethernet on Arch: netctl with openresolv

Fri Apr 19, 2013 9:21 am

You picked up a static example for netcfg, not netctl. As a personal note I found it's always better to grab an example and modify, rather than adjust an existing netcfg file to netctl.
So-

Code: Select all

cp /etc/netctl/examples/ethernet-static /etc/netctl/locallan
I called it locallan so it shows where that filename is used later, it is a profile now
So you edit /etc/netctl/locallan and enable with

Code: Select all

netctl enable locallan
Being static, if plugged into something live, be it zaurus or hub/switch, it will come up, and come up again if unplugged.
Here is the example

Code: Select all

Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.23/24' '192.168.1.87/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.1'
DNS=('192.168.1.1')

## 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'
Here is what you want

Code: Select all

Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.23/24')
Now your zaurus just needs to be 192.168.1.something and it will work.

As a side note, if your rpi has internet connection, it can allocate ip address very easily to the zaurus (zaurus not fixed ip then), AND (a little more complicated) let the zaurus share the internet connection.

sdjf
Posts: 1388
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Ethernet on Arch: netctl with openresolv

Fri Apr 19, 2013 10:34 am

Hi Pepedog, weird, I thought I had used the netctl example, editing out what did not need. maybe I used the ifplugd one instead? not sure at this point.

while waiting for a reply, I found another example that cloudcentric had posted link to in another thread and got eth0 up on pi, but cannot get ethernet up on zaurus.

what looks suspicious to me in ifconfig is the broadcast address of 192.168.2.255 from that, shouldn't broadcast end in a zero 0 ?

also, I can disable the one I tried as soon as I can change my ethernet-static to what you show, but what does the last position mean in the following you gave, what does it mean, the 23/24?
Address=('192.168.1.23/24')
also, the pi's internet access is broken for several days now, having trouble fixing that, think I am better off letting the zaurus use it's own modem that works very well.

zaurus has ethernet enabled and adapter is recognized but am not able to detect pi via ethernet from zaurus at this point. eth0 shows in route and ifconfig on pi but not zaurus, will ask zaurus friend for how to debug zaurus end.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || My 512MB Model B only runs Arch.

pepedog
Posts: 1044
Joined: Fri Oct 07, 2011 9:55 am

Re: Ethernet on Arch: netctl with openresolv

Fri Apr 19, 2013 12:01 pm

You are mentioning 2 ip ranges
192.168.1.? And 192.168.2.?
/24 means a whole class C network of 255(256) addresses, ie last 8 bits, or 2 digit hex
So both devices must be in same (class C) subnet
The 23 is the final part of IP address, it could have been 192.168..1.1 and zaurus 192.168.1.2

I think you could make a script on zaurus to bring up Ethernet.
I'm not sure if you need a crossover cable, my pogoplug doesn't, it detects and connects with or without crossover cable
Maybe I could confirm if someone else doesn't, once my grandson has gone home

sdjf
Posts: 1388
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Ethernet on Arch: netctl with openresolv

Fri Apr 19, 2013 3:47 pm

pepedog wrote:You are mentioning 2 ip ranges
192.168.1.? And 192.168.2.?...So both devices must be in same (class C) subnet
oops, I may have edited the range in examples for security reasons. I am making sure that my files all have the same range, and that it is a different range than I use for my usb0 connection.
pepedog wrote:I think you could make a script on zaurus to bring up Ethernet.
Yes, you are right, but until I can bring it up manually, I do not know what to put in the zaurus script. lsusb on zaurus shows the ethernet adapter, lsmod shows the driver for the adapter is running, but I cannot brinig up eth0 with variations of ifconfig and route at this point, zaurus does not see the pi via ethernet at all.

This is on zaurus, where "route" command only shows ppp0, no ethernet:

Code: Select all

bash$ sudo ifconfig eth0 192.168.2.1
netmask 255.255.255.0 up
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
SIOCSIFNETMASK: No such device
eth0: unknown interface: No such device
bash$  
pepedog wrote: I'm not sure if you need a crossover cable, my pogoplug doesn't, it detects and connects with or without crossover cable
I seem to recall others saying they do not need a crossover cable, that the pi can detect what is going on. Maybe I have some setting on the pi in a configuration file wrong. Edited lots of files, trying to get this up and running, and I suppose any one of them could be messing things up.

When I followed the netctl wiki instructions, could not get things running but when I followed the example from the following, ethernet came up on pi. And he says he just used a standard ethernet cable:

http://bvanderveen.com/a/rpi-booted-static-ip-ssh

He has the following in /etc/conf.d/network, maybe that is what I have wrong.

broadcast=192.168.0.255
gateway=192.168.0.254

ifconfig eth0 on pi has
broadcast 192.168.2.255

Is broadcast supposed to be on the same subnet as the one for ethernet IP addresses?

The static ethernet example for netctl has no broadcast IP.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || My 512MB Model B only runs Arch.

pepedog
Posts: 1044
Joined: Fri Oct 07, 2011 9:55 am

Re: Ethernet on Arch: netctl with openresolv

Fri Apr 19, 2013 4:06 pm

The instructions involving /etc/conf.d/network is neither netcfg or netctl
The example I gave, if started, ifconfig will show broadcast and whatever is all done, it's really simple.

It's not written in stone the zaurus ethernet is eth0
What does ifconfig -a show

sdjf
Posts: 1388
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Ethernet on Arch: netctl with openresolv

Fri Apr 19, 2013 4:53 pm

At this point, looks like I am dealing with a major hardware problem. Allergy to inks meant had not read the adapter manual, looked at it and

1) it may not work on linux at all, despite fact that the driver was loaded.

2) flashing lights on adapter mean it is not configured yet.

dmesg on zaurus says there is firmware in the adapter. Manual says adapter is for windows 98 only, may have bought another incompatible ethernet adapter for zaurus.

ifconfig -a on zaurus only shows lo and ppp0. no eth* at all.

lsusb for adapter, in case curious.
Bus 001 Device 005: ID 0506:03e8 3Com Corp. 3C19250 Ethernet [klsi]

may be a lost cause in hardware department, waiting for input from zaurus friend.

As far as Pi end goes, I also experimented by changing to using cmdline.txt on my old Arch soft float SD card, with no editing of any other files on the SD card at all. And when I booted up the system, eth0 was there, ready to roll, with no need for any special software. I was able to get in to see things (headless server) over usb using the old script I had been using to get access with my other zaurus that has no ethernet capability, without editing cmdline.txt interfering with the IP addresses.

Looking at ifconfig eth0 on that setup, it confirms my hunch about broadcast address, shows broadcast address is on the same network range as ethernet, not a different one. But I think that is not the issue at this point. Sadly, it is hardware configuration and compatibility on the PDA side.
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || My 512MB Model B only runs Arch.

sdjf
Posts: 1388
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Ethernet on Arch: netctl with openresolv

Sun Apr 28, 2013 5:37 am

yahoo! was just able to ssh in to the pi via ethernet from my sl6000 zaurus! did it by issuing "ifconfig up" by hand, the SD card I have in Pi at the moment does not have netctl installed, but at least I know the ethernet adapter for the PDA is now working and I have ethernet! still more work to do, but at least I now have solved the pda hardware issues.

cheers and thanks!
FORUM TIP: To view just one person's posting history, sign in, click on their user name, then click on "Search User's Posts." || My 512MB Model B only runs Arch.

pepedog
Posts: 1044
Joined: Fri Oct 07, 2011 9:55 am

Re: Ethernet on Arch: netctl with openresolv

Sun Apr 28, 2013 8:45 am

That's good.
7 second boot possible with netctl. Looks like netctl-ifplugd@eth0 will be the way for all alarm

Return to “Arch”

Who is online

Users browsing this forum: No registered users and 7 guests