VLAN Questions

thehourmanthehourman Posts: 723Member
Hey guys, I just finished the ICND1 book by Wendell Odom. I am not going to take the test yet. I am still waiting for my Sybex CCNA. Once I finish the sybex book then I am going to schedule my ICND1 exam.

Anyways the CD that came with the book has some .PDF for practices and stuff. I am currently reading the Vlan pdf that came with it. I guess it is more in depth in Vlan.

The question is the term Trunking is used for adding another switch to a switch, right?
[Switch1]
(trunk cable/cat5e)
[Switch2]

So lets say in Switch1 we have 2 Vlans which are Vlan1 and Vlan2, and on Switch2 we have 2 Vlans, Vlan1 and Vlan2.
Also, lets say each Vlan has 5 host. If the host in Switch1(Vlan1) sends a broadcast, the other 4 hosts in Switch1(Vlan1) will get the broadcast.
In addition, Switch1(Vlan1) will forward the broadcast out to Switch2(Vlan1) as well (with the header Vlan ID of 1). Therefore, Switch2(Vlan1) will receive the broadcast from Switch1(Vlan1).

Is that how trunking works?

Here is another scenario, lets use the same situation; but the Switch1 has Vlan1 and Vlan2 and Switch2 has Vlan3 and Vlan4.
If a host in Switch1(Vlan1) send a broadcast, the hosts in vlan1 are the only ones who will get the broadcast frame because there are no other vlan1 on the other side of the trunk link.

Am I right?


Thanks
Studying:
Working on CCNA: Security. Start date: 12.28.10
Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
Reading:
Network Warrior - Currently at Part II
Reading IPv6 Essentials 2nd Edition - on hold

Comments

  • thehourmanthehourman Posts: 723Member
    ISL and 802.1Q are the protocol being used by the switches, right?
    So ISL and 802.1Q are pretty much like the routing protocol for switches.
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • Forsaken_GAForsaken_GA Posts: 4,024Member
    no, dot1q and isl are not anything like routing protocols. They do absolutely no traffic determination whatsoever.

    In a nutshell, what a trunk line does is allow you to multiplex data from different vlans and send them out over the same link so that the traffic can be segregated back into their vlans once they reach their destination. This is different than a port in access mode in which the traffic is assumed to be in the same vlan as the port, and therefore no frames are tagged.

    Trunk lines are kind of like taking the subway. You get on at one location, you ride the subway in the direction of your destination until you reach it, and then you get off.
  • Forsaken_GAForsaken_GA Posts: 4,024Member
    Actually, let me see if I can explain this a little bit better -

    Let's say I have two switches, A and B and I'm not doing any trunking

    And lets say I have 3 vlans, 1, 2, and 3

    If the ports in vlan 1 on Switch A want to talk to the ports in vlan 1 on switch B, I have to connect a port in vlan 1 on switch A to a port in vlan 1 on switch B.

    If the ports in vlan 2 on Switch A want to talk to the ports in vlan 2 on switch B, I have to connect a port in vlan 2 on switch A to a port in vlan 2 on switch B.

    If the ports in vlan 3 on Switch A want to talk to the ports in vlan 3 on switch B, I have to connect a port in vlan 3 on switch A to a port in vlan 3 on switch B.

    So basically, I've just used 3 ports to connect these two switches together so the vlans can communicate within their own vlan. That's a little bit wasteful. Now imagine if I had 20 vlans, and 50 switches. I would be wasting a very large number of ports just to enable the vlans to talk to each other.

    So instead I create a trunk link between switch A and switch B. As the frames destined for the other switch enter the trunk link, the switch adds a tag to the frame that says what vlan the frame came from, and when it reaches the other end of the trunk, the switch looks at that tag and knows which vlan to deliver the frame to. So now instead of using 3 links to enable the vlans on each switch to communicate with each other, I'm just using one. This is a much better situation to be in.

    Trunk lines allow communication within the vlans between different switches. For different vlans to be able to talk to each other would require a layer 3 device.

    Hope that makes sense.
  • thehourmanthehourman Posts: 723Member
    Yes, it does.
    Also, back to your example, the Vlan 1 in switch A and Vlan 1 in switch B, do they have to be in the same subnet?

    What about the default gateway?
    Lets say the router's fa0/0(DW) has an ip address of 192.168.2.1/26.
    The switch A Vlan1 is in subnet 192.168.2.0/26, Vlan2 is in subnet 192.168.2.64/26, and Vlan3 is in subnet 192.168.2.128/26.
    What is the default gateway for Vlan2 and Vlan3?
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • Forsaken_GAForsaken_GA Posts: 4,024Member
    thehourman wrote: »
    Yes, it does.
    Also, back to your example, the Vlan 1 in switch A and Vlan 1 in switch B, do they have to be in the same subnet?

    Only if they want to communicate at layer 3.

    Vlans are purely a layer 2 construct, though the best practice is one subnet to a vlan. You can have have 10 or 15 subnets in a single vlan if you want (and I actually do on my production network, thanks to the crappy design of my predecessors)
    What about the default gateway?
    Lets say the router's fa0/0(DW) has an ip address of 192.168.2.1/26.
    The switch A Vlan1 is in subnet 192.168.2.0/26, Vlan2 is in subnet 192.168.2.64/26, and Vlan3 is in subnet 192.168.2.128/26.
    What is the default gateway for Vlan2 and Vlan3?

    If the router has an IP address of 192.168.2.1/26, and that router port is connected to a switch port in vlan1, all the machines in vlan1 would be able to use it as it's default gateway (assuming they were addressed within that subnet). If you wanted to put hosts in vlan1 that were addressed like, say 172.16.39.0/24, you'd add 172.16.39.1 as a secondary IP address to the router interface, and configure those hosts with a gateway of 172.16.39.1, they'd be able to communicate at layer 3 (note, this is NOT intervlan routing, it's just routing. Everything is still in the same vlan)

    Assuming you wanted to use the same router interface to also host gateways for vlan2 and vlan3, you would actually configure a switch port as a trunk to the router, and configure sub interfaces for each, so if vlan2 wanted to talk to vlan 1, it would go up the trunkline to the router, and then back down the trunkline to the switch. On the way up, it'd be tagged with vlan 2, on the way back down, it'd be tagged as vlan 1. This is know as Router On A Stick (ROAS)
  • chmorinchmorin Posts: 1,446Member
    Forsaken is correct, (Whowould think that an NP and DP knows what VLAN's do /end sarcasm). Trunking is used to enable switch communication and inter-vlan communication. While a trunk port can't transport VLAN packets alone, it needs the help of a layer 3 device to move packets from one network to the other.

    Also I am pretty sure dot1q is an encapsulation mode done on the physical interface, and in that encapsulation trunk packets can exist. It is not like a routing protocol.

    Broadcasts are sent to all the switches, but only forwarded to any clients located on the broadcasts vlan. A vlan implies many of the same rules as a local area network. Hence, Virtual Local Area Network. Because of that, yes a VLAN does have to be in the same subnet.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • thehourmanthehourman Posts: 723Member
    To add a secondary ip to the router's fa0/0, is the the command:
    conf t
    int fa0/0
    ip address 172.16.39.1 255.255.255.0
    If the router ask if it secondary just say yes, right?

    In ICND1 book by Odom, for all the example that he has in that book. Did he use ROAS? Because all the example in the book are like [router]
    [switch]----[multiple vlans]
    But did not mention ROAS at all, at least for what I remember.
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • Forsaken_GAForsaken_GA Posts: 4,024Member
    thehourman wrote: »
    To add a secondary ip to the router's fa0/0, is the the command:
    conf t
    int fa0/0
    ip address 172.16.39.1 255.255.255.0
    If the router ask if it secondary just say yes, right?

    In ICND1 book by Odom, for all the example that he has in that book. Did he use ROAS? Because all the example in the book are like [router]
    [switch]----[multiple vlans]
    But did not mention ROAS at all, at least for what I remember.

    no, you configure it as

    ip address 172.16.39.1 255.255.255.0 secondary

    If you don't add the secondary keyword, it'll replace the IP you currently have assigned to the interface
  • chmorinchmorin Posts: 1,446Member
    Inter VLAN Routing is not an ICND1 topic, I believe.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • thehourmanthehourman Posts: 723Member
    The reason I asked is because I found a pdf about vlan in the CD that came with the book.
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • CiskHoCiskHo Posts: 188Member
    thehourman wrote: »
    Did he use ROAS? Because all the example in the book are like [router]
    [switch]----[multiple vlans]
    But did not mention ROAS at all, at least for what I remember.
    Did you see anything about subinterfaces? I thought ROAS required addressing like:
    fa0/0.1 (for vlan1)
    fa0/0.2 (for vlan2)
    fa0/0.3 (for vlan3)
    ...etc
    My Lab Gear:
    2811(+SW/POE/ABGwifi/DOCSIS) - 3560G-24-EI - 3550-12G - 3550POE - (2) 2950G-24 - 7206VXR - 2651XM - (2) 2611XM - 1760 - (2) CP-7940G - ESXi Server

    Just Finished: RHCT (1/8/11) and CCNA:S (Fall 2010)
    Prepping For: VCP and CCNP SWITCH, ROUTE, TSHOOT
  • thehourmanthehourman Posts: 723Member
    I don't think so.
    I just said fa0/0

    What how do you setup the fa0/0.x interface?
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • SelfmadeSelfmade Posts: 268Member
    First you make sure the fa0/0 interface is enabled by doing a no shut on it to bring it to the up state

    then you type

    int fa0/0.10 for vlan 10 (just imagine there's a vlan 10)
    then
    encapsulation dot1q 10 (sets up encapsulation)
    ip address 172.16.10.1 255.255.255.0

    for vlan 20 using the same router

    int fa0/0.20
    encapsulation dot1q 20
    ip address 172.16.20.1 255.255.255.0

    for vlan 30 using the same router

    int fa0/0.30
    encapsulation dot1q 30
    ip address 172.16.20.1 255.255.255.0

    now if you have a native vlan called vlan 99

    you would do it like this

    int fa0/0.99
    encapsulation dot1q 99 native (the native at the end of this command specifies that it's the native VLAN)
    ip address 172.16.99.1 255.255.255.0

    now between the router and the switch

    you'd make sure that on the switchport that accesses the router
    you enabled trunking

    it would be

    Fa0/1 on the switch to the Fa0/0 interface on the router

    on the switch you would type

    S1(config)#int fa0/1
    S1(config-if)#switchport mode trunk
    S1(config-if)#switchport trunk native vlan 99

    that would allow trunking between the switch and the router and allow the end users to use the router on a stick inter-vlan method to talk to each other using vlans to seperate the users

    Remember, a VLAN is just another word for a LAN, a LAN is done using physical cabling, a VLAN is logically based, that makes it easy to remember what you're talking about

    there's lots of Packet Tracer activities that give you lots of practice with vlans, inter-vlan routing and whatnot in CCNA 3

    i recommend getting your hands on those Packet Tracers

    I consider switching a lot easier to learn than routing for me

    Weird, i know, i'm probably in the minority, but I picked up switching a lot faster than I did routing.

    Anyway, hope my little guest lecture helps
    It's not important to add reptutation points to others, but to be nice and spread good karma everywhere you go.
  • thehourmanthehourman Posts: 723Member
    I tried to read the vlan.pdf that comes with ICND1 ciscopress, but I am really confuse about the commands.
    So the fa0/0.x is the vlan's id, right?
    The switchport mode trunk is like a static way of trunking to router's fa0/0, right?

    This switch vlan configuration is more confusing than the router's CLI.
    I am using GNS3 and it does not have switch just routers, and it seems to hang from time to time(not the GNS3, the console terminal). I want to practice on my 2950s, but my surge protector just stopped working, so I need to buy a new one.
    Where do I get that packet tracing I can't seem to find it? I am going to need it when I am at work, and when I get home I'm going to play with my 2 2950s.
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • notgoing2failnotgoing2fail Posts: 1,138Member
    thehourman wrote: »
    I tried to read the vlan.pdf that comes with ICND1 ciscopress, but I am really confuse about the commands.
    So the fa0/0.x is the vlan's id, right?
    The switchport mode trunk is like a static way of trunking to router's fa0/0, right?

    This switch vlan configuration is more confusing than the router's CLI.


    This part (fa0/0.x) looks likes a subinterface to me. The X would be whatever number you want.

    The switchport mode trunk tells the port to no longer be an access port and to be a trunking port. On older switches it will default to ISL. (boo!)
    So when you turn it into a trunk also issue this command to make sure it uses 802.1Q

    switchport trunk encapsulation dot1q
  • Forsaken_GAForsaken_GA Posts: 4,024Member
    thehourman wrote: »
    I tried to read the vlan.pdf that comes with ICND1 ciscopress, but I am really confuse about the commands.
    So the fa0/0.x is the vlan's id, right?

    Normal convention is to make the .x something meaningful. It's not automatically associated with anything, it's just used as an identifier, but most people associate with something relevant to the interfaces configuration if possible (ie, if it's doing ROAS, the .x would be the vlan. If you're doing frame relay, the .x will usually be the DLCI)
  • SysAdmin4066SysAdmin4066 Posts: 443Member
    Layer 3 switches can do intervlan routing much easier, using switched virtual interfaces (SVIs). These allow the routing process to be internal rather than requiring the ROAS configuration.
    In Progress: CCIE R&S Written Scheduled July 17th (Tentative)

    Next Up: CCIE R&S Lab
  • thehourmanthehourman Posts: 723Member
    This part (fa0/0.x) looks likes a subinterface to me. The X would be whatever number you want.

    The switchport mode trunk tells the port to no longer be an access port and to be a trunking port. On older switches it will default to ISL. (boo!)
    So when you turn it into a trunk also issue this command to make sure it uses 802.1Q

    switchport trunk encapsulation dot1q
    @notgoing2fail, I know that you are studying vlan. Have you read the .pdf vlan that came with the Ciscopress ICND1? If you have, what do you think of it?
    Is vlan configuration part of ICND1?
    Normal convention is to make the .x something meaningful. It's not automatically associated with anything, it's just used as an identifier, but most people associate with something relevant to the interfaces configuration if possible (ie, if it's doing ROAS, the .x would be the vlan. If you're doing frame relay, the .x will usually be the DLCI)
    @Forsaken_GA,
    How does the vlan know which one its default gateway?
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • notgoing2failnotgoing2fail Posts: 1,138Member
    thehourman wrote: »
    @notgoing2fail, I know that you are studying vlan. Have you read the .pdf vlan that came with the Ciscopress ICND1? If you have, what do you think of it?
    Is vlan configuration part of ICND1?

    I have not looked at the vlan.pdf, I wasn't even aware of it. I played around with the 2 CD's that come with the books but really didn't go into depth with them......

    I think I'll be studying vlan's for the rest of my life. LOL I think there will always be something new to learn or to remember!!!
  • Forsaken_GAForsaken_GA Posts: 4,024Member
    thehourman wrote: »


    @Forsaken_GA,
    How does the vlan know which one its default gateway?

    It doesn'. Again, vlan's are layer 2 constructs. Default gateway is a routing concept, which would put it at layer 3. You can assign any IP you want to the layer 3 inteface that will be acting as the default gateway, you just have to configure your hosts to use that as the default gateway. Common convention is that the first usable IP in the subnet is the default gateway, but that's not a hard and fast rule.

    Do not equate vlan to subnet. While, again, it's common convention to put one subnet per vlan, it is not a requirement, they operate on different layers.
  • notgoing2failnotgoing2fail Posts: 1,138Member
    It doesn'. Again, vlan's are layer 2 constructs. Default gateway is a routing concept, which would put it at layer 3. You can assign any IP you want to the layer 3 inteface that will be acting as the default gateway, you just have to configure your hosts to use that as the default gateway. Common convention is that the first usable IP in the subnet is the default gateway, but that's not a hard and fast rule.

    Do not equate vlan to subnet. While, again, it's common convention to put one subnet per vlan, it is not a requirement, they operate on different layers.


    Everything he said is spot on. Too many times books and instructors use the same old ip address and students fall asleep on the fundamentals and start to believe that 192.168.1.1 is the only possible gateway for your network...

    And although vlans are typically associated with subnets, it really shouldn't be looked that way completely....
  • SelfmadeSelfmade Posts: 268Member
    It doesn'. Again, vlan's are layer 2 constructs. Default gateway is a routing concept, which would put it at layer 3. You can assign any IP you want to the layer 3 inteface that will be acting as the default gateway, you just have to configure your hosts to use that as the default gateway. Common convention is that the first usable IP in the subnet is the default gateway, but that's not a hard and fast rule.

    Do not equate vlan to subnet. While, again, it's common convention to put one subnet per vlan, it is not a requirement, they operate on different layers.

    correct

    the physical layer consists of end user devices, cabling, and clock rates on serial links

    the data link layer consists mostly around switches and MAC addressing (basically connecting devices together)

    the network layer focuses on IP and routing functions, which includes Inter-VLAN routing

    when you start learning how to troubleshoot network problems it becomes very instructive to know everything about the first 3 layers, what functions are performed at each of the first 3 layers, it's only once you know those 3 layers, that you will find it easier to troubleshoot problems in your Packet Tracer labs as well as in the real world.

    One more little tip, the ping command works at layer 3, don't forget that. But at the same time, know why when a ping is being sent, why it fails and what a failed ping can tell you (obviously, something's wrong, but where and at what layer? what part of the network is the ping failing at?)

    that can really help you a lot, not just with VLANs and testing them for connectivity, but everything else associated with networking
    It's not important to add reptutation points to others, but to be nice and spread good karma everywhere you go.
  • Yahe007Yahe007 Posts: 2Registered Users ■□□□□□□□□□
    @Selfmade

    Couldn't find better explanation :) thank u very much :)
  • SelfmadeSelfmade Posts: 268Member
    Yahe007 wrote: »
    @Selfmade

    Couldn't find better explanation :) thank u very much :)


    Np icon_cheers.gif

    I'm a Man of the People icon_thumright.gif
    It's not important to add reptutation points to others, but to be nice and spread good karma everywhere you go.
Sign In or Register to comment.