networking:cisco:trunk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:cisco:trunk [2026/02/02 23:17] – [Topologi] ilyasanetworking:cisco:trunk [2026/02/02 23:28] (current) – [Testing] ilyasa
Line 27: Line 27:
   * VLAN 20 - PC3,PC4,PC7,PC8 (MAGENTA)   * VLAN 20 - PC3,PC4,PC7,PC8 (MAGENTA)
 ===== Konfigurasi ===== ===== Konfigurasi =====
-  * **Step 1 : Pembuatan VLANs**+===== Konfigurasi  VLANs===== 
 +  * **Step 1 : Menset vlan 10,20 pada masing masing switch**
 <code> <code>
-Switch(config)#vlan 10 +SW1(config)#vlan 10 
-Switch(config-vlan)#name BIRU +SW1(config-vlan)#name BIRU 
-Switch(config-vlan)#exit+SW1(config-vlan)#exit 
 +SW1(config)#vlan 20 
 +SW1(config-vlan)#name MAGENTA 
 +SW1(config-vlan)#exit 
 +</code> 
 +<code> 
 +SW2(config)#vlan 10 
 +SW2(config-vlan)#name BIRU 
 +SW2(config-vlan)#exit 
 +SW2(config)#vlan 20 
 +SW2(config-vlan)#name MAGENTA 
 +SW2(config-vlan)#exit 
 +</code>
  
-Switch(config)#vlan 20 +  * **Step 2 : Mengatur ports sesuai VLAN.** 
-Switch(config-vlan)#name MAGENTA +<code> 
-Switch(config-vlan)#exit+SW1(config)#interface range f0/1-2 
 +SW1(config-if-range)#switchport mode access 
 +SW1(config-if-range)#switchport access vlan 10 
 +SW1(config)#interface range f0/3-4 
 +SW1(config-if-range)#switchport mode access 
 +SW1(config-if-range)#switchport access vlan 20
 </code> </code>
-  * **Step 2 : Assign VLANs ke Ports** 
 <code> <code>
-Switch(config)#interface f0/1 +SW2(config)#interface range f0/1-2 
-Switch(config-if)#switchport mode access  +SW2(config-if-range)#switchport mode access 
-Switch(config-if)#switchport access vlan 10 +SW2(config-if-range)#switchport access vlan 10 
-Switch(config-if)#exit+SW2(config-if-range)#exit 
 +SW2(config)#interface range f0/3-4 
 +SW2(config-if-range)#switchport mode access 
 +SW2(config-if-range)#switchport access vlan 20 
 +</code>
  
-Switch(config)#interface f0/2 +===== Konfigurasi  Trunk===== 
-Switch(config-if)#switchport mode access  +  * **Step 1 : Mengatur trunk pada sisi SW1.** 
-Switch(config-if)#switchport access vlan 10 + 
-Switch(config-if)#exit+<code> 
 +SW1(config)#interface g0/1 
 +SW1(config-if)#switchport mode trunk 
 +SW1(config-if)#do show interfaces trunk 
 +Port        Mode         Encapsulation  Status        Native vlan 
 +Gig0/     on           802.1q         trunking      1 
 + 
 +Port        Vlans allowed on trunk 
 +Gig0/     1-1005 
 + 
 +Port        Vlans allowed and active in management domain 
 +Gig0/     1,10,20 
 + 
 +Port        Vlans in spanning tree forwarding state and not pruned 
 +Gig0/     1,10,20 
 + 
 +SW1(config-if)#switchport trunk allowed vlan 10,20 
 +SW1(config-if)#do show interfaces trunk 
 +Port        Mode         Encapsulation  Status        Native vlan 
 +Gig0/     on           802.1q         trunking      1 
 + 
 +Port        Vlans allowed on trunk 
 +Gig0/     10,20 
 + 
 +Port        Vlans allowed and active in management domain 
 +Gig0/     10,20 
 + 
 +Port        Vlans in spanning tree forwarding state and not pruned 
 +Gig0/     20 
 + 
 +SW1(config-if)#exit 
 +</code> 
 + 
 +  * **Step 2 : Mengatur trunk pada sisi SW2.** 
 + 
 +<code> 
 +SW2(config)#interface g0/1 
 +SW2(config-if)#switchport mode trunk 
 +SW2(config-if)#switchport trunk allowed vlan 10,20 
 +SW2(config-if)#
 </code> </code>
  
 ===== Testing ===== ===== Testing =====
 +  * **PC1 -> PC6,PC8**
 +<code>
 +C:\>ping 192.168.1.4
 +
 +Pinging 192.168.1.4 with 32 bytes of data:
 +
 +Reply from 192.168.1.4: bytes=32 time<1ms TTL=128
 +Reply from 192.168.1.4: bytes=32 time<1ms TTL=128
 +Reply from 192.168.1.4: bytes=32 time<1ms TTL=128
 +Reply from 192.168.1.4: bytes=32 time<1ms TTL=128
 +
 +Ping statistics for 192.168.1.4:
 +    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
 +Approximate round trip times in milli-seconds:
 +    Minimum = 0ms, Maximum = 0ms, Average = 0ms
 +
 +C:\>ping 192.168.2.4
 +
 +Pinging 192.168.2.4 with 32 bytes of data:
 +
 +Request timed out.
 +Request timed out.
 +Request timed out.
 +Request timed out.
 +
 +Ping statistics for 192.168.2.4:
 +    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
 +</code>
 +  * **PC3 -> PC6,PC8**
 +<code>
 +C:\>ping 192.168.1.4
 +
 +Pinging 192.168.1.4 with 32 bytes of data:
 +
 +Request timed out.
 +Request timed out.
 +Request timed out.
 +Request timed out.
 +
 +Ping statistics for 192.168.1.4:
 +    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
 +
 +C:\>ping 192.168.2.4
 +
 +Pinging 192.168.2.4 with 32 bytes of data:
 +
 +Reply from 192.168.2.4: bytes=32 time<1ms TTL=128
 +Reply from 192.168.2.4: bytes=32 time<1ms TTL=128
 +Reply from 192.168.2.4: bytes=32 time<1ms TTL=128
 +Reply from 192.168.2.4: bytes=32 time<1ms TTL=128
 +
 +Ping statistics for 192.168.2.4:
 +    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
 +Approximate round trip times in milli-seconds:
 +    Minimum = 0ms, Maximum = 0ms, Average = 0ms
 +</code>
  • networking/cisco/trunk.1770049068.txt.gz
  • Last modified: 2026/02/02 23:17
  • by ilyasa