Thursday, June 2, 2016

Why is my ROAS not working? - solved. The case of missing gateways.

This is my second router-on-a-stick configuration that is not working.




I originally had just two switches connected by a trunk, and 3 vlans:
- vlan 10 (PC-A, PC-B)
- vlan 20 (PC-C)
- vlan 99 native

Switch 1 and Switch 2 had a trunk connection on interfaces fa0/1

PC-A and PC-B could ping with or without the trunk. No wonder, they are on the same vlan.
PC-A or PC-B (vlan 10) could not ping PC-C (vlan 20) with or without a trunk. So, no inter-vlan communication...

To test what was failing, the trunk or the access ports, and decided to create PC-D on Switch 1, and place it in VLAN 20. Now we have vlan 10 and vlan 20 PCs connected to both switches. Is the trunk working?

PC-A and PC-B (my Vlan 10s) can ping ok - just like before
PC-C and PC-D (my Vlan 20s) can ping ok - good, so the trunk link is working
No PCs in Vlan 10 cannot ping any PCs in VLAN 20, and vice versa. Even if they are on the same switch. Why can;t the switch see a connected device???

For a while I was puzzled, but then I remembered. Duh!, my switches don't know how to route between vlans. (Dolt!!!!)

Ok, at least we got that far in our thinking. Then let's create the router on a stick. So, I added R0, and connected it via a trunk to g0/1 on Switch 1. Subinterfaces are created. Trunking is turned on between the Switch 1 and the R0. All is b-e-a-u-t-i-f-u-l!

Scores for this round:
PCs in VLAN 10 can ping each other AND subinterface g0/1.10 - so, the router sees the PCs
PCs in VLAN 20 can ping each other AND subinterface g0/1.20 - so far so good
But no one can ping anything in a different vlan. Not even their own default gateways on subinterfaces. What the hell?

Why is router not routing between the vlans? Cm'on, router! Wakey-wakey!!!

Checking and re-checking all configs.

------------

Router


interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface GigabitEthernet0/1.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
!
interface GigabitEthernet0/1.99
encapsulation dot1Q 99
ip address 192.168.1.1 255.255.255.0
!
interface Vlan1
no ip address
shutdown

!

Switch 1


hostname S1
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
switchport mode access
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
switchport mode trunk
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan99
ip address 192.168.1.11 255.255.255.0
!
!

!



Switch 2

hostname S2
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan99
ip address 192.168.1.12 255.255.255.0
!

!

Subinterfaces match the VLANs. All should be good. Yet my poor little PCs are still little Vlan-prisoners, SOMEHOW.

Re-checking IPs on the PCs for typos....

PC-A
IP Address......................: 192.168.10.3
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 0.0.0.0

Waaaait a second. Where did the default gateway go?.
Re-checking my PCs - all of them are missing default gateways. Darn you, Packet Tracer version 6.2!!!

Adding the gateways. Re-checking my pings...

All pings worked!!! So, the reason why my PCs were not communicating was because of the missing gateway assignment.

Whew. Glad I decided to post my blabber. otherwise I would have not even checked the PC assignments for another hour. 

No comments:

Post a Comment