So I have configurable switch, two pc (1st PC is on VLAN 101, 2nd PC is on VLAN 102) and a router that is on VLAN 103.
VLAN 103 (named as router) is in trunk mode.
switchport mode trunk
switchport trunk allow vlan 102,103VLAN 101(pirmas) VLAN 102(antras) is in access mode
switchport mode access
switchport access vlan 101 / vlan 102But still I can't ping from VLAN 103 to VLAN101 102 and vica versa, even if its trunked. Here is is the scheme:
Can you tell me what I'm doing wrong?
21 Answer
On the router, you need to configure the VLANs as subinterfaces:
interface FastEthernet0/0 no ip address no shutdown
!
interface FastEthernet0/0.101 encapsulation dot1Q 101 ip address 192.168.1.1 255.255.255.0 no shutdown
!
interface FastEthernet0/0.102 encapsulation dot1Q 102 ip address 192.168.2.1 255.255.255.0 no shutdown
!PCs on VLAN 101 need an address in the 192.168.1.0/24 network with a gateway of 192.168.1.1.
PCs on VLAN 102 need an address in the 192.168.2.0/24 network with a gateway of 192.168.2.1.
The router doesn't need a separate VLAN. You could ser up a management VLAN if you want, but you don't have any devices in that VLAN.