chapter 08 - vlan and trunking

Upload: trietbuivien

Post on 04-Jun-2018

231 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    1/35

    Chapter 8

    VLAN & Trunking

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    2/35

    Objectives

    Upon completion of this chapter, you will beable to perform the following tasks:

    Configure a VLAN

    Configure VLAN Trunking Protocol (VTP) Configure a switch for trunkingConfigure a router for trunkingRouting between Vlans

    Verify VLAN connectivity

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    3/35

    VLAN introduction

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    4/35

    VLAN Overview

    Segmentation

    Flexibility

    Security

    A VLAN = A broadcast domain = Logical network (subnet)

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    5/35

    Benefits of VLANs

    Easily move workstations on the LAN.Easily add workstations to the LAN.Easily change the LAN configuration.Easily control network traffic.Improve security.

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    6/35

    VLAN Operations

    Each logical VLAN is like a separate physical bridge VLANs can span across multiple switches Trunks carries traffic for multiple VLANs Trunks use special encapsulation to distinguish

    between different VLANs

    Switch A

    GreenVLAN

    BlackVLAN

    RedVLAN

    GreenVLAN

    BlackVLAN

    RedVLAN

    Switch B

    Trunk

    Fast Ethernet

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    7/35

    VLAN Membership Modes

    VLAN5

    Static VLAN Dynamic VLAN

    MAC = 1111.1111.1111

    Trunk

    VMPS

    1111.1111.1111 = vlan 10

    VLAN10

    Port e0/9Port e0/4

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    8/35

    VLAN CONFIGURATION

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    9/35

    Configuring Static VLANsCreate VLANs:

    Switch# vlan databaseSwitch(vlan)# vlan < vlan_number> name Switch(vlan)# exit

    Assign ports to VLANs:Switch(config)# interface fastethernet 0/9Switch(config-if)#switchport access vlan < vlan_number>

    Deleting VLANs

    Use the no form of the command .EX :

    Create VLANs:Switch# vlan databaseSwitch(vlan)# vlan 2 name VlanBGD Switch(vlan)# exit

    Assign ports to VLANs:Switch(config)# interface fastethernet 0/9Switch(config-if)#switchport access vlan 2

    Deleting VLANs Use the no form of the command .

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    10/35

    Verifying and save VLANconfiguration

    show vlan

    copy running-config startup-configCopy running-config TFTP

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    11/35

    TRUNKING

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    12/35

    Trunking concept

    VLAN1

    VLAN2

    VLAN1

    VLAN2

    VLAN1

    VLAN2

    VLAN1

    VLAN2

    VLAN1

    VLAN2

    VLAN1 and VLAN2

    TRUNK

    A trunk is a single communications line that carriesdata of multiple Vlans.

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    13/35

    VLANs and trunking

    ISL802.1Q (dot1q)

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    14/35

    Frames Tagging

    ISL802.1Q (dot1q)

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    15/35

    ISL Tagging

    Not intrusive to clientstations, client does notsee the ISL headerEffective betweenswitches, routers andswitches, switches andservers with ISL networkinterface cards

    ISL trunks enable VLANs across a backbone

    VLAN Tag addedby incoming

    port

    VLAN Tagstripped by

    forwarding port

    Inter-SwitchLink carries

    VLAN identifier

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    16/35

    ISL Encapsulation

    ISL Header26 bytes Encapsulated Ethernet frame

    CRC4 bytes

    Frames encapsulated with ISL header and CRCSupport for many VLANs (1024)

    VLAN field

    BPDU bit

    DA Type User SA LEN

    VLAN

    AAAA03

    BPDU

    HSA VLAN BPDUBPDU INDEX RES

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    17/35

    IEEE 802.1q

    802.1q does not actually encapsulate the originalframe instead, it adds an extra 4-byte header to themiddle of the original Ethernet header.802.1q encapsulation forces a recalculation of theoriginal FCS field in the Ethernet trailer

    Dest Src Len/Type Data FCS

    Dest Src Type Tag Len/Type Data FCS

    Priority VLAN ID

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    18/35

    ISL and 802.1q Compared

    Both ISL and 802.1q provide trunking.

    Both allow the use of a 12-bit-long VLAN ID field. So,either works fine and supports the same number ofVLANs.Both support a separate instance of spanning tree foreach VLAN.

    The header used by each varies, and only ISL actuallyencapsulates the original frame.

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    19/35

    Trunking implementation

    Switch# show port capabilities

    Switch # configure terminalSwitch(config)# interface f0/1Switch(config-if)# Switchport mode trunk.Switch(config-if)# Switchport trunk encapsulation dot1q/islSwitch # Show trunk

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    20/35

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    21/35

    Inter-VLAN issues and solutions

    Every Vlan is one subnetwork.When a host on one VLAN wants to communicate with ahost on another, a router must be involved. Networks with many VLANs must use VLAN trunking to

    assign multiple VLANs to a single router interface.

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    22/35

    Dividing a Physical Interface intoSubinterfaces

    Physical interfaces can be divided into multiplesubinterfaces.

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    23/35

    Physical and logical interfaces

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    24/35

    Configuring Router for Trunking

    Router(config)#Interface fastethernet port-numberRouter(config-if)#no shutdownRouter(config-if)#exit

    Router(config)# interface fastethernet port-number . Subinterface-number

    Router(config-if)#encapsulation dot1q/isl vlan-numberRouter(config-if)#ip address

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    25/35

    R1

    SW1SW2

    Vlan1 Vlan1 Vlan2 Vlan3Vlan3Vlan2

    F0/0.10:192.168.1.254F0/0.12:192.168.2.254F0/0.13:192.168.3.254

    .1.20 .2.20 .3.20 .1. 10 .2.10 .3.10

    EX : Configuring Router for Trunking

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    26/35

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    27/35

    VTP

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    28/35

    VLAN Trunking Protocol (VTP)

    A messaging system that advertises VLANconfiguration informationMaintains VLAN configuration consistencythroughout a common administrative domainVTP sends advertisements on trunk ports onlySupport mixed media trunks (Fast Ethernet,

    FDDI, ATM)

    1.new vlan added

    3.Sync to the latest vlan information

    2

    VTP Domain ICND

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    29/35

    VTP Modes

    Transparent

    Forwardsadvertisements

    Synchronize Not saved in

    NVRAM

    Create vlans Modify vlans Delete vlans Sends/forwardsadvertisements

    Synchronize Saved in NVRAM

    Create vlans Modify vlans Delete vlans Forwardsadvertisements

    Does notsynchronize

    Saved in NVRAM

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    30/35

    VTP advertisements are sent as multicast frames

    VTP servers and clients synchronized to latest revisionnumber

    VTP advertisement are sent every five minutes or whenthere is a change

    How VTP Works

    1.Add new VLAN2.Rev 3 --> Rev 4

    Server

    Client Client

    4.Rev 3 --> Rev 45.Sync new vlan info

    3 3

    4.Rev 3 --> Rev 45.Sync new vlan info

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    31/35

    VTP Pruning Increases available bandwidth by reducing unnecessaryflooded traffic

    Example: Station A sends broadcast, broadcast is onlyflooded toward any switch with ports assigned to the redVLAN

    Switch 4

    Switch 2

    Switch 6 Switch 3 Switch 1

    Port 2

    Floodedtraffic is

    pruned

    RedVLAN

    Port 1

    Switch 5

    A

    B

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    32/35

    VLAN Configuration Guidelines

    Maximum number of VLANs is switch-dependent

    Catalyst 1900 supports 64 VLANs with a separatespanning tree per VLANVLAN1 is One of the factory default VLANsCDP and VTP advertisements are sent on VLAN1

    Must be in VTP server or transparent mode tocreate, add, or delete VLANs

    VLAN Config ration Steps

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    33/35

    VLAN Configuration Steps

    Enable VTP (optional)

    Enable trunking

    Create VLANs

    Assign VLAN to ports

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    34/35

    VTP domain name

    VTP mode (server/client/transparent)

    VTP server mode is the default

    VTP pruning

    VTP password

    VTP Configuration Guidelines

    Use caution when adding a new switch into an existing domain. Anew switch should be added in client mode to prevent the newswitch from propagating incorrect VLANs information

    Use the delete vtp command to reset the VTP revision number

    wg_sw_2950#vlan database wg_sw_2950(vlan)#vtp [ server | client | transparent ] wg_sw_2950(vlan)#vtp domain domain-name wg_sw_2950(vlan)#vtp password password wg_sw_2950(vlan)#vtp pruning wg_sw_2950(vlan)#exit

  • 8/13/2019 Chapter 08 - VLAN and Trunking

    35/35

    Verifying VTP Configurations

    wg_sw_a#show vtpVTP version: 1Configuration revision: 4Maximum VLANs supported locally: 1005Number of existing VLANs: 6VTP domain name : switchlabVTP password :

    VTP operating mode : TransparentVTP pruning mode : EnabledVTP traps generation : EnabledConfiguration last modified by: 10.1.1.40 at 00-00-0000 00:00:00

    wg_sw_a#show vtp