04-14-2019 12:05 PM
Hello,
I am trying to do a lab for Router on the stick but it fails. Here is the scenario.
I have 1841 router and 2950 24 port switch.
1841 Fe 0/0 is connected to switch on Fe 0/1
Switch hAS 2 Vlans namely vlan10 and vlan20
when I no shutdown on vlan10 then Vlan20 goes down with administratively shutdown state. At any given point of time I cannot have both the VLANS up and running state.
Your help will be appreciated.
Solved! Go to Solution.
04-14-2019 11:50 PM - edited 04-15-2019 02:06 AM
Thanks to George. Let me draft how the problem was resolved.
My configurations was correct but the only thing I came to knew is
I cannot have more than 1 vlan up and running
if you have vlan10 and vlan 20
you can only have an ip address to vlan10 up and running .if you try to give an ip to vlan 20 and make no shut down it will automatically take down vlan 10.
This behaviour is due to layer 2 capabilities of switch.
Also I have to put the ip default-gateway command on the switch because router does all the routing for inter vlan
switch only forwards PACKETS TO router.
04-15-2019 01:49 AM
Hello,
indeed, management access and the ip default-gateway command are only required for communication between the switch and the router. Clients on Vlan 10 and Vlan 20 will be able to communicate regardless.
The rest of your summary is correct.
Good luck with your studies...
04-14-2019 12:10 PM - edited 04-14-2019 12:11 PM
Hi,
You can't have more than one vlan on the 2950 and that is only for management. So, you have to simply trunk port fa01 on the switch side and add vlan 10 and 20 to it. Than on the router on port fa0/0 you need to create 2 sub-interfaces (one for 10 and one for 20) and add IP to each sub-interface. see link
HTH
04-14-2019 12:13 PM
04-14-2019 01:28 PM - edited 04-14-2019 01:30 PM
@cigalahgroup hello,
try it;
on router:
rt(config)interface g1/0/0.10
rt(config-if)encanpsulation dotq1 10
rt(config-if)ip address 192.168.1.1 255.255.255.0
rt(config)interface g1/0/0.20
rt(config-if)encanpsulation dotq1 20
rt(config-if)ip address 192.168.2.1 255.255.255.0
on switch:
sw(config)interface g0/24
sw(config-if) switchport mode trunk
sw(config-if) switchport mode trunk allowed vlan 10,20
sw(config) vlan 10
sw(config-vl) name admin
sw(config-vl) exit
sw(config) interface vlan 10
sw(config-if) ip address 192.168.1.2 255.255.255.0
sw(config) vlan 20
sw(config-vl) name user
sw(config-vl) exit
sw(config) ip default-gateway 192.168.1.1
and test connection.
04-14-2019 10:39 PM
Here are my configurations
# conf t
(config)# vlan 10
(config-vlan)# exit
(config)# vlan 20
(config-vlan)# exit
(config)# interface FastEthernet1/0/1
(config-if)# description trunk-to-router-on-a-stick
(config-if)# switchport trunk encapsulation dot1q
(config-if)# switchport mode trunk
(config-if)# spanning-tree portfast trunk
(config-if)# exit
(config)# interface FastEthernet1/0/2
(config-if)# description connection-to-Sales
(config-if)# switchport mode access
(config-if)# switchport access vlan 10
(config-if)# exit
(config)# interface FastEthernet1/0/3
(config-if)# description connection-to-IT
(config-if)# switchport mode access
(config-if)# switchport access vlan 20
(config-if)# exit
Router Configuration
# conf t
(config)# interface fastethernet 0/0.10
(config-if)# encapsulation dot1q 10
(config-if)# ip address 10.10.10.2 255.255.255.0
(config-if)# exit
(config)# interface fastethernet 0/0.20
(config-if)# encapsulation dot1q 20
(config-if)# ip address 20.20.20.2 255.255.255.0
(config-if)# exit
My configurations are correct but still I have the same problem..
04-14-2019 11:45 PM
Hello,
on a side note, if this is a Packet Tracer file, post it here (ZIP the .pkt file first, otherwise the system won't let you upload it).
Also, just to be sure you have, check if interface FastEthernet0/0 on the router is not shut...
04-14-2019 11:50 PM - edited 04-15-2019 02:06 AM
Thanks to George. Let me draft how the problem was resolved.
My configurations was correct but the only thing I came to knew is
I cannot have more than 1 vlan up and running
if you have vlan10 and vlan 20
you can only have an ip address to vlan10 up and running .if you try to give an ip to vlan 20 and make no shut down it will automatically take down vlan 10.
This behaviour is due to layer 2 capabilities of switch.
Also I have to put the ip default-gateway command on the switch because router does all the routing for inter vlan
switch only forwards PACKETS TO router.
04-15-2019 12:37 AM
Hello,
remote access would be a good idea...
04-15-2019 01:49 AM
Hello,
indeed, management access and the ip default-gateway command are only required for communication between the switch and the router. Clients on Vlan 10 and Vlan 20 will be able to communicate regardless.
The rest of your summary is correct.
Good luck with your studies...
04-15-2019 01:56 AM
Hello
As @Reza Sharifi suggested twice the switch is only capable to allow 1 l3 svi so if you want intervlan routing as suggested by @Jaderson Pessoa you need change it so the router perfrom this action,
04-15-2019 05:05 AM
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