View previous topic :: View next topic |
Author |
Message |
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 314 Location: Somewhere in the 77
|
Posted: Tue May 21, 2024 11:27 am Post subject: [SOLVED] Setting a working bridge for my VMs |
|
|
Hello,
EDIT: Long-story short, the dhcpcd services starting at boot was in conflict, disabling it and rebooting worked like a charm.
I tried yesterday to setup a bridge aside my enp8s0 Ethernet card, because virt-manager/KVM/qemu was not pleased to create a VM without any BR/TAP connection.
Code: | Mephistopheles ~ # ip a
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: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 70:85:c2:8d:11:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.103/24 brd 192.168.1.255 scope global dynamic noprefixroute enp8s0
valid_lft 36078sec preferred_lft 30678sec
inet6 2a01:e0a:47d:1160:caee:5d3c:2295:7499/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86072sec preferred_lft 86072sec
inet6 fe80::64a2:b7fe:c028:e261/64 scope link
valid_lft forever preferred_lft forever
3: br0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 9a:5b:a6:86:35:7a brd ff:ff:ff:ff:ff:ff
|
As you can see, enp8s0 is working and has it's own IP in my LAN with the DHCP process.
I tried to add br0 aside it, as connecting enp8s0 to br0, following this page: https://wiki.gentoo.org/wiki/Network_bridge
But no luck, following the SystemD sub-section I created the /etc/systemd/network/MyBridge.netdev file:
Code: | [NetDev]
Name=br0
Kind=bridge
|
As /etc/systemd/network/MyEth.network:
Code: | [Match]
Name=eth*
[Network]
Bridge=br0
|
And since I'm lazy, I wanted to do it via DHCP to not bother:
Code: |
[Match]
Name=br0
[Network]
DHCP=ipv4
|
The systemd-networkd service status return this:
Code: | Mephistopheles ~ # systemctl status systemd-networkd
● systemd-networkd.service - Network Configuration
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-05-21 10:47:59 CEST; 2h 2min ago
TriggeredBy: ● systemd-networkd.socket
Docs: man:systemd-networkd.service(8)
man:org.freedesktop.network1(5)
Main PID: 740 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 19047)
FD Store: 0 (limit: 512)
Memory: 3.3M (peak: 3.8M)
CPU: 48ms
CGroup: /system.slice/systemd-networkd.service
└─740 /usr/lib/systemd/systemd-networkd
mai 21 10:47:59 Mephistopheles systemd-networkd[740]: enp8s0: Link UP
mai 21 10:47:59 Mephistopheles systemd-networkd[740]: br0: netdev ready
mai 21 10:47:59 Mephistopheles systemd-networkd[740]: Enumeration completed
mai 21 10:47:59 Mephistopheles systemd[1]: Started Network Configuration.
mai 21 10:47:59 Mephistopheles systemd-networkd[740]: enp8s0: Link DOWN
mai 21 10:47:59 Mephistopheles systemd-networkd[740]: enp8s0: Link UP
mai 21 10:47:59 Mephistopheles systemd-networkd[740]: br0: Configuring with /etc/systemd/network/MyBridge.network.
mai 21 10:47:59 Mephistopheles systemd-networkd[740]: br0: Link UP
mai 21 10:48:02 Mephistopheles systemd-networkd[740]: enp8s0: Gained carrier
|
It seems to recognize br0 and linking it up. At this point I was thinking I was on something working. Saw it was not working because I could not SSH my VM or ping it.
The ip a command return for the enp1s0 inside the VM the IP: 169.254.141.74/16, while my usual networks works on 192.168.1.XXX/24, but so far as I remember it's quite normal into a VM to have these, on another CIDR/Mask, but the internet (LAN or WAN) does not works.
Killing dhcpcd (-x) and then doing dhcpcd enp1s0 return this:
Code: |
dhcpcd-10.0.6 starting
DUID 00:01:00:01:2d:df:39:89:52:54:00:14:14:b9
enp1s0: IAID 00:14:14:b9
enp1s0: soliciting an IPv6 router
enp1s0: soliciting a DHCP lease
enp1s0: using IPv4LL address 169.254.141.74
enp1s0: adding route to 169.254.0.0/16
enp1s0: adding default route
|
While, on the VM, ip routes return:
Code: |
default dev enp1s0 scope link src 169.254.141.74 metric 1001002
169.254.0.0/16 dev enp1s0 scope link src 169.254.141.74 metric 1002
|
This is the route of the host:
Code: |
default via 192.168.1.254 dev enp8s0 proto dhcp src 192.168.1.103 metric 1002
192.168.1.0/24 dev enp8s0 proto dhcp scope link src 192.168.1.103 metric 1002
|
Of course, I am the source of this non-working situation.
I've some nftables rules, but it does happen too if I flush them:
Code: |
Mephistopheles ~ # ping -c 3 169.254.141.74
PING 169.254.141.74 (169.254.141.74) 56(84) octets de données.
--- statistiques ping 169.254.141.74 ---
3 paquets transmis, 0 reçus, 100 % paquets perdus, temps 2028 ms
Mephistopheles ~ # nft list ruleset
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
ct state invalid counter packets 0 bytes 0 drop comment "early drop of invalid packets"
ct state { established, related } counter packets 277 bytes 376537 accept comment "accept all connections related to connections made by us"
iif "lo" accept comment "accept loopback"
iif != "lo" ip daddr 127.0.0.0/8 counter packets 0 bytes 0 drop comment "drop connections to loopback not coming from loopback"
iif != "lo" ip6 daddr ::1 counter packets 0 bytes 0 drop comment "drop connections to loopback not coming from loopback"
ip protocol icmp counter packets 0 bytes 0 accept comment "accept all ICMP types"
meta l4proto ipv6-icmp counter packets 0 bytes 0 accept comment "accept all ICMP types"
tcp dport 22 counter packets 0 bytes 0 drop comment "accept SSH"
tcp dport 80 counter packets 0 bytes 0 drop comment "accept HTTP"
tcp dport 443 counter packets 0 bytes 0 drop comment "accept HTTPS"
udp dport 30001 counter packets 0 bytes 0 accept comment "accept 30001 - minetestserver - testAvecJustine"
udp dport 30002 counter packets 0 bytes 0 accept comment "accept 30002 - minetestserver - minecloniaTest1"
counter packets 5 bytes 8616 comment "count dropped packets"
}
chain forward {
type filter hook forward priority filter; policy drop;
counter packets 0 bytes 0 comment "count dropped packets"
}
chain output {
type filter hook output priority filter; policy accept;
counter packets 7 bytes 567 comment "count accepted packets"
}
}
Mephistopheles ~ # nft flush ruleset
Mephistopheles ~ # nft list ruleset
Mephistopheles ~ # ping -c 3 169.254.141.74
PING 169.254.141.74 (169.254.141.74) 56(84) octets de données.
--- statistiques ping 169.254.141.74 ---
3 paquets transmis, 0 reçus, 100 % paquets perdus, temps 2034 ms
|
So I'm pretty sure my firewall is not involved here.
Since systemd-netword is enable at boot, it already reads the configuration at boot time. Reloading the service indeed brings nothing new and the status only add:
Code: | mai 21 13:03:46 Mephistopheles systemd[1]: Reloading Network Configuration... |
Also, virt-manager is saying in the NIC subsection of the configuration of my VM:
Code: | Failed to find a suitable default network | .
The model of the device is by default virtio, it has a MAC address (52.54:00:14:14:b9), unknown IP, the state of the link is active. As a bridge device with device name "br0" as well:
Code: | <interface type="bridge">
<mac address="52:54:00:14:14:b9"/>
<source bridge="br0"/>
<model type="virtio"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
|
----
Then, later, I realized that the MyEth file was for eth… not enp !
So I set enp8s0, thinking I'm smart.
Reloading systemd-netword:
Code: | Mephistopheles ~ # systemctl status systemd-networkd.service
● systemd-networkd.service - Network Configuration
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-05-21 13:13:38 CEST; 3s ago
TriggeredBy: ● systemd-networkd.socket
Docs: man:systemd-networkd.service(8)
man:org.freedesktop.network1(5)
Main PID: 77596 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 19047)
FD Store: 0 (limit: 512)
Memory: 1.6M (peak: 2.1M)
CPU: 66ms
CGroup: /system.slice/systemd-networkd.service
└─77596 /usr/lib/systemd/systemd-networkd
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: vnet1: Link UP
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: vnet1: Gained carrier
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: enp8s0: Gained IPv6LL
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: br0: Gained IPv6LL
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: vnet1: Gained IPv6LL
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: Enumeration completed
mai 21 13:13:38 Mephistopheles systemd[1]: Started Network Configuration.
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: br0: netdev exists, using existing without changing its parameters
mai 21 13:13:38 Mephistopheles systemd-networkd[77596]: br0: Configuring with /etc/systemd/network/MyBridge.network. |
Showing me that vnet1 was added:
Code: | Mephistopheles ~ # ip a
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: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
link/ether 70:85:c2:8d:11:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.103/24 brd 192.168.1.255 scope global dynamic noprefixroute enp8s0
valid_lft 42964sec preferred_lft 37564sec
inet6 fe80::64a2:b7fe:c028:e261/64 scope link
valid_lft forever preferred_lft forever
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 9a:5b:a6:86:35:7a brd ff:ff:ff:ff:ff:ff
inet 192.168.1.47/24 metric 1024 brd 192.168.1.255 scope global dynamic br0
valid_lft 43189sec preferred_lft 43189sec
inet6 2a01:e0a:47d:1160:985b:a6ff:fe86:357a/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86388sec preferred_lft 86388sec
inet6 fe80::985b:a6ff:fe86:357a/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
5: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UNKNOWN group default qlen 1000
link/ether fe:54:00:14:14:b9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fe14:14b9/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
|
But now, half of my networks won't works:
I Can reach google and some websites, not all, gentoo.org is ok, as google, but some are not and everything on LAN is not either (I can't ping my LAN server !). I can as well use emerge --sync.
The ip route of the host now is this:
Code: | Mephistopheles ~ # ip route
default via 192.168.1.254 dev enp8s0 proto dhcp src 192.168.1.103 metric 1002
default via 192.168.1.254 dev br0 proto dhcp src 192.168.1.47 metric 1024
192.168.1.0/24 dev enp8s0 proto dhcp scope link src 192.168.1.103 metric 1002
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.47 metric 1024
192.168.1.254 dev br0 proto dhcp scope link src 192.168.1.47 metric 1024 |
As for the VM which can, at least, use links to reach google:
Code: |
default via 192.168.1.254 dev enp1s0 proto dhco src 192.168.1.50 metric 1002
192.168.1.0/24 dev enp1s0 proto dhcp scope link src 192.168.1.50 metric 1002 |
I guess multiple routes on my host is an undesired behaviour.
Simpliest way to solve this was a reboot of the host, which indeed return this route:
Code: | Mephistopheles ~ # ip route
default via 192.168.1.254 dev enp8s0 proto dhcp src 192.168.1.103 metric 1002
192.168.1.0/24 dev enp8s0 proto dhcp scope link src 192.168.1.103 metric 1002 |
And everything is back to normal, for the host.
What do you think ?
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website.
Last edited by kgdrenefort on Sat May 25, 2024 12:42 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54667 Location: 56N 3W
|
Posted: Tue May 21, 2024 12:26 pm Post subject: |
|
|
kgdrenefort,
Close but no cigar. I have no idea how to do this with systemd but this is what is needed.
Bring up enp8s0 without any IP address or routes.
Create br0.
Donate enp8s0 to br0
Configure br0 in place of enp8s0.
enp8s0 will never have any IP address or routes. Its donated to br0.
Set up the VM as a member of br0. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 314 Location: Somewhere in the 77
|
Posted: Tue May 21, 2024 12:52 pm Post subject: |
|
|
NeddySeagoon wrote: | kgdrenefort,
Close but no cigar. I have no idea how to do this with systemd but this is what is needed.
Bring up enp8s0 without any IP address or routes.
Create br0.
Donate enp8s0 to br0
Configure br0 in place of enp8s0.
enp8s0 will never have any IP address or routes. Its donated to br0.
Set up the VM as a member of br0. |
So br0 has to get the IP and all of that, sharing the connection between enp8s0 (my host) and my VMs (so, br0 becomes the main device getting connection on the host) and then, connecting the VM to br0 as the host would be ?
Thanks for your answer.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54667 Location: 56N 3W
|
Posted: Tue May 21, 2024 1:11 pm Post subject: |
|
|
kgdrenefort,
A bridge is the software equivalent of an Ethernet hub.
Every port can see all of the traffic on the bridge.
With OpenRC its
Code: | config_eth0="null"
bridge_br4="eth0"
config_br4="192.168.100.250/24"
routes_br4="default via 192.168.100.252" |
but you could use dhcpcd in place of a static setup. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 314 Location: Somewhere in the 77
|
Posted: Tue May 21, 2024 1:18 pm Post subject: |
|
|
Right now, I think my problem is I have two routes.
If I set up the config as it is it Systemd and reboot, the behaviour is the same (two defaults routes…).
I'm tempted to delete the old one, without bridge, but also afraid to duck up my network configuration as well:
Code: | default via 192.168.1.254 dev enp8s0 proto dhcp src 192.168.1.103 metric 1002
192.168.1.0/24 dev enp8s0 proto dhcp scope link src 192.168.1.103 metric 1002 |
Kind of lost on the next good moves to follow:
Should I be removing old default routes for enp8s0 ? Could it breaks the networks until I fix it ?
I guess removing it won't make it come back after a reboot. My main concern.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54667 Location: 56N 3W
|
Posted: Tue May 21, 2024 1:55 pm Post subject: |
|
|
kgdrenefort,
enp8s0 should not have an IP address, nor a route.
It's a port on br0 _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
salahx Guru
Joined: 12 Mar 2005 Posts: 558
|
Posted: Wed May 22, 2024 5:52 pm Post subject: |
|
|
I've got a systemd-networkjd+libvirt machine. Here's the recipe. You need to create 3 files:
/etc/systemd/network/25-bridge0.netdev
Code: | [NetDev]
Name=bridge0
Kind=bridge |
/etc/systemd/network/25-bridge0-en.network
Code: | [Match]
Name=en*
[Network]
Bridge=bridge0 |
/etc/systemd/network/25-bridge0.network
Code: | [Match]
Name=bridge0
[Network]
DHCP=yes |
|
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 314 Location: Somewhere in the 77
|
Posted: Sat May 25, 2024 11:01 am Post subject: |
|
|
salahx wrote: | I've got a systemd-networkjd+libvirt machine. Here's the recipe. You need to create 3 files:
/etc/systemd/network/25-bridge0.netdev
Code: | [NetDev]
Name=bridge0
Kind=bridge |
/etc/systemd/network/25-bridge0-en.network
Code: | [Match]
Name=en*
[Network]
Bridge=bridge0 |
/etc/systemd/network/25-bridge0.network
Code: | [Match]
Name=bridge0
[Network]
DHCP=yes |
|
Hello and thanks.
I might have progression, I think your configuration comes from Archlinux wiki, here.
Find maybe what was wrong, as Neddy (and the Archlinux's wiki) says, enp8s0 (my main ethernet interface) should not get the IP first.
And it seems they (files into /etc/systemd/network) are read by alphabetic order, so the order was probably wrong.
But, even if now I have set "bridge0" (instead of br0, because why not) I keep internet working, even after a reboot, but the VM still do not have internet, and on the host my bridge0 is down somehow:
Code: |
meself@Mephistopheles ~ $ ip a
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: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 70:85:c2:8d:11:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.103/24 brd 192.168.1.255 scope global dynamic noprefixroute enp8s0
valid_lft 42837sec preferred_lft 37437sec
inet6 2a01:e0a:47d:1160:caee:5d3c:2295:7499/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86140sec preferred_lft 86140sec
inet6 fe80::64a2:b7fe:c028:e261/64 scope link
valid_lft forever preferred_lft forever
3: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether c2:4f:4f:ed:e8:b3 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c04f:4fff:feed:e8b3/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
5: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default qlen 1000
link/ether fe:54:00:14:14:b9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fe14:14b9/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
|
As testing virt-manager by running the VM (before hand I changed to bridge0 the interface in the configuration:
Code: | <interface type="bridge">
<mac address="52:54:00:14:14:b9"/>
<source bridge="bridge0"/>
<model type="virtio"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface> |
In /etc/systemd/network I have these files:
- 25-bridge0.netdev:
Code: |
[NetDev]
Name=bridge0
Kind=bridge
|
- 25-bridge0-enp8s0.netdev:
Code: | [Match]
name=enp8s0
[Network]
Bridge=bridge0
|
- 25-bridge0.network
Code: | [Match]
Name=bridge0
[Network]
DHCP=yes
|
First error, 25-bridge0-enp8s0.netdev should be named with .network, not .netdev.
Then, I tried to understood which was the proper order, because even if the archlinux's wiki speak about alphabetical order, they should have named in consequence their file example with number, as 0-… 1-…, because it seems they are not presented in the right order.
So far as I understand, the .netdev file in charge to raise an interface (here, bridge0) should be read first, to create the bridge 0 interface.
Then it should be the file connecting bridge0 to enp8s0, and finally the one giving an IP address with DHCPd to bridge0. Correct ?
Thus, I tried this order:
- 0-bridge0.netdev : Create the bridge0 interfaces
Code: |
[NetDev]
Name=bridge0
Kind=bridge
|
- 1-bridge0-enp8s0.network : Connect enp8s0 to the bridge0 interfaces, the one that should got an IP
Code: |
[Match]
name=enp8s0
[Network]
Bridge=bridge0
|
- 2-bridge0.network : Then, finally, giving an IP to bridge0, and thus, allowing enp8s0 to get the network as well
Code: |
[Match]
Name=bridge0
[Network]
DHCP=yes
|
But, despite trying or rebooting the whole system, this is my ip a:
Code: |
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: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 70:85:c2:8d:11:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.103/24 brd 192.168.1.255 scope global dynamic noprefixroute enp8s0
valid_lft 42821sec preferred_lft 37421sec
inet6 2a01:e0a:47d:1160:caee:5d3c:2295:7499/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86385sec preferred_lft 86385sec
inet6 fe80::64a2:b7fe:c028:e261/64 scope link
valid_lft forever preferred_lft forever
3: bridge0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether c2:4f:4f:ed:e8:b3 brd ff:ff:ff:ff:ff:ff
|
1/ enp8s0 get the IP, meh !
2/ bridge0 still DOWN
Is there something I missed ? The order of files maybe ?
I also tried to revert the order of 2 to 1, and 1 to 2, so I tried that order as well:
- 0-bridge0.netdev
- 1-bridge0.network
- 2-bridge0-enp8s0.network
Not better.
Any ideas about what I'm missing ?
Good things is it doesn't break my networking for now.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 314 Location: Somewhere in the 77
|
Posted: Sat May 25, 2024 12:42 pm Post subject: |
|
|
I might have found the problem, dhcpd.
After keeping mixing my files order, trying to replace DHCP=yes by ipv4, googling, crying… I had an idea.
And if dhcpd was adding stuff unwanted ? I disabled at boot, and how, surprise:
Code: | 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: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master bridge0 state UP group default qlen 1000
link/ether 70:85:c2:8d:11:c5 brd ff:ff:ff:ff:ff:ff
3: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether c2:4f:4f:ed:e8:b3 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.44/24 metric 1024 brd 192.168.1.255 scope global dynamic bridge0
valid_lft 43187sec preferred_lft 43187sec
inet6 2a01:e0a:47d:1160:c04f:4fff:feed:e8b3/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86387sec preferred_lft 86387sec
inet6 fe80::c04f:4fff:feed:e8b3/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
|
Code: | default via 192.168.1.254 dev bridge0 proto dhcp src 192.168.1.44 metric 1024
192.168.1.0/24 dev bridge0 proto kernel scope link src 192.168.1.44 metric 1024
192.168.1.254 dev bridge0 proto dhcp scope link src 192.168.1.44 metric 1024
|
And my internet seems to be very ok. I changed my IP, I could probably set the same MAC address to my bridge0 than my enp8s0 to keep stuff like they were on my LAN.
For further reader, as me, this is the actual state of my /etc/systemd/network files configuration:
- 0-bridge0.netdev
Code: |
[NetDev]
Name=bridge0
Kind=bridge
|
- 1-bridge0-enp8s0.network
Code: |
[Match]
Name=enp8s0
[Network]
Bridge=bridge0
|
-2-bridge0.network
Code: |
[Match]
Name=bridge0
[Network]
DHCP=ipv4
|
So, first file create the bridge0 interface, as a bridge.
Second is connecting enp8s0 traffic to bridge0.
Then, finally, DHCP is asked to gives an IPv4 address to bridge0, sharing connection with the enp8s0 device.
Correct ?
----
As for my VM, now it gets an IP for enp1s0 which is 192.168.1.50/24, did not pushed any more test, but it was not even reaching that point. I could also try this… https://bpa.st/LYFA from the VM.
Now, as you can see at the beginning of this answer, enp8s0 does not get an IP any more !
Thanks for your time, will add [RESOLVED] into the topic name, and not coming back unless I missed something I did not realized yet !
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|