| conf t |
| enter into configuration mode on L2 switch side |
| int fa0/1 |
| switchport mode trunk |
| turn on trunk mode on L2 switch side |
| switchport trunk native vlan 100 |
| don’t forget to define a native vlan for full Trunk communication |
| no shut |
| bring up the port |
| end |
| conf t |
| enter into configuration mode on router side |
| int fa0/0.2 |
| sub identifier (.2) needs to be the same like the VLAN ID will be used |
| encapsulation dot1Q 2 |
| VLAN on subinterface set up |
| ip address 192.168.2.1 255.255.255.0 |
| set up IP address for the VLAN interface |
| exit |
| int fa0/0.3 |
| sub identifier (.3) needs to be the same like the VLAN ID will be used |
| encapsulation dot1Q 3 |
| VLAN on subinterface set up |
| ip address 192.168.3.1 255.255.255.0 |
| set up IP address for the VLAN interface |
| exit |
| int fa0/0.100 |
| sub identifier (.100) needs to be the same like the native VLAN ID will be used |
| encapsulation dot1Q 100 native |
| native VLAN on subinterface set up |
| exit |
| int fa0/0 |
| no shut |
| end |
| sh ip route |
| check the route table |