06-14-2017 09:12 AM - last edited on 03-25-2019 03:48 PM by ciscomoderator
Thanks in advance,
All, I have configured a router-on-a-stick lab in packet tracer 6.2. The following is my configuration:
What is working:
What is not working:
What troubleshooting steps thus far
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
Solved! Go to Solution.
06-14-2017 10:17 AM
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
06-14-2017 09:25 AM
Try adding default gateway on the switch.
ip default-gateway 10.0.0.1
If problem persists then please share the configuration file.
06-14-2017 10:01 AM
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#
06-14-2017 10:17 AM
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
06-14-2017 10:21 AM
I see more context now in your post, disregard, let me try this.
06-14-2017 10:30 AM
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.
:-)
06-14-2017 10:32 AM
Awesome, that helps a lot, thank you Julio
06-14-2017 10:33 AM
It was a pleasure my friend.
Have a great day
:-)
06-14-2017 10:24 AM
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
06-14-2017 10:29 AM
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?
06-14-2017 10:30 AM
nevermind, this worked after changing ip default-gateway of the switch to 10.0.0.1
06-14-2017 10:03 AM
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
06-14-2017 10:34 AM
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!
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