CH 03
CH 03
Chapter-03
Switches
Baessa K.
Mettu University
Faculty of Engineering and Technology
Department of Information Technology
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Outline
2 VLANs
Outline
2 VLANs
• You can encrypt all passwords assigned to a switch using the service
password-encryption command.
Banners I
• Login Banner
Port Security I
• Port security is disabled by default.
• Limit and identify the MAC addresses of the workstations that are
allowed to access the port.
• When secure MAC addresses assigned to a secure port, the port does
not forward packets with source addresses outside the group of
defined addresses.
• Specify a group of valid MAC addresses allowed on a port.
• Or Allow only one MAC address access to the port.
• Specify that the port automatically shuts down if an invalid MAC
address is detected.
Port Security II
• Modes:
1 Protect: drop frames – no notify
2 Restrict: drop frames - notify
3 Shutdown: disable port - notify
Port Security IV
Port Security V
Port Security VI
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Basics I
• Host A sending out a broadcast and all ports on all switches forwarding
it–all except the port that originally received it.
Basics II
• STOP! → Security!
• within the typical layer 2 switched internetwork, all users can see all
devices by default.
• And you can’t stop devices from broadcasting, plus you can’t stop
users from trying to respond to broadcasts.
• There’s hope!
VLAN
Basics III
• A VLAN is a logical grouping of network users and resources
connected to administratively defined ports on a switch.
Basics IV
Basics V
• VLANs provide segmentation
based on broadcast domains.
• VLANs logically segment
switched networks based on the
functions, project teams, or
applications of the organization
regardless of the physical
location or connections to the
network.
• Communication among VLANs
still require a router.
• BUT, only one physical
connection will handle all
routing.
Basics VI
• A VLAN allows:
• Creation of groups of logically networked devices.
• The devices to act as if they are on their own independent network.
• The devices can share a common infrastructure.
• Each VLAN is a separate broadcast domain.
• Broadcast traffic is controlled.
• Each VLAN is a separate IP subnet.
• To communicate among VLANs, you must use a router
Benefits of VLANs I
• Security
• Groups with specific security needs are isolated from the rest of the
network.
• Sensitive data can be isolated to one VLAN, separating it from the
others.
• Cost Reduction
• Cost savings result from less need for expensive network upgrades and
more efficient use of existing bandwidth and uplinks.
• Higher Performance
• Dividing flat Layer 2 networks into multiple logical broadcast domains
reduces unnecessary traffic on the network and boosts performance.
• Broadcast Storm Mitigation
• VLAN segmentation prevents a broadcast storm from propagating
throughout the entire network.
Benefits of VLANs II
VLAN ID Ranges I
VLAN ID Ranges II
Types of VLANs I
5 Management VLAN
• A VLAN defined by the network administrator as a means to access the
management capabilities of a switch.
• By default, VLAN1 is management VLAN.
• It is a security best practice to define the management VLAN to be a
VLAN distinct from all other VLANs defined in the switched LAN.
• You do so by configuring and activating a new VLAN interface.
• You assign the management VLAN an IP address and subnet
mask.
• A new switch has all ports assigned to VLAN 1.
• Using VLAN 1 as the management VLAN means that anyone
connecting to the switch will be in the management VLAN.
• That assumes that all ports have not been assigned to another VLAN.
6 Voice VLANs
• This enables switch ports to carry IP voice traffic from an IP phone.
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Basics I
• Switch ports are layer 2–only interfaces that are associated with a
physical port.
• A switch port can belong to only one VLAN if it is an access port or
• all VLANs if it is a trunk port.
• You can manually configure a port as an access or trunk port, or you
can let the Dynamic Trunking Protocol (DTP) operate on a per-port
basis to set the switchport mode.
• DTP does this by negotiating with the port on the other end of the
link.
Basics II
Access ports
• An access port belongs to and carries the traffic of only one VLAN.
• Traffic is both received and sent in native formats with no VLAN
tagging whatsoever.
• Anything arriving on an access port is simply assumed to belong to
the VLAN assigned to the port
• So, what do you think will happen if an access port receives a tagged
packet, like IEEE 802.1Q tagged?
• Remember that access-link devices can’t communicate with devices
outside their VLAN unless the packet is routed.
Basics III
Trunk Ports
• A trunk link is a 100- or 1000Mbps point-to-point link between two
switches, between a switch and router, or even between a switch and
server.
• it carries the traffic of multiple VLANs–from 1 to 4,094 at a time
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Trunk I
Trunk II
Definition
A trunk is a physical and logical connection between two switches across
which network traffic travels.
Trunk III
Trunk IV
Trunk V
• VLANs over the singular link.
• A VLAN trunk allows you to extend the VLANs across an entire
network.
• A VLAN trunk does not belong to a specific VLAN; rather, it serves
as a conduit for VLANs between switches.
Trunk VI
Attention!
• It is also important to realize that a trunk link does not belong to a specific
VLAN.
• The responsibility of a trunk link is to act as a conduit for VLANs.
• Between switches and routers.
• Between switches and switches.
Trunk VII
• With the EtherType field set to the TPID value, the switch receiving
the frame knows to look for information in the Tag control
information field.
• The Tag control information field contains the following:
• 3 bits of user priority:
• Used to provide fast transmission of Layer 2 frames, like voice traffic.
• 1 bit of Canonical Format Identifier (CFI):
• Enables Token Ring frames to be carried across Ethernet links easily.
• 12 bits of VLAN ID (VID):
• VLAN identification numbers.
Trunking Modes I
• IEEE 802.1Q
• ISL (Inter-Switch Link)
• Today only 802.1Q is used.
• Legacy networks may still use ISL.
Trunking Modes II
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Overview I
Overview II
1 Create the VLANs.
2 Assign switch ports to VLANs statically.
3 Verify VLAN configuration.
4 Enable trunking on the inter-switch connections.
5 Verify trunk configuration.
• Command Syntax:
1 S1 # configure terminal
2 S1 ( config ) # vlan vlan - id
3 S1 ( config - vlan ) # name vlan - name
4 S1 ( config - vlan ) # end
Overview III
• Configure a VLAN
Overview IV
Overview V
Managing VLANs I
• Remove VLAN
Managing VLANs II
• To remove all VLAN configuration
Configure a Trunk I
• Command Syntax:
1 S1 # configure terminal
2 S1 ( config ) # interface interface - id
3 S1 ( config - if ) # switchport mode trunk
4 S1 ( config - if ) # switchport trunk native vlan vlan - id
5 S1 ( config - if ) # switchport trunk allowed vlan add vlan -
list
6 S1 ( config - vlan ) # end
Configure a Trunk II
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
VTP Concepts I
VTP Concepts II
VTP Concepts IV
VTP Concepts V
VTP Components I
VTP Domain
• Consists of one or more interconnected switches.
• All switches in a domain share VLAN configuration details using VTP
advertisements.
• Router or Layer 3 switch defines the boundary of domain.
VTP Components II
VTP Modes
• Server:
• The server is where VLANs can be created, deleted, or renamed for the
domain.
• VTP servers advertise VLAN information to other switches in the same
VTP domain.
• Client
• You cannot create, change, or delete VLANs on a VTP client.
• VTP clients Forward advertisements to other clients.
• You must configure VTP Client mode.
VTP Modes . . .
• Transparent:
• VTP transparent mode switches forward VTP advertisements to VTP
clients and VTP servers, but do not originate or otherwise implement
VTP advertisements.
• VLANs that are created, renamed, or deleted on a VTP transparent
mode switch are local to that switch only.
VTP Components IV
VTP Operation I
VTP Operation II
VTP Operation IV
VTP Operation V
VTP Operation VI
VTP Advertising I
VTP Advertising II
VTP Advertising IV
VTP Advertising V
• VTP Advertisement Types
1 Summary Advertisement
• Contains the VTP domain name, the current revision number, and
other VTP configuration details.
• Summary advertisements are sent:
• Every 5 minutes by a VTP server or client to inform neighboring
VTP-enabled switches of the current VTP configuration revision
number for its VTP domain.
• Immediately after a configuration change.
VTP Advertising VI
2 Subset Advertisement
• A subset advertisement contains VLAN information.
• Changes that trigger the subset advertisement include:
• Creating or deleting a VLAN.
• Suspending or activating a VLAN.
• Changing the name of a VLAN.
• Changing the MTU of a VLA
3 Request Advertisement:
• A request advertisement is sent to a VTP server.
• The VTP server responds to the client by sending a summary
advertisement followed by a subset advertisement.
• Request advertisements are sent if:
• The VTP domain name has been changed.
• The switch receives a summary advertisement with a higher
configuration revision number than its own.
• A subset advertisement message is missed for some reason.
• The switch has been reset.
VTP Pruning I
• VTP gives you a way to preserve bandwidth by configuring it to
reduce the amount of broadcasts, multicasts, and unicast packets.
• This is called pruning. VTP pruning enabled switches sends
broadcasts only to trunk links that actually must have the information.
• If Switch A doesn’t have any ports configured for VLAN 5 and a broadcast
is sent throughout VLAN 5, that broadcast wouldn’t traverse the trunk link
to Switch A.
• By default, VTP pruning is disabled on all switches.
• Seems to me this would be a good default parameter.
VTP Pruning II
• When you enable pruning on a VTP server, you enable it for the
entire domain.
• By default, VLANs 2 through 1001 are pruning eligible, but VLAN 1
can never prune because it’s an administrative VLAN.
• VTP pruning is supported with both VTP version 1 and version 2.
• By using the show interface trunk command, we can see that all
VLANs are allowed across a trunked link by default:
VTP Pruning IV
Configure VTP I
Configure VTP II
• Configuration Guidelines:
Configure VTP IV
Configure VTP V
Configure VTP VI
Outline
2 VLANs
VLAN Basics
Identifying VLANs
VLAN Trunking
Configure VLANs and Trunks
VLAN Trunking Protocol(VTP)
Methods
• Traditional Inter-VLAN Routing.
• Router-on-a-stick Inter-VLAN Routing.
• Switch Based Inter-VLAN Routing.
Assign it to a VLAN
• Before assigning an IP Address, the interface must to be configured
to operate on a specific VLAN using the proper encapsulation.
1 R1 ( config - subif ) # encapsulation dot1q vlan - id
Assign an IP Address:
• The IP Address assigned here will become the default gateway for
that VLAN.
1 R1 ( config - if ) # no shutdown
Configuring Subinterfaces
1 R1 # show ip route