You are not logged in.
My issue is exactly as described in the title.
I want to achieve a bridge interface (lxcbridge) that has a static ip address. I have no other special configurations at all.
Content in /etc/systemd/network is:
/etc/systemd/network/
├─ 10-lxcbridge.netdev
├─ 10-lxcbridge.networkFile 10-lxcbridge.netdev contains:
[NetDev]
Name=lxcbridge
Kind=bridgeFile 10-lxcbridge.network contains:
[Match]
Name=lxcbridge
[Network]
Address=172.65.0.2/24
Gateway=172.65.0.1after executing
sudo systemctl restart systemd-networkd, the output of
ip addr showgives:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether re:da:ct:ed:xx:xx brd ff:ff:ff:ff:ff:ff
inet 192.168.0.120/24 brd 192.168.0.255 scope global dynamic noprefixroute wlan0
valid_lft 84311sec preferred_lft 73511sec
7: lxcbridge: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether c6:49:0b:9f:1e:3d brd ff:ff:ff:ff:ff:fas you can see, lxcbridge did not get its IP address assigned. (The result is the same after a reboot).
I could manually set it using
ip addr set ...but that is not my intention.
journalctl -u systemd-networkdgives:
Jun 25 17:39:55 redacted systemd[1]: Started Network Configuration.
Jun 25 17:39:55 redacted systemd-networkd[1245]: lxcbridge: Configuring with /etc/systemd/network/10-lxcbridge.network.
Jun 25 17:39:55 redacted systemd-networkd[1245]: lxcbridge: Link UPnetworkctl -a statusgives following info for lxcbridge:
● 7: lxcbridge
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/10-lxcbridge.network
State: no-carrier (configuring)
Online state: offline
Type: bridge
Kind: bridge
Driver: bridge
Hardware Address: c6:49:0b:9f:1e:3d
MTU: 1500 (min: 68, max: 65535)
QDisc: noqueue
IPv6 Address Generation Mode: eui64
Forward Delay: 14.990s
Hello Time: 1.990s
Max Age: 19.990s
Ageing Time: 4min 59.990s
Priority: 32768
STP: no
Multicast IGMP Version: 2
Cost: 1999
Port State: disabled
Number of Queues (Tx/Rx): 1/1
Auto negotiation: no
Activation Policy: up
Required For Online: yesI do not understand why the address is not simply applied. I also find it strange this device is stuck in "configuring", but this is perhaps because it has no address and hence cannot be called "configured" or "routable".
The main issue is the IP not being assigned as configured, why is this? I have no clue how to dig for the issue other than the commands I have already shown above, which did not give me key indicators of possible errors or configuration mistakes.
Any help is appreciated.
Offline
looks like you missed binding the bridge to a physical interface.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
here's my setup:
[main@main ~]$ cat /etc/systemd/network/10_br0.netdev
[NetDev]
Name=br0
Kind=bridge[main@main ~]$ cat /etc/systemd/network/20_lan.network
[Match]
Name=enp42s0
[Network]
Bridge=br0[main@main ~]$ cat /etc/systemd/network/30_br0.network
[Match]
Name=br0
[Network]
DHCP=yes
[DHCPv4]
UseDomains=true
[DHCPv6]
UseDomains=true
[IPv6AcceptRA]
UseDomains=truethe important part is the 2nd file which connects the bridge and eth0
Last edited by cryptearth (2024-06-28 08:28:02)
Offline
Mind splitting the outputs so it's clearer where each file ends ?
It looks like you are lacking a file .
you need 2 files to setup the bridge interface, 10-foo.netdev and 10-foo.network
next you need 20-foo1.network to assign a (static) IP address to the bridge device .
(In the wiki link I posted they call this file /etc/systemd/network/MyBridge.network )
last is 30-foo2.network to setup address for the clients using the bridge .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Mind splitting the outputs so it's clearer where each file ends ?
done
Offline