Setting VLAN dan Router
Setting VLAN dan Router
SWITCH 1
Switch>en
Switch#conf t
Enter
configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan
10
Switch(config-vlan)#name
laras
Switch(config-vlan)#exit
Switch(config)#vlan
20
Switch(config-vlan)#name
ira
Switch(config-vlan)#exit
Switch(config)#interface
fastEthernet 0/1
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 10
Switch(config-if)#exit
Switch(config)#interface
fastEthernet 0/2
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 10
Switch(config-if)#exit
Switch(config)#interface
fastEthernet 0/3
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 20
Switch(config-if)#exit
Switch(config)#interface
fastEthernet 0/4
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 20
Switch(config-if)#exit
SWITCH
2
Switch>en
Switch#conf
t
Enter
configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan
30
Switch(config-vlan)#name
eko
Switch(config-vlan)#exit
Switch(config)#vlan
40
Switch(config-vlan)#name
heru
Switch(config-vlan)#exit
Switch(config)#interface
fastEthernet 0/1
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 30
Switch(config-if)#exit
Switch(config)#interface
fastEthernet 0/2
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 30
Switch(config-if)#exit
Switch(config)#interface
fastEthernet 0/3
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 40
Switch(config-if)#exit
Switch(config)#interface
fastEthernet 0/4
Switch(config-if)#switchport
mode access
Switch(config-if)#switchport
access vlan 40
Switch(config-if)#exit
ROUTER 1
Router>en
Router#conf
t
Enter
configuration commands, one per line. End with CNTL/Z.
Router(config)#int
fastEthernet 0/0
Router(config-if)#ip
address 192.168.10.10 255.255.255.0
Router(config-if)#no
shut
Router(config-if)#exit
Router(config)#int
fastEthernet 0/1
Router(config-if)#ip
address 192.168.5.5 255.255.255.128
Router(config-if)#no
shut
Router(config-if)#exit
Router(config)#int
fastEthernet 0/0.30
Router(config-subif)#encapsulation
dot1Q 30
Router(config-subif)#ip
address 192.168.30.33 255.255.255.240
Router(config-subif)#exit
Router(config)#interface
fastEthernet 0/0.40
Router(config-subif)#encapsulation
dot1Q 40
Router(config-subif)#ip
address 192.168.40.49 255.255.255.240
Router(config-subif)#exit
ROUTER 2
Router>en
Router#conf
t
Enter
configuration commands, one per line. End with CNTL/Z.
Router(config)#int
fastEthernet 0/0
Router(config-if)#ip
address 192.168.20.129 255.255.255.192
Router(config-if)#no
shut
Router(config-if)#exit
Router(config)#int
fastEthernet 0/1
Router(config-if)#ip
address 192.168.5.6 255.255.255.128
Router(config-if)#no
shut
Router(config-if)#exit
Router(config)#int
fastEthernet 0/1.10
Router(config-subif)#encapsulation
dot1Q 10
Router(config-subif)#ip
address 192.168.10.33 255.255.255.224
Router(config-subif)#exit
Router(config)#interface
fastEthernet 0/1.20
Router(config-subif)#encapsulation
dot1Q 20
Router(config-subif)#ip
address 192.168.20.65 255.255.255.224
Router(config-subif)#exit
SWITCH 3
Switch#en
Switch#vlan
database
Switch(vlan)#vlan
10 name laras
VLAN 10
added:
Name: laras
Switch(vlan)#exit
APPLY
completed.
Exiting....
Switch#vlan
database
Switch(vlan)#vlan
20 name ira
VLAN 20
added:
Name: ira
Switch(vlan)#exit
APPLY
completed.
Exiting....
TRUNK
Router 1
Switch>en
Switch#conf
t
Switch(config)#interface
fastEthernet 0/5
Switch(config-if)#switchport
mode trunk
Router 2
Switch>en
Switch#conf
t
Switch(config)#int
fastEthernet 0/5
Switch(config-if)#switchport
mode trunk
Router 3
Switch>en
Switch#conf
t
Switch(config)#int
fastEthernet 0/3
Switch(config-if)#switchport mode trunk
IP ROUTE
Route 1
Router>en
Router#conf
t
Router(config)#ip
route 192.168.20.128 255.255.255.192 192.168.5.6
Router(config)#ip
route 192.168.10.32 255.255.255.224 192.168.5.6
Router(config)#ip route 192.168.20.64 255.255.255.224 192.168.5.6
Router 2
Router>en
Router#conf
t
Router(config)#ip
route 192.168.20.128 255.255.255.192 192.168.5.6
Router(config)#ip
route 192.168.10.32 255.255.255.224 192.168.5.6
Router(config)#ip route 192.168.20.64 255.255.255.224 192.168.5.6
0 comments: