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

    199
    1
    17
    ...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.

    [​IMG]
     
    Certifications: A+
  2. greenbrucelee
    Highly Decorated Member Award

    greenbrucelee Zettabyte Poster

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

    Triton.Deep Bit Poster

    42
    3
    22
    -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 192.168.1.1 255.255.255.0. 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.

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

    keconnect sparky Nibble Poster

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

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

    brick-it Bit Poster

    14
    0
    19
    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

    56
    0
    33
    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 192.168.0.254/24 whatever. On the interface that connects the pc,
    obviously have a different network. Say 10.0.0.254/24. 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
    WIP: CCIE

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.