Chapter 1: Network Fundamentals Lab 002

This lab configures and verifies IPv4 on switches with VLANs, ensuring connectivity across switches and teaching basic VLAN switch commands.


Lab 002 Configuring and Verifying IPv4 Addressing on Switches with VLANs

Watch Full Demo on YouTube:

Lab Objective:

The objective of this lab is to configure and verify IPv4 addressing on switches with VLANs, ensuring connectivity between computers within the same VLAN across multiple switches. By building this lab network you will be able to learn the basic commands needed to configure a switch with the default VLAN.

Lab Topology:

Equipment Required:

  • 2x Cisco Switches (2960)
  • 2x PCs with ethernet interface
  • Console Cable
  • Ethernet Cable
  • Computer with Terminal emulation software e.g. PuTTY

IPv4 Address Table:

Device NameInterface IDIPv4 AddressSubnet Mask
Switch 1VLAN 10192.168.0.100255.255.255.0
Switch 2VLAN 10192.168.0.200255.255.255.0
Host 1Fa0192.168.0.1255.255.255.0
Host 2Fa0192.168.0.2255.255.255.0

List of Command Summary:

CommandCommand Description
enableenters privileged EXEC mode
configure terminalenters global configuration mode from privileged EXEC mode
hostname [hostname]Assign a device name to router
interface [type number]Change from global configuration mode to interface configuration mode
ip address [ipv4-address] [subnetmask]assign an IPv4 address to an interface
no shutdownenables an interface
interface range [type number]-[type number]This is used to enter interface configuration mode for a range of Ethernet interfaces
switch mode accessset the operational mode of an interface to access mode
switch access vlan [vlan-ID]assigns a specific VLAN to an access port
ping [ipv4-address]Sends an ICMP (Internet Control Message Protocol) echo request to the specified address
show running-configsave the running configuration to the startup-configuration file
show ip interface briefdisplay a summary of all IPv4 addresses configured on the Router’s interfaces
show vlan briefdisplays a brief summary of the VLAN configuration on the switch including the VLAN ID, VLAN name, and port membership
endexit configuration mode
exitexits one level in the menu structure command

Lab Task:

  1. Connect the switches and computers as per the topology diagram.
  2. Configure the appropriate hostname on each device as per topology.
  3. Configure VLANs on both switches:
    1. Create VLAN 10 on Switch 1 and Switch 2.
    1. Assign VLAN names (e.g., VLAN10).
    1. Configure VLAN interfaces with IP addresses as per IPv4 address table above.
  4. Configure switch ports:
    1. Assign ports on Switch 1 to VLAN 10.
    1. Assign ports on Switch 2 to VLAN 10.
  5. Verify that each switchport is in the appropriate VLAN
  6. Configure IP addresses on Host1&2:
    1. Configure Host 1 with IP address 192.168.0.1/24 and default gateway 192.168.0.100.
    1. Configure Host 2 with IP address 192.168.0.2/24 and default gateway 192.168.0.200.
  7. Verify connectivity:
    1. Test connectivity between PC 1 and PC 2 using the ping command.
    1. Ensure successful ping replies between the two computers.
  8. Save Configuration

Configuration Steps:

  1. Connect Switches and Computers:
    1. Connect Switch 1 and Switch 2 using an Ethernet cable.
    1. Connect each computer to Switch 1 and Switch 2 using Ethernet cables.
  2. Change the name of both switches according to the topology:
    1. On Switch 1:
      1. switch> enable
      1. switch# configure terminal
      1. switch(config)# hostname Switch1
    1. On Switch 2:
      1. switch> enable
      1. switch# configure terminal
      1. switch(config)# hostname Switch2
  3. Configure VLANs:
    1. On Switch 1, create VLAN 10 and assign an IP address to the VLAN interface:
      1. Switch1(config)# vlan 10
      1. Switch1(config-vlan)# name VLAN10
      1. Switch1(config-vlan)# exit
      1. Switch1(config)# interface vlan 10
      1. Switch1(config-if)# ip address 192.168.0.100 255.255.255.0
      1. Switch1(config-if)# no shutdown
    1. Repeat the same configuration on Switch 2:
      1. Switch2(config)# vlan 10
      1. Switch2(config-vlan)# name VLAN10
      1. Switch2(config-vlan)# exit
      1. Switch2(config)# interface vlan 10
      1. Switch2(config-if)# ip address 192.168.0.200 255.255.255.0
      1. Switch2(config-if)# no shutdown
  4. Configure Switch Ports:
    1. Assign ports on Switch 1 to VLAN 10:
      1. Switch1(config)# interface range FastEthernet0/23-24
      1. Switch1(config-if-range)# switchport mode access
      1. Switch1(config-if-range)# switchport access vlan 10
      1. Switch1(config-if-range)# exit
      1. Switch1(config)# interface FastEthernet0/1
      1. Switch1(config-if-range)# switchport mode access
      1. Switch1(config-if-range)# switchport access vlan 10
    1. Repeat the same configuration on Switch 2:
      1. Switch2(config)# interface range FastEthernet0/23-24
      1. Switch2(config-if-range)# switchport mode access
      1. Switch2(config-if-range)# switchport access vlan 10
      1. Switch2(config-if-range)# exit
      1. Switch2(config)# interface FastEthernet0/1
      1. Switch2(config-if-range)# switchport mode access
      1. Switch2(config-if-range)# switchport access vlan 10
  • Verify VLAN Interface assignment:
    • Issue this command to verify the VLAN assignment:
      • show vlan brief
  • Configure IP Addresses on Computers:
    • Configure Host 1 with IP address 192.168.0.1/24 and default gateway 192.168.0.100.
    • Configure Host 2 with IP address 192.168.0.2/24 and default gateway 192.168.0.200.
  • Verify Connectivity:
    • Verify connectivity between PC 1 and PC 2 using the ping command:
      • PC1> ping 192.168.0.2
      • PC2> ping 192.168.0.1

Don’t forget to save the running configuration on the device.

Conclusion:

In this lab, you have successfully configured and verified IPv4 addressing on switches with VLANs. By assigning ports to VLANs and configuring IP addresses on VLAN interfaces, you have established communication between computers within the same VLAN across multiple switches.

Packet Tracer Lab (Pre/Post configuration):

Download the file below and open the word document to access the Packet Tracer labs.


Discover more from IEE

Subscribe to get the latest posts sent to your email.


Discover more from IEE

Subscribe now to keep reading and get access to the full archive.

Continue reading