Routing – Problem routing multiple switches and 1 router

routing

I am having trouble routing between 2 switches and 1 router. My network diagram is below.

enter image description here

I currently have both switches trunked to ports fa 0/0 and 0/1 of the router.

I created sub interfaces on the router as well. I also set the IP address default gateways for the end devices for these sub interfaces.

The problem I am facing is PC0 and PC1 can talk to each other without an issue, however PC 2 and 3 cannot. Also, PC 2 and 3 cannot communicate with PC 0 and 1 and vice versa.

When I check to see how the packet is moving through the network, for example from PC 2 to PC 3 it reaches switch 1, switch 1 sends it to the router, the router says there isn't a sub interface with this VLAN enabled and then drops the packet.

When I check the router's interfaces in show int , it clearly shows the interface up, and VLAN id being correct.

My logic is that PC2 sends the packet to the default gateway, the router sends it out the sub interface associated with PC3's subnet and the switch sends it to PC3.

I also tried setting up static routes but it still isn't working.

It's driving me nuts, is there a problem with my logic?

Update
Still not working, are some of my configs for the router and switches.

(Switch 1)

interface FastEthernet0/1
 switchport access vlan 30
 switchport mode access
!
interface FastEthernet0/2
 switchport access vlan 40
 switchport mode access
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/24
 switchport mode trunk
!

router

hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.254 255.255.255.0
!
interface FastEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.20.254 255.255.255.0
!
interface FastEthernet0/0.30
 encapsulation dot1Q 30
 ip address 192.168.30.254 255.255.255.0

!
interface FastEthernet0/0.40
 encapsulation dot1Q 40
 ip address 192.168.40.254 255.255.255.0
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!

(Switch 0)

interface FastEthernet0/1
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/2
 switchport access vlan 20
 switchport mode access
!
interface FastEthernet0/24
 switchport mode trunk
!
interface Vlan1
 no ip address
 shutdown
!

Best Answer

A quite common pitfall on ISR G1 Models (the generation of your 1841) is that you create a SVI Interface (g.G. interface VLAN10) for Layer3 configuration, but didn't mention to create the corresponding vlan in the vlan database that is seperated from the configuration file (similar to the VLAN database in older Catalyst switches).

vlan dat
vlan 100
name FOO
apply

From the configuration perspective everything looks fine, but it isn't working.

maybe you stepped in this pitfall too

Related Topic