Difference between revisions of "Ubuntu: Bridge"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with "Install apt install bridge-utils Konfigurasi /etc/network/interfaces # The local network bridge auto br0 iface br0 inet static bridge_ports enp3s0 tun0 addres...") |
Onnowpurbo (talk | contribs) |
||
Line 14: | Line 14: | ||
address 192.168.0.10 | address 192.168.0.10 | ||
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
+ | |||
+ | |||
+ | |||
+ | ==iproute2== | ||
+ | |||
+ | Create | ||
+ | |||
+ | # ip link add name bridge_name type bridge | ||
+ | # ip link set bridge_name up | ||
+ | |||
+ | # ip link set eth0 up | ||
+ | # ip link set eth0 master bridge_name | ||
+ | |||
+ | Utility | ||
+ | |||
+ | # bridge link | ||
+ | # ip link set eth0 nomaster | ||
+ | # ip link set eth0 down | ||
+ | # ip link delete bridge_name type bridge | ||
+ | |||
+ | |||
+ | ==bridge-utils== | ||
+ | |||
+ | # brctl addbr bridge_name | ||
+ | # brctl addif bridge_name eth0 | ||
+ | |||
+ | Hati2 IP di eth0 akan hilang | ||
+ | |||
+ | $ brctl show | ||
+ | # ip link set dev bridge_name up | ||
+ | |||
+ | # ip link set dev bridge_name down | ||
+ | # brctl delbr bridge_name | ||
+ | |||
+ | Note: To enable the bridge-netfilter functionality, you need to manually load the br_netfilter module: | ||
+ | |||
+ | # modprobe br_netfilter |
Latest revision as of 10:34, 2 February 2019
Install
apt install bridge-utils
Konfigurasi
/etc/network/interfaces
# The local network bridge auto br0 iface br0 inet static bridge_ports enp3s0 tun0 address 192.168.0.10 netmask 255.255.255.0
iproute2
Create
# ip link add name bridge_name type bridge # ip link set bridge_name up
# ip link set eth0 up # ip link set eth0 master bridge_name
Utility
# bridge link # ip link set eth0 nomaster # ip link set eth0 down # ip link delete bridge_name type bridge
bridge-utils
# brctl addbr bridge_name # brctl addif bridge_name eth0
Hati2 IP di eth0 akan hilang
$ brctl show # ip link set dev bridge_name up
# ip link set dev bridge_name down # brctl delbr bridge_name
Note: To enable the bridge-netfilter functionality, you need to manually load the br_netfilter module:
# modprobe br_netfilter