InterVLAN Routing
Menggunakan Switch layer 3
Konfigurasi Switch Layer 3 :
[Link](config)#ip routing
[Link](config)#int vlan 10
[Link](config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
[Link](config-if)#ip add [Link] [Link]
[Link](config-if)#exit
[Link](config)#int vlan 20
[Link](config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
[Link](config-if)#ip add [Link] [Link]
Mengecek Routing tabel :
[Link]#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
[Link]/24 is subnetted, 2 subnets
C [Link] is directly connected, Vlan10
C [Link] is directly connected, Vlan20
[Link]#
Menggunakan Router (Router On A Stick)
Konfigurasi vlan di switch :
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname [Link]
[Link](config)#vlan 10
[Link](config-vlan)#name LAB-A
[Link](config-vlan)#exit
[Link](config)#vlan 20
[Link](config-vlan)#name LAB-B
[Link](config)#vlan 88
[Link](config-vlan)#name native-management
[Link](config-vlan)#exit
[Link](config)#int vlan 88
[Link](config-if)#
%LINK-5-CHANGED: Interface Vlan88, changed state to up
[Link](config-if)#ip address [Link] [Link]
[Link](config-if)#exit
[Link](config)#ip default-gateway [Link]
[Link](config)#int f0/1
[Link](config-if)#switchport mode access
[Link](config-if)#switchport access vlan 10
[Link](config-if)#int f0/24
[Link](config-if)#switchport mode access
[Link](config-if)#switchport access vlan 20
[Link](config-if)#exit
[Link](config)#int f0/10
[Link](config-if)#switchport mode trunk
[Link](config-if)#switchport trunk native vlan 88
Konfigurasi Router :
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
[Link](config)#hostname [Link]
[Link](config)#int f0/0.10
[Link](config-subif)#encapsulation dot1Q 10
[Link](config-subif)#ip add [Link] [Link]
[Link](config-subif)#exit
[Link](config)#int f0/0.20
[Link](config-subif)#encapsulation dot1Q 20
[Link](config-subif)#ip add [Link] [Link]
[Link](config-subif)#exit
[Link](config)#int f0/0.88
[Link](config-subif)#encapsulation dot1Q 88 native
[Link](config-subif)#ip add [Link] [Link]
[Link](config-subif)#exit
[Link](config)#int f0/0
[Link](config-if)#no shut
Tabel routing :
[Link]#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
[Link]/30 is subnetted, 1 subnets
C [Link] is directly connected, FastEthernet0/0.88
[Link]/24 is subnetted, 2 subnets
C [Link] is directly connected, FastEthernet0/0.10
C [Link] is directly connected, FastEthernet0/0.20