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

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

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. Enable pruning in the VTP administrative domain. pruning is disabled. Display the VTP switch configuration information. Conflicts are VTP version 3 devices with conflicting primary servers. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display. Display the VTP password. You can only enable VTP pruning on a switch in VTP server mode. the VTP domain does not function properly if you do not assign the same password to each switch in the domain. The show vtp devices command does not display information when the switch is in transparent or off mode. 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. You need to enable pruning on only one switch in VTP server mode. The password can be 8 to 64 characters. (Optional) Save the configuration in the startup configuration file. show vtp interface[interface-id] show vtp password show vtp status Computer Networks 2 – Laboratories 3 . The form of the password displayed depends on whether or not the hidden keyword was entered and if encryption is enabled on the switch. By default. Command Step 1 Step 2 configure terminal vtp pruning Purpose Enter global configuration mode. the current VTP revision. and the number of VLANs. Command show vtp counters show vtp devices[conflict] Purpose Display counters about VTP messages that have been sent and received. If you configure a VTP password. Display information about all VTP version 3 devices in the domain. Step 3 Step 4 end show vtp status Return to privileged EXEC mode. Return to privileged EXEC mode.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. Verify your entries in the VTP Pruning Mode field of the display. Note Only VTP mode and domain name are saved in the switch running configuration and can be copied to the startup configuration file. You can also display statistics about the advertisements sent and received by the switch.

(Optional) Enter a name for the VLAN. This saves the configuration in the switch startup configuration file. the default is to append the vlan-id with leading zeros to the word VLAN. For example. This saves the configuration in the switch startup configuration file.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. any ports assigned to that VLAN become inactive. Interface VLAN membership on the switch is assigned manually on an interface-by-interface basis. (Optional) Configure the VLAN as the RSPAN VLAN for a remote SPAN session. the VLAN configuration is saved in the running configuration file as well as in the VLAN database. If no name is entered for the VLAN. Return to privileged EXEC mode. VLAN0004 is a default VLAN name for VLAN 4. 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. Computer Networks 2 – Laboratories 4 . Verify the VLAN removal. 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. Enter a VLAN ID. (Optional) Change the MTU size (or other VLAN characteristic). (Optional) If the switch is in VTP transparent mode. Verify your entries. the new VLAN is created. the VLAN configuration is saved in the running configuration file as well as in the VLAN database. Enter a new VLAN ID to create a VLAN. and enter VLAN configuration mode. Return to privileged EXEC mode. If you assign an interface to a VLAN that does not exist. the VLAN is removed from the VLAN database for all switches in the VTP domain. When you delete a VLAN. or enter an existing VLAN ID to modify that VLAN. (Optional) If the switch is in VTP transparent 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). Remove the VLAN by entering the VLAN ID. Configuring Normal-Range VLANs Command Step 1 Step 2 Step 3 configure terminal vlan vlan-id name vlan-name Purpose Enter global configuration mode.

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

Puts the interface into permanent trunking mode and negotiates to convert the neighboring link into a trunk link. The interface becomes a trunk interface if the neighboring interface is set to trunk or desirable mode. dynamic auto: Set the interface to a trunk link if the neighboring interface is set to trunk or desirable mode. dynamic desirable: Set the interface to a trunk link if the neighboring interface is set to trunk. desirable. 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. Return to privileged EXEC mode. 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. Makes the interface able to convert the link to a trunk link. Display parameters for all VLANs or the specified VLAN on the switch. The interface becomes a trunk interface if the neighboring interface is set to trunk. The interface becomes a trunk interface even if the neighboring interface is not a trunk interface. Specify the native VLAN for IEEE 802. Display the switchport configuration of the interface in the Administrative Computer Networks 2 – Laboratories 6 . Prevents the interface from generating DTP frames. or auto mode. which is used if the interface stops trunking. The default switchport mode for all Ethernet interfaces is dynamic auto. desirable.1Q trunks. Makes the interface actively attempt to convert the link to a trunk link. You can use this command only when the interface switchport mode is access or trunk. and enter interface configuration mode. 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).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. You must manually configure the neighboring interface as a trunk interface to establish a trunk link. or auto 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. Specify the port to be configured for trunking. 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. The interface becomes a nontrunk interface regardless of whether or not the neighboring interface is a trunk interface. This is the default.

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

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

Return to privileged EXEC 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. Computer Networks 2 – Laboratories 9 . (Optional) Save your entries in the configuration file. Define the interface to set the STP port priority. When the trunk links come up. and enter interface configuration mode. VTP passes the VTP and VLAN information to Switch B. 128. Spanning-tree VLAN port priority (configurable on a per-VLAN basis) 128. Enter global configuration mode on Switch A. 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. ◦ 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. (Rapid PVST+ and MSTP are disabled.) 32768. 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. 10 Mb/s: 100. Verify your entries. Define the interface to set the STP port priority.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. Configure the port as a trunk port. 100 Mb/s: 19. Verify that Switch B has learned the VLAN configuration. Return to privileged EXEC mode. Step 17 spanning-tree vlan 8-10 port-priority 16 Assign the port priority of 16 for VLANs 8 through 10. Assign the port priority of 16 for VLANs 3 through 6. Step10 end Step 11 show interfaces interface-id_1switchport Verify the VLAN configuration. 1000 Mb/s: 4. Define the interface to be configured as a trunk. and enter interface configuration mode. PVST+.

100 Mb/s: 19. 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. Maximum-aging time: 20 seconds.4094. Computer Networks 2 – Laboratories 10 .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. 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. Spanning-tree timers Hello time: 2 seconds. Step 3 exit Example: Router(config-vlan)#exit Updates the VLAN database. propagates it throughout the administrative domain. Displays spanning-tree information for the specified interface. Displays a detailed summary of interface information. Displays a summary of interface states or displays the total lines of the STP state section. Step 2 ISL VLAN ID Example: Router(config)#vlan 2 Router(config-vlan)# Adds VLANs. and returns to global configuration mode. 2. 10 Mb/s: 100. with identifiers ranging from 1. Forward-delay time: 15 seconds.

Displays summary configuration information for all configured VLANs. Displays detailed configuration information for all configured VLANs. show vlan-switch: Entered Computer Networks 2 – Laboratories 11 .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. from privileged EXEC mode.

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

where x is group number.0/24 • Computer Networks 2 – Laboratories 13 . no password) on Switch and Switching Router. subnet=10.Faculty of Computer Science and Engineering – Ho Chi Minh City University of Technology 2. 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.51 to . name=bsd.11. each group will take the host address from range .x9. Verify your entries in the VTP Operating Mode and the VTP Domain Name fields of the display. Ex: group 5 will dispose hosts from . Lab steps Note: To avoid the conflict of IP address from manual configuration once two group connecting together.x1 – .10.59. • Configure VTP domain netlab (mode server.

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