Candid photograph of a Linux server terminal with a soft olive-green glow against a dark slate background, conveying a calm technical atmosphere.

Step-by-step guides for system administrators — covering command-line basics, web server setup, and preparation material for technical interviews.

Browse Tutorials

Configuring a Bridge Network with brctl on RHEL

A Linux bridge connects one or more physical or virtual interfaces at Layer 2, allowing a host and its virtual machines to share the same Ethernet segment. On RHEL systems, brctl from the bridge-utils package can create and inspect a bridge, while the traditional ifcfg-* files make the configuration survive a reboot.

This approach is useful for KVM labs, test servers, and small office networks. It can also support an Android guest used for application testing: the guest’s network connection belongs to the host bridge, while interface work such as building a custom dialog remains inside the guest operating system. Linuxtpoint’s about page provides further context on its practical Linux administration focus.

Understand The Bridge Layout

A bridge behaves like a software switch. The physical network interface, such as eth0 or ens160, becomes a bridge port, and the host’s IP address moves from that interface to br0. Virtual machine interfaces can then attach to the same bridge and obtain addresses from the existing DHCP server or use static addresses on the same subnet.

Do not assign an IP address to both the physical interface and br0. That creates confusing routing behaviour and may produce intermittent connectivity. On a server in a Sydney or Melbourne data centre, check the provider’s virtualisation policy first, because some VPS platforms block promiscuous or bridged traffic at the hypervisor edge.

Prepare The RHEL Host

Install the legacy bridge utilities and identify the active interface before changing anything:

sudo yum install -y bridge-utils
ip -br link
ip route

On older RHEL and CentOS releases, the interface may be called eth0; newer predictable naming commonly produces names such as ens192. Record the current gateway, DNS servers, subnet prefix, and default route. If the machine is remote, use an out-of-band console or schedule the change during a maintenance window. A dropped SSH session can otherwise leave a Brisbane office server unreachable.

Stop NetworkManager temporarily only if the host uses the legacy network service and your local operating procedure requires it. Avoid guessing: RHEL 7 commonly supports both NetworkManager and network, while later releases increasingly favour NetworkManager profiles and may not include the old network-scripts package by default.

Create A Temporary Bridge

The following commands create a non-persistent bridge for testing. Replace ens160 with the actual interface name, and make sure it is not carrying an essential remote session:

sudo ip addr flush dev ens160
sudo brctl addbr br0
sudo brctl addif br0 ens160
sudo ip link set ens160 up
sudo ip link set br0 up

For DHCP, request an address on the bridge rather than the physical port:

sudo dhclient -v br0
ip addr show br0
ip route
brctl show

For a static test address, use the values appropriate to your network:

sudo ip addr add 192.0.2.20/24 dev br0
sudo ip route add default via 192.0.2.1

The 192.0.2.0/24 range is reserved for documentation, so replace it with the real subnet in production. brctl showmacs br0 can display learned MAC addresses, which is useful when checking whether a virtual machine or external switch is reaching the bridge.

Persist The Configuration

On RHEL releases using network-scripts, create /etc/sysconfig/network-scripts/ifcfg-br0:

DEVICE=br0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.0.2.20
PREFIX=24
GATEWAY=192.0.2.1
DNS1=192.0.2.53
STP=no
DELAY=0

Then configure the physical port without an address in /etc/sysconfig/network-scripts/ifcfg-ens160:

DEVICE=ens160
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br0

Use STP=yes when the bridge may form a loop through multiple switches or bridged interfaces. For a single physical uplink, disabling spanning tree can reduce startup delay, but it should be a deliberate choice. In Australian colocation facilities, confirm whether the upstream switch expects a single MAC address or permits several guest MAC addresses before attaching production workloads.

Verify And Troubleshoot

Reload the relevant service according to the RHEL version:

sudo systemctl restart network

Or, with NetworkManager-managed profiles:

sudo nmcli connection reload
sudo nmcli connection up br0

Check the result with ip addr, ip route, brctl show, and ping. Confirm that the default route is attached to br0, not ens160, and inspect /var/log/messages or journalctl -u NetworkManager for activation errors. If DHCP fails, verify VLAN tagging, switch port configuration, and whether the DHCP server has limits on client MAC addresses.

When the bridge appears correct but a service still fails, trace the service rather than repeatedly changing network settings. A practical strace debugging guide can help distinguish DNS, socket, and permission problems from a genuine Layer 2 fault. Australian NBN connections often use consumer routers that handle DHCP and VLAN details differently from enterprise switches, so reproduce the topology in a lab before moving it to a live link.

Keep a console session open, back up the original interface files, and apply the persistent configuration only after the temporary bridge passes connectivity tests. The next concrete step is to run ip -br link, identify the real uplink name, and create a backup of its current RHEL network configuration.