Create a Bridge interface on Linux Host running RHEL/Rocky Linux
(base) [root@t480s ~]# nmcli device status
DEVICE TYPE STATE CONNECTION
wlp61s0 wifi connected HUAWEI-HOME
enp0s31f6 ethernet connected enp0s31f6
docker0 bridge connected (externally) docker0
lo loopback connected (externally) lo
virbr0 bridge connected (externally) virbr0
p2p-dev-wlp61s0 wifi-p2p disconnected --
(base) [root@t480s ~]#
(base) [root@t480s ~]#
(base) [root@t480s ~]# sudo nmcli con add type bridge ifname br0 con-name br0
Connection 'br0' (5722704f-3f32-45d4-8329-7e24031eb926) successfully added.
(base) [root@t480s ~]# nmcli con add type bridge-slave ifname enp0s31f6 master br0
Connection 'bridge-slave-enp0s31f6' (f7a612e4-0112-4524-bc73-dc2fb8abb45f) successfully added.
(base) [root@t480s ~]# nmcli con modify br0 ipv4.addresses 192.168.3.51/24
(base) [root@t480s ~]# nmcli con modify br0 ipv4.gateway 192.168.3.1
(base) [root@t480s ~]# nmcli con modify br0 ipv4.dns "192.168.3.1 8.8.8.8"
(base) [root@t480s ~]# nmcli con modify br0 ipv4.method manual
(base) [root@t480s ~]# nmcli con modify br0 ipv6.method ignore
(base) [root@t480s ~]# nmcli con modify br0 bridge.stp no
(base) [root@t480s ~]# nmcli connection show
NAME UUID TYPE DEVICE
enp0s31f6 e7dabef2-a1f0-4aa5-8cab-7b7b5576f30c ethernet enp0s31f6
br0 5722704f-3f32-45d4-8329-7e24031eb926 bridge br0
docker0 10a7c8c3-13dd-4226-9701-4fc7fd0eb67e bridge docker0
lo 9fc2a74c-a0ee-47d7-a78a-09a18bc5f80b loopback lo
virbr0 b1e9f838-ff29-4d96-9c0a-d3970e5b0006 bridge virbr0
bridge-slave-enp0s31f6 f7a612e4-0112-4524-bc73-dc2fb8abb45f ethernet --
(base) [root@t480s ~]# nmcli connection down enp0s31f6
Connection 'enp0s31f6' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/14)
(base) [root@t480s ~]# nmcli connection up br0
Connection successfully activated (controller waiting for ports) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/18)
# TESTING:
(base) [root@t480s ~]# ping -c1 www.google.com
PING forcesafesearch.google.com (216.239.38.120) 56(84) bytes of data.
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=1 ttl=118 time=14.3 ms
--- forcesafesearch.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 14.298/14.298/14.298/0.000 ms
(base) [root@t480s ~]# ip addr show br0
14: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:6a:64:12:37:8b brd ff:ff:ff:ff:ff:ff
inet 192.168.3.51/24 brd 192.168.3.255 scope global noprefixroute br0
valid_lft forever preferred_lft forever
inet6 fe80::ea6a:64ff:fe12:378b/64 scope link
valid_lft forever preferred_lft forever
(base) [root@t480s ~]# nmcli device status
DEVICE TYPE STATE CONNECTION
br0 bridge connected br0
wlp61s0 wifi connected HUAWEI-HOME
enp0s31f6 ethernet connected bridge-slave-enp0s31f6
docker0 bridge connected (externally) docker0
lo loopback connected (externally) lo
virbr0 bridge connected (externally) virbr0
p2p-dev-wlp61s0 wifi-p2p disconnected --
(base) [root@t480s ~]#
(base) [root@t480s ~]#
(base) [root@t480s ~]# wget www.google.com
--2026-01-01 10:59:53-- http://www.google.com/
Resolving www.google.com (www.google.com)... 216.239.38.120, 2001:4860:4802:32::78
Connecting to www.google.com (www.google.com)|216.239.38.120|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’
index.html [ <=> ] 20.27K --.-KB/s in 0.01s
2026-01-01 10:59:53 (1.97 MB/s) - ‘index.html’ saved [20758]
(base) [root@t480s ~]#
Comments
Post a Comment