1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to you route a vlan'ed pc to a router?

Discussion in 'Routing & Switching' started by zr79, Apr 16, 2009.

  1. zr79

    zr79 Byte Poster

    ...to a router, or another segment.....

    In this diagram PC1 and PC2 are in "Vlan 5" and therefore can only ping each other.

    How do i get PC1 and / or PC2 to "reach the router" ..........?

    And a similar question, how would i add PC3 to "Vlan 5" through the router.........?

    The other 2 PCs are just on the default vlan 1....so don't come into it.

    Certifications: A+
  2. greenbrucelee
    Highly Decorated Member Award

    greenbrucelee Zettabyte Poster

    another router?
    Certifications: A+, N+, MCDST, Security+, 70-270
    WIP: 70-620 or 70-680?
  3. Triton.Deep

    Triton.Deep Bit Poster

    -cracks knuckles-

    1) How to make PC1 and PC2 see the router using VLAN 5.

    a. Make link from switch to router a trunk port (not an access port).
    i. I can't remember all the commands without having my fingers typing in the IOS, but on the switch use the "switchport" command. Go with 802.1q encapsulation, if it's a test network just trunk all vlans, but probably a good time to learn how to prune them as welll.
    ii. On the router, configure the vlan interfaces 1) config t 2) int VLAN5 3) Ip address 4) int VLAN1 etc etc etc

    2) How to make PC3 talk on VLAN5 going through the router.
    i. Much better to just plug PC3 into VLAN5 on the switch and add that port to VLAN5. However...
    ii. You can bridge the connections on the router I think. Might run into some issues briding across them if one is in trunk mode(hrmms..you could use a sub-interface possibly), but maybe not. This is all from memory, I'd have to log in and do a little exploring to make it all perfect. Just research briding connections in the Cisco IOS and you'll get it figured out I'm sure.

    Anyways, hopefully that gives you the basic idea and gets you going. Hope it helps.

    Certifications: MCITP EMA, MCTS, MCSE (x3), CCNA, A+,etc
    WIP: MCM for Exchange probably. Not Sure
  4. keconnect sparky

    keconnect sparky Nibble Poster

    As already mentioned above, u setup whats called "router on a stick"

    the trunk link(s) have to be at least a 100mb port to handle the extra vlan traffic
    Certifications: MCP, CCENT, CCNA, CCNA-S
  5. brick-it

    brick-it Bit Poster

    you could create a sub interface on the router's ethernet port, one for each vlan, each with is own ip address and mask (on different subnets). This will do your inter vlan routing.
    Certifications: HNC comp, C&G Electronics, CCNA voice
    WIP: CCNA security
  6. kammodo

    kammodo Nibble Poster

    Actually this question is harder than I thought.
    Everyone is saying router on a stick. Which seems ok.However a few extra questions arise, for myself anyway.
    What would be Pc3,s default gateway as this link would have to be an access port cause its not a switch and the encapsulation on the pc dot1q? nope, so it would be an normal L3 port. So right away Im thinking how can you have the PC specifically in vlan 5 without putting it in an actual vlan? So trunk from switch to router, and on the router, yes
    encapsualtion isl/dot1q. So waht ip address would you have on it? got to be different from the network address that pc3 is using as a gefault gateway otherwise it will say
    'address overlaps'. Ok so I havent figured out how to switch purely on layer2 info on the router, maybe someone has figured it out.
    But there is a work around. Well theoretically anhow, as I have not actually tested it, please anybody feel free to pick holes in my theory. Ok have the trunking
    as per normal from switch to router with a default gateway, say whatever. On the interface that connects the pc,
    obviously have a different network. Say and the pc on this network too. Then set up a routing protocoll or static routes to each set of address.
    Finally since this seems to no longer a vlan for pc3 but just L3 routing and the nature of the Vlan is reduced broadcast and enhanced security, take care of the security with
    ACL,s and shut down unwanted ports on the router. Well the pc is in a different subnet and routing is now mostly L3, but it might work..........
    Certifications: CCNA R+S, CCDA , CCNP r+s , CCDP

Share This Page