Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| networking:cisco:vlan [2026/02/02 13:01] – [Topologi] ilyasa | networking:cisco:vlan [2026/02/02 23:16] (current) – [Topologi] ilyasa | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | |||
| {{indexmenu_n> | {{indexmenu_n> | ||
| ====== 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 ^ | ||
| | '' | | '' | ||
| Line 17: | Line 16: | ||
| name VLAN-Management | name VLAN-Management | ||
| </ | </ | ||
| - | === 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: | ||
| </ | </ | ||
| - | === Menghapus VLAN === | + | ==== Menghapus VLAN ==== |
| ^ Command ^ Description ^ | ^ Command ^ Description ^ | ||
| | '' | | '' | ||
| | '' | | '' | ||
| - | === Menghapus VLAN dari Interface=== | + | ==== Menghapus VLAN dari Interface |
| ^ Command ^ Description ^ | ^ Command ^ Description ^ | ||
| | '' | | '' | ||
| Line 50: | Line 49: | ||
| - | ==== Topologi ==== | + | ===== Topologi |
| {{ : | {{ : | ||
| " | " | ||
| Goalsnya adalah untuk memisahkan Devices sesuai VLAN pada topology | Goalsnya adalah untuk memisahkan Devices sesuai VLAN pada topology | ||
| * VLAN 10 - PC1,PC2 | * VLAN 10 - PC1,PC2 | ||
| - | * VLAN 10 - PC3,PC4 | + | * VLAN 20 - PC3,PC4 |
| - | ==== Konfigurasi ==== | + | ===== Konfigurasi ===== |
| + | * **Step 1 : Pembuatan VLANs** | ||
| + | < | ||
| + | Switch(config)# | ||
| + | Switch(config-vlan)# | ||
| + | Switch(config-vlan)# | ||
| - | === Router C2691 === | + | Switch(config)# |
| - | + | Switch(config-vlan)# | |
| - | < | + | Switch(config-vlan)# |
| - | // Masuk Global Configration mode | + | </code> |
| - | C2691> enable | + | * **Step 2 : Assign VLANs ke Ports** |
| - | C2691# configure terminal | + | <code> |
| - | C2691(config)# | + | Switch(config)#interface f0/1 |
| - | //setup ip interface gateaway | + | Switch(config-if)#switchport mode access |
| - | C2691(config)#interface f0/0 | + | Switch(config-if)#switchport access vlan 10 |
| - | C2691(config-if)# | + | Switch(config-if)# |
| - | // Setup DHCP Server | + | Switch(config)# |
| - | C2691(config-if)# | + | Switch(config-if)# |
| - | C2691(dhcp-config)#network 192.168.0.0 255.255.255.0 | + | Switch(config-if)#switchport access vlan 10 |
| - | C2691(dhcp-config)#default-router 192.168.0.1 | + | Switch(config-if)#exit |
| - | C2691(dhcp-config)#exit | + | </ |
| - | C2691(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.100 | + | Dapat dapat juga menggukan '' |
| + | < | ||
| + | Switch(config)#interface range f0/3-4 | ||
| + | Switch(config-if-range)#switchport mode access | ||
| + | Switch(config-if-range)#switchport access vlan 20 | ||
| + | </ | ||
| + | * **Step 3 : Check VLAN Summary** | ||
| + | < | ||
| + | Switch#show vlan brief | ||
| + | </ | ||
| + | Sample Output: | ||
| + | < | ||
| + | VLAN Name | ||
| + | ---- -------------------------------- --------- ------------------------------- | ||
| + | 1 | ||
| + | 10 | ||
| + | 20 | ||
| + | 1002 fddi-default | ||
| + | 1003 token-ring-default | ||
| + | 1004 fddinet-default | ||
| + | 1005 trnet-default | ||
| </ | </ | ||
| - | === PCs === | + | ===== Testing ===== |
| - | < | ||
| - | // PC1 | ||
| - | PC1> ip dhcp | ||
| - | DDORA IP 192.168.0.101/ | ||
| - | // PC2 | ||
| - | PC2> | + | * **PC1 -> PC2, |
| - | DORA IP 192.168.0.102/24 GW 192.168.0.1 | + | <code> |
| - | // PC3 | + | C: |
| - | PC3> ip dhcp | + | |
| - | DORA IP 192.168.0.103/24 GW 192.168.0.1 | + | Pinging |
| + | |||
| + | Reply from 192.168.0.2: | ||
| + | Reply from 192.168.0.2: | ||
| + | Reply from 192.168.0.2: | ||
| + | Reply from 192.168.0.2: | ||
| + | |||
| + | 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 | ||
| + | |||
| + | 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), | ||
| </ | </ | ||
| - | ==== Cheatsheet ==== | + | * **PC3 > PC1, |
| - | < | + | < |
| - | ip dhcp excluded-address | + | C: |
| - | ip dhcp pool LAN | + | |
| - | | + | Pinging |
| - | | + | |
| - | 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 | ||
| + | |||
| + | 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: | ||
| + | Reply from 192.168.0.4: | ||
| + | Reply from 192.168.0.4: | ||
| + | Reply from 192.168.0.4: | ||
| + | |||
| + | Ping statistics for 192.168.0.4: | ||
| + | Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), | ||
| + | Approximate round trip times in milli-seconds: | ||
| + | | ||
| </ | </ | ||
| + | |||