• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

brctl Command Examples in Linux

by admin

Network bridging involves associating two networks that normally would not pass network traffic between them. Bridging works at OSI Layer 2 with MAC addresses. A Linux system can be configured to bridge two networks. The brctl (bridge control) command is used to configure bridging within Linux.

A common example of bridging is as follows:

  • brctl show — View the bridging configuration.
  • brctl addbr {bridge name} — Create an empty bridge.
  • brctl addif {bridge name} eth0 — Add eth0 to the bridge.
  • brctl addif {bridge name} eth1 — Add eth1 to the bridge, linking the networks connected to eth0 and eth1.

Syntax

The syntax of the brctl command is:

# brctl [command]

brctl Command Examples

1. Show a list with information about currently existing Ethernet bridges:

# brctl show

2. Create a new Ethernet bridge interface:

# brctl add bridge_name

3. Delete an existing Ethernet bridge interface:

# brctl del bridge_name

4. Add an interface to an existing bridge:

# brctl addif bridge_name interface_name

5. Remove an interface from an existing bridge:

# brctl delif bridge_name interface_name

Filed Under: Linux

Some more articles you might also be interested in …

  1. runuser: command not found
  2. nethogs Command Examples in Linux
  3. KVM Virsh Command Examples on CentOS and RHEL
  4. head Command Examples in Linux
  5. w Command Examples in Linux
  6. pi: command not found
  7. How to configure xhost to be persistent across reboots in Linux
  8. Oracle Database Environment Variables and Their Functions
  9. kdialog: command not found
  10. Linux Command line Basics – Executing commands from the command line

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright