Practice On Cisco Devices, Basics of VLAN: Objectives
Practice On Cisco Devices, Basics of VLAN: Objectives
Computer Networks 1
Practice on Cisco devices,
Basics of VLAN
Names: ........................................................................
Student No.: ......................……………………………
Objectives
Using Cisco IOS command-line interface (CLI) for configuring Switches 2960 Series
and Routers 1800 Series.
Understanding VLAN basics.
Global While in privileged device(config)# To exit to privileged Use this mode to configure
configuration EXEC mode, enter the EXEC mode, enter exit parameters that apply to the entire
configure command. or end, or press Ctrl-Z. device.
VLAN While in global device(config-vlan)# To exit to global Use this mode to configure VLAN
configuration configuration mode, configuration mode, parameters. When VTP mode is
enter the vlan vlan-id enter the exit transparent, you can create
command. command. extended-range VLANs (VLAN
IDs greater than 1005) and save
To return to privileged
configurations in the device startup
EXEC mode, press
1
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
Interface While in global device(config-if)# To exit to global Use this mode to configure
configuration configuration mode, configuration mode, parameters for the Ethernet ports.
enter the interface enter exit.
command (with a To return to privileged
specific interface). EXEC mode, press
Ctrl-Z or enter end.
Line While in global device(config-line)# To exit to global Use this mode to configure
configuration configuration mode, configuration mode, parameters for the terminal line.
specify a line with the enter exit.
line vty or line console To return to privileged
command. EXEC mode, press
Ctrl-Z or enter end.
2. Help System
Command Purpose
help Obtain a brief description of the help system in any command mode.
abbreviated-command-entry? Obtain a list of commands that begin with a particular character string.
For example:
device# di?
<10-255> Length of time (in sec) that receiver must keep this
packet
2
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
3. Abbreviated Commands
You need to enter only enough characters for the device to recognize the command as unique.
This example shows how to enter the show configuration privileged EXEC command in an
abbreviated form:
device# show conf
3
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
Then, open Putty and configure the terminal for 9600 baud, 8 data bits, no parity, 1 stop
bit, and no flow control (see Category → Connection → Serial preference)
Fire up putty, and select the serial radio button, the Serial Line, and Speed boxes will be
populated for you. However, make sure that speed is 9600. And save the connection (give
it a name) and save it
View Console
4
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
SUMMARY STEPS
1. enable
2. configure terminal
3. hostname name (SwLANx, CEx)
4. Verify that the device prompt displays your new hostname.
5.end
SUMMARY STEPS
1. enable
2. clock set hh:mm:ss day month year or clock set hh:mm:ss month day year
This example shows how to manually set the system clock to 1:32 p.m. on July 23, 2010:
device# clock set 13:32:00 27 Sep 2010
SUMMARY STEPS
1. enable
2. configure terminal
3. enable password password (NetLab@switchx, NetLab@routerx)
4. enable secret password (NetLab@switchx, NetLab@routerx)
5. exit
6. enable
7. exit
SUMMARY STEPS
1. enable
2. show ip interface brief
3. configure terminal
4. interface {fastethernet | gigabitethernet} port (0)
5. description string (Port on RouterX connect to SwitchX, NetLab LAN)
6. ip address ip-address mask (172.28.13.2x 255.255.255.0 where x for group number)
7. no shutdown
8. end
9. show ip interface brief
5
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
SUMMARY STEPS
1. enable
2. show ip interface brief
3. configure terminal
4. interface vlan vlan-id (1)
5. ip address ip-address subnet-mask (172.28.13.3x 255.255.255.0)
6. exit
7. ip default-gateway ip-address (172.28.13.2x)
8. end
9. show interfaces vlan vlan-id (1)
10. show ip redirects
11. copy running-config startup-config
When you create an SVI, it does not become active until you associate it with a physical port
Assigning Static-Access Ports to a VLAN
12. interface interface-id (fastethernet0)
13. switchport mode access
14. switchport access vlan vlan-id (1)
15. end
16. copy running-config startup-config
PRE-REQUISITES
SUMMARY STEPS
1. enable
2. ping [ip-address | hostname]
SUMMARY STEPS
1. enable
2. copy running-config startup-config
6
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
7
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
Cisco IOS Release 12.2SX supports 4096 VLANs in accordance with the IEEE 802.1Q standard.
These VLANs are organized into several ranges
VLANs Range Usage
0, 4095 Reserved For system use only. You cannot see or use these
VLANs.
1 Normal Cisco default. You can use this VLAN but you cannot
delete it.
2-1001 Normal For Ethernet VLANs; you can create, use, and delete
these VLANs.
1002- Normal Cisco defaults for FDDI and Token Ring. You cannot
1005 delete VLANs 1002-1005.
Practice 2
1. Connect 2 PCs to 2960 series switch, using Fast Ethernet 1 and Fast Ethernet 2 port,
configure static ip address for each PC, verify that 2 PCs can ping each other.
2. Add Fast Ethernet 1 port to VLAN 2, Fast Ethernet 2 port to VLAN 3, verify that 2 PCs
cannot ping each other.
8
Computer Networks 1 – Laboratories
Faculty of Computer Science and Engineering – HCMC University of Technology
Solution:
1. enable
2. vlan database
3. vlan 2 name Engineer
4. vlan 3 name Manager
5. exit
6. conf t
7. int fa1
8. switchport access vlan 2
9. int fa2
10. switchport access vlan 3
11. end
12. show vlan
Practice 3
Create network topology in figure 3 in Cisco Packet Tracer.
Submission
Complete practice 3 and save as lab9.pkt, submit this file to your instructor.
References
http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_55_se/configuration/guide/scg_29
60.html
http://www.cisco.com/en/US/docs/routers/access/1800/1841/software/configuration/guide/sw.html
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/12-2SX/configuration/guide/book/vlans.html
9
Computer Networks 1 – Laboratories