cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2209
Views
5
Helpful
12
Replies

Router on a Stick Lab Question

steeilers
Level 1
Level 1

Thanks in advance,

All, I have configured a router-on-a-stick lab in packet tracer 6.2. The following is my configuration:

  • Subnet 1 / VLAN 10: 10.0.0.0 - 10.0.0.255 /24
    • PSH-R01 VLAN10 Gateway: 10.0.0.1 G0/1.10
    • PSH-SW01: 10.0.0.2 MGT IP
    • PSH-PC1: 10.0.0.10 VLAN 10 --> FE0/0 PSH-SW01
    • PSH-PC2: 10.0.0.20 VLAN 10 --> FE0/1 PSH-SW01
  • Subnet 2 / VLAN 2: 10.0.1.0 - 10.0.1.255 /24
    • PSH-R1 VLAN20 Gateway: 10.0.1.1 G0/1.20
    • PSH-PC3: 10.0.1.10 VLAN 20 --> FE0/2 PSH-SW01
    • PSH-PC4: 10.0.1.20 VLAN 20 --> FE0/3
  • PSH-SW01 Trunk to PSH-R01
    • FE0/24 to PSH-R01 G0/1


What is working:

    • My hosts on each VLAN can ping eachother and the router
    • My router can ping the hosts

What is not working:

    • My switch vlan 1 interface (MGT IP) can not ping the hosts nor the router
    • my router and hosts can ping the switches MGT IP

What troubleshooting steps thus far

    • I allowed all VLANS over my trunk from switch to router when before I was trying to prune to just 1, 10, 20
    • I discovered a sub interface command for routers "encapsulation dot1q  VLAN native" that I thought defined the native vlan for the sub interface, but it replaced the other encap dot1q vlan line I had entered and removed my configured IP address from the sub interface. But when I did this, it allowed my switch to ping the router, strange and vice versa? Strange?

I've looked everywhere online. To note, I'm trying to make the MGT IP of my switch an IP in the VLAN 10 subnet, I'm not configuring my routers physical interface with anything, my problem may be here, but I'm not sure if I need to just create a completely new subnet for my MGT switch? 

Thanks in advance guys, FYI i'm studying for my CCNA,

Steven Eilers

1 Accepted Solution

Accepted Solutions

Hi

This configuration is not required on the router.

ip default-gateway 10.0.2.2

ip route 10.0.0.0 255.255.255.0 GigabitEthernet0/1

ip route 10.0.1.0 255.255.255.0 GigabitEthernet0/1

The problem is related to the vlan 10, you have configured an IP address on the vlan 1 from the network segment of the vlan 10, so you should change the vlan 1 to vlan 10.

Your subinterface .10 is associated to the vlan 10 not to vlan 1, so you need to make this change:

interface Vlan1
no ip address
no description

interface Vlan10
description PSH-SW01 MGT IP
ip address 10.0.0.2 255.255.255.0




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

View solution in original post

12 Replies 12

cofee
Level 5
Level 5

Try adding default gateway on the switch.

ip default-gateway 10.0.0.1

If problem persists then please share the configuration file.

I had tried that already, forgot to add to my threat

PSH-R01 Config:

PSH-R01#show run

Building configuration...

Current configuration : 1238 bytes

!

version 15.1

no service timestamps log datetime msec

no service timestamps debug datetime msec

service password-encryption

!

hostname PSH-R01

!

!

!

!

!

!

!

!

ip cef

no ipv6 cef

!

!

!

!

license udi pid CISCO2911/K9 sn FTX1524I057

!

!

!

!

!

!

!

!

!

ip ssh version 1

ip domain-name pain-doctor.org

!

!

spanning-tree mode pvst

!

!

!

!

!

!

interface GigabitEthernet0/0

ip address 10.0.2.1 255.255.255.252

duplex auto

speed auto

!

interface GigabitEthernet0/1

no ip address

duplex full

speed 100

!

interface GigabitEthernet0/1.10

description PSH Marketiing VLAN 10 Interface

encapsulation dot1Q 10

ip address 10.0.0.1 255.255.255.0

!

interface GigabitEthernet0/1.20

encapsulation dot1Q 20

ip address 10.0.1.1 255.255.255.0

!

interface GigabitEthernet0/2

no ip address

duplex auto

speed auto

shutdown

!

interface Vlan1

no ip address

shutdown

!

ip default-gateway 10.0.2.2

ip classless

ip route 10.0.0.0 255.255.255.0 GigabitEthernet0/1

ip route 10.0.1.0 255.255.255.0 GigabitEthernet0/1

ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0

!

ip flow-export version 9

!

!

!

no cdp run

!

!

!

PSH-R01#

PSH-R01#

Hi

This configuration is not required on the router.

ip default-gateway 10.0.2.2

ip route 10.0.0.0 255.255.255.0 GigabitEthernet0/1

ip route 10.0.1.0 255.255.255.0 GigabitEthernet0/1

The problem is related to the vlan 10, you have configured an IP address on the vlan 1 from the network segment of the vlan 10, so you should change the vlan 1 to vlan 10.

Your subinterface .10 is associated to the vlan 10 not to vlan 1, so you need to make this change:

interface Vlan1
no ip address
no description

interface Vlan10
description PSH-SW01 MGT IP
ip address 10.0.0.2 255.255.255.0




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

I see more context now in your post, disregard, let me try this.

Hi

If the vlan 1 will be on other subnet, you need to create the sub-interface for that vlan, example:

Router

interface GigabitEthernet0/1.1
encapsultation dot1q 1
ip address 10.0.5.1 255.255.255.0
no shutdown 

Router in a stick scheme is used to create intervlan routing, so if the sub-interface with its gateway is not configured, the vlan 1 will not able to communicate with the rest.

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Awesome, that helps a lot, thank you Julio

It was a pleasure my friend.

Have a great day

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

before I revert my troubleshooting, I tried to configure vlan1 int on the switch with a different subnet, make my router's physical interface open to this subnet, but the routing didn't work? wouldn't this traffic be routable? 

SW01

interface Vlan1

description PSH-SW01 MGT IP

ip address 10.0.5.2 255.255.255.0

ip default-gateway 10.0.5.1

R1

interface GigabitEthernet0/1

ip address 10.0.5.1 255.255.255.0

duplex full

speed 100

ip route 10.0.5.0 255.255.255.0 GigabitEthernet0/1

my pings aren't going across

I made the changes

PSH-SW01 is pingable from hosts on the 10 VLAN, and the router

The switch is not however pingable from my hosts on the 20 VLAN, the same host can ping the hosts on the 10 VLAN though.

Thoughts?

nevermind, this worked after changing ip default-gateway of the switch to 10.0.0.1

Switch Config:


NOB-PSHSW01#show run
Building configuration...

Current configuration : 1481 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname NOB-PSHSW01
!
!

!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
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
!
interface FastEthernet0/24
switchport mode trunk
duplex full
speed 100
!
interface Vlan1
description PSH-SW01 MGT IP
ip address 10.0.0.2 255.255.255.0
!
ip default-gateway 10.0.0.1
!
!
!
!
line con 0
logging synchronous
exec-timeout 0 0
!
line vty 0 4
exec-timeout 0 0
logging synchronous
no login
history size 30
line vty 5 15
exec-timeout 0 0
logging synchronous
no login
!
!
end

steeilers
Level 1
Level 1

Can you explain why the below config isn't needed on the router?

ip default-gateway 10.0.2.2

ip route 10.0.0.0 255.255.255.0 GigabitEthernet0/1

ip route 10.0.1.0 255.255.255.0 GigabitEthernet0/1

Thank you!

Review Cisco Networking for a $25 gift card