# data[].attributes.body
elaborato Riccardo Fusco (università degli studi di Napoli)

tutorial Router on stick by Keith Barker

tutorial by Antony

# data[].attributes.body
Go in the CLI of Switch1.

Set as Trunk Mode  the port where is connect the router, with this commands:

switchport mode trunk
switchport trunk allowed vlan none                            ( add the vlans where pass by this port)
switchport trunk allowed vlan add 10
switchport trunk allowed vlan add 20
switchport trunk allowed vlan add 30
no shutdown
exit

# data[].attributes.body
Router3 is correctly configured!

# data[].attributes.body
To check the accurate of configuration, enter the follow command in the Global Mode:

Show ip route

# data[].attributes.body
Go to the CLI of router.

Write:

enable
configure terminal                                                   (enter in the terminal configuration)
interface GigabitEthernet 0/0
no shutdown                                                             (switch-on the Interface G0/0)
exit
interface GigabitEthernet 0/0.10                          (define the sub-interface  .10 )
encapsulation dot1Q 10                                         (define the protocol dot1Q for Vlan 10)
ip address 192.168.10.254 255.255.255.0       (set the IP gateway and subnet-mask)
exit

Repet the process for every Vlan.

# data[].attributes.body
VLAN                  IP GATEWAY
vlan 10               192.168.10.254
vlan 20               192.168.20.254
vlan 30               192.168.30.254

# data[].attributes.body
1. Add a generic router.

2. Assign the relative IP address and gateway:

# data[].attributes.body
Imagine we have this situation.

# data[].attributes.body
How can we connect two or more different VLAN?

# data[].attributes.body
We are planning the network of a school, we have:

2 switch 2950-24

3 enviroments lab. info, lab.sistemi,  segreteria

3 VLAN, with different networks

# data[].attributes.body
We can use a router on stick, which allows  to interconnect differents VLAN