May 2017
Beginner
552 pages
28h 47m
English
The ip command performs several actions using the command/subcommand model. To create a bridge, we use the ip link commands.
In this example, there are two NIC cards: eth0 is configured and connected to the 192.168.1.0 subnet, while eth1 is not configured but will be connected to the 10.0.0.0 subnet via the bridge:
# Create a new bridge named br0
ip link add br0 type bridge
# Add an Ethernet adapter to the bridge
ip link set dev eth1 master br0
# Configure the bridge's IP address
ifconfig br0 10.0.0.2
# Enable packet forwarding
echo 1 ...