I have a Cisco Catalyst Ethernet switch.
I would like to setup this configuration:
- Ports 18 and 19 are on VLAN 10.
- Ports 20 and 21 are on VLAN 20.
- I would like port 22 to have access to both VLANs 10 and 20.
Here is the configuration I made through SSH:
conf terminal
Vlans creation:
vlan 10
name VLAN0010
exit
vlan 20
name VLAN0020
exit
First, I cleared the configuration for the 5 affected ports:
interface range FastEthernet0/18 - 22
no switchport nonegotiate
no shutdown
no switchport mode
no switchport access vlan
no switchport mode access
no switchport trunk allowed vlan
no switchport trunk native vlan
no switchport mode trunk
Then, I configured the two ports assigned to VLAN 10 in access mode:
interface range FastEthernet0/18 - 19
switchport mode access
switchport access vlan 10
switchport nonegotiate
no shut
Then I configured the two ports assigned to VLAN 20 in access mode:
interface range FastEthernet0/20 - 21
switchport mode access
switchport access vlan 20
switchport nonegotiate
no shut
Then, I configured port 22 in trunk mode, so it can access both VLANs:
interface range FastEthernet0/22
switchport mode trunk
switchport trunk native vlan 10
switchport trunk allowed vlan 10,20
switchport nonegotiate
no shut
Problem: Only the machines connected to ports 18 and 19 (VLAN 10) can communicate with the machine connected to port 22. Machines connected to ports 20 and 21 (VLAN 20) cannot ping the machine connected to port 22. It seems that only the native VLAN of the trunk port is allowed. If I change it to VLAN 20, the opposite happens. What is missing for port 22 to communicate with both VLANs?
Thank you.