Menghubungkan Router ke Switch
Apabila kita menghubungkan switch ke router dimana ada beberapa VLAN yang perlu di lewatkan maka pada switch di set trunk. namun jika pada switch terdapat 1 VLAN saja maka cukup diset access. kali ini karean kita ingin melewatkan bebrapa vlan yakni vlan 10 dan vlan 20, maka sisi switch diset trunk.
Konfigurasi pada Switch yang pertama
Switch>enSwitch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW2
SW2(config)#vlan 10
SW2(config-vlan)#name SISWA
SW2(config-vlan)#ex
SW2(config)#vlan 20
SW2(config-vlan)#name GURU
SW2(config-vlan)#ex
SW2(config)#
SW2(config)#int f0/2
SW2(config-if)#switchport access vlan 10
SW2(config-if)#ex
SW2(config)#int f0/3
SW2(config-if)#switchport access vlan 20
SW2(config-if)#ex
SW2(config)#%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/1 VLAN1.
%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/1 on VLAN0001. Inconsistent port type.
SW2(config)#int
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
% Incomplete command.
SW2(config)#int f0/1
SW2(config-if)#switchport mode trunk
SW2(config-if)#ex
Konfigurasi pada switch ke 2
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW1
SW1(config)#vlan 10
SW1(config-vlan)#name SISWA
SW1(config-vlan)#ex
SW1(config)#vlan 20
SW1(config-vlan)#name GURU
SW1(config-vlan)#ex
SW1(config)#int f0/4
SW1(config-if)#switchport mode access
SW1(config-if)#switchport acces vlan 10
SW1(config-if)#ex
SW1(config)#int f0/3
SW1(config-if)#switchport acces vlan 20
SW1(config-if)#ex
SW1(config)#int f0/2
SW1(config-if)#switchport mode trunk
SW1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
SW1(config-if)#ex
SW1(config)#int f0/1
SW1(config-if)#switchport mode trunk
SW1(config-if)#ex
SW1(config)#
Konfigurasi Router
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int f0/0
R1(config-if)#no shut
R1(config)#int f0/0.10
R1(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.10, changed state to up
R1(config-subif)#enc
R1(config-subif)#encapsulation dot
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip add 10.10.10.1 255.255.255.0
R1(config-subif)#ex
R1(config)#int f0/0.20
R1(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.20, changed state to up
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip add 20.20.20.1 255.255.255.0
R1(config-subif)#ex
R1(config)#ex
R1#
%SYS-5-CONFIG_I: Configured from console by console
cek konfigurasi router dan pastikan sudah benar dengan verifikasi :
R1#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up up
FastEthernet0/0.10 10.10.10.1 YES manual up up
FastEthernet0/0.20 20.20.20.1 YES manual up up
FastEthernet1/0 unassigned YES unset administratively down down
Serial2/0 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
FastEthernet5/0 unassigned YES unset administratively down down
R1#
Video lengkapnya bisa di liaht di youtube dibawah ini :
0 Response to "Menghubungkan Router ke Switch"
Post a Comment