Network Interfaces
Creating two network interfaces in Linux
sudo ip link add eth0dummy1 type dummy
sudo ip link add eth0dummy2 type dummy
Setting those interfaces up
sudo ip link set up eth0dummy1
sudo ip link set up eth0dummy2
Showing existing interfaces
ip addr list
MAC is assigned to eth0dummy1 and eth0dummy2 interfaces |
Bridge
Creating the bridge
sudo brctl addbr dummybridge
Setting the bridge up
sudo ip link set up dummybridge
Adding interfaces to the bridge
sudo brctl addif dummybridge eth0dummy1 eth0dummy2
Showing existing bridges
sudo brctl show
Showing virtual ports and MAC addresses
sudo brctl showmacs dummybridge
virtual port 1 attached to eth0dummy1 interface MAC and port 2 to eth0dummy2 MAC |
Router
Converting the bridge to a router by assigning a L3 address.
sudo ip addr add 172.16.0.1/24 dev dummybridge
Reference
Comments
Post a Comment