Router on a Stick

10Linefigure10Linefigure Member Posts: 368 ■■■□□□□□□□
Hey guys, so I am having problems with a hands on lab configuring '' Router on a Stick'' In the Lab I have a switch with 2 computers connected, another switch with 2 more computers connected, the 4 computers share 2 subnets, 1 computer for each subnet on each switch. Then these 2 switches are both trunked to a 3rd switch that is then trunked to a router. (I am guessing you guys already knew this lol, but my confusion is making me go [EMAIL="?#@R%$@W"]?#@R%$@W[/EMAIL] how is this possible!! I put the hosts in Vlan 10 and Vlan 20, set up the Vlans on all 3 switches, and set up the 2 sub interfaces going to my router, all with the Dot1q encapsulation, and nothing. The book says the computers in different subnets should work now, but they can only talk within their subnet, what am I missing? Do I need to have a routing protocol for this? (I can use the 3rd switch to route on the backplane with ''ip routing'' and it works instantly!

Thank you guys! sorry its so long lol
CCNP R&S, Security+
B.S. Geography - Business Minor
MicroMasters - CyberSecurity
Professional Certificate - IT Project Management

Comments

  • Adam BAdam B Member Posts: 108 ■■□□□□□□□□
    Did you put an ip default gateway? Could be the problem. And are you reading the Todd Lammle CCENT book? If so, I am as well :). Good Luck! Tell us if it works
    2015 Goals: CCNP SWITCH [] SEC+ [ ] CCNP ROUTE [ ] CCNP TSHOOT [ ]

  • kohr-ahkohr-ah Member Posts: 1,277
    Let me see if I can help with this (compare it to what you are doing):

    So you have something similar to this?


    From bottom left it goes
    PC 0 - 192.168.0.5
    PC 1 - 192.168.20.5
    PC 2 - 192.168.0.10
    PC 3 - 192.168.20.10

    Here are my configs (All PCs can ping one another. I removed ports from the config that didn't matter)

    Lower Left Switch Config:
    !
    version 12.2
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Switch
    !
    !
    !
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
    switchport access vlan 10
    !
    interface FastEthernet0/2
    switchport access vlan 20
    !
    interface GigabitEthernet1/1
    switchport mode trunk
    !
    interface GigabitEthernet1/2
    !
    interface Vlan1
    no ip address
    shutdown
    !
    !
    line con 0
    !
    line vty 0 4
    login
    line vty 5 15
    login
    !
    !
    end




    Switch#


    Lower Right Switch Config:
    !
    version 12.2
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Switch
    !
    !
    !
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
    switchport access vlan 10
    !
    interface FastEthernet0/2
    switchport access vlan 20
    !
    interface GigabitEthernet1/1
    switchport mode trunk
    !
    interface GigabitEthernet1/2
    !
    interface Vlan1
    no ip address
    shutdown
    !
    !
    line con 0
    !
    line vty 0 4
    login
    line vty 5 15
    login
    !
    !
    end


    Upper Middle Switch Config:
    Current configuration : 1106 bytes
    !
    version 12.2
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Switch
    !
    !
    !
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
    switchport mode trunk
    !
    interface GigabitEthernet1/1
    switchport mode trunk
    !
    interface GigabitEthernet1/2
    switchport mode trunk
    !
    interface Vlan1
    no ip address
    shutdown
    !
    !
    line con 0
    !
    line vty 0 4
    login
    line vty 5 15
    login
    !
    !
    end





    1841 Router Config:
    Router#sh run
    Building configuration...


    Current configuration : 717 bytes
    !
    version 12.4
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Router
    !
    spanning-tree mode pvst
    !
    interface FastEthernet0/0
    no ip address
    duplex auto
    speed auto
    !
    interface FastEthernet0/0.1
    description SALES VLAN
    encapsulation dot1Q 10
    ip address 192.168.0.1 255.255.255.0
    !
    interface FastEthernet0/0.2
    description ACCOUNTING VLAN
    encapsulation dot1Q 20
    ip address 192.168.20.1 255.255.255.0
    !
    interface FastEthernet0/1
    no ip address
    duplex auto
    speed auto
    shutdown
    !
    interface Vlan1
    no ip address
    shutdown
    !
    ip classless
    !
    line con 0
    !
    line aux 0
    !
    line vty 0 4
    login
    !
    end
  • 10Linefigure10Linefigure Member Posts: 368 ■■■□□□□□□□
    Yes Kohr-ah mine looks just like that, except my hosts for Vlan 10 are 10.10.10.101 and 102 and Vlan 20 are 20.20.20.201 and 202. Other thing is I have switch 1 and 2 from your diagram connected, and double sets of trunking lines. This example, if its allowed, I'm not advertising swear! Is from Chaper 11 of Todd Lammle's CCENT book if that helps. But yes other then that mine looks like yours but I cant escape their vlans to talk to each other!
    Adam B- hey man yea I am using his book, the host computers are pre-configured in the simulator that came with the book (as a download) am I able, or do I need to change them? Thanks guys.
    CCNP R&S, Security+
    B.S. Geography - Business Minor
    MicroMasters - CyberSecurity
    Professional Certificate - IT Project Management
  • kohr-ahkohr-ah Member Posts: 1,277
    Can you post the configurations in here?
    Maybe we can then see if anything is up.

    Also for fun is the router fa0/0 (not sub interfaces) no shut?
  • olaHaloolaHalo Member Posts: 748 ■■■■□□□□□□
    Router on a stick using Cisco packet tracer - YouTube

    This vid the guy is only using a single switch. But the trunk commands should be the same on all of them
    Adam B- hey man yea I am using his book, the host computers are pre-configured in the simulator that came with the book (as a download) am I able, or do I need to change them? Thanks guys.
    Make sure you change the gateways on each of the PCs to match whatever you set the interfaces to on the router
    kohr-ah wrote: »

    Also for fun is the router fa0/0 (not sub interfaces) no shut?
    So many hours I lost due to this...
  • 10Linefigure10Linefigure Member Posts: 368 ■■■□□□□□□□
    @ Kohr - Yes, when I get off work I will do the simulation again then post all the configs up here so we can look through them!

    @ola - Hey, Yes I put no shut on the routers fa0/0 interface, do I need to set anything else on it?

    How do I change the default gateways on the pc's? ( Thought this can only be done through Windows lol )
    CCNP R&S, Security+
    B.S. Geography - Business Minor
    MicroMasters - CyberSecurity
    Professional Certificate - IT Project Management
  • 10Linefigure10Linefigure Member Posts: 368 ■■■□□□□□□□
    Alright everyone, back in the room, here are the configs, we will start with the router, sorry if its lengthy! Okay, my bad, looks like the simulator I am using doesnt let me copy the information, so I took screen shots, hope that is okay!
    CCNP R&S, Security+
    B.S. Geography - Business Minor
    MicroMasters - CyberSecurity
    Professional Certificate - IT Project Management
  • eddie174eddie174 Member Posts: 17 ■■■□□□□□□□
    You don't have a management vlan to trunk on. Vlan 20 and 10 should trunk on vlan 1 native. Your router should have sub-interfaces on Fa0/0 such as fa0/0.99 fa0/0.10, fa0/0.20 assigned the default gateway IP address with encap DOT1q.

    Your switches should all have vlan ip addresses within the same subnets with switchport mode trunk and switchport trunk vlan 1 native. no other IP address. You also have to trunk the out going interface to the router. your interfaces to the nodes should be switchport mode access allow vlan 10 or 20.
  • kohr-ahkohr-ah Member Posts: 1,277
    Alright everyone, back in the room, here are the configs, we will start with the router, sorry if its lengthy! Okay, my bad, looks like the simulator I am using doesnt let me copy the information, so I took screen shots, hope that is okay!

    Can you see the default gateway on the PCs? That is the only thing I can imagine as everything else looks fine.
  • eddie174eddie174 Member Posts: 17 ■■■□□□□□□□
    looking at your abbreviated running configs and template I don't see your IP addresses for Vlan 1 in the running config? if you want to trunk you have to have IP addresses on each switch for vlan 1. Since I don't see any other Vlan info except for your access ports if you are not using VTP you need to have interfaces for each vlan on the switches.
    Like this:

    int vlan 20
    name IT
    int vlan 10
    name admin

    etc....

    When you configure the IP addresses on each switch (vlan 1) ensure you use the no shut command and ensure your nodes have the correct gateways
    For security reasons I usually don't use Vlan 1 for anything since you can't turn off CDP advertisements and I use another Vlan number for management/native.
  • 10Linefigure10Linefigure Member Posts: 368 ■■■□□□□□□□
    Yes, on 2 of the Switches the simulator would not let me put an IP address on Vlan1, I would be in config t > vlan 1 > then type ''ip address _____________ '' and it would give a question mark right after the ''ip'' so I didnt set them.
    @kohr , Yes it tells me the default gateway on the PC's they are auto set with the lab to be what you will make the sub-interfaces on the router.
    @ Eddie ''You also have to trunk the out going interface to the router'' I was not aware I could set trunking on my router?

    Thank you guys for the help
    CCNP R&S, Security+
    B.S. Geography - Business Minor
    MicroMasters - CyberSecurity
    Professional Certificate - IT Project Management
  • eddie174eddie174 Member Posts: 17 ■■■□□□□□□□
    not on the router but the output of the switch to the router. also remember when you enter the ip address you have to enter int vlan 1 then the ip address with the subnet mask.

    like this:

    config t
    int vlan 1
    ip address 192.68.39.2 255.255.255.0
    ip default-gateway 192.168.39.1
    no shut
  • 10Linefigure10Linefigure Member Posts: 368 ■■■□□□□□□□
    @ Eddie - BRILLIANT! See, I was using the config# vlan 1 command, so when I did it your way, config# int vlan 1 , it let me set the IP :) . But before it was time to pop the cork and grab the ladies a problem occurred! As you will see in my screen shot!
    CCNP R&S, Security+
    B.S. Geography - Business Minor
    MicroMasters - CyberSecurity
    Professional Certificate - IT Project Management
  • eddie174eddie174 Member Posts: 17 ■■■□□□□□□□
    Enter the int VLAN and IP address then no shut then exit then ip default-gateway 192.168.49.1 or whatever your scheme is. There is a post on this forum that walks you through inter VLAN routing step by step.
Sign In or Register to comment.