Network Config for Raspberry Pi 4

This is for ARMv8 based devices

Network Config for Raspberry Pi 4

Postby tmmd » Sun Jan 19, 2020 3:41 am

Hi there,

I'm finding that I need some help setting up networking on my Raspberry Pi 4. I've been using Manjaro for a couple years ago but am a newbie to vanilla Arch itself, so I'm not completely sure where my problem is cropping up. Below, I'll quickly outline my hardware setup and then go over what I've done to try setting up networking so far.

Hardware-wise, I have a 4gb Raspberry Pi 4 that's connected to power through an official power brick, an external monitor through HDMI, my wifi router through an ethernet cable, and my keyboard through USB. I followed the steps here (https://archlinuxarm.org/platforms/armv ... berry-pi-4) to get Arch ARM installed on an SD card, and am successfully booting into Arch ARM with the Pi.
So far, I've been trying to follow the steps in the ArchWiki article (https://wiki.archlinux.org/index.php/Ne ... connection) to get the networking up and running. For Step 1 (listing and enabling my network interface), I get the following outputs from the following commands:

$this->bbcode_second_pass_code('', 'lspci

00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2711 (rev 01)
01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)')

$this->bbcode_second_pass_code('', 'ls /sys/class/net

eth0 lo wlan0')

$this->bbcode_second_pass_code('', 'ip link

2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether dc:a6:32:41:9b:54 brd ff:ff:ff:ff:ff:ff')

Note that I'm skipping the $this->bbcode_second_pass_code('', 'lo') and $this->bbcode_second_pass_code('', 'wlan0') listings from $this->bbcode_second_pass_code('', 'ip link'). I've been assuming that if $this->bbcode_second_pass_code('', 'eth0') is showing up and is listed as UP in the <...> portion of $this->bbcode_second_pass_code('', 'ip link') that means that the interface is listed and enabled. However, I'm worried that there's no listing for the interface in $this->bbcode_second_pass_code('', 'lspci'). Is this a problem, or no? And if so, what should I do to rectify it?


For Step 2 I have been focusing on establishing a wired connection. There's an ethernet cable connected to my router, but is there anything else I need to do?


For Step 3 (setting IP address) I have gotten the following outputs from the following commands:

$this->bbcode_second_pass_code('', 'ip address add 192.168.1.153/24 dev eth0')

$this->bbcode_second_pass_code('', 'ip address show

2:eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether dc:a6:32:41:9b:54 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.153/24 scope global eth0
valid_lft forever preferred_lft forever')

I think I'm understanding the $this->bbcode_second_pass_code('', 'ip address') commands pretty well, so I don't have any questions formulated. But definitely let me know if you notice anything or could use some extra information.


For Step 4 (setting up routing table) I'm honestly not quite sure what it is that I'm doing. I suspect that if the issue isn't from Step 1, it's from here. In particular, I'm not certain what sort of information is supposed to go in the $this->bbcode_second_pass_code('', 'PREFIX') and $this->bbcode_second_pass_code('', 'address') portions of the $this->bbcode_second_pass_code('', 'ip route') commands. If any of you know of any good web pages/YouTube videos that can explain the main concepts behind routing tables and/or the ideas behind the $this->bbcode_second_pass_code('', 'ip route') commands (especially for home networking), that would be a huge help.

Anyways, I've tried using $this->bbcode_second_pass_code('', 'default'), $this->bbcode_second_pass_code('', '192.168.1.153'), and $this->bbcode_second_pass_code('', '192.168.1.254') (which is the ip address on the bottom of my router and shows up on my laptop running Manjaro when I run some of the ip commands on it) in the place of the $this->bbcode_second_pass_code('', 'PREFIX') portion of the $this->bbcode_second_pass_code('', 'ip route add PREFIX via address dev interface') command. I've also tried using $this->bbcode_second_pass_code('', '192.168.1.153') and $this->bbcode_second_pass_code('', '192.168.1.254') in the place of address in the same command. And of course I've been using $this->bbcode_second_pass_code('', 'eth0') in place of $this->bbcode_second_pass_code('', 'interface'). So far, all of the combinations update the output of $this->bbcode_second_pass_code('', 'ip route show') in ways I don't find surprising, but none of the combinations have left me able to successfully $this->bbcode_second_pass_code('', 'ping 8.8.8.8').


That's where I've been able to get so far. Any suggestions about what to do from here would be a huge help. And of course if there's any other info you could use, just let me know.

Best,
Thomas
tmmd
 
Posts: 17
Joined: Sun Jan 19, 2020 3:34 am

Re: Network Config for Raspberry Pi 4

Postby graysky » Sun Jan 19, 2020 9:10 am

The default image you installed should work out-of-the-box with a wired connection via DHCP (using systemd-networkd). Is this not the case?
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Network Config for Raspberry Pi 4

Postby summers » Sun Jan 19, 2020 11:12 am

As graysky says, its a bit strange that dhcp didn't work. The set up of ethernet in the OS looks fine, so question is why the network didn't come up.

First of try doing dhcp by hand $this->bbcode_second_pass_code('', 'dhcpcd eth0') and see what errors you get.

If that doesn't solve it we'll need to understand your network a tad better. What is the RPi plugged into? Do you know how the network looks to that device? If dhcp doesn't work, odds are that somewhere you have a network problem ...
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm

Re: Network Config for Raspberry Pi 4

Postby tmmd » Sun Jan 19, 2020 5:19 pm

Thanks for the responses. I've copied the output from dhcpd below.

Connections-wise, I have an ethernet cable going from the Pi to an ethernet port on an Arris BGW210 router (see https://www.amazon.com/BGW210-700-802-1 ... B07BZC72TB). There's also an ethernet cable going from the router's broadband port to my home's network wall socket.

The laptop I'm using has no problems connecting to the router through wifi, but unfortunately it's an ultrabook so it doesn't have an ethernet port to test the wired connection.

I'm not sure how to test 'how the network looks to' the router. If there's a wiki page or something similar you can point me to, I'll work through it and get back to you.


$this->bbcode_second_pass_code('', 'dhcpd eth0

[61762.638443] 8021q.1Q VLAN Support v1.8
eth0: waiting for carrier
timed out
dhcpcd exited')



P.S. Sorry about the wonky formatting of my original post. I'm new here and didn't know the 'Code' feature would automatically put stuff onto a new line.
tmmd
 
Posts: 17
Joined: Sun Jan 19, 2020 3:34 am

Re: Network Config for Raspberry Pi 4

Postby summers » Sun Jan 19, 2020 5:54 pm

IIRC $this->bbcode_second_pass_code('', 'eth0: waiting for carrier') means it can't even detect a signal there, let alone a dhcp server.

Does the Rpi have leds on the ethernet port? Did these illuminate/change colour when the cable was plugged in?

Do you have a faulty ethernet cable?

Can other devices connect to the router?

Can you log onto the router (via the laptop) and see if it has detected the RPi?
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm

Re: Network Config for Raspberry Pi 4

Postby tmmd » Sun Jan 19, 2020 9:00 pm

Yep, it was a bad cable. I feel stupid now.....

Thanks so much for the help.
tmmd
 
Posts: 17
Joined: Sun Jan 19, 2020 3:34 am


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 8 guests