Net-461 - Lab Part 02
Net-461 - Lab Part 02
Upon completion of this laboratory exercise, the student technicians/engineers will be able to:
None
None
DISCUSSION
The Layer 2 infrastructure consists mainly of interconnected Ethernet switches. Most end-
user devices, such as computers, printers, IP phones, and other hosts, connect to the network
via Layer 2 access switches. As a result, switches can present a network security risk. Similar
to routers, switches are subject to attack from malicious internal users. The switch Cisco IOS
software provides many security features that are specific to switch functions and protocols.
In a Network Switches Normally work on Distribution Layer getting access for this layer
from the intruder could be more dangerous for over Security of any organization. VLANs are
helpful in the administration of logical groups, allowing members of a group to be easily
Computer Network II 3
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
moved, changed, or added. This activity focuses on creating and naming VLANs, assigning
access ports to specific VLANs, changing the native VLAN, and configuring trunk links to
prevent them from unauthorized Groups/Computers.
None
A. PROCEDURE
Topology Diagram
On all three switches, enter user EXEC mode. Then enter privileged EXEC mode.
From privileged EXEC mode on all three switches, issue the show running-config command
to verify the current running configuration. The basic configurations are already set, but there
are no VLAN assignments.
On S1, issue the show vlan command. The only VLANs present are the default ones. By
default, all interfaces are assigned to VLAN 1.
Notice that each PC can ping the other PC that shares the same network:
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Currently, all broadcast traffic is sent out to all ports on the switch, except for the port on
which the broadcast was received. This greatly increases the traffic on all access and trunk
links as well as increases CPU usage on the switches and PCs. VLANs contain the
broadcasts within each VLAN only.
The command vlan vlan-id creates a VLAN. Use the name vlan-name command to name a
VLAN.
On S1, create four VLANs using the vlan-ids and the names shown below:
S1(config)# vlan 10
Computer Network II 5
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
S1(config-vlan)# vlan 30
S1(config-vlan)# name Guest(Default)
S1(config-vlan)# vlan 99
S1(config-vlan)# name Management&Native
After creating the VLANs, return to privileged EXEC and issue the show vlan command to
verify the creation of the new VLANs.
10 Faculty/Staff active
20 Students active
30 Guest(Default) active
99 Management&Native active
S1#
On S2 and S3, use the same commands you used on S1 to create and name the VLANs.
Use the show vlan command to verify all VLANs are configured and named.
The switchport mode access command configures the interface as an access port. The
switchport access vlan vlan-id command assigns a VLAN to the port. An access port can
only be assigned one access VLAN. Enter the following commands on S2.
Assign VLANs to active ports on S3. S3 uses the same VLAN access port assignments that
you configured on S2.
Previously, PCs that shared the same network could ping each other successfully. Try pinging
between PC1 and PC4. Although the access ports are assigned to the appropriate VLANs, the
ping fails. Why?
Computer Network II 7
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
The interfaces between S2 and S1 and between S3 and S1 are not yet configured as trunks.
Nor are these interfaces configured as access links for the VLAN assigned to PC1 and PC4.
S2 and S3, therefore, do not forward VLAN 10 traffic (traffic from PC1 and PC4) out the
interface to S1.
Task 1 to 4 should be completed. If not, Check previous steps again to see which required
components are not yet completed.
Note: with Vlan Trunking, a single port can serve multiple connections as seen in the diagram below.
Step 1. Configure S1 Fa0/1 and Fa0/2 for trunking and to use VLAN 99 as the native
VLAN.
The trunk port takes about a minute to become active again. You can switch between
Realtime and Simulation modes three or four times to quickly bring the port back up.
Then, the ports on S2 and S3 that connect to S1 become inactive. Again, switch between
Realtime and Simulation modes three or four times to quickly bring the ports back up.
Once the ports become active, you periodically receive the following syslog messages:
The Cisco Discovery Protocol (CDP) gave this message which tells that the native VLAN on
S1 does not match the native VLANs in S2 and S3. You configured the native VLAN on S1
to be VLAN 99. However, the native VLANs on S2 and S3 is set to the default VLAN 1.
Note: You can allow specific Vlan access by using this command:
Although there is currently a native VLAN mismatch, pings between PCs on the same VLAN
are now successful. Why?
Computer Network II 9
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Pings are successful because trunking has been enabled on S1. DTP has automatically
negotiated the other side of the trunk links. In this case, S2 and S3 have now automatically
configured the ports attached to S1 as trunking ports.
Step 3. Verify trunking is enabled on S2 and configure VLAN 99 as the native VLAN.
Dynamic Trunking Protocol (DTP) has automatically enabled the FastEthernet 0/1 port on S2
for trunking. Once you configured the mode to trunking on S1, DTP messages sent from S1
to S2 automatically informed S1 to move the state of Fa0/1 to trunking. This can be verified
with the following command on S1:
Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
<output omitted>
S2#
Note: the administrative mode is set to dynamic auto. This is the default state of all ports on
a Cisco IOS switch. However, DTP has negotiated trunking, so the operation mode is trunk,
resulting in a native VLAN mismatch.
As a best practice, configure the administrative mode of the trunking interface to be in trunk
mode. This ensures that the interface is statically configured as a trunk port and never
negotiates a different mode.
Step 4. Verify trunking is enabled on S2 and configure VLAN 99 as the native VLAN:
To correct the native VLAN mismatch, configure the trunking port with the switchport
trunk native vlan 99 command.
Step 5. Verify trunking is enabled on S3 and configure VLAN 99 as the native VLAN.
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
<output omitted>
S3#
Configure the administrative mode of the trunking interface to be in trunk mode, and correct
the native VLAN mismatch with the switchport trunk native vlan 99 command.
B. OBSERVATIONS
C. ANALYSIS
D. CONCLUSION
Computer Network II 11
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
Using MAC address of each PC will secure connectivity in the network to one known MAC
address. Follow the following commands in each port.
Step 4. Show the ports' security for Interfaces 0/1 and 0/3
Note: PC- 1 can ping PC- 2. MAC addresses will be different because they are unique.
Computer Network II 13
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
Step 7. Show the ports' security for Interfaces 0/1 and 0/2
Did all interfaces update their MAC addresses after the ping?
Step 8. Try to connect PC -6 with S-Building 10 switch via port interface fa 0/2 as shown
below.
Note: Before this step make sure to copy running configuration to startup configuration.
Step 9. Verify connectivity between PCs on the same network (PC-1 to PC-6).
Note:
PC- 1 can't ping PC- 6. The port became shutdown because violation mode is true.
Once interface changed to use a different MAC- Address or more than one MAC, it
turned off for security obligation.
All red dots in the diagram below mean ports are not active.
Step 10. Try to connect PC- 2 with the S-Building 10 switch via the same port as in the
diagram below.
Computer Network II 15
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
Note: Although PC-6 use the same MAC- Address, the switch can't turn on the port
automatically.
To complete this step, there is a need for reloading the switch to activate the port fa0/2 again.
S-Bullding10#reload
After this try to verify connections. Ping from PC-1 to PC-2. Can they see each other?
Note: After the reloading, you are required to perform ping between PCs.
As a further security measure, disable ports that are not being used on the switch.
A blackhole VLAN is a term used for a VLAN configured for unused ports. It is a security
practice, whereby you create a VLAN that has no route, or no default gateway to other
networks within your organization.
Note: Ports F0/1, F0/2 are used on S-Building 10 switch. The remaining FastEthernet ports
and the two GigabitEthernet ports will be shut down.
Computer Network II 17
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
Note: The range command greatly reduces the amount of repetitive commands you must
enter when configuring the same commands on multiple ports.
Computer Network II 19
LAB MANUAL
LAB EXPERIMENT – 02: SECURING NETWORK SWITCHES
FINAL CHECKLIST
1. Clean your equipment, materials, and work benches before you leave
2. Return all equipment and materials to their proper storage area
3. Submit your lab report on time