Anda di halaman 1dari 11

Bridging (MikroTik Base)

Published On Wednesday, September 19, 2012 By admin. Under: MikroTik, Tutorial (Short). Tags: Bridging, MikroTik

Basic Configuration
Teknik bridge (bridging) adalah teknik memasukan atau menggabungkan beberapa interface router menjadi satu segmen jaringan (satu broadcast domain). Interface yang digabungkan dapat berasal dari beberapa router. Fungsi routing akan hilang dari interface-interface tersebut dan tidak perlu mengkonfigurasikan IP Address pada interface-interface yang akan dibridging. Interface yang telah dibridge dapat disamakan dengan port-port pada switch. Contoh skenario jaringan yang digunakan adalah sebagai berikut :

Perintah untuk membuat interface bridge pada Router-A adalah sebagai berikut : [admin@Router-A] > interface bridge add name=bridge-1 [admin@Router-A] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:00:00:00:00:00 protocolmode=none priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

Perintah untuk memasukan interface ethernet Router-A kedalam interface bridge adalah sebagai berikut : [admin@Router-A] > interface bridge port add interface=ether1 bridge=bridge-1 [admin@Router-A] > interface bridge port add interface=ether2 bridge=bridge-1 [admin@Router-A] > interface bridge port print Flags: X disabled, I inactive, D dynamic # 0 1 INTERFACE ether1 ether2 BRIDGE bridge-1 bridge-1 080 080 PRIORITY PATH-COST HORIZON 10 10 none none

Untuk Router-B, perintah yang dapat digunakan : [admin@Router-B] > interface bridge add name=bridge-1 [admin@Router-B] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:00:00:00:00:00 protocolmode=none priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router-B] > interface bridge port add interface=ether1 bridge=bridge-1 [admin@Router-B] > interface bridge port add interface=ether2 bridge=bridge-1 [admin@Router-B] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:0C:29:0E:D7:BF protocolmode=none priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

Redundant Link
Untuk jaringan yang menerapkan bridging dengan redundant link, maka redundant link yang dibangun berpotensi menghasilkan looping. Untuk mencegah looping interface bridge harus mengaktifkan Spanning Tree Protocol (STP) ataupun Rapid Spanning Tree Protocol (STP). Jika menggunakan STP/RSTP, maka salah satu bridge harus berperan sebagai root bridge.

Untuk Router-A, konfigurasi yang dapat dilakukan adalah sebagai berikut : [admin@Router-A] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:0C:29:91:EF:01 protocol-mode=none priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router-A] > interface bridge set 0 protocol-mode=rstp priority=07000

[admin@Router-A] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:0C:29:91:EF:01 protocol-mode=rstp priority=07000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router-A] > interface bridge port add interface=ether2 bridge=bridge-1 [admin@Router-A] > interface bridge port print Flags: X disabled, I inactive, D dynamic # 0 1 2 INTERFACE ether1 ether2 ether3 BRIDGE bridge-1 bridge-1 bridge-1 080 080 080 PRIORITY PATH-COST HORIZON 10 10 10 none none none

Untuk Router-B, perintah yang dapat digunakan adalah sebagai berikut : [admin@Router-B] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:0C:29:0E:D7:BF protocol-mode=none priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m [admin@Router-B] > interface bridge set 0 protocol-mode=rstp priority=08000

[admin@Router-B] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:0C:29:0E:D7:BF protocol-mode=rstp priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router-A] > interface bridge port add interface=ether2 bridge=bridge-1 [admin@Router-A] > interface bridge port print Flags: X disabled, I inactive, D dynamic # INTERFACE BRIDGE PRIORITY PATH-COST HORIZON

0 1 2

ether1 ether2 ether3

bridge-1 bridge-1 bridge-1

080 080 080

10 10 10

none none none

Sedangkan untuk melakukan monitoring terhadap interface-interface bridge beserta port yang menjadi anggota dari masing-masing bridge, perintah yang dapat digunakan adalah sebagai berikut : [admin@Router-A] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:0C:29:91:EF:01 protocol-

mode=rstp priority=06000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router-A] > interface bridge monitor 0 state: enabled current-mac-address: 00:0C:29:91:EF:01 root-bridge: yes root-bridge-id: 06000.00:0C:29:91:EF:01 root-path-cost: 0 root-port: none port-count: 3 designated-port-count: 3

[admin@Router-A] > interface bridge port print Flags: X disabled, I inactive, D dynamic # 0 1 2 INTERFACE ether1 ether2 ether3 BRIDGE bridge-1 bridge-1 bridge-1 PRIORITY PATH-COST HORIZON 080 080 080 10 10 10 none none none

[admin@Router-A] > interface bridge port monitor 0 status: in-bridge port-number: 1 role: designated-port edge-port: no edge-port-discovery: yes point-to-point-port: no

external-fdb: no sending-rstp: yes learning: yes forwarding: yes

[admin@Router-A] > interface bridge port monitor 1 status: in-bridge port-number: 2 role: designated-port edge-port: yes edge-port-discovery: yes point-to-point-port: no external-fdb: no sending-rstp: yes learning: yes forwarding: yes

[admin@Router-A] > interface bridge port monitor 2 status: in-bridge port-number: 3 role: designated-port edge-port: no edge-port-discovery: yes point-to-point-port: no external-fdb: no sending-rstp: yes learning: yes forwarding: yes

Untuk memonitor pada Router-B dapat digunakan perintah sebagai berikut : [admin@Router-B] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 arp=enabled mac-address=00:0C:29:0E:D7:BF protocol-mode=rstp priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 max-message-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router-B] > interface bridge monitor 0 state: enabled current-mac-address: 00:0C:29:0E:D7:BF root-bridge: no root-bridge-id: 06000.00:0C:29:91:EF:01 root-path-cost: 10 root-port: ether1 port-count: 3 designated-port-count: 1

[admin@Router-B] > interface bridge port print Flags: X disabled, I inactive, D dynamic # 0 1 2 INTERFACE ether1 ether2 ether3 BRIDGE bridge-1 bridge-1 bridge-1 080 080 080 PRIORITY PATH-COST HORIZON 10 10 10 none none none

[admin@Router-B] > interface bridge port monitor 0 status: in-bridge port-number: 1 role: root-port edge-port: no edge-port-discovery: yes point-to-point-port: no external-fdb: no sending-rstp: yes learning: yes forwarding: yes root-path-cost: 10 designated-bridge: 06000.00:0C:29:91:EF:01 designated-cost: 0 designated-port-number: 1

[admin@Router-B] > interface bridge port monitor 1 status: in-bridge port-number: 2 role: designated-port edge-port: yes

edge-port-discovery: yes point-to-point-port: no external-fdb: no sending-rstp: yes learning: yes forwarding: yes

[admin@Router-B] > interface bridge port monitor 2 status: in-bridge port-number: 3 role: alternate-port edge-port: no edge-port-discovery: yes point-to-point-port: no external-fdb: no sending-rstp: yes learning: no forwarding: no root-path-cost: 10 designated-bridge: 06000.00:0C:29:91:EF:01 designated-cost: 0 designated-port-number: 3

Another Scenario
Contoh penerapan teknik bridging pada jaringan yang terhubung ke Internet dapat dilihat pada gambar berikut :

Topologi di atas menginginkan sebuah segmen jaringan 192.168.2.0/24 berada pada dua router yang berbeda. Untuk menggabungkan jaringan 192.168.2.0/24 yang ada pada ether3 Router A dan jaringan 192.168.2.0/24 yang ada pada ether2 Router B, maka digunakanlah teknik bridging. IP Address yang akan berfungsi sebagai gateway pada jaringan 192.168.2.0/24 cukup berada pada salah satu interface saja. Pada Router A, konfigurasi yang harus dilakukan adalah sebagai berikut : [admin@Router A] > interface bridge add name=bridge-1 protocol-mode=rstp priority=07000 [admin@Router A] > interface bridge print Flags: X disabled, R running

R name=bridge-1 mtu=1500 l2mtu=65535 arp=enabled mac-address=00:00:00:00:00:00

protocol-mode=rstp priority=07000 auto-mac=yes admin-mac=00:00:00:00:00:00 maxmessage-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router A] > interface bridge port add interface=ether3 bridge=bridge-1 [admin@Router A] > interface bridge port add interface=ether5 bridge=bridge-1 [admin@Router A] > interface bridge port print Flags: X disabled, I inactive, D dynamic # 0 1 INTERFACE ether3 ether5 BRIDGE bridge-1 bridge-1 080 080 PRIORITY PATH-COST HORIZON 10 10 none none

Sedangkan pada Router B, konfigurasi yang harus dilakukan adalah

[admin@Router B] > interface bridge add name=bridge-1 protocol-mode=rstp [admin@Router B] > interface bridge print Flags: X disabled, R running 0 R name=bridge-1 mtu=1500 l2mtu=65535 arp=enabled mac-address=00:00:00:00:00:00

protocol-mode=rstp priority=08000 auto-mac=yes admin-mac=00:00:00:00:00:00 maxmessage-age=20s forward-delay=15s transmit-hold-count=6 ageing-time=5m

[admin@Router B] > interface bridge port add interface=ether2 bridge=bridge-1 [admin@Router B] > interface bridge port add interface=ether5 bridge=bridge-1 [admin@Router B] > interface bridge port print Flags: X disabled, I inactive, D dynamic # 0 1 INTERFACE ether2 ether5 BRIDGE bridge-1 bridge-1 080 080 PRIORITY PATH-COST HORIZON 10 10 none none

Pada interface ether2 Router B, tidak perlu diberikan IP Address. [admin@Router B] > ip add print Flags: X disabled, I invalid, D dynamic # ADDRESS NETWORK BROADCAST INTERFACE

0 10.10.10.2/29

10.10.10.0

10.10.10.7

ether1

1 192.168.4.1/24

192.168.4.0

192.168.4.255 ether3