1

Ahoy friends. I have set up another topic today regarding this problem, but now i received further information, and i got a little bit forward, so it has almost nothing to do with the old one. I have been struggeling during the creation of a network bridge on Fedora 31, but finally i got it working. I followed maybe 10 tutorials, but now it's more or less working. My goal is to passthrough my virtual machines to my local network, so i want the network brdige br0 to obtain ip addresses for my machines using the network's dhcp server. Simple router. Unfortunately somethings goes wrong, and im unable to find solutions.

My nmcli connection show output below

[root@localhost ~]# nmcli connection show 
NAME        UUID                                  TYPE      DEVICE 
Bridge br0  d2d68553-f97e-7549-7a26-b34a26f29318  bridge    br0    
enp0s3      da37a9c2-f5a5-3a8a-b3ab-4ecd96031402  ethernet  enp0s3 
virbr0      898b66b6-22e1-4e46-9065-2fd67158731c  bridge    virbr0 
enp0s8      00cb8299-feb9-55b6-a378-3fdc720e0bc6  ethernet  enp0s8 

enp0s8 is the interface i want to use for the br0 bridge. So i got 2 physical network interfaces connected to the physical local area network.

So i tried to bring everything up, and it looked nice, but unfortunately the process seems to be stuck while obtaining an ip address. Furthermore it's extremely difficult to get information regarding this topic, so if there is no solution i will have to pay someone, but i'm sure someone will be able to help :)

    Jan 27 21:42:43 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 27 21:42:43 localhost.localdomain NetworkManager[930]: <info>  [1580157763.0113] device (enp0s8): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jan 27 21:42:43 localhost.localdomain NetworkManager[930]: <info>  [1580157763.0117] device (enp0s8): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jan 27 21:42:43 localhost.localdomain NetworkManager[930]: <info>  [1580157763.0137] device (enp0s8): Activation: successful, device activated.
Jan 27 21:42:43 localhost.localdomain systemd[1]: iscsi.service: Unit cannot be reloaded because it is inactive.
Jan 27 21:42:53 localhost.localdomain systemd[1]: NetworkManager-dispatcher.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The unit NetworkManager-dispatcher.service has successfully entered the 'dead' state.
Jan 27 21:42:53 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <warn>  [1580157808.3501] dhcp4 (br0): request timed out
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3502] dhcp4 (br0): state changed unknown -> timeout
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3567] dhcp4 (br0): canceled DHCP transaction
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3568] dhcp4 (br0): state changed timeout -> done
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3571] device (br0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <warn>  [1580157808.3589] device (br0): Activation: failed for connection 'Bridge br0'
Jan 27 21:43:28 localhost.localdomain audit: ANOM_PROMISCUOUS dev=enp0s8 prom=0 old_prom=256 auid=4294967295 uid=0 gid=0 ses=4294967295
Jan 27 21:43:28 localhost.localdomain kernel: device enp0s8 left promiscuous mode
Jan 27 21:43:28 localhost.localdomain kernel: br0: port 1(enp0s8) entered disabled state
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3766] device (br0): detached bridge port enp0s8
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3791] device (enp0s8): state change: activated -> deactivating (reason 'dependency-failed', sys-iface-state: 'managed')
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3814] device (br0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.3854] policy: auto-activating connection 'Bridge br0' (d2d68553-f97e-7549-7a26-b34a26f29318)
Jan 27 21:43:28 localhost.localdomain systemd[1]: Starting Network Manager Script Dispatcher Service...
-- Subject: A start job for unit NetworkManager-dispatcher.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit NetworkManager-dispatcher.service has begun execution.
-- 
-- The job identifier is 3027.
Jan 27 21:43:28 localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
-- Subject: A start job for unit NetworkManager-dispatcher.service has finished successfully
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit NetworkManager-dispatcher.service has finished successfully.
-- 
-- The job identifier is 3027.
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=raw family=2 entries=52
Jan 27 21:43:28 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=mangle family=2 entries=67
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=nat family=2 entries=106
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=filter family=2 entries=189
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=raw family=10 entries=55
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=mangle family=10 entries=66
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=nat family=10 entries=101
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=filter family=10 entries=193
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.4138] device (br0): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
Jan 27 21:43:28 localhost.localdomain NetworkManager[930]: <info>  [1580157808.4159] device (enp0s8): state change: deactivating -> disconnected (reason 'dependency-failed', sys-iface-state: 'managed')
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=raw family=2 entries=51
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=mangle family=2 entries=66
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=nat family=2 entries=104
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=filter family=2 entries=186
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=raw family=10 entries=54
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=mangle family=10 entries=65
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=nat family=10 entries=99
Jan 27 21:43:28 localhost.localdomain audit: NETFILTER_CFG table=filter family=10 entries=190
Jan 27 21:43:38 localhost.localdomain systemd[1]: NetworkManager-dispatcher.service: Succeeded.

Here, the maybe more useful logs of the Cockpit GUI

    21:49
<info> [1580158169.5541] device (enp0s8): state change: deactivating -> disconnected (reason 'dependency-failed', sys-iface-state: 'managed')
NetworkManager
21:49
<info> [1580158169.5527] device (br0): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
NetworkManager
21:49
<info> [1580158169.5155] policy: auto-activating connection 'Bridge br0' (d2d68553-f97e-7549-7a26-b34a26f29318)
NetworkManager
21:49
<info> [1580158169.5130] device (br0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
NetworkManager
21:49
<info> [1580158169.5109] device (enp0s8): state change: activated -> deactivating (reason 'dependency-failed', sys-iface-state: 'managed')
NetworkManager
21:49
<info> [1580158169.5090] device (br0): detached bridge port enp0s8
NetworkManager
21:49
<warn> [1580158169.4982] device (br0): Activation: failed for connection 'Bridge br0'
NetworkManager
21:49
<info> [1580158169.4974] manager: startup complete
NetworkManager
21:49
<info> [1580158169.4969] device (br0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
NetworkManager
21:49
<info> [1580158169.4966] dhcp4 (br0): state changed timeout -> done
NetworkManager

When i edit the /etc/sysconfig/network-scripts/ifcfg-br0 file, changing BOOTPROTO=dhcpto BOOTPROTO=none it receives an IPv6 address but not an IPv4 one.

I tried to assign a static ip, it works, but i don't understand a lot of networking stuff, especially such complicated things like virtual machines and bridges. Now there is an ip assigned to the br0 interface, but still no internet connection inside of the virtual machines.

192.168.2.133/24, 2001:4dd6:6675:0:8022:44ff:fe0c:7261/64, fe80:0:0:0:8022:44ff:fe0c:7261/64

EDIT:

Today i tried to set up a bridge using the Cockpit web interface, after ip addr show and nmcli connection show it looks like that, but unfortunately no internet connection inside of the virtual machines

Last login: Tue Jan 28 11:23:04 2020 from 192.168.2.49
[root@localhost ~]# brctl show
bridge name bridge id       STP enabled interfaces
bridge0     8000.eaa2ae14ae08   yes     enp0s8
[root@localhost ~]# nmcli connection show 
NAME     UUID                                  TYPE      DEVICE  
enp0s3   da37a9c2-f5a5-3a8a-b3ab-4ecd96031402  ethernet  enp0s3  
bridge0  c9243687-2904-4ee8-9d0a-bf1818fc4705  bridge    bridge0 
enp0s8   00cb8299-feb9-55b6-a378-3fdc720e0bc6  ethernet  enp0s8  
[root@localhost ~]# ip addr show 
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 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:14:57:8e brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.128/24 brd 192.168.2.255 scope global dynamic noprefixroute enp0s3
       valid_lft 863374sec preferred_lft 863374sec
    inet6 2001:4dd1:6569:0:8d77:52a:b667:6cf6/64 scope global dynamic noprefixroute 
       valid_lft 7129sec preferred_lft 3529sec
    inet6 fe80::7802:956e:eee2:dde8/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master bridge0 state UP group default qlen 1000
    link/ether 08:00:27:f3:a8:5a brd ff:ff:ff:ff:ff:ff
8: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether ea:a2:ae:14:ae:08 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.150/24 brd 192.168.2.255 scope global noprefixroute bridge0
       valid_lft forever preferred_lft forever
    inet6 2001:4dd1:6569:0:bf80:325c:ded7:6f92/64 scope global dynamic noprefixroute 
       valid_lft 7129sec preferred_lft 3529sec
    inet6 fe80::669:9515:8a22:dce2/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Now after resetting everything, and creating a new bridge, an IPv4 address is being assigned to the virtual machine, but inside of the vm i can't get any network nor internet access.

Hostname also appears inside of the local area network.

ip addr show

[root@localhost images]# ip addr show
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 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:14:57:8e brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.128/24 brd 192.168.2.255 scope global dynamic noprefixroute enp0s3
       valid_lft 860261sec preferred_lft 860261sec
    inet6 2001:4dd1:6569:0:a58a:c00c:a13e:430/64 scope global dynamic noprefixroute 
       valid_lft 7196sec preferred_lft 3596sec
    inet6 fe80::73d7:3c65:50ab:a960/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master bridge0 state UP group default qlen 1000
    link/ether 08:00:27:f3:a8:5a brd ff:ff:ff:ff:ff:ff
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:43:41:4e brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
    link/ether d2:bd:8e:48:b7:6d brd ff:ff:ff:ff:ff:ff
6: bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 16:fa:f3:41:a9:f3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.150/24 brd 192.168.2.255 scope global noprefixroute bridge0
       valid_lft forever preferred_lft forever
    inet6 2001:4dd1:6569:0:35d5:4679:9565:86a/64 scope global dynamic noprefixroute 
       valid_lft 7196sec preferred_lft 3596sec
    inet6 fe80::4aae:e40c:fd54:62a6/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
12: macvtap0@bridge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 500
    link/ether 52:54:00:c4:10:78 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fec4:1078/64 scope link 
       valid_lft forever preferred_lft forever

macvtap0 has been created automatically, and having the same MAC the virtual machine has.

Fabian Druschke
  • 185
  • 6
  • 16
  • Conent of `ip addr show` as expected nothing assigned. Unfortunately i can't use virbr0 for this purpose, because it only provides NAT, (https://unix.stackexchange.com/questions/523245/whats-the-function-of-virbr0-and-virbr0-nic) that's not what i want. `br0: mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether ea:a2:ae:14:ae:08 brd ff:ff:ff:ff:ff:ff` – Fabian Druschke Jan 28 '20 at 09:35
  • So i tried to assign a static ip adress now, and it works, more or less. I have assigned a static ip address to br0, and the VM is being recognized by the router, but only having an ipv6 address, and i'm not able to ping it, or to establish any ssh connection. Hostname also appears in the router's interface. – Fabian Druschke Jan 28 '20 at 09:42
  • Link is UP inside of the VM, but DHCPDISCOVER is not able to find anything. – Fabian Druschke Jan 28 '20 at 09:54
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/103794/discussion-between-fabian-druschke-and-roaima). – Fabian Druschke Jan 28 '20 at 10:32
  • 1. Does `ip link set promisc on dev enp0s8` fix the problem? 2. You've got `bridge0` containing `enp0s8` but you're trying to reference `br0`. I'm not at all convinced they're the same bridge. – roaima Jan 28 '20 at 10:52
  • Thanks for your reply! I have reset everything, and now i set up a new bridge, called bridge0 using the interface. It seems to work almost fine. The virtual machines receive an ipv4 address by the network's dhcp, and the hostname also appears. But there seems to be something wrong with the firewall maybe (?) because i can't ping anything inside of the virtual machine. I'll post ip addr show again. – Fabian Druschke Jan 28 '20 at 11:41
  • Do i have to configure anything for the guest virtual machine? Or can i use the given "enp0s8" interface? Maybe that's the problem? Because the bridge itself does not appear in the virtual machine – Fabian Druschke Jan 28 '20 at 12:49
  • Ahoy, just to inform, my host machine is running on VirtualBox, right now i have enabled promisc mode for both network devices (enp0s3 and enp0s8). – Fabian Druschke Jan 28 '20 at 14:02
  • Good news, it has changed something!!! Now the virtual machine can retrieve an IP by using DHCPDISCOVER, but now when i try to connect to the virtual machine using SSH i receive something like `Connection reset by 192.168.2.141 port 22 ` do i have to change anything regarding the iptables rules or something of the host machine? Because something seems to prevent my connection attempt. I'm also able to connect to the internet using the virtual machine. Only annoying thing: There seems to be something like a firewall. So promisc mode was the right way, didn't enable it in VirtualBox settings! – Fabian Druschke Jan 28 '20 at 14:04
  • you are using two interfaces (enp0s3 and bridge0) on the same ethernet LAN, using the same IP LAN. Don't do this: this doesn't work properly without policy routing. If you use an IP only bridge0 (that means reconfigure your network settings), then it would work. There are other methods (macvlan, or moving an interface to an other network namespace, or using policy routing, etc.), but you must get the basic method working before moving on to more complex. – A.B Feb 02 '20 at 19:45

0 Answers0