Konfigurasi Bridge pada Router MikroTik

mikrotik_logo_newBasic Configuration

Teknik bridge (bridging) adalah teknik memasukan atau menggabungkan beberapa interface router menjadi satu segmen jaringan (satu broadcast domain). Artikel ini akan membahas konfigurasi bridge pada Router MikroTik.

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 protocol-mode=none
      priority=0x8000 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
 #    INTERFACE                    BRIDGE                    PRIORITY PATH-COST  HORIZON  
 0    ether1                       bridge-1                  0x80     10         none     
 1    ether2                       bridge-1                  0x80     10         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 protocol-mode=none
      priority=0x8000 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 protocol-mode=none
      priority=0x8000 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=0x8000 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=0x7000


[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=0x7000 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    ether1                 bridge-1            0x80     10         none     
 1    ether2                 bridge-1            0x80     10         none     
 2    ether3                 bridge-1            0x80     10         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=0x8000 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=0x8000

 

[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=0x8000 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    ether1                  bridge-1            0x80     10         none     
 1    ether2                  bridge-1            0x80     10         none     
 2    ether3                  bridge-1            0x80     10         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=0x6000 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: 0x6000.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
 #    INTERFACE            BRIDGE                      PRIORITY PATH-COST  HORIZON  
 0    ether1              bridge-1                       0x80     10         none     
 1    ether2              bridge-1                       0x80     10         none     
 2    ether3              bridge-1                       0x80     10         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=0x8000 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: 0x6000.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
 #    INTERFACE               BRIDGE              PRIORITY PATH-COST  HORIZON  
 0    ether1                  bridge-1            0x80     10         none     
 1    ether2                  bridge-1            0x80     10         none     
 2    ether3                  bridge-1            0x80     10         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: 0x6000.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: 0x6000.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=0x7000

[admin@Router A] > 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=0x7000 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=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
 #    INTERFACE        BRIDGE               PRIORITY PATH-COST  HORIZON  
 0    ether3           bridge-1               0x80     10         none     
 1    ether5           bridge-1               0x80     10         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=0x8000 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=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
 #    INTERFACE             BRIDGE       PRIORITY PATH-COST  HORIZON  
 0    ether2               bridge-1      0x80     10         none     
 1    ether5               bridge-1      0x80     10         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

 

keyword : bridge, bridging, konfigurasi bridge pada router mikrotik

 
.

Leave a Reply

Your email address will not be published. Required fields are marked *