Bridge cannot get an IP

This forum is for discussion about general software issues.

Bridge cannot get an IP

Postby zero » Wed Jan 06, 2016 9:23 am

Hello folks!

I'm trying to set up a wireless ap on odroid c1+, but having trouble with the bridge. For some reason the br0 cannot get an IP.
On the desktop computer I also have arch installed, and have no problem using the same config on it. Both desktop and odroid are connected directly to the same cable modem that has multiple ethernet ports.

First tried with the netctl using this guide. For a simple start the /etc/netctl/bridge looks like this:
$this->bbcode_second_pass_code('', 'Description="Example Bridge connection"
Interface=br0
Connection=bridge
BindsToInterfaces=(eth0)
IP=dhcp
## Ignore (R)STP and immediately activate the bridge
#SkipForwardingDelay=yes
')

Stopped the systemd network and the eth0:
$this->bbcode_second_pass_code('', 'systemctl stop systemd-networkd.service
ip link set eth0 down')

Then started the netctl service:
$this->bbcode_second_pass_code('', 'systemctl start netctl@bridge.service
[97298.520913@3] netdev_open
[97298.520947@3] Ethernet reset
[97298.520995@3] NET MDA descpter start addr=ed600000
[97298.579714@0] phy_interface = 0
[97298.579761@0] aml_phy_init: trying to attach to 0:01
[97298.582430@0] am_rtl811f called phy reset
[97298.599787@0] --1--write mac add to:eea7e688: 00 1e 06 20 17 93 |.. .|
[97298.600852@0] --2--write mac add to:eea7e688: 00 1e 06 20 17 93 |.. 7.|
[97298.607608@0] write mac add to:eea7e688: 00 1e 06 20 17 93 |.. .|
[97298.613794@0] Current DMA mode=0, set mode=621c100
[97298.628668@0] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[97298.651060@0] IPv6: ADDRCONF(NETDEV_UP): br0: link is not ready
[97302.599730@0] [adjust link] -> eth: full-duplex
[97302.599776@0] [adjust link] -> eth: phy_speed <> priv_speed)
[97302.604288@0] [adjust link -> eth: am_adjust_link state change (new_state=true)
[97302.611576@0] libphy: 0:01 - Link is Up - 1000/Full
[97302.616577@0] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[97302.623164@0] br0: port 1(eth0) entered forwarding state
[97302.628202@0] br0: port 1(eth0) entered forwarding state
[97302.633608@0] IPv6: ADDRCONF(NETDEV_CHANGE): br0: link becomes ready
[97317.639523@0] br0: port 1(eth0) entered forwarding state

Job for netctl@bridge.service failed because the control process exited with error code. See "systemctl status
netctl@bridge.service" and "journalctl -xe" for details.')
$this->bbcode_second_pass_code('', 'systemctl status netctl@bridge.service -l
Jan 05 16:32:57 alarm dhcpcd[27306]: DUID 00:01:00:01:1e:1e:9a:bb:2e:85:a1:da:08:b1
Jan 05 16:32:57 alarm dhcpcd[27306]: br0: IAID a1:da:08:b1
Jan 05 16:32:57 alarm dhcpcd[27306]: br0: soliciting a DHCP lease
Jan 05 16:33:23 alarm dhcpcd[27306]: timed out
Jan 05 16:33:23 alarm network[27296]: DHCP IPv4 lease attempt failed on interface 'br0'
Jan 05 16:33:23 alarm network[27296]: Failed to bring the network up for profile 'bridge'
Jan 05 16:33:23 alarm systemd[1]: netctl@bridge.service: Main process exited, code=exited, status=1/FAILURE
Jan 05 16:33:23 alarm systemd[1]: Failed to start Networking for netctl profile bridge.
Jan 05 16:33:23 alarm systemd[1]: netctl@bridge.service: Unit entered failed state.
Jan 05 16:33:23 alarm systemd[1]: netctl@bridge.service: Failed with result 'exit-code'.
')
After that ifconfig shows no ipv4 for br0:
$this->bbcode_second_pass_code('', 'br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::2c85:a1ff:feda:8b1 prefixlen 64 scopeid 0x20<link>
ether 2e:85:a1:da:08:b1 txqueuelen 0 (Ethernet)
RX packets 6840 bytes 339008 (331.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 102 bytes 24416 (23.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
inet6 fe80::21e:6ff:fe20:1793 prefixlen 64 scopeid 0x20<link>
ether 00:1e:06:20:17:93 txqueuelen 1000 (Ethernet)
RX packets 4013958 bytes 483810184 (461.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7687445 bytes 2325655294 (2.1 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 40

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 37667 bytes 16806688 (16.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 37667 bytes 16806688 (16.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0')
Tried also to reboot the system with netctl enabled and systemd.network disabled, but I get the same error.
Then I disabled the netctl service and tried with going back to the systemd using this guide. Configs are the following:
/etc/systemd/network/bridge.netdev$this->bbcode_second_pass_code('', '
[NetDev]
Name=br0
Kind=bridge
')
/etc/systemd/network/eth0.network$this->bbcode_second_pass_code('', '
[Match]
Name=eth0

[Network]
Bridge=br0
')
/etc/systemd/network/bridge.network$this->bbcode_second_pass_code('', '
[Match]
Name=br0

[Network]
DHCP=ipv4')
But I get a very similar error by enabling and starting the systemd-network service or by rebooting the system.
This also work on the PC (with enp0s3 instead of eth0), but not on the odroid.
What am I missing?
zero
 
Posts: 4
Joined: Tue Jan 05, 2016 4:33 pm

Re: Bridge cannot get an IP

Postby WarheadsSE » Wed Jan 06, 2016 1:12 pm

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Bridge cannot get an IP

Postby zero » Wed Jan 06, 2016 2:37 pm

Thanks. That's the page I started with. First it took me like 10 minutes to set up the AP on the PC (arch x64) using that guide, and it was working great. Then did a copy/paste of the config files to the odroid. The only change I made was to replace the enp0s3 with eth0, as I already stated. But there it doesn't work. By digging into the logs I found out that problem lies in inability for the br0 to get an ip.
I'm going to study the NAT aproach as well, to see if that works, but it looks more complicated.
zero
 
Posts: 4
Joined: Tue Jan 05, 2016 4:33 pm

Re: Bridge cannot get an IP

Postby yugabharathi » Wed Feb 10, 2016 9:00 am

I have 7372 AP running 100.1.x.x.x... (jsut updated today). Everything works fine except for a device that is connected to a wireless bridge. The device will not get an ip address from the DHCP.
yugabharathi
 
Posts: 1
Joined: Wed Feb 10, 2016 8:54 am

Re: Bridge cannot get an IP

Postby 3bal » Sun Feb 14, 2016 8:05 pm

I have the exact same problem!

I've created the entire setup on my archlinux desktop machine and then copied the files to my ODROID-c1 archlinux box.

Didnt work !!!
Cant figure this out.

so I came upon to another approach:
I created a shell script that runs once after boot (via systemd timers) and do everything I need:

https://gist.github.com/ebal/65cb67b30e99cdcf401e

hopefully someone can find this useful.
3bal
 
Posts: 2
Joined: Sun Feb 14, 2016 7:44 pm

Re: Bridge cannot get an IP

Postby zero » Mon Feb 15, 2016 8:50 am

Nice one 3bal. Cannot try this right now as I switched to another distro, but definitely want to come back asap.
But how do you bring up the wlan0? I dont see that line in your script. As far as I recall hostapd doesn't do that. Also, does this mean that any other network service (networkd, netctl) should be disabled?
zero
 
Posts: 4
Joined: Tue Jan 05, 2016 4:33 pm

Re: Bridge cannot get an IP

Postby WarheadsSE » Mon Feb 15, 2016 3:02 pm

You might want to remove the Address configuration (.network files) from systemd-networkd, but systemd-networkd's .link and .netdev can be used for handling the bridge configurations.

@3bal, odd hat it did not directly translate
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Bridge cannot get an IP

Postby Socaltom » Fri Feb 19, 2016 9:16 pm

I was doing something similar, I finally just started using this script. It works great.
$this->bbcode_second_pass_code('', 'https://github.com/oblique/create_ap')
Tom
used to be owned by me
Pink Pogo V2, Black Pogo V3, Zyxel NAS 325 v1,
used to be Adminstrator for
Goflex net, Black V3, Black V2
Now I have a couple of raspberry pi ( 3+ and 4)
Socaltom
 
Posts: 571
Joined: Thu Apr 07, 2011 2:21 pm
Location: The left side


Return to General

Who is online

Users browsing this forum: No registered users and 6 guests