networking:cisco:vlan

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:vlan [2026/02/02 12:58] – [Syntax] ilyasanetworking:cisco:vlan [2026/02/02 23:16] (current) – [Topologi] ilyasa
Line 1: Line 1:
- 
 {{indexmenu_n>030}} {{indexmenu_n>030}}
 ====== Cisco : VLAN ====== ====== Cisco : VLAN ======
 VLAN (Virtual Local Area Network) adalah sebuah metode untuk membagi satu jaringan komputer fisik menjadi beberapa jaringan virtual yang terpisah. Hal ini memungkinkan Anda untuk mengelompokkan komputer berdasarkan fungsi, departemen, atau proyek—tanpa harus mengubah kabel fisik yang sudah ada. VLAN (Virtual Local Area Network) adalah sebuah metode untuk membagi satu jaringan komputer fisik menjadi beberapa jaringan virtual yang terpisah. Hal ini memungkinkan Anda untuk mengelompokkan komputer berdasarkan fungsi, departemen, atau proyek—tanpa harus mengubah kabel fisik yang sudah ada.
-==== Syntax ==== +===== Syntax ===== 
-=== Membuat VLAN ===+==== Membuat VLAN ====
 ^ Command ^ Description ^ ^ Command ^ Description ^
 | ''S1(config)#vlan [vlan-ID]'' | Membuat VLAN baru dan menetapkan nomor VLAN | | ''S1(config)#vlan [vlan-ID]'' | Membuat VLAN baru dan menetapkan nomor VLAN |
Line 17: Line 16:
  name VLAN-Management  name VLAN-Management
 </code> </code>
-=== Assigning VLAN ke Interfaces ===+==== Assigning VLAN ke Interfaces ====
 Setelah VLAN dibuat, port switch dapat ditetapkan ke VLAN tertentu. Setelah VLAN dibuat, port switch dapat ditetapkan ke VLAN tertentu.
  
Line 37: Line 36:
 </code> </code>
  
-=== Menghapus VLAN ===+==== Menghapus VLAN ====
 ^ Command ^ Description ^ ^ Command ^ Description ^
 | ''S1(config)#no vlan [vlan-id]'' | Menghapus VLAN tertentu | | ''S1(config)#no vlan [vlan-id]'' | Menghapus VLAN tertentu |
 | ''S1(config)#delete flash:vlan.dat'' | Menghapus file database VLAN dari flash memory | | ''S1(config)#delete flash:vlan.dat'' | Menghapus file database VLAN dari flash memory |
-=== Menghapus VLAN dari Interface===+==== Menghapus VLAN dari Interface ====
 ^ Command ^ Description ^ ^ Command ^ Description ^
 | ''S1(config)#interface [int-id]'' | Masuk ke mode konfigurasi interface | | ''S1(config)#interface [int-id]'' | Masuk ke mode konfigurasi interface |
Line 50: Line 49:
  
  
-==== Topologi ====+===== Topologi ====
 +{{ :networking:cisco:cisco_vlan.png?nolink |}} 
 +"Sebelum konfigurasi VLAN, keempat end host berada dalam LAN yang sama (192.168.0.0/24) dan dapat saling berkomunikasi. Setelah mengonfigurasi VLAN, kita akan membagi topologi tersebut menjadi dua VLAN terpisah untuk mengisolasi lalu lintas data (traffic)." 
 +Goalsnya adalah untuk memisahkan Devices sesuai VLAN pada topology 
 +  * VLAN 10 - PC1,PC2 
 +  * VLAN 20 - PC3,PC4 
 +===== Konfigurasi ===== 
 +  * **Step 1 : Pembuatan VLANs** 
 +<code> 
 +Switch(config)#vlan 10 
 +Switch(config-vlan)#name BIRU 
 +Switch(config-vlan)#exit
  
-==== Konfigurasi ====+Switch(config)#vlan 20 
 +Switch(config-vlan)#name MAGENTA 
 +Switch(config-vlan)#exit 
 +</code> 
 +  * **Step 2 : Assign VLANs ke Ports** 
 +<code> 
 +Switch(config)#interface f0/1 
 +Switch(config-if)#switchport mode access  
 +Switch(config-if)#switchport access vlan 10 
 +Switch(config-if)#exit
  
-=== Router C2691 ===+Switch(config)#interface f0/2 
 +Switch(config-if)#switchport mode access  
 +Switch(config-if)#switchport access vlan 10 
 +Switch(config-if)#exit 
 +</code> 
 +Dapat dapat juga menggukan ''interface range'' untuk menkongigurasi banyak interface secara bersamaan: 
 +<code> 
 +Switch(config)#interface range f0/3-4 
 +Switch(config-if-range)#switchport mode access  
 +Switch(config-if-range)#switchport access vlan 20 
 +</code> 
 +  * **Step 3 : Check VLAN Summary** 
 +<code> 
 +Switch#show vlan brief 
 +</code> 
 +Sample Output: 
 +<code> 
 +VLAN Name                             Status    Ports 
 +---- -------------------------------- --------- ------------------------------- 
 +1    default                          active    Fa0/5 - Fa0/24, Gig0/1, Gig0/2 
 +10   BIRU                             active    Fa0/1, Fa0/2 
 +20   MAGENTA                          active    Fa0/3, Fa0/4 
 +1002 fddi-default                     active     
 +1003 token-ring-default               active     
 +1004 fddinet-default                  active     
 +1005 trnet-default                    active     
 +</code>
  
-<code>  +===== Testing =====
-// Masuk Global Configration mode +
-C2691> enable +
-C2691# configure terminal +
-C2691(config)# +
-//setup ip interface gateaway +
-C2691(config)#interface f0/0 +
-C2691(config-if)#ip address 192.168.0.1 255.255.255.0+
  
-// Setup DHCP Server 
-C2691(config-if)#ip dhcp pool LAN 
-C2691(dhcp-config)#network 192.168.0.0 255.255.255.0 
-C2691(dhcp-config)#default-router 192.168.0.1 
-C2691(dhcp-config)#exit 
-C2691(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.100 
-</code> 
  
-=== PCs ===+  * **PC1 -> PC2,PC3,PC4** 
 +<code> 
 +C:\>ping 192.168.0.2
  
-<code>  +Pinging 192.168.0.2 with 32 bytes of data:
-// PC1 +
-PC1> ip dhcp +
-DDORA IP 192.168.0.101/24 GW 192.168.0.1 +
-// PC2+
  
-PC2ip dhcp +Reply from 192.168.0.2: bytes=32 time<1ms TTL=128 
-DORA IP 192.168.0.102/24 GW 192.168.0.1 +Reply from 192.168.0.2: bytes=32 time<1ms TTL=128 
-// PC3 +Reply from 192.168.0.2: bytes=32 time<1ms TTL=128 
-PC3ip dhcp +Reply from 192.168.0.2: bytes=32 time<1ms TTL=128 
-DORA IP 192.168.0.103/24 GW 192.168.0.1+ 
 +Ping statistics for 192.168.0.2: 
 +    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.0.3 
 + 
 +Pinging 192.168.0.3 with 32 bytes of data: 
 + 
 +Request timed out. 
 +Request timed out. 
 +Request timed out. 
 +Request timed out. 
 + 
 +Ping statistics for 192.168.0.3: 
 +    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), 
 + 
 +C:\>ping 192.168.0.4 
 + 
 +Pinging 192.168.0.4 with 32 bytes of data: 
 + 
 +Request timed out. 
 +Request timed out. 
 +Request timed out. 
 +Request timed out. 
 + 
 +Ping statistics for 192.168.0.4: 
 +    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
 </code> </code>
  
-==== Cheatsheet ====+  * **PC3 > PC1,PC3,PC4**
  
-<code>  +<code> 
-ip dhcp excluded-address 192.168.0.1 +C:\>ping 192.168.0.1 
-ip dhcp pool LAN + 
-  network 192.168.0.0 255.255.255.0 +Pinging 192.168.0.1 with 32 bytes of data: 
-  default-router 192.168.0.1 + 
-  exit+Request timed out. 
 +Request timed out. 
 +Request timed out. 
 +Request timed out. 
 + 
 +Ping statistics for 192.168.0.1: 
 +    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), 
 + 
 +C:\>ping 192.168.0.2 
 + 
 +Pinging 192.168.0.2 with 32 bytes of data: 
 + 
 +Request timed out. 
 +Request timed out. 
 +Request timed out. 
 +Request timed out. 
 + 
 +Ping statistics for 192.168.0.2: 
 +    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), 
 + 
 +C:\>ping 192.168.0.4 
 + 
 +Pinging 192.168.0.4 with 32 bytes of data: 
 + 
 +Reply from 192.168.0.4: bytes=32 time<1ms TTL=128 
 +Reply from 192.168.0.4: bytes=32 time<1ms TTL=128 
 +Reply from 192.168.0.4: bytes=32 time<1ms TTL=128 
 +Reply from 192.168.0.4: bytes=32 time<1ms TTL=128 
 + 
 +Ping statistics for 192.168.0.4: 
 +    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), 
 +Approximate round trip times in milli-seconds: 
 +    Minimum = 0ms, Max
 </code> </code>
 +
  • networking/cisco/vlan.1770011938.txt.gz
  • Last modified: 2026/02/02 12:58
  • by ilyasa