Task 1: Prepare The Network: System and Network Admin Lab 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

System and Network Admin Lab 2

Basic VLAN Configuration


Learning Objectives

Upon completion of this lab, you will be able to:

 Cable a network according to the topology diagram

 Erase the startup configuration and reload a switch to the default state
 Perform basic configuration tasks on a switch
 Create VLANs

 Assign switch ports to a VLAN


 Verify VLAN configuration
 Enabling trunk on inter-switch connections
 Verify trunk configuration

Task 1: Prepare the Network


Step 1: Cable a network that is similar to the one in the topology diagram.

You can use any current switch in your lab as long as it has the required interfaces shown in the
topology.

Step 2: Clear any existing configurations on the switches, and initialize all ports in
the shutdown state.

Switch3>
Switch3>enable
Switch3#
Switch3#config t
Switch3(config)#interface range
fa0/1-24
Switch3(config-if-range)#shutdown
Switch3(config-if-range)#exit
NOTE: DO THIS FOR SWITCH2
Task 2: Perform Basic Switch Configurations
Step 1: Configure the switches according to the following guidelines.

 Configure the switch hostname.

 Configure an EXEC mode password or enable password of class.


Step 2: Re-enable the user ports on S2 and S3.
S2(config)#interface range fa0/3-5
S2(config-if-range)#switchport mode access
S2(config-if-range)#no shutdown
S3(config)#interface range fa0/3-5
S3(config-if-range)#switchport mode access
S3(config-if-range)#no shutdown

Task 3: Configure and Activate Ethernet Interfaces


Step 1: Configure the PCs.

Configure the IP addresses for those PCs by referring to the addressing table at the
beginning of the lab. Alternatively, you can configure all six PCs with the IP
addresses and default gateways.

Addressing Table
Host name
Interface IP Address Subnet Mask Default Gateway

S1 VLAN 40 172.17.40.11 255.255.255.0 N/A

S2 VLAN 40 172.17.40.12 255.255.255.0 N/A

S3 VLAN 40 172.17.40.13 255.255.255.0 N/A

PC1 NIC 172.17.10.21 255.255.255.0 172.17.10.1

PC2 NIC 172.17.20.22 255.255.255.0 172.17.20.1


PC3 NIC 172.17.30.23 255.255.255.0 172.17.30.1

PC4 NIC 172.17.10.24 255.255.255.0 172.17.10.1

PC5 NIC 172.17.20.25 255.255.255.0 172.17.20.1

PC6 NIC 172.17.30.26 255.255.255.0 172.17.30.1

Task 4: Configure VLANs on the Switch


Step 1: Create VLANs on switch S1.

Use the vlan vlan-id command in global configuration mode to add a VLAN to
switch S1. There are four VLANS configured for this lab: VLAN 10 (CS); VLAN
20 (IT); VLAN 30 (IS); and VLAN 40 (MANAGEMENT). After you create the
VLAN, you will be in vlan configuration mode, where you can assign a name to the
VLAN with the name + vlan name c o m m a n d .
S1>enable
S1#config t

S1(config)#vlan 10

S1(config)#vlan 10
S1(config-vlan)#name CS
S1(config-vlan)#vlan 20
S1(config-vlan)#name IT
S1(config-vlan)#vlan 30
S1(config-vlan)#name IS
S1(config-vlan)#vlan 40
S1(config-vlan)#name
management
S1(config-vlan)#exit
S1#
Step 2: Verify that the VLANs have been created on S1.

Use the show vlan brief command to verify that the VLANs have been created.
Step 3: Configure and name VLANs on switches S2 and S3.

Create and name VLANs 10, 20, 30, and 40 on S2 and S3 using the commands from
Step 1 as S1. Verify the correct configuration with the show vlan brief command.

Step 4: Assign switch ports to VLANs on S2 and S3.

Refer to the port assignment table on page 1. Ports are assigned to VLANs in
interface configuration mode, using the switchport access vlan vlan-Id command.
You can assign each port individually or you can use the interface range command
to simplify this task, as shown here. The commands are shown for S3 only, but you
should configure both S2 and S3 similarly. Save your configuration when done.

Initial Port Assignments (Switches 2 and 3)


Ports Assignment Network
Fa0/1 802.1q Trunks (Native VLAN 40) 172.17.40.0 /24
Fa0/5 VLAN 30 – IS 172.17.30.0 /24
Fa0/3 VLAN 10 – CS 172.17.10.0 /24
Fa0/4 VLAN 20 – IT 172.17.20.0 /24

S3(config)#interface range fa0/5

S3(config-if-range)#switchport access vlan 30

S3(config-if-range)#interface range fa0/3


S3(config-if-range)#switchport access vlan 10

S3(config-if-range)#interface range fa0/4

S3(config-if-range)#switchport access vlan 20

S3(config-if-range)#end

NOTE: DO THE SAME FOR S2

Step 4: Determine which ports have been added.


Use the show vlan brief command
Step 5: Assign the MANAGEMENT VLAN.

A MANAGEMENT VLAN is any VLAN that you configure to access the MANAGEMENT
capabilities of a switch. VLANs are identified by a VLAN ID (a number between 0 – 4095).
VLAN 1 serves as the MANAGEMENT VLAN if you did not specifically define another
VLAN. You assign the MANAGEMENT VLAN an IP address and subnet mask. A switch
can be managed via HTTP, Telnet, SSH, or SNMP. Because the out-of-the-box configuration
of a Cisco switch has VLAN 1 as the default VLAN, VLAN 1 is a bad choice as the
MANAGEMENT VLAN. You do not want an arbitrary user who is connecting to a switch
to default to the MANAGEMENT VLAN. Recall that you configured the MANAGEMENT
VLAN as VLAN 40 earlier in this lab. From interface configuration mode, use the ip
address command to assign the MANAGEMENT IP address to the switches.

S1(config)#interface vlan 40
S1(config-if)#ip address 1 7 2 . 1 7 . 4 0 . 1 1 255.255.255.0
S1(config-if)#no shutdown

S2(config)#interface vlan 40
S2(config-if)#ip address 1 7 2 . 1 7 . 4 0 . 1 2 255.255.255.0
S2(config-if)#no shutdown
S3(config)#interface vlan 40
S3(config-if)#ip address 1 7 2 . 1 7 . 4 0 . 1 3 255.255.255.0
S3(config-if)#no shutdown

Assigning a MANAGEMENT address allows IP communication between the


switches, and also allows any host connected to a port assigned to VLAN 40 to
connect to the switches. Because VLAN 40 is configured as the MANAGEMENT
VLAN, any ports assigned to this VLAN are considered MANAGEMENT ports and
should be secured to control which devices can connect to these ports.
Step 6: Configure trunk and the native VLAN for the trunk ports on all switches.

Trunks are connections between the switches that allow the switches to exchange
information for all VLANS. By default, a trunk port belongs to all VLANs, as
opposed to an access port, which can only belong to a single VLAN. The trunk is
called 802.1Q VLAN encapsulation

A native VLAN is assigned to an 802.1Q trunk port. In the topology, the native
VLAN is VLAN 40. An 802.1Q trunk port supports traffic coming from many
VLANs (tagged traffic) as well as traffic that does not come from a VLAN (untagged
traffic). The 802.1Q trunk port places untagged traffic on the native VLAN.
Untagged traffic is generated by a computer attached to a switch port that is
configured with the native VLAN. Native VLAN serves as a common identifier on
opposing ends of a trunk link. It is a best practice to use a VLAN other than VLAN 1
as the native VLAN.

Use the interface range command in global configuration mode to simplify configuring trunk.

S1(config)#interface range fa0/1-2


S1(config-if-range)#switchport mode trunk
S1(config-if-range)#switchport trunk native vlan 40
S1(config-if-range)#no shutdown
S1(config-if-range)#end
S2(config)#interface fa0/1
S2(config-if-range)#switchport mode trunk
vlan 40
S2(config-if-range)#switchport trunk native
S2(config-if-range)#no shutdown
S2(config-if-range)#end
S3(config)#interface fa0/1
S3(config-if range)#switchport mode trunk
vlan 40
S3(config-if-range)#switchport trunk native
S3(config-if-range)#no shutdown
S3(config-if-range)#end

Verify that the trunks have been configured with the show interface trunk command.

S1#show interface trunk


Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 40
Fa0/2 on 802.1q trunking 40
Port Vlans allowed on
trunk Fa0/1 1-4094
Fa0/2 1-4094

Port Vlans allowed and active in MANAGEMENT


domain Fa0/1 1,10,20,30,40
Fa0/2 1,10,20,30,40
Step 7: Verify that the switches can communicate.

From S1, ping the MANAGEMENT address on both S2 and S3.

ping 172.17.40.12
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos’ to 172.17.40.12, timeout is 2 s e c o n d s
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/9m s

S1#ping 172.17.40.13
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.17.40.13, timeout is 2s e c o n d s :
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1m s
Step 8: Ping several hosts from PC2.

Ping from host PC2 to host PC1 (172.17.10.21).

Is the ping attempt successful?

Ping from host PC2 to the switch VLAN 40 IP address 172.17.40.12.

Is the ping attempt successful? ____________________________________________


Answer: Because these hosts are on different subnets and in different VLANs, they
cannot communicate without a Layer 3 device to route between the separate
subnetworks.

Ping from host PC2 to host PC5. Is the ping attempt successful?

Answer: Because PC2 is in the same VLAN and the same subnet as PC5, the ping is successful

You might also like