BRIDGING
Kali ini kita akan ngelab dengan topik bahasan yakni bridging.
Kapan kita menggunakan bridging? Yakni ketika kita hendak menggabungkan dua atau lebih inerface menjadi seolah-olah satu interface, atau kadang bisa kita gunakan untuk menggabungkan dua network yang berbeda. Sebenarnya ada cara lain untuk menghubungkan network yang berbeda, yakni routing. Routing merupakan cara yang paling saya anjurkan. Namun kali ini kita akan membahas tentang bridging.
Adapung topologi yang akan kita gunakan adalah seperti pada gambar dibawah ini.Baik, kita mulai saja labingnya. Pertama, pastikan IP Address pada router sudah di pasang.
[admin@MikroTik] > system identity set name=IDN_R1 [admin@IDN_R1] > ip address add address=12.12.12.1/24 interface=ether2 [admin@IDN_R1] > ip address add address=192.168.1.1/24 interface=ether1 [admin@IDN_R1] > ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK INTERFACE 0 12.12.12.1/24 12.12.12.0 ether2 1 192.168.1.1/24 192.168.1.0 ether1 [admin@IDN_R1] >
Sama halnya dengan router IDN_R1, pastikan pula kita telah memberikan ip address pada IDN_R2.
[admin@MikroTik] > system identity set name=IDN_R2 [admin@IDN_R2] > ip address add address=12.12.12.2/24 interface=ether1 [admin@IDN_R2] > ip address add ad=192.168.2.1/24 interface=ether2 [admin@IDN_R2] > ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK INTERFACE 0 12.12.12.2/24 12.12.12.0 ether1 1 192.168.2.1/24 192.168.2.0 ether2 [admin@IDN_R2] >
Pada komputer client pun sama, berikan ip address pada computer client .
PC1> 192.168.1.3/24 192.168.1.1 Checking for duplicate address... PC1 : 192.168.1.3 255.255.255.0 gateway 192.168.1.1 PC2> ip 192.168.1.2/24 192.168.1.1 Checking for duplicate address... PC1 : 192.168.1.2 255.255.255.0 gateway 192.168.1.1 PC3> ip 192.168.2.2/24 192.168.2.1 Checking for duplicate address... PC1 : 192.168.2.2 255.255.255.0 gateway 192.168.2.1 PC4> ip 192.168.2.3/24 192.168.2.1 Checking for duplicate address... PC1 : 192.168.2.3 255.255.255.0 gateway 192.168.2.1
Cek IP Address pada masing-komputer client.
PC1> sh ip NAME : PC1[1] IP/MASK : 192.168.1.3/24 GATEWAY : 192.168.1.1 DNS : 8.8.8.8 8.8.4.4 DHCP SERVER : 192.168.1.1 DHCP LEASE : 626, 900/450/787 MAC : 00:50:79:66:68:00 LPORT : 10005 RHOST:PORT : 127.0.0.1:10004 MTU : 1500 PC1> PC2> sh ip NAME : PC2[1] IP/MASK : 192.168.1.2/24 GATEWAY : 192.168.1.1 DNS : 8.8.8.8 8.8.4.4 DHCP SERVER : 192.168.1.1 DHCP LEASE : 645, 900/450/787 MAC : 00:50:79:66:68:01 LPORT : 10007 RHOST:PORT : 127.0.0.1:10006 MTU : 1500 PC2> PC3> sh ip NAME : PC3[1] IP/MASK : 192.168.2.2/24 GATEWAY : 192.168.2.1 DNS : 8.8.8.8 8.8.4.4 DHCP SERVER : 192.168.2.1 DHCP LEASE : 677, 900/450/787 MAC : 00:50:79:66:68:02 LPORT : 10011 RHOST:PORT : 127.0.0.1:10010 MTU : 1500 PC3> PC4> sh ip NAME : PC4[1] IP/MASK : 192.168.2.3/24 GATEWAY : 192.168.2.1 DNS : 8.8.8.8 8.8.4.4 DHCP SERVER : 192.168.2.1 DHCP LEASE : 661, 900/450/787 MAC : 00:50:79:66:68:03 LPORT : 10013 RHOST:PORT : 127.0.0.1:10012 MTU : 1500 PC4>
Okee, sekarang kita coba untuk melakukan testing koneksi antar PC Client dengan melakukan PING
PC1> ping 192.168.2.2 *192.168.1.1 icmp_seq=1 ttl=64 time=0.783 ms (ICMP type:3, code:0, Destination network unreachable) *192.168.1.1 icmp_seq=2 ttl=64 time=0.698 ms (ICMP type:3, code:0, Destination network unreachable) *192.168.1.1 icmp_seq=3 ttl=64 time=0.940 ms (ICMP type:3, code:0, Destination network unreachable) ^C PC1> PC4> ping 192.168.1.3 *192.168.2.1 icmp_seq=1 ttl=64 time=17.159 ms (ICMP type:3, code:0, Destination network unreachable) *192.168.2.1 icmp_seq=2 ttl=64 time=1.044 ms (ICMP type:3, code:0, Destination network unreachable) ^C PC4>
Pada percobaan PING diatas, terlihat bahwa PING tidak berjalan sebagaimana yang kita harapkan, karena akan memberikan reply Destination network unreachable.
Maka dari itu, kita tambahkan interface bridge, dan berikan ip address pada interface bridge tersebut. Dengan adanya interface bridge ini, maka kedua router tersebut berada dalam satu network, sehingg kita tidak perlu melakukan routing.
Maka kita buat interface bridging sehingga topologinya menjadi seperti pada gambar dibawah ini.
Baik, kita mulai melakukan konfigurasi bridging dengan menambahkan interface bridge. Kita mulai dengan IDN_R1.
[admin@IDN_R1] > interface bridge add name=bridge1 [admin@IDN_R1] > interface print Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE MTU L2MTU MAX-L2MTU MAC-ADDRESS 0 RS ether1 ether 1500 00:15:D2:DF:3F:00 1 RS ether2 ether 1500 00:15:D2:DF:3F:01 2 R ether3 ether 1500 00:15:D2:DF:3F:02 3 R ether4 ether 1500 00:15:D2:DF:3F:03 4 R ether5 ether 1500 00:15:D2:DF:3F:04 5 R ether6 ether 1500 00:15:D2:DF:3F:05 6 R ether7 ether 1500 00:15:D2:DF:3F:06 7 R bridge1 bridge 1500 65535 00:15:D2:DF:3F:00 [admin@IDN_R1] >
Selanjutnya, tambahkan interface yang akan kita bridge ke bridge port.
[admin@IDN_R1] > interface bridge port add interface=ether1 bridge=bridge1 [admin@IDN_R1] > interface bridge port add interface=ether2 bridge=bridge1 [admin@IDN_R1] > interface bridge port print Flags: X - disabled, I - inactive, D - dynamic # INTERFACE BRIDGE PRIORITY PATH-COST HORIZON 0 ether1 bridge1 0x80 10 none 1 ether2 bridge1 0x80 10 none [admin@IDN_R1] >
Lakukakan hal yang sama pada router IDN_R2. Kita buat juga interface bridge.
[admin@IDN_R2] > interface bridge add name=bridge1 [admin@IDN_R2] > interface print Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE MTU L2MTU MAX-L2MTU MAC-ADDRESS 0 R ether1 ether 1500 00:15:D2:E1:A6:00 1 R ether2 ether 1500 00:15:D2:E1:A6:01 2 R ether3 ether 1500 00:15:D2:E1:A6:02 3 R ether4 ether 1500 00:15:D2:E1:A6:03 4 R ether5 ether 1500 00:15:D2:E1:A6:04 5 R ether6 ether 1500 00:15:D2:E1:A6:05 6 R ether7 ether 1500 00:15:D2:E1:A6:06 7 R bridge1 bridge 1500 65535 00:00:00:00:00:00
Dan kemudian kita masukkan ke interface pada IDN_R1 yang akan kita bridge.
[admin@IDN_R2] > interface bridge port add interface=ether1 bridge=bridge1 [admin@IDN_R2] > interface bridge port add interface=ether2 bridge=bridge1 [admin@IDN_R2] > interface bridge port print Flags: X - disabled, I - inactive, D - dynamic # INTERFACE BRIDGE PRIORITY PATH-COST HORIZON 0 ether1 bridge1 0x80 10 none 1 ether2
Selanjutnya, berikan ip address pada interface bridge yang sudah kita buat sebelumnya. Kita mulai dengan IDN_R1.
[admin@IDN_R1] > ip address add address=21.21.21.1/24 interface=bridge1 [admin@IDN_R1] > ip address pe bad command name pe (line 1 column 12) [admin@IDN_R1] > ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK INTERFACE 0 12.12.12.1/24 12.12.12.0 ether2 1 192.168.1.1/24 192.168.1.0 ether1 2 21.21.21.1/24 21.21.21.0 bridge1 [admin@IDN_R1] >
Kita lanjutkan dengan IDN_R2. Berikan ip address pada interface bridge.
[admin@IDN_R2] > ip address add address=21.21.21.2/24 interface=bridge1 [admin@IDN_R2] > ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK INTERFACE 0 12.12.12.2/24 12.12.12.0 ether1 1 192.168.2.1/24 192.168.2.0 ether2 2 21.21.21.2/24 21.21.21.0 bridge1 [admin@IDN_R2] >
Selanjutnya, pada PC Client pun kita ganti IP Addressnya, dan kita berikan IP Address yang berada dalam satu network dengan IP Address di pada interface bridge pada masing-masing router sebagaimana yang telah kita set sebelumnya.
PC1> sh ip NAME : PC1[1] IP/MASK : 21.21.21.3/24 GATEWAY : 21.21.21.1 DNS : MAC : 00:50:79:66:68:00 LPORT : 10019 RHOST:PORT : 127.0.0.1:10018 MTU : 1500 PC1> PC2> sh ip NAME : PC2[1] IP/MASK : 21.21.21.4/24 GATEWAY : 21.21.21.1 DNS : MAC : 00:50:79:66:68:01 LPORT : 10021 RHOST:PORT : 127.0.0.1:10020 MTU : 1500 PC2> PC3> sh ip NAME : PC3[1] IP/MASK : 21.21.21.5/24 GATEWAY : 21.21.21.2 DNS : MAC : 00:50:79:66:68:02 LPORT : 10007 RHOST:PORT : 127.0.0.1:10006 MTU : 1500 PC3> PC4> sh ip NAME : PC4[1] IP/MASK : 21.21.21.6/24 GATEWAY : 21.21.21.2 DNS : MAC : 00:50:79:66:68:03 LPORT : 10009 RHOST:PORT : 127.0.0.1:10008 MTU : 1500
Sekarang, coba lakukan PING.
[admin@IDN_R1] > ping 21.21.21.1 HOST SIZE TTL TIME STATUS 21.21.21.1 56 64 18ms 21.21.21.1 56 64 6ms sent=2 received=2 packet-loss=0% min-rtt=6ms avg-rtt=12ms max-rtt=18ms [admin@IDN_R1] > ping 21.21.21.2 HOST SIZE TTL TIME STATUS 21.21.21.2 56 64 16ms 21.21.21.2 56 64 2ms sent=2 received=2 packet-loss=0% min-rtt=2ms avg-rtt=9ms max-rtt=16ms [admin@IDN_R1] > ping 21.21.21.3 HOST SIZE TTL TIME STATUS 21.21.21.3 56 64 5ms 21.21.21.3 56 64 1ms sent=2 received=2 packet-loss=0% min-rtt=1ms avg-rtt=3ms max-rtt=5ms [admin@IDN_R1] > ping 21.21.21.5 HOST SIZE TTL TIME STATUS 21.21.21.5 56 64 1ms 21.21.21.5 56 64 2ms sent=2 received=2 packet-loss=0% min-rtt=1ms avg-rtt=1ms max-rtt=2ms [admin@IDN_R1] > ping 21.21.21.6 HOST SIZE TTL TIME STATUS 21.21.21.6 56 64 31ms 21.21.21.6 56 64 3ms sent=2 received=2 packet-loss=0% min-rtt=3ms avg-rtt=17ms max-rtt=31ms [admin@IDN_R1] > [admin@IDN_R2] > ping 21.21.21.1 HOST SIZE TTL TIME STATUS 21.21.21.1 56 64 16ms 21.21.21.1 56 64 3ms sent=2 received=2 packet-loss=0% min-rtt=3ms avg-rtt=9ms max-rtt=16ms [admin@IDN_R2] > ping 21.21.21.2 HOST SIZE TTL TIME STATUS 21.21.21.2 56 64 7ms 21.21.21.2 56 64 7ms sent=2 received=2 packet-loss=0% min-rtt=7ms avg-rtt=7ms max-rtt=7ms [admin@IDN_R2] > ping 21.21.21.3 HOST SIZE TTL TIME STATUS 21.21.21.3 56 64 6ms 21.21.21.3 56 64 2ms sent=2 received=2 packet-loss=0% min-rtt=2ms avg-rtt=4ms max-rtt=6ms [admin@IDN_R2] > ping 21.21.21.4 HOST SIZE TTL TIME STATUS 21.21.21.4 56 64 10ms 21.21.21.4 56 64 5ms sent=2 received=2 packet-loss=0% min-rtt=5ms avg-rtt=7ms max-rtt=10ms [admin@IDN_R2] > ping 21.21.21.5 HOST SIZE TTL TIME STATUS 21.21.21.5 56 64 5ms sent=1 received=1 packet-loss=0% min-rtt=5ms avg-rtt=5ms max-rtt=5ms [admin@IDN_R2] > ping 21.21.21.6 HOST SIZE TTL TIME STATUS 21.21.21.6 56 64 4ms 21.21.21.6 56 64 1ms sent=2 received=2 packet-loss=0% min-rtt=1ms avg-rtt=2ms max-rtt=4ms [admin@IDN_R2] PC1> ping 21.21.21.1 84 bytes from 21.21.21.1 icmp_seq=1 ttl=64 time=17.161 ms 84 bytes from 21.21.21.1 icmp_seq=2 ttl=64 time=0.846 ms ^C PC1> ping 21.21.21.2 84 bytes from 21.21.21.2 icmp_seq=1 ttl=64 time=1.839 ms 84 bytes from 21.21.21.2 icmp_seq=2 ttl=64 time=1.483 ms ^C PC1> ping 21.21.21.3 21.21.21.3 icmp_seq=1 ttl=64 time=0.001 ms 21.21.21.3 icmp_seq=2 ttl=64 time=0.001 ms 21.21.21.3 icmp_seq=3 ttl=64 time=0.001 ms 21.21.21.3 icmp_seq=4 ttl=64 time=0.001 ms 21.21.21.3 icmp_seq=5 ttl=64 time=0.001 ms PC1> PC1> ping 21.21.21.4 84 bytes from 21.21.21.4 icmp_seq=1 ttl=64 time=0.210 ms 84 bytes from 21.21.21.4 icmp_seq=2 ttl=64 time=0.229 ms ^C PC1> ping 21.21.21.5 84 bytes from 21.21.21.5 icmp_seq=1 ttl=64 time=2.478 ms 84 bytes from 21.21.21.5 icmp_seq=2 ttl=64 time=2.283 ms ^C PC1> ping 21.21.21.6 84 bytes from 21.21.21.6 icmp_seq=1 ttl=64 time=1.561 ms 84 bytes from 21.21.21.6 icmp_seq=2 ttl=64 time=2.894 ms ^C PC1> PC3> ping 21.21.21.1 84 bytes from 21.21.21.1 icmp_seq=1 ttl=64 time=2.192 ms ^C PC3> ping 21.21.21.2 84 bytes from 21.21.21.2 icmp_seq=1 ttl=64 time=1.234 ms 84 bytes from 21.21.21.2 icmp_seq=2 ttl=64 time=0.785 ms ^C PC3> ping 21.21.21.3 84 bytes from 21.21.21.3 icmp_seq=1 ttl=64 time=2.451 ms 84 bytes from 21.21.21.3 icmp_seq=2 ttl=64 time=2.181 ms ^C PC3> ping 21.21.21.4 84 bytes from 21.21.21.4 icmp_seq=1 ttl=64 time=1.781 ms 84 bytes from 21.21.21.4 icmp_seq=2 ttl=64 time=2.342 ms ^C PC3> ping 21.21.21.5 21.21.21.5 icmp_seq=1 ttl=64 time=0.001 ms 21.21.21.5 icmp_seq=2 ttl=64 time=0.001 ms 21.21.21.5 icmp_seq=3 ttl=64 time=0.001 ms 21.21.21.5 icmp_seq=4 ttl=64 time=0.001 ms 21.21.21.5 icmp_seq=5 ttl=64 time=0.001 ms PC3> ping 21.21.21.6 84 bytes from 21.21.21.6 icmp_seq=1 ttl=64 time=0.775 ms 84 bytes from 21.21.21.6 icmp_seq=2 ttl=64 time=0.512 ms ^C PC3>
Jika Anda menemukan permasalahan berupa tidak PING, maka alternatif solusinya coba hapus IP Address pada interface ether 1 dan ether 2, sehingga pada masing-masing Router hanya ada IP Address interface bridge.
Sekian dulu, wasslamualaikum warah matullahi wabarakatuh.
No comments:
Post a Comment
Tak ada gading yang tak retak!!
Komentar dan masukan yang bersifat membangun selalu kami harapkan, demi kebaikan bersama.