You are on page 1of 11

Switching Layer 2 Switching By: Mohand For: arabhardware

Must break up collision domains correctly . LAN Switching: Bridge Switch Software based Hardware based ASIC chips Have one STP per bridge Have many Low number of ports Many numbers of ports .Hardware – based bridging (ASIC) .Wire speed .Make sure that users spend 80 percent of their time on the local segment .Both make forwarding decisions based on layer 1 address Switching functions at layer 2: .Switches do not break broadcast domains by default Bridging VS.address learning: enter this info into a MAC database - Station A sends a frame to station C Switch caches the MAC address of station A to port E0 by learning the source address of data frames ‎ The frame from station A to station C is flooded out to all ports except port E0‎ Forward/filter decisions - Station A sends a frame to station C Destination is know : frame is not flooded .Low cost and latency Switching limitations: .Switching Layer 2 Switching Purposes for using switching: .Breaks up collision domains .Cost – effective – resilient internetworking Switching services: .

STP used to stop network loops Redundant topology: - - - Redundant topology: eliminates single points of failure Redundant topology causes: broadcast storms .multiple frame copies and MAC Database instability Common Spanning-tree protocol: Used to make the switches communicate Prevent redundant paths Prevent loops Create from the block path a backup .- Station A sends a frame to station B The switch has the address for station B in the MAC address table Loop avoidance: if multiple connections between the switches are created for redundancy network loops can occur .

BPDU : bridge protocol data unit .If equal  the low port number Spanning-tree port state: .One designated port per segment .Provides a level of security over a flat network .The lowest cost to root bridge .Non designated port unused Spanning-tree path cost: Link speed 10 Gbps 1 Gbps 100 Mbps 10 Mbps Cost by IEEE 2 4 19 100 Root Bridge: (DF) .Operation: .Flexibility and scalability .Listening 15 seconds .One root bridge per network .If equal  the low port number Designated port: (DF) .Disable: by administrator manually VLAN'S: A logical grouping of network users and resources connected to administratively ports on a switch VLANs Features: .Learning 15 seconds .If equal  the lowest bridge id .Forwarding .The lowest cost to root bridge .One root port per non root bridge .Root bridge = bridge with lowest bridge id .If equal  the lowest bridge id .Bridge id = bridge priority (2byte) |Mac address (6byte) .Simplify network management (Segmentation) .Blocking 20 seconds .All ports at the root bridge are designated forward Root port: (RF) .

Access links : a link that is part of only one VLAN .Static VLANs : typical and most secure .Inter-switch link (ISL) : Cisco proprietary | Fast Ethernet & Giga Ethernet only .Dynamic VLAN's : automatic  (VMPS) VLAN management policy server VLAN Identifying: .1Q Trucking : used for Cisco and non-Cisco switch VLAN 1 native VLAN untagged traffic (Save size for another application like voip) .VLAN Operation: - Each logical VLAN is like a separate physical bridge VLANS can span across multiple switches Trunks carry traffic for multiple VLANS Trunks use special encapsulation distinguish between different VLANs VLAN Memberships: .Truck links : carries multiple VLANs Frame Tagging: .IEEE 802.

VTP advertisements are sent as multicast frames . delete and rename VLANs VTP Modes: VTP Operation: .VTP advertisements are sent every 5 minutes or when there is a change . allow an administrator to add.VTP servers and clients are synchronized to the latest revision number .Per-VLAN Spanning-Tree: VLAN Trunking protocol: (VTP) Manage all configuration VLANs.

the Support Department. . You assigned each floor to a switch for easy management and of course they can be assigned to different VLANs. How will you do that? Well. Now let’s discuss about VTP role in this topology! Suppose VTP is not running on these switches. without VTP you have to go to each switch to enable this new VLAN. Why we need VTP? To answer this question. To help you understand the basic concept. Fortunately your office only has 5 floors so you can finish this task in some hours :) But just imagine if your company was bigger with 100-floor office and some VLANs needed to be added every month! Well. your bosses can sit in any floor and still access Manage VLAN (VLAN 7). your boss decides to add a new department to your office. it is what VTP does for you! How VTP Works To make switches exchange their VLAN information with each other. this is a summary of what VTP is: “VTP allows a network manager to configure a switch so that it will propagate VLAN configurations to other switches in the network” VTP minimizes misconfigurations and configuration inconsistencies that can cause problems. other switches automatically learn about this VLAN. One day. Luckily. Only switches belonging to the same domain share their VLAN information. VTP is a Cisco-proprietary protocol and is available on most of the Cisco switches.This topic describes the features that VLAN Trunking Protocol (VTP) offers to support VLANs. Cisco alway s “thinks big” to create a method for you to just sit at the “Main Sw”. they need to be configured in the same VTP domain. Suppose you are working in a medium company in a 5-floor office. sweet. it is propagated to all switches via VTP advertisements. For example. When a change is made to the VLAN database. it will surely become a daunting task to add a new VLAN like this. let’s discuss a real and popular network topology. and you are tasked to add a new SUPPORT VLAN for this department. right? It is not a dream. This is the best design because each person’s permission is not limited by the physica l location. VTP helps you simplify management of the VLAN database across multiple switches. such as duplicate VLAN names or incorrect VLAN-type specifications. Your technical colleagues can sit anywhere on the floors to access Technical VLAN (VLAN 4). adding your new VLANs and magically.

the better your VTP advertisement. Each VTP advertisement is sent with a Revision number. A transparent switch can add. it still forwards VTP advertisements from the server to other switches (but doesn’t read that update). This is also the default mode. the first time the Main Sw sends a VTP advertisement. it will send a VTP advertisement with the Revision number of 2. modify) new VLAN. He can set it toTransparent mode. So the higher the revision number. only one switch should be allowed to create (or delete. the network manager doesn’t want a switch to learn VTP information from other switches. This number is used in order to determine whether the VTP advertisement is more recent than the current version of that switch. In some cases. They are operated in Client mode.To maintain domain consistency. a switch maintains its own VLAN database and never learn VTP information from other switches (even the server). VTP advertisements bring VLAN information to all the switches in a VTP domain. However. In this mode. When you add a new VLAN to the Main Sw. the “Main Sw” should be assigned this function and we should place it in a safe place. Client switches first . This switch is like the “master” of the whole VTP domain and it is operated in Server mode. delete and modify VLAN database locally. As said above. its Revision number is 1. Other switches are only allowed to receive and forward updates from the “server” switch. Because each time you make a VLAN change in a switch. For example. the configuration revision is incremented by one. Now return to the example above. we can configure any switches as the “server” but for our convenience.

Next it receives the VTP advertisement with the Revision number of 2. the two VTP versions are not interoperable so make sure to configure the same VTP version on every switch in a domain. it deletes its whole VTP information and copy the new information from the better VTP advertisement to its VLAN database. + VTP V2 Mode: displays if VTP version 2 mode is enabled. + VTP Operating Mode: can be server. Within a domain. + Number of Existing VLANs: Number of existing VLANs. it continues comparing with its current Revision number (1) -> it continues update its VLAN database. By default. Let’s have a look at the output of this command: + VTP Version: displays the VTP version the switch is running. Displays the IP address of the switch that caused the configuration change to the database.receive the VTP advertisement with the Revision number of 1. One important thing you must know is when a switch receives a better VTP advertisement. the switch runs version 1 but can be set to version 2. The “show vtp status” command analysis The most important command to view the status of VTP on Cisco switches that each CCNA learners must grasp is the “show vtp status” command. or transparent. VTP version 2 is disabled by default. + MD5 Digest: a 16-byte checksum of the VTP configuration. a switch operates in VTP Server mode with a NULL (blank) domain name with no password configured (the password field is not listed in the output) + VTP Pruning Mode: displays whether pruning is enabled or disabled. which is bigger than its current Revision number (0) so it updates its VLAN database. . + Configuration Last Modified: date and time of the last configuration modification. + VTP Traps Generation: displays whether VTP traps are sent to a network management station. By default. + Configuration Revision: current Revision number on this switch. + VTP Domain Name: name that identifies the administrative domain for the switch. A switch does not try to compare its own VLAN database with information from the received VTP advertisements to find out and update the difference! Note: VTP advertisements are sent as multicast frames and all neighbors in that domain receive the frames. client. + Maximum VLANs Supported Locally: maximum number of VLANs supported locally. We will discuss about VTP Pruning later.

Sw3 sends an advertisement to Server switch to inform that it . For example. When a switch has a port associated with a VLAN. let’s see an example: When PC A sends a broadcast frame on VLAN 10. VTP Pruning makes more efficient use of trunk bandwidth by forwarding broadcast and unknown unicast frames on a VLAN only if the switch on the receiving end of the trunk has ports in that VLAN. Sw2. that broadcast traffic also consumes processor time on Sw2. the switch sends an advertisement to its neighbors to inform that it has active ports on that VLAN. The link between switches Server and Sw2 does not carry any VLAN 10 traffic so it can be “pruned”. and Sw3 all receive broadcast frames from PC A. Switches Server. But only Sw3 has user on VLAN 10 and it is a waste of bandwidth on Sw2. Moreover. In the above example. it travels across all trunk links in the VTP domain. Server switch doesn’t send broadcast frame to Sw2 because Sw2 doesn’t have ports in VLAN 10.VTP Pruning: Increases available bandwidth by reducing unnecessary flooded traffic To understand what VTP Pruning is.

If both sides are set to dynamic auto. VTP messages are transmitted out of all the trunk connections. * Client: cannot make changes to the VLAN configuration when in this mode. You only need to enable pruning on one VTP server switch in the domain. VTP client also forwards VTP advertisements (but cannot create VTP advertisements). VTP Pruning makes more efficient use of trunk bandwidth by forwarding broadcast and unknown unicast frames on a VLAN only if the switch on the receiving end of the trunk has ports in that VLAN . VTP modes: * Server: The default mode. transparent. In Server mode we can create. Below summaries important notes about VTP: + Whenever a change occurs in the VLAN database. the change is propagated to all switches in the VTP domain. delete VLANs. the VTP server increments its configuration revision number and then advertises the new revision throughout the VTP domain via VTP advertisements. the change affects only the local switch and does not propagate to other switches in the VTP domain. + VTP operates in one of three modes: server. To configure trunk between these ports. modify. however. a VTP client can send any VLANs currently listed in its database to other VTP switches. the link will remain in access mode. VTP Configuration Main Main Main Main Sw(config)#vtp Sw(config)#vtp Sw(config)#vtp Sw(config)#vtp version 2 domain 9tut mode server password keepitsecret On client switches Client(config)#vtp Client(config)#vtp Client(config)#vtp Client(config)#vtp version 2 domain 9tut password keepitsecret mode client Notice: Before configuring VTP make sure the links between your switches are trunk links. When you make a change to the VLAN configuration on a VTP server. Your trunk link can automatically be formed if both of your switches are not 2960 or 3560 because ports on the 2960 and 3560 switches are set to dynamic auto by default. VTP transparent mode does forward VTP advertisements that it receives within the domain. or client. Sw2 has not advertised about VLAN 10 so Server switch will prune VLAN 10 on the trunk to Sw2.has active port for VLAN 10. use these commands: Client(config)#interface fa0/1 (or the interface on the link you want to be trunk) Client(config-if)#switchport mode trunk These commands only need to be used on one of two switches to form the trunk. * Transparent: When you make a change to the VLAN configuration in this mode.