Inter VLAN Routing
- Konfigurasi inter vlan
- Antar swicth di mode trunk dan hanya vlan 20 yang boleh lewat
Swicth 0
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#vlan 30
Switch(config-vlan)#int f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#ex
Switch(config)#do wr
Building configuration...
[OK]
Switch(config)#
%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%SPANTREE-2-RECV_PVID_ERR: Received 802.1Q BPDU on non trunk FastEthernet0/3 VLAN1.
%SPANTREE-2-BLOCK_PVID_LOCAL: Blocking FastEthernet0/3 on VLAN0001. Inconsistent port type.
Switch(config)#int f0/2
Switch(config-if)#sw mode trunk
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
Nah tadi kan case nya hanya vlan 20 yang boleh lewat jadi tinggal tambahkan command switchport trunk allowed 20 di interfacce f0/2 yang mengarah ke router jadi nanti yang bisa lewat hanya vlan 20 saja
Switch(config-if)#sw trunk allowed vlan 20
Switch(config-if)#ex
Switch(config)#do wr
Building configuration...
[OK]
Switch(config)#
Swicth 1
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#vlan 30
Switch(config-vlan)#int f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#ex
Switch(config)#vlan 30
Switch(config-vlan)#int f0/2
Switch(config-if)#sw
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#ex
Switch(config)#do wr
Building configuration...
[OK]
Switch(config)#ex
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f0/3
Switch(config-if)#switchport mode trunk
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Tidak ada komentar:
Posting Komentar