You are on page 1of 14

Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology

Computer Networks 2 - Labs

Contents
Lab 1: Introduction to networking materials and software tools Lab 2: Practice on Cisco network devices Lab 3: Building a complete network on Packet Tracer Lab 4: LAN-to-LAN Connections Lab 5: Advanced LAN Switching Configuration - VLANs Lab 6: Building Inter-VLAN Network with a Router and Layer-3 Switch Lab 7: Basic Router Configuration Lab 8: RIP Version 2 and Debugging Lab 9: Configure OSPF on a multi-access network Lab 10: BGP - inter-autonomous system routing protocol Lab 11: Wireless Network and AP Configuration Lab 12: Using a network management and monitoring tool

Computer Networks 2 – Laboratories

1

Describes the features and interfaces that can be configured on the VLANs assigned to the switch ports on Cisco 1801 Integrated-Services Router. (Optional) Configure the database: vlan: the VLAN database is the default if none are configured. VTP server mode requires a domain name. you must decide whether to use VLAN Trunking Protocol (VTP) to maintain global VLAN configuration for your network. the VTP file name. This command is optional for modes other than server mode. unknown: an unknown database type. and to disable or enable pruning. server. You use the vtp global configuration command to set the VTP password. The name can be 1 to 32 characters. 1801 IS Router) will be given at Lab time. transparent or off). VLAN configuration modes. mst: the multiple spanning tree (MST) database. Command Step 1 configure terminal Step 2 vtp domain domain-name Purpose Enter global configuration mode. and the mode. You should configure the VTP domain before configuring other VTP parameters. • • II. Step 3 vtp mode{client|server|transparent|off} {vlan|mst|unknown} Configure the switch for VTP mode (client. the switch learns the domain name from the VTP server in the domain. Cisco devices (8-port Catalyst 2960 Switch. Introduction to VLAN Configuration on Cisco devices 1. the domain name. Configure the VTP administrative-domain name.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Lab 5: Advanced LAN Switching Configuration . the interface providing updated VTP information. It includes information about VLAN membership modes.VLANs I. All switches operating in VTP server or client mode under the same administrative responsibility must be configured with the same domain name. Objectives: • This lab describes how to configure normal-range VLANs (VLAN IDs 1 to 1005) and extended-range VLANs (VLAN IDs 1006 to 4094) on the Catalyst 2960 Switches. Computer Networks 2 – Laboratories 2 . VLAN trunks (Dynamic VLAN assignment from a VLAN Membership Policy Server (VMPS) is actually ignored). If the switch has a trunk connection to a VTP domain. Configuring VLANs on Cisco Catalyst 2960 Switch ◦ Configuring VTP Domain Before you create VLANs. the version.

Command Step 1 Step 2 configure terminal vtp pruning Purpose Enter global configuration mode. Display VTP status and configuration for all interfaces or the specified interface. ◦ Monitoring VTP You monitor VTP by displaying VTP configuration information: the domain name. The password can be 8 to 64 characters. Note Only VTP mode and domain name are saved in the switch running configuration and can be copied to the startup configuration file. show vtp interface[interface-id] show vtp password show vtp status Computer Networks 2 – Laboratories 3 . (Optional) Save the configuration in the startup configuration file. Step 3 Step 4 end show vtp status Return to privileged EXEC mode. the current VTP revision. the VTP domain does not function properly if you do not assign the same password to each switch in the domain. Return to privileged EXEC mode. Display the VTP switch configuration information. pruning is disabled. Verify your entries in the VTP Pruning Mode field of the display. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display. Display information about all VTP version 3 devices in the domain. If you configure a VTP password. and the number of VLANs. Display the VTP password. You need to enable pruning on only one switch in VTP server mode. Command show vtp counters show vtp devices[conflict] Purpose Display counters about VTP messages that have been sent and received.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Step 4 vtp password yourpassword (Optional) Set the password for the VTP domain. You can also display statistics about the advertisements sent and received by the switch. Step 5 end Step 6 show vtp status Step 7 copy running-config startup-config ◦ Enabling VTP Pruning Pruning increases available bandwidth by restricting flooded traffic to those trunk links that the traffic must use to access the destination devices. The show vtp devices command does not display information when the switch is in transparent or off mode. You can only enable VTP pruning on a switch in VTP server mode. By default. The form of the password displayed depends on whether or not the hidden keyword was entered and if encryption is enabled on the switch. Conflicts are VTP version 3 devices with conflicting primary servers. Enable pruning in the VTP administrative domain.

Verify the VLAN removal. (Optional) If the switch is in VTP transparent mode. Return to privileged EXEC mode. For example. When you delete a VLAN. or enter an existing VLAN ID to modify that VLAN. the default is to append the vlan-id with leading zeros to the word VLAN. Verify your entries. Interface VLAN membership on the switch is assigned manually on an interface-by-interface basis. the new VLAN is created. the VLAN configuration is saved in the running configuration file as well as in the VLAN database. and enter VLAN configuration mode. Configuring Normal-Range VLANs Command Step 1 Step 2 Step 3 configure terminal vlan vlan-id name vlan-name Purpose Enter global configuration mode. Command Step 1 Step 2 Step 3 Step 4 Step 5 configure terminal no vlan vlan-id end show vlan brief copy running-config startup config Purpose Enter global configuration mode. Assigning Static-Access Ports to a VLAN You can assign a static-access port to a VLAN without having VTP globally propagate VLAN configuration information by disabling VTP (VTP transparent mode). If no name is entered for the VLAN. VLAN0004 is a default VLAN name for VLAN 4. the VLAN configuration is saved in the running configuration file as well as in the VLAN database. (Optional) Configure the VLAN as the RSPAN VLAN for a remote SPAN session. the VLAN is removed from the VLAN database for all switches in the VTP domain. This saves the configuration in the switch startup configuration file. Enter a VLAN ID. Step 4 Step 5 Step 6 Step 7 Step 8 mtu mtu-size remote-span end show vlan{name vlan-name | id vlan-id} copy running-config startup config Deleting a VLAN When you delete a VLAN from a switch that is in VTP server mode. (Optional) If the switch is in VTP transparent mode.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology ◦ Configuring VLANs All the PCs in a particular IP subnet belong to the same VLAN. Remove the VLAN by entering the VLAN ID. Enter a new VLAN ID to create a VLAN. If you assign an interface to a VLAN that does not exist. (Optional) Enter a name for the VLAN. Return to privileged EXEC mode. any ports assigned to that VLAN become inactive. Computer Networks 2 – Laboratories 4 . (Optional) Change the MTU size (or other VLAN characteristic). This saves the configuration in the switch startup configuration file.

(Optional) Save your entries in the configuration file. Save your entries in the switch startup configuration file. Verify your entries in the Administrative Mode and the Access Mode VLAN fields of the display. Define the VLAN membership mode for the port (Layer 2 access port). and the extended-range VLAN IDs will not be saved. Displaying VLANs Command Purpose Computer Networks 2 – Laboratories 5 . Assign the port to a VLAN. Note With VTP version 3. Otherwise. Return to privileged EXEC mode. Return to privileged EXEC mode. Step 5 remote-span Step 6 end Step 7 show vlan vlan-id Step 8 copy running-config startup config (Optional) Configure the VLAN as the RSPAN VLAN. you need to save the VTP transparent mode configuration and the extended-range VLAN configuration in the switch startup configuration file. The range is 1006 to 4094. Step 3 vlan vlan-id Step 4 mtu mtu-size Enter an extended-range VLAN ID and enter VLAN configuration mode. it will default to VTP server mode. Note Although all VLAN commands appear in the CLI help. Valid VLAN IDs are 1 to 4094. and remote-span commands are supported for extendedrange VLANs. Verify the VLAN membership mode of the interface. only the mtu mtu-size. the VLAN configuration is also saved in the VLAN database. if the switch resets. Configure the switch for VTP transparent mode. Verify that the VLAN has been created.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Command Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 configure terminal interface interface-id switchport mode access switchport access vlan vlan-id end show running-config interface interface-id show interfaces interface-id switchport copy running-config startup-config Purpose Enter global configuration mode Enter the interface to be added to the VLAN. Note This step is not required for VTP version 3. disabling VTP. Configuring Extended-Range VLANs Command Step 1 configure terminal Step 2 vtp mode transparent Purpose Enter global configuration mode. (Optional) Modify the VLAN by changing the MTU size. To save extendedrange VLAN configurations.

This is the default. Configure the interface as a Layer 2 trunk (required only if the interface is a Layer 2 access port or to specify the trunking mode). ◦ Configuring VLAN Trunks Mode switchport mode access Function Puts the interface (access port) into permanent nontrunking mode and negotiates to convert the link into a nontrunk link.1Q trunks. desirable. Step 4 Step 5 Step 6 Step 7 switchport access vlan vlan-id switchport trunk native vlan vlan-id end show interfaces interface-id switchport (Optional) Specify the default VLAN. The default switchport mode for all Ethernet interfaces is dynamic auto. Specify the port to be configured for trunking. or auto mode. dynamic desirable: Set the interface to a trunk link if the neighboring interface is set to trunk. or auto mode. and enter interface configuration mode. Display the switchport configuration of the interface in the Administrative Computer Networks 2 – Laboratories 6 . The interface becomes a trunk interface if the neighboring interface is set to trunk. Display parameters for all VLANs or the specified VLAN on the switch. trunk: Set the interface in permanent trunking mode and negotiate to convert the link to a trunk link even if the neighboring interface is not a trunk interface. Makes the interface able to convert the link to a trunk link.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology show interfaces[vlan vlan-id] show vlan [id vlan-id] Display characteristics for all interfaces or for the specified VLAN configured on the switch. Specify the native VLAN for IEEE 802. desirable. Return to privileged EXEC mode. The interface becomes a trunk interface if the neighboring interface is set to trunk or desirable mode. The interface becomes a trunk interface even if the neighboring interface is not a trunk interface. Puts the interface into permanent trunking mode and negotiates to convert the neighboring link into a trunk link. The interface becomes a nontrunk interface regardless of whether or not the neighboring interface is a trunk interface. Prevents the interface from generating DTP frames. dynamic auto: Set the interface to a trunk link if the neighboring interface is set to trunk or desirable mode. which is used if the interface stops trunking. Makes the interface actively attempt to convert the link to a trunk link. switchport mode dynamic auto switchport mode dynamic desirable switchport mode trunk switchport nonegotiate Configuring an Ethernet Interface as a Trunk Port Command Step 1 Step 2 Step 3 configure terminal interface interface-id switchport mode {dynamic{auto | desirable} | trunk} Purpose Enter global configuration mode. You must manually configure the neighboring interface as a trunk interface to establish a trunk link. You can use this command only when the interface switchport mode is access or trunk.

Step 5 Step 6 Step 7 end show interfaces interface-id switchport copy running-config startup-config Return to privileged EXEC mode.vlan[.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Mode and the Administrative Trunking Encapsulation fields of the display. except|remove} vlan-list The vlan-list parameter is either a single VLAN number from 1 to 4094 or a range of VLANs described by two VLAN numbers.. use a hyphen to designate a range of IDs. Valid IDs are 2 to 1001. (Optional) Save your entries in the configuration file. Do not enter any spaces between comma-separated VLAN parameters or in hyphen-specified ranges. and enter interface configuration mode. Beginning in privileged EXEC mode. Verify your entries in the Trunking VLANs Enabled field of the display. the lower one first. Computer Networks 2 – Laboratories 7 . Configure the interface as a VLAN trunk port. Extended-range VLANs (VLAN IDs 1006 to 4094) cannot be pruned. separated by a hyphen. switchport trunk allowed vlan {add |all | (Optional) Configure the list of VLANs allowed on the trunk. Configure the list of VLANs allowed to be pruned from the trunk. Step 8 Step 9 show interfaces interface-id trunk copy running-config startup-config Display the trunk configuration of the interface. Separate nonconsecutive VLAN IDs with a comma and no spaces. Specify the port to be configured.vlan[. The default list of VLANs allowed to be pruned contains VLANs 2 to 1001..]] Purpose Enter global configuration mode. (Optional) Save your entries in the configuration file. Step 4 Step 5 Step 6 end Show interfaces interface-id switchport copy running-config startup-config Return to privileged EXEC mode. Defining the Allowed VLANs on a Trunk Command Step 1 Step 2 Step 3 Step 4 configure terminal interfaceinterface-id switchport mode trunk Purpose Enter global configuration mode. Verify your entries in the Pruning VLANs Enabled field of the display. All VLANs are allowed by default. VLANs that are pruning-ineligible receive flooded traffic. follow these steps to remove VLANs from the pruning-eligible list on a trunk port: Command Step 1 Step 2 Step 3 configure terminal interface interface-id switchport trunk pruning vlan {add | except | none | remove} vlan-list [. and enter interface configuration mode. Select the trunk port for which VLANs should be pruned. (Optional) Save your entries in the configuration file.

(Optional) Save your entries in the configuration file.1Q trunk. Verify your entries in the Trunking Native Mode VLAN field. and enter interface configuration mode. In the display.1Q tagging can receive both tagged and untagged traffic. Step 6 show vlan Verify that the VLANs exist in the database on Switch A. For vlan-id. The native VLAN is VLAN 1 by default. the range is 1 to 4094. the switch forwards untagged traffic in the native VLAN configured for the port. Verify the VTP configuration on both Switch A and Switch B. Step 4 Step 5 Step 6 end show interfaces interface-id switchport copy running-config startup-config Return to privileged EXEC mode.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Configuring the Native VLAN for Untagged Traffic A trunk port configured with IEEE 802. check the VTP Operating Mode and the VTP Domain Name fields. Define the interface that is configured as the IEEE 802. Command Step 1 Step 2 Step 3 configure terminal interface interface-id switchport trunk native vlan vlan-id Purpose Enter global configuration mode. Configuring Trunk Ports for Load Sharing Command Step 1 Step 2 configure terminal vtp domain domain-name Purpose Enter global configuration mode on Switch A. By default. Return to privileged EXEC mode. The domain name can be 1 to 32 characters. Configure the VLAN that is sending and receiving untagged traffic on the trunk port. Computer Networks 2 – Laboratories 8 . Configure a VTP administrative domain. Step 3 Step 4 Step 5 vtp mode server end show vtp status Configure Switch A as the VTP server.

Return to privileged EXEC mode. Define the interface to set the STP port priority. Verify your entries. 128. 100 Mb/s: 19. Return to privileged EXEC mode.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Step 7 Step 8 Step 9 configure terminal interface interface-id_1 switchport mode trunk Enter global configuration mode. 1000 Mb/s: 4. (Rapid PVST+ and MSTP are disabled. Configure the port as a trunk port. Step 18 exit Step 19 interface interface-id_2 Step 20 spanning-tree vlan 3-6 port-priority 16 Step 21 end Step 22 show running-config Step 23 copy running-config startup-config Return to global configuration mode. Computer Networks 2 – Laboratories 9 . Step10 end Step 11 show interfaces interface-id_1switchport Verify the VLAN configuration. Assign the port priority of 16 for VLANs 3 through 6. Verify that Switch B has learned the VLAN configuration. (Optional) Save your entries in the configuration file. VTP passes the VTP and VLAN information to Switch B. Step 12 Step 13 Step14 show vlan Step 15 configure terminal Step 16 interface interface-id_1 Repeat Steps 7 through 10 on Switch A for a second port in the switch stack. Define the interface to be configured as a trunk. Spanning-tree VLAN port priority (configurable on a per-VLAN basis) 128. ◦ Default Spanning-Tree Configuration Feature Enable state Spanning-tree mode Switch priority Spanning-tree port priority (configurable on a per-interface basis) Spanning-tree port cost (configurable on a per-interface basis) Default Setting Enabled on VLAN 1. Enter global configuration mode on Switch A. Define the interface to set the STP port priority. 10 Mb/s: 100. and enter interface configuration mode. Repeat Steps 7 through 10 on Switch B to configure the trunk ports that connect to the trunk ports configured on Switch A. and enter interface configuration mode. and enter interface configuration mode. When the trunk links come up. PVST+.) 32768. Step 17 spanning-tree vlan 8-10 port-priority 16 Assign the port priority of 16 for VLANs 8 through 10.

with identifiers ranging from 1. and returns to global configuration mode. Maximum-aging time: 20 seconds. 100 Mb/s: 19.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Spanning-tree VLAN port cost (configurable on a per-VLAN basis) 1000 Mb/s: 4. propagates it throughout the administrative domain. 2. 10 Mb/s: 100. Displays a detailed summary of interface information. Step 3 exit Example: Router(config-vlan)#exit Updates the VLAN database.4094. Computer Networks 2 – Laboratories 10 . Forward-delay time: 15 seconds. Displays spanning-tree information for the specified interface. Configure VLANs on Cisco router 1801 Command Step 1 vlan ? Example: Router# config t Router(config)#vlan ? WORD accounting ifdescr ISL VLAN IDs 1-4094 VLAN accounting configuration VLAN subinterface ifDescr Purpose Enters VLAN configuration mode. Step 2 ISL VLAN ID Example: Router(config)#vlan 2 Router(config-vlan)# Adds VLANs. Spanning-tree timers Hello time: 2 seconds. Transmit hold count: 6 BPDUs ◦ Displaying the Spanning-Tree Status Command show spanning-tree active show spanning-tree detail show spanning-tree interface interface-id show spanning-tree summary [totals] Purpose Displays spanning-tree information on active interfaces only. Displays a summary of interface states or displays the total lines of the STP state section.

Displays summary configuration information for all configured VLANs. from privileged EXEC mode. show vlan-switch: Entered Computer Networks 2 – Laboratories 11 . Displays detailed configuration information for all configured VLANs.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology Router(config)# Verify Your VLAN Configuration show: Entered from VLAN database mode.

Lab practice 1.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology III. Network Layout Computer Networks 2 – Laboratories 12 .

subnet=10. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display. Lab steps Note: To avoid the conflict of IP address from manual configuration once two group connecting together. Create 3 VLANs matching the LAN1 Layout configured on Switch 2960 and LAN2 Layout configured on Router: • Grouping BSD hosts into the VLAN id=11.x9. name=bsd. where x is group number. each group will take the host address from range .10.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology 2.51 to . no password) on Switch and Switching Router.11. • Configure VTP domain netlab (mode server.59.x1 – .0/24 • Computer Networks 2 – Laboratories 13 . Ex: group 5 will dispose hosts from .

Re-check the connectivity of two hosts of the same VLAN. Reset all devices to factory default. subnet=10. Displaying the Spanning-Tree Status. Display and check the correctness of all VLAN Configuration. subnet=10. and the number of VLANs.13. 14 Computer Networks 2 – Laboratories .0/24 Grouping WINDOWS hosts into the VLAN id=13. Result • Finish your work by reporting your network status and explaining your solution on place. subnet=10.10. name=extended. name=linux. Configure another Trunk Ports for Load Sharing on Switch and Router. Configure Extended-Range VLAN id=1008.10. name=windows.0/24 • • • • • • • • • • Assign Static-Access Ports to a VLAN.0.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology • • Grouping LINUX hosts into the VLAN id=12. Check the connectivity. Remove VLAN id=11 from the pruning-eligible list on a trunk port of Switch and Router. Check the connectivity by pinging to the hosts in the same VLAN. Trunking Switch to Switch with the neighbor group by setting one more port as trunk port.0/24. the current VTP revision.12.10. Change the IP configuration on PC to adapt the VLAN port assignment (admin privilege). Configuring an Ethernet Interface as a Trunk Port on Switch and Switching Router. Connect them together. Monitor VTP by displaying VTP configuration information: the domain name. Define the Allowed-VLANs on a Trunk. freely decided. Remove the BSD from the Allowed-VLANs list. Configure the Native VLAN id=13 for Untagged Traffic. • • • • 3. Trunking Switch to Router.