Switching Lab 2 : Inter Vlan Routing

Switching Lab 2 : Inter Vlan Routing

  • 15 September 2021
  • Network
  • Ditulis oleh Ajriya Muhammad Arkan
  • 501 Views

Tambahkan PC-3 dan Router. Kita buat vlan 20 serta daftarkan ke port e0/2 

SW-1
SW-KANAN(config)#vlan 20 
SW-KANAN(config-vlan)#name Pelajar 
SW-KANAN(config-vlan)#exit 
SW-KANAN(config)#int e0/2 
SW-KANAN(config-if)#switchport mode access 
SW-KANAN(config-if)#switcport access vlan 20 
SW-KANAN(config-if)#exit 
SW-KANAN(config)#int e0/1 
SW-KANAN(config-if)#switchport trunk allowed vlan 20 
SW-KANAN(config-if)#exit

 Kita konfigurasi trunk ke arah R1 

SW1
SW-KIRI(config)#int e0/2 
SW-KIRI(config-if)#switchport trunk encapsulation dot1q 
SW-KIRI(config-if)#switchport mode trunk 
SW-KIRI(config-if)#switchport trunk allowed vlan 10,20 
SW-KIRI(config-if)#exit 
SW-KIRI(config)#int e0/1 
SW-KIRI(config-if)#switchport trunk allowed vlan add 20 
SW-KIRI(config-if)#exit

Kita lakukan konfigurasi pada R1

R1
R1(config)#int e0/0 
R1(config-if)#no shutdown 
R1(config-if)#duplex full

R1(config)#int e0/0.10 
R1(config-subif)#encapsulation dot1q 10 
R1(config-subif)#ip add 192.168.10.254 255.255.255.0 
R1(config-subif)#exit 

R1(config)#int f0/0.20 
R1(config-subif)#encapsulation dot1Q 20 
R1(config-subif)#ip add 192.168.20.254 255.255.255.0 
R1(config-subif)#exit 

Selanjutnya kita isi gateway pada setiap PC dan tes ping ke gateway 

PC1
PC1> ip 192.168.10.1/24 192.168.10.254 
Checking for duplicate address... 
PC1 : 192.168.10.1 255.255.255.0 gateway 192.168.10.254

PC1> ping 192.168.10.254 
84 bytes from 192.168.10.254 icmp_seq=1 ttl=255 time=41.136 ms 
84 bytes from 192.168.10.254 icmp_seq=2 ttl=255 time=12.315 ms 

PC2
PC2> ip 192.168.10.2/24 192.168.10.254 
Checking for duplicate address... 
PC2 : 192.168.10.2 255.255.255.0 gateway 192.168.10.254 

PC2> ping 192.168.10.254 
84 bytes from 192.168.10.254 icmp_seq=1 ttl=255 time=9.939 ms 
84 bytes from 192.168.10.254 icmp_seq=2 ttl=255 time=2.251 ms

PC3
PC3> ip 192.168.20.1/24 192.168.20.254 
Checking for duplicate address... 
PC1 : 192.168.20.1 255.255.255.0 gateway 192.168.20.254 

PC3> ping 192.168.20.254 
host (192.168.20.254) not reachable

Hasil ping dari PC3 ke R1 masih gagal, karena pada SW-KIRI belum kita setting vlan 20. Kita verifikasi pada SW-KIRI

SW-KIRI
SW-KIRI(config)#do show vlan brief 
VLAN Name Status Ports 
---- -------------------------------- --------- ------------------------------- 
1 default active Et0/3, Et1/0, Et1/1, Et1/2 
                 Et1/3, Et2/0, Et2/1, Et2/2 
                 Et2/3, Et3/0, Et3/1, Et3/2 
                 Et3/3 
10 Engineer active Et0/0 
1002 fddi-default act/unsup 
1003 token-ring-default act/unsup 
1004 fddinet-default act/unsup 
1005 trnet-default act/unsup

Pada SW-KIRI tidak ada vlan 20, sehingga packet dari SW-KANAN tidak bisa lewat ke SW-KIRI. Untuk itu, konfigurasikan vlan 20 dan tidak perlu di assign kemana-mana.

SW-KIRI
SW-KIRI#vlan database 
SW-KIRI(vlan)#vlan 20 name Pelajar 
VLAN 20 added: Name: Pelajar 
SW-KIRI(vlan)#exit

Tes ping lagi

PC3
PC3> ping 192.168.20.254 
84 bytes from 192.168.20.254 icmp_seq=1 ttl=255 time=51.679 ms 
84 bytes from 192.168.20.254 icmp_seq=2 ttl=255 time=8.270 ms

Pingnya berhasil. Selanjutnya kita verifikasi pada R1

R1
R1#sh ip int brief | i up 
FastEthernet0/0 unassigned YES unset up up 
FastEthernet0/0.10 192.168.10.254 YES manual up up 
FastEthernet0/0.20 192.168.20.254 YES manual up up

R1#show cdp neighbors 
Device ID Local Intrfce Holdtme Capability Platform Port ID 
ESW1       Fas 0/0       169       S I       2691   Fas 1/2 

SW1
SW1#sh vlan-switch brief 
VLAN Name Status Ports 
---- -------------------------------- --------- ------------------------------- 
1 default active Fa1/3, Fa1/4, Fa1/5, Fa1/6 
                 Fa1/7, Fa1/8, Fa1/9, Fa1/10 
                 Fa1/11, Fa1/12, Fa1/13, Fa1/14 
                 Fa1/15 
10 Engineer active Fa1/0 20 Pelajar active 
1002 fddi-default active 
1003 token-ring-default active 
1004 fddinet-default active 
1005 trnet-default active

SW2
SW2#sh vlan-switch brief 
VLAN Name Status Ports 
---- -------------------------------- --------- ------------------------------- 
1 default active Fa1/3, Fa1/4, Fa1/5, Fa1/6 
                 Fa1/7, Fa1/8, Fa1/9, Fa1/10 
                 Fa1/11, Fa1/12, Fa1/13, Fa1/14 
                 Fa1/15 
10 Engineer active Fa1/0 20 Pelajar active Fa1/2 
1002 fddi-default active 
1003 token-ring-default active 
1004 fddinet-default active 
1005 trnet-default active 

SW2
SW2#sh int trunk 
Port Mode Encapsulation Status Native vlan 
Fa1/1 on 802.1q trunking 1 
Port Vlans allowed on trunk 
Fa1/1 1-2,10,20,1002-1005 
Port Vlans allowed and active in management domain 
Fa1/1 1,10,20 
Port Vlans in spanning tree forwarding state and not pruned 
Fa1/1 1,10,20 

PC3
PC3> ping 192.168.10.1 
84 bytes from 192.168.10.1 icmp_seq=1 ttl=63 time=19.854 ms 
84 bytes from 192.168.10.1 icmp_seq=2 ttl=63 time=21.234 ms

Comm

  • Tags:
  • -
  • Share: