br0 브리지가 IP를 얻을 수 없습니다. 무슨 일인가요?

br0 브리지가 IP를 얻을 수 없습니다. 무슨 일인가요?

안녕 친구들. 오늘 이 문제에 대해 또 다른 스레드를 설정했지만 이제 더 많은 정보를 받고 어느 정도 진전을 이루었으므로 이전 스레드와는 거의 관련이 없습니다. Fedora 31에서 브리지를 만드는 데 어려움을 겪었지만 마침내 작동하게 되었습니다. 튜토리얼을 10개 정도 들었는데 지금은 어느 정도 효과가 있습니다. 내 목표는 가상 머신을 로컬 네트워크에 전달하는 것이므로 네트워크 brdige br0이 네트워크의 dhcp 서버를 사용하여 내 컴퓨터의 IP 주소를 가져오길 원합니다. 간단한 라우터. 불행히도 문제가 발생하여 해결책을 찾을 수 없습니다.

nmcli connection show출력은 다음과 같습니다

[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은 br0 브리지에 사용하려는 인터페이스입니다. 따라서 물리적 LAN에 연결된 2개의 물리적 네트워크 인터페이스가 있습니다.

그래서 전부 꺼내어 보았는데 괜찮아 보였는데 아쉽게도 IP 주소를 가져오는 과정에서 프로세스가 막히는 것 같았습니다. 또한, 이 주제에 대한 정보를 얻는 것이 매우 어렵기 때문에 해결책이 없으면 누군가에게 비용을 지불해야 하지만 누군가가 도움을 줄 수 있을 것이라고 확신합니다 :)

    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.

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

/etc/sysconfig/network-scripts/ifcfg-br0 파일 을 편집할 때 BOOTPROTO=dhcp파일을 변경하면 BOOTPROTO=noneIPv6 주소가 수신되지만 IPv4 주소는 수신되지 않습니다.

고정 IP 할당을 시도했지만 제대로 작동했지만 네트워킹, 특히 가상 머신 및 브리지와 같은 복잡한 것에 대해 많이 이해하지 못합니다. 이제 br0 인터페이스에 IP가 할당되었지만 가상 머신 내부에는 여전히 인터넷 연결이 없습니다.

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

편집하다:

오늘 Cockpit 웹 인터페이스를 사용하여 브리지를 설정하려고 했는데 결과는 다음 과 ip addr show같았 nmcli connection show으나 안타깝게도 VM 내부에 인터넷 연결이 없습니다.

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

이제 모든 것을 재설정하고 새 브리지를 만든 후 IPv4 주소가 VM에 할당되지만 VM 내부에서는 네트워크나 인터넷에 액세스할 수 없습니다.

호스트 이름은 LAN 내부에도 나타납니다.

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은 자동으로 생성되며 가상 머신과 동일한 MAC을 갖습니다.

관련 정보