Lab.10 Cara Menggunakan Switch Sebagai Router
kita akan menggunakan Switch layer 3 yang dapat dilihat dari gambar dibawah
Pertama kita buat VLAN 10 dan VLAN 20
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
dan setting agar
Fa0/1 dan Fa0/2 ke VLAN 10
Switch(config-vlan)#interface fa0/1
Switch(config-if)#sw acc vlan 10
Switch(config-if)#interface fa0/2
Switch(config-if)#sw acc vlan 10
Fa0/3 dan Fa0/3 ke VLAN 20
Switch(config-if)#interface fa0/3
Switch(config-if)#sw acc vlan 20
Switch(config-if)#interface fa0/4
Switch(config-if)#sw acc vlan 20
Beri IP pada VLAN 10
Switch(config-if)#int vlan 10
Switch(config-if)#ip add 10.10.10.1 255.255.255.0
Beri IP pada VLAN 20
Switch(config-if)#int vlan 20
Switch(config-if)#ip add 20.20.20.1 255.255.255.0
Aktifkan IP Routing agar bisa meroutingkan antar VLAN yang berbeda
Switch(config-if)#ip routing
Lalu Set Manual PC pada VLAN 10 ber IP 10.10.10.0/24 dan PC pada VLAN 20 ber IP 20.20.20.0/24
Jika sudah, maka kita coba test ping dari PC ke Gateway.
Switch(config)#do show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/1 unassigned YES unset up up
FastEthernet0/2 unassigned YES unset up up
FastEthernet0/3 unassigned YES unset up up
FastEthernet0/4 unassigned YES unset up up
FastEthernet0/5 unassigned YES unset down down
FastEthernet0/6 unassigned YES unset down down
FastEthernet0/7 unassigned YES unset down down
FastEthernet0/8 unassigned YES unset down down
FastEthernet0/9 unassigned YES unset down down
FastEthernet0/10 unassigned YES unset down down
FastEthernet0/11 unassigned YES unset down down
FastEthernet0/12 unassigned YES unset down down
FastEthernet0/13 unassigned YES unset down down
FastEthernet0/14 unassigned YES unset down down
FastEthernet0/15 unassigned YES unset down down
FastEthernet0/16 unassigned YES unset down down
FastEthernet0/17 unassigned YES unset down down
FastEthernet0/18 unassigned YES unset down down
FastEthernet0/19 unassigned YES unset down down
FastEthernet0/20 unassigned YES unset down down
FastEthernet0/21 unassigned YES unset down down
FastEthernet0/22 unassigned YES unset down down
FastEthernet0/23 unassigned YES unset down down
FastEthernet0/24 unassigned YES unset down down
GigabitEthernet0/1 unassigned YES unset down down
GigabitEthernet0/2 unassigned YES unset down down
Vlan1 unassigned YES unset administratively down down
Vlan10 10.10.10.1 YES manual up up
Vlan20 20.20.20.1 YES manual up up
Switch(config)#
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
dan setting agar
Fa0/1 dan Fa0/2 ke VLAN 10
Switch(config-vlan)#interface fa0/1
Switch(config-if)#sw acc vlan 10
Switch(config-if)#interface fa0/2
Switch(config-if)#sw acc vlan 10
Fa0/3 dan Fa0/3 ke VLAN 20
Switch(config-if)#interface fa0/3
Switch(config-if)#sw acc vlan 20
Switch(config-if)#interface fa0/4
Switch(config-if)#sw acc vlan 20
Beri IP pada VLAN 10
Switch(config-if)#int vlan 10
Switch(config-if)#ip add 10.10.10.1 255.255.255.0
Beri IP pada VLAN 20
Switch(config-if)#int vlan 20
Switch(config-if)#ip add 20.20.20.1 255.255.255.0
Aktifkan IP Routing agar bisa meroutingkan antar VLAN yang berbeda
Switch(config-if)#ip routing
Lalu Set Manual PC pada VLAN 10 ber IP 10.10.10.0/24 dan PC pada VLAN 20 ber IP 20.20.20.0/24
Jika sudah, maka kita coba test ping dari PC ke Gateway.
Switch(config)#do show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/1 unassigned YES unset up up
FastEthernet0/2 unassigned YES unset up up
FastEthernet0/3 unassigned YES unset up up
FastEthernet0/4 unassigned YES unset up up
FastEthernet0/5 unassigned YES unset down down
FastEthernet0/6 unassigned YES unset down down
FastEthernet0/7 unassigned YES unset down down
FastEthernet0/8 unassigned YES unset down down
FastEthernet0/9 unassigned YES unset down down
FastEthernet0/10 unassigned YES unset down down
FastEthernet0/11 unassigned YES unset down down
FastEthernet0/12 unassigned YES unset down down
FastEthernet0/13 unassigned YES unset down down
FastEthernet0/14 unassigned YES unset down down
FastEthernet0/15 unassigned YES unset down down
FastEthernet0/16 unassigned YES unset down down
FastEthernet0/17 unassigned YES unset down down
FastEthernet0/18 unassigned YES unset down down
FastEthernet0/19 unassigned YES unset down down
FastEthernet0/20 unassigned YES unset down down
FastEthernet0/21 unassigned YES unset down down
FastEthernet0/22 unassigned YES unset down down
FastEthernet0/23 unassigned YES unset down down
FastEthernet0/24 unassigned YES unset down down
GigabitEthernet0/1 unassigned YES unset down down
GigabitEthernet0/2 unassigned YES unset down down
Vlan1 unassigned YES unset administratively down down
Vlan10 10.10.10.1 YES manual up up
Vlan20 20.20.20.1 YES manual up up
Switch(config)#
0 comments