0

There are two network cards on my server: enp7s0 and enp9s0.

Their configuration is as follows:

enp7s0:

file: /etc/sysconfig/network-scripts/ifcfg-enp7s0

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
...
NAME=enp7s0
DEVICE=enp7s0
ONBOOT=yes
BRIDGE=macbr0

enp9s0:

file: /etc/sysconfig/network-scripts/ifcfg-enp9s0

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
...
NAME=enp9s0
DEVICE=enp9s0
ONBOOT=yes
BRIDGE=macbr0

This is the bridged network card I created:

macbr0:

file: /etc/sysconfig/network-scripts/ifcfg-macbr0

DEVICE=macbr0
TYPE=Bridge
BOOTPROTO=static
IPADDR=192.168.0.119
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
ONBOOT=yes
DNS1=114.114.114.114
DNS2=8.8.8.8
NAME=macbr0

This is the log about the bridge on my server:

file: /var/log/messages

Nov 16 00:44:49 server nm-dispatcher: req:3 'connectivity-change': start running ordered scripts...
Nov 16 00:44:49 server NetworkManager[2239]: <info>  [1636994689.5024] device (enp7s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Nov 16 00:44:49 server NetworkManager[2239]: <info>  [1636994689.5027] device (enp9s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Nov 16 00:44:49 server NetworkManager[2239]: <info>  [1636994689.5030] device (macbr0): state change: config -> ip-config (reason 'none', sys-iface-state: 'assume')
Nov 16 00:44:49 server NetworkManager[2239]: <info>  [1636994689.5041] device (enp7s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Nov 16 00:44:49 server NetworkManager[2239]: <info>  [1636994689.5047] manager: NetworkManager state is now CONNECTED_LOCAL
Nov 16 00:44:52 server NetworkManager[2239]: <info>  [1636994692.1345] policy: set 'macbr0' (macbr0) as default for IPv4 routing and DNS
Nov 16 00:44:52 server NetworkManager[2239]: <info>  [1636994692.1349] device (enp7s0): Activation: successful, device activated.
Nov 16 00:44:52 server NetworkManager[2239]: <info>  [1636994692.1362] device (enp9s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Nov 16 00:44:52 server nm-dispatcher: req:4 'up' [enp7s0]: new request (3 scripts)
Nov 16 00:44:52 server nm-dispatcher: req:4 'up' [enp7s0]: start running ordered scripts...
Nov 16 00:44:52 server nm-dispatcher: req:5 'connectivity-change': new request (3 scripts)
Nov 16 00:44:52 server systemd: Unit iscsi.service cannot be reloaded because it is inactive.
Nov 16 00:44:52 server nm-dispatcher: req:5 'connectivity-change': start running ordered scripts...
Nov 16 00:44:53 server NetworkManager[2239]: <info>  [1636994693.2505] device (enp9s0): Activation: successful, device activated.
Nov 16 00:44:53 server nm-dispatcher: req:6 'up' [enp9s0]: new request (3 scripts)
Nov 16 00:44:53 server nm-dispatcher: req:6 'up' [enp9s0]: start running ordered scripts...
Nov 16 00:44:53 server NetworkManager[2239]: <info>  [1636994693.2528] device (macbr0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'assume')
Nov 16 00:44:53 server NetworkManager[2239]: <info>  [1636994693.2547] device (macbr0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'assume')
Nov 16 00:44:53 server NetworkManager[2239]: <info>  [1636994693.2551] device (macbr0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'assume')
Nov 16 00:44:53 server NetworkManager[2239]: <info>  [1636994693.2561] manager: NetworkManager state is now CONNECTED_SITE
Nov 16 00:44:53 server systemd: Unit iscsi.service cannot be reloaded because it is inactive.
Nov 16 00:44:55 server NetworkManager[2239]: <info>  [1636994695.4836] device (macbr0): Activation: successful, device activated.
Nov 16 00:44:55 server NetworkManager[2239]: <info>  [1636994695.4847] manager: NetworkManager state is now CONNECTED_GLOBAL
Nov 16 00:44:55 server NetworkManager[2239]: <info>  [1636994695.4861] manager: startup complete
Nov 16 00:44:55 server nm-dispatcher: req:7 'up' [macbr0]: new request (3 scripts)
Nov 16 00:44:55 server nm-dispatcher: req:7 'up' [macbr0]: start running ordered scripts...

This is the configuration of my client access bridge:

enter image description here

DNS Server: 8.8.8.8,114.114.114.114
Static IP: 192.168.0.121
Netmask: 255.255.255.0
Gateway: 192.168.0.1

The server operating system is CentOS7, and the client operating system is Manjaro.

On the server, the network cable connection with the client is the enp9s0 network card.

Now it can be accessed from 192.168.0.1 to 192.168.0.255, including the gateway 192.168.0.1 can also be accessed by ping.

But still unable to connect to the Internet.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.