08-17-2017 09:16 AM - edited 03-08-2019 11:47 AM
Hello !!
I have tried to connect vlans to a router using trunk, but I cannot ping between the vlans. Please help with it. I have given the topology and configuraions used below:
ROUTER
|
|
-------- Switch---------
| |
PC1 PC2
Ports connecting to PC1 and PC2 are VLAN10 and VLAN20 respectively. Connections are:
PC1 ---- fa1/1 Switch PC2 ------------fa1/2 Switch Switch fa1/0---- fa1/0 Router
PC1
IP: 10.1.1.1 255.255.255.0 Gateway: 10.1.1.100
PC2
IP: 10.1.1.2 255.255.255.0 Gateway: 10.1.1.100
Configurations in Switch:
interface FastEthernet1/1
switchport mode access
switchport access vlan 10
interface FastEthernet1/2
switchport mode access
switchport access vlan 20
interface FastEthernet1/0
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan all
Configuration in router
interface FastEthernet1/0
ip address 10.1.1.100 255.255.255.0
Please provide your suggestions. Thank You
Solved! Go to Solution.
08-17-2017 09:28 AM
You've split your 10.1.1.0/24 across two VLANs - that's not going to work. Either place all ports of 10.1.1.0/24 in one VLAN or create a second network, e.g. 10.1.2.0/24, which you place into the second VLAN. If you do the latter, you'll need to trunk between the switch and the router and use subinterfaces on the router's interface to the switch.
08-17-2017 09:32 PM
ya for sub-interfaces you need router or layer 3 switch for routing between 2 diffrent vlans. and your ip is the gateway ip in sub-interfaces
08-17-2017 09:28 AM
You've split your 10.1.1.0/24 across two VLANs - that's not going to work. Either place all ports of 10.1.1.0/24 in one VLAN or create a second network, e.g. 10.1.2.0/24, which you place into the second VLAN. If you do the latter, you'll need to trunk between the switch and the router and use subinterfaces on the router's interface to the switch.
08-17-2017 09:53 AM
Thank you Joseph ! One more small doubt, if I trunk and use subinterfaces, the IPs I use there willl be the gateway IPs right ?
08-17-2017 09:32 PM
ya for sub-interfaces you need router or layer 3 switch for routing between 2 diffrent vlans. and your ip is the gateway ip in sub-interfaces
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide