Anda di halaman 1dari 24

CISCO CCNA

zarenco [COMPANY NAME] [Company address]

Contents
Chapter 9 ................................................................................................................................................. 2 Cisco CCNA Virtual LANs (VLANs) Part I................................................................................................... 2 Cisco CCNA Benifits of VLANs .............................................................................................................. 5 Cisco CCNA VLAN Operations .............................................................................................................. 6 Cisco CCNA VLAN Operations .............................................................................................................. 7 Cisco CCNA 802.1q Frame Tagging ...................................................................................................... 8 Cisco CCNA Dividing a Physical Interface into Subinterfaces .............................................................. 9 Cisco CCNA Router Subinterface Example ........................................................................................ 10 Cisco CCNA Creating Vlans ................................................................................................................ 11 Cisco CCNA Creating Trunk Ports ...................................................................................................... 12 Cisco CCNA VLANs Part II ....................................................................................................................... 13 Cisco CCNA Show Interface Truck ..................................................................................................... 13 Cisco CCNA Configuration Question .................................................................................................. 14 Cisco CCNA VLAN Question ............................................................................................................... 15 Cisco CCNA Virtual Trunk protocol (VTP) .......................................................................................... 16 Cisco CCNA VTP Modes ..................................................................................................................... 17 Cisco CCNA VTP Client Mode............................................................................................................. 18 Cisco CCNA VTP Configuration Example............................................................................................ 19 Cisco CCNA VTP Revisions ................................................................................................................. 20 Cisco CCNA VTP Physical Design Example ......................................................................................... 21 Cisco CCNA Show commands for VLAN's .......................................................................................... 22 Cisco CCNA Gathering information to Configure Switch 2 ................................................................ 23

Chapter 9
Cisco CCNA Virtual LANs (VLANs) Part I
Cisco CCNA VLAN and STP

When Ciscos talking about switching, they really mean layer-2 switching unless they say otherwise. Layer-2 switching is the process of using the hardware address of devices on a LAN to segment a network. How do we break up broadcast domains in a pure switched internetwork? By creating a virtual local area network (VLAN), thats how! A VLAN is a logical grouping of network users and resources connected to administratively defined ports on a switch. When you create VLANs, you are given the ability to create smaller broadcast domains within a layer2 switched internetwork by assigning different ports on the switch to different subnetworks. A VLAN is treated like its own subnet or broadcast domain, which means that frames broadcasted onto the network are only switched between the ports logically grouped within the same VLAN.

Cisco CCNA Before VLAN's

How do we break up broadcast domains in a pure switched internetwork? By creating a Virtual Local Area Network (VLAN), thats how! A VLAN is a logical grouping of network users and resources connected to administratively defined ports on a switch. When you create VLANs, you are given the ability to create smaller broadcast domains within a layer2 switched internetwork by assigning different ports on the switch to different subnetworks. A VLAN is treated like its own subnet or broadcast domain, which means that frames broadcasted onto the network are only switched between the ports logically grouped within the same VLAN. Before VLANs, we had hubs for each floor connected to a router, which broke broadcast domains for each floor. This topology is known as a collapsed backbone. Not a great solution for larger offices with lots of users. Shared bandwidth via hubs cause collisions on an ethernet network reducing throughput. Look on the next slide to see a better implementation utilizing switches along with VLANs.

Cisco CCNA After VLANs

VLANs break up collisions domains for each port on the switch. However, the benefit of the design in this slide is that you are no longer stuck with physical constraints. You can assign any switch port to any VLAN, so it doesnt matter where the employee is physically located. Use of switches also break up the collision domain.

Cisco CCNA Benifits of VLANs

VLANs logically divide a switch into multiple, independent switches at layer 2 A VLAN can span multiple switches VLANs increase the number of broadcast domains (while decreasing the size of each broadcast domain) Trunk links can carry traffic for multiple VLANs Access links carry information about only one VLAN

Cisco CCNA VLAN Operations

Access links This type of link is only part of one VLAN, and its referred to as the native VLAN of the port. Any device attached to an access link is unaware of a VLAN membershipthe device just assumes its part of a broadcast domain, but it has no understanding of the physical network. Switches remove any VLAN information from the frame before its sent to an access-link device. Access-link devices cannot communicate with devices outside their VLAN unless the packet is routed through a router. Trunk links Trunks can carry multiple VLANs and originally gained their name after the telephone system trunks that carry multiple telephone conversations. A trunk link can be a 100Mbps or higher point-to-point link between two switches, between a switch and router, or between a switch and server. These carry the traffic of multiple VLANsfrom 1 to 4095 at a time.

Cisco CCNA VLAN Operations

Another benefit to trunking is when youre connecting switches. Trunk links can carry some or all VLAN information across the link, but if the links between your switches arent trunked, then only one VLAN will be switched across the link. By default, all VLANs are configured on a trunked links. Specific VLANs that are not required to be trunked across a link can be disallowed by excluding the respective VLANs.

Cisco CCNA 802.1q Frame Tagging

Cisco Catalyst switches use frame tagging with VLAN ID to identify the VLAN membership of a frame over trunked links. 802.1q (DOT1q) inserts a four-byte tag field into the original ethernet frame. A unique identifier is placed in the header of each frame as it is forwarded between switches. The four-byte tag is stripped off by the switch prior to sending a packet to a host across a not trunk link.

Cisco CCNA Dividing a Physical Interface into Subinterfaces

At this point, it is important to understand that if the you want a router to connect multiple VLANs, the router needs a separate connection for each VLAN. The terminology separate can be accomplished multiple ways on a router. You can establish a separate physical connection for each VLAN that will interconnect with other VLANs, or you can split a FastEthernet or higher bandwidth interface into multiple, logical subinterfaces as depicted in the figure on the slide.

Cisco CCNA Router Subinterface Example

802.1q encapsulation is configured utilizing the encapsulation dot1q # command where # is the VLAN number. The example configured on the slide also called router on a stick. This configuration is not used as frequently now that port densities have increased on the newer devices, hence eliminating the need for sub-interfaces on higher port density devices.

10

Cisco CCNA Creating Vlans

By default a Cisco switch is set to VTP Server mode. In VTP server mode you can add, change or delete VLANs. If you are in VTP Client or Transparent mode then you cannot add, change or delete VLANs. VTP modes will be covered shortly. The first box shows an example of how to create a VLAN and assign a name to the VLAN. The second box shows an example of assigning switch interfaces as access ports to the specified VLAN.

11

Cisco CCNA Creating Trunk Ports

There are four options to the switchport mode command. They are as follows: Trunk Configures the port as a 802.1Q trunk port. Access Disables trunk mode and associated trunk mode negotiation. Dynamic desirable Triggers the port to negotiate the link on a nontrunk port to trunk mode. Dynamic auto Enables a port to become a trunk only if the connected device has the state set to trunk or dynamic desirable.

12

Cisco CCNA VLANs Part II


Cisco CCNA Show Interface Truck

To verify trunk configuration use one of the following two commands: To display the administrative and operational status of a switching (nonrouting) port, use the show interfaces switchport command. show interfaces [interface-id] switchport [module mod] interface-id - (Optional) Interface ID for the physical port. module mod - (Optional) Limits the display to interfaces on the specified module; valid values are from 1 to 6. To display port and module interface-trunk information, use the show interfaces trunk command. show interfaces trunk [module mod] module mod - (Optional) Limits the display to interfaces on the specified module; valid values are from 1 to 6.

13

Cisco CCNA Configuration Question

Answer: Router(config)#int fa0/0 Router(config-if)#no shutdown Router(config-if)#int fa 0/0.1 Router(config-subif)#encap dot1q 10 Router(config-subif)#ip address 192.168.10.1 255.255.255.0 Router(config-subif)#exit Router(config)#int fa 0/0.2 Router(config-subif)#encap dot1q 20 Router(config-subif)#ip address 192.168.20.1 255.255.255.0 Switch1(config)#int fa 0/1 Switch1(config-if)#switchport mode trunk

14

Remember, router ports are administratively down by default so the no shutdown command is needed on the router but by default switch ports are administratively up so the command is not needed on the switch.

Cisco CCNA VLAN Question

Hosts A, B and C are all configured on different subnets. Everything from the hosts perspective looks to be configured correctly. Note that host A is on VLAN1 while host B and C are on VLANs 32 and 33 respectively. Since host A can ping the switch, the only possible answer could be that the switch has an IP address define on VLAN 1 but does not have an ip default-gateway assigned.

15

Cisco CCNA Virtual Trunk protocol (VTP)

Server: This is the default for all Catalyst switches. You need at least one server in your VTP domain to propagate VLAN information throughout the domain. The switch must be in server mode to be able to create, add, or delete VLANs in a VTP domain. Client: switches receive information from VTP servers, and they also send and receives updates. But they cant make any changes. Learns and saves VTP configuration in the running configuration but does not save it to NVRAM. Transparent: Switches dont participate in the VTP domain, but theyll still forward VTP advertisements through any configured trunk links. Passes information about VTP configuration only. Be careful when adding configured switches into a different VTP domain. You can bring the network down and lose your VLAN database.

16

Cisco CCNA VTP Modes

The VTP mode is changed from global configuration mode with the following command: vtp mode mode Where mode is either client, server or transparent. Server: This is the default for all Catalyst switches. You need at least one server in your VTP domain to propagate VLAN information throughout the domain. The switch in server mode can create, add, or delete VLANs in a VTP domain. Client: switches receive information from VTP servers, and they also send and receives updates. But they cant make any changes. Learns but DOES NOT save VTP configuration in the running configuration and does not save it to NVRAM, nor anywhere else. It learns and forwards VTP information only. Client switches cannot create, add or delete VLANS. Transparent: Switches dont participate in the VTP domain, but theyll still forward VTP advertisements through any configured trunk links. Passes information about VTP configuration only. Can create, add, or delete VLANs on the local switch.

17

Cisco CCNA VTP Client Mode

In Client Mode, The switch will forward VTP summary advertisements The switch will process VTP summary advertisements The switch learns but does NOT saves VTP configuration in the running configuration NOR in the NVRAM. Learns and passes VTP information only!

18

Cisco CCNA VTP Configuration Example

To setup VTP a domain name needs to be configured and be the same on all switches throughout the domain. At least one switch needs to be configured in server mode and have all VLANS defined on it. Optionally a password can be configured within the VTP domain for additional security. To communicate VLAN information between switches, the following must occur: 1. The VTP management domain name of both switches must be set the same 2. At least one of the switches must be configured as a VTP server 3. Other switches that you wish to dynamically learn the VLANs should be configured in vtp client mode 4. No router is necessary

19

Cisco CCNA VTP Revisions

Note: The VTP revision number is important in that if a new switch is placed on the network in Server mode and has a higher revision number than the current switch in Server mode, all clients will start learning the VLANs defined on the new switch and delete the valid VLANs learned by the original switch configured as a VTP Server.

20

Cisco CCNA VTP Physical Design Example

Typically from a design perspective, the main core switch is configured as the VTP Server and all other switches as VTP clients. This works well is you have hundreds of VLANs. If you just have a handful of VLANs, configuring all switches in transparent mode and manually creating the VLANs required on the respective switches works well also.

21

Cisco CCNA Show commands for VLAN's

You must remember these commands!! show vlan Displays VLAN memberships on a switch show interface trunk Displays port and module interface trunk information show mac-address-table Displays the Forward/Filter (MAC address) table show vtp status Displays the VTP statistics and domain information

22

Cisco CCNA Gathering information to Configure Switch 2

From Switch 1, gather the needed information to configure Switch 2. switch1>enable switch1#show vtp status Write down the vtp domain name (case sensitive) switch1#show running-config Write down the ip address, mask and default gateway 1. Login to switch 2 and configure the next IP address in the range under the VLAN 1 interface (dont forget to do a no shut) 2. Set the ip default-gateway for the switch 3. Set the VTP domain name 4. Set the VTP mode to client

23

Anda mungkin juga menyukai