0% found this document useful (0 votes)
30 views27 pages

APT2050

Prize Neverson was assigned a lab to configure VLANs on a switch and router. The lab involved setting the switch hostname and enable secret, creating VLANs 20 and 30, assigning ports to each VLAN, configuring trunk ports, and configuring subinterfaces on a router to connect the VLANs. Prize was then asked to configure additional VLANs 40 and 50 spanning two switches connected by a router to test connectivity between the VLANs.

Uploaded by

estherwangari534
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views27 pages

APT2050

Prize Neverson was assigned a lab to configure VLANs on a switch and router. The lab involved setting the switch hostname and enable secret, creating VLANs 20 and 30, assigning ports to each VLAN, configuring trunk ports, and configuring subinterfaces on a router to connect the VLANs. Prize was then asked to configure additional VLANs 40 and 50 spanning two switches connected by a router to test connectivity between the VLANs.

Uploaded by

estherwangari534
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Name: Prize Neverson

ID: 664210

APT2050A Telecommunications & Computer Networks


Lab#5 - Layer 3 Laboratory - Configuring VLANs
Given on 29th June 2023; Due: 17th July 2023;
Instructor: Gerald Chege, PhD
Ensure your name appears in all design diagrams (label routers with your name) as
well as on all ping cmd shells (e.g. ping <your name>) for all your submissions.

We’ll perform the following tasks on a switch (see figure below)


 Set the switches hostname
 Configure the enable secret
 Configure two VLANs
 Assign half the ports to each VLAN
 Configure two ports as trunks for future switch expansion
 Configure sub-interfaces on a half router (or router on a stick) to connect two VLANs
Would you like to enter the initial configuration dialog? [yes/no]: no
Press RETURN to get started
Switch>
Notes:Enter enable mode
Switch>enable
Notes:Enter configuration mode
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Notes:Change the switch name
Switch(config)#hostname 2950
Notes:Change the enable password
2950(config)#enable

Notes:Create two VLANs and give them names


2950(config)#vlan 20
2950(config-vlan)#name Data
2950(config-vlan)#exit
2950(config)#vlan 30
2950(config-vlan)#name LabWork
2950(config-vlan)#exit

Notes:Select the first range of ports and add them to the Data VLAN
2950(config)#int range faste0/3 – 12
2950(config-if-range)#switchport mode access
2950(config-if-range)#switchport access vlan 20
2950(config-if-range)#no shutdown
2950(config-if-range)#exit

Notes:Select the second range of ports and add them to the ISCSI VLAN
2950(config)#int range faste0/13 – 24
2950(config-if-range)#switchport mode access
2950(config-if-range)#switchport access vlan 30
2950(config-if-range)#no shutdown
2950(config-if-range)#exit
2950(config)#exit

1
Notes: Select the two ports 1 and 2 and configure them as trunks. While it’s not necessary, limit the trunk to only pass VLAN 20 and 30 traffic over
the trunk link
2950(config)#int range faste0/1 – 2
2950(config-if-range)#switchport mode trunk
2950(config-if-range)#switchport trunk allowed VLAN 20,30
2950(config-if-range)#no shutdown
2950(config-if-range)#exit
2950(config)#exit

Notes: Save the configuration


2950#write

Notes: Use the ‘show vlan’ command to display the VLANs that are locally defined. The output also displays which ports are assigned to which
VLANs. Note that the two trunk ports aren’t assigned to either VLAN.
2950#show vlan
2950#

Notes:
1) Now connect and configure hosts for VLAN 20 (access ports 3-12) and hosts for VLAN 30 (access ports 13-24);
2) Then specify default gateway on hosts so all VLANs can be routed (gateway is a sub-interface on router = on VLAN20 sub-interface in this
example is 172.25.22.4)

Now connect and configure hosts for VLAN 2 (access ports 3-12) and hosts for VLAN 3 (access ports 13-24);

Half Router Configuration (Router on a Stick)

Connect the trunk port#2 of the switch to the half-router’s interface

router (config)#interface fastethernet0/1


router (config-if)#no ip address
router (config-if)#exit
router (config)#interface fastethernet0/1.1
router (config-subif))# encapsulation dot1Q 1 native
router (config-subif))#ip address 172.25.1.28 255.255.255.0
router (config)#exit
router (config)#interface fastethernet0/1.2
router (config-subif))# encapsulation dot1Q 20
router (config-subif))#ip address 172.25.22.4 255.255.255.0
router (config)#exit
router (config)#interface fastethernet0/1.3
router (config-subif))# encapsulation dot1Q 30
router (config-subif))#ip address 172.20.1.1 255.255.255.0
router (config)#exit
router (config)#end
router #

NB:

a) This configures sub-interface 0/1.1 on VLAN 1 as the native VLAN


b) There are three VLANs 1, 2, and 3 with the sub-interfaces 0/1.1, 0/1.2 and 0/1.3 having IP
addresses as shown.
c) Specify routing algorithm (e.g. RIP with neighbors networks as the two VLANs)

1) Confirm each VLAN is working by pinging hosts within the VLan;


2) Test the trunk ports by pinging across the two VLANs;
next page

2
Scree
nshot of the network

3
Show VLAN configuration

next page

4
Ping Command (Switch B)
Within VLAN 20
PC 8 to PC 9

Within VLAN 30

PC 10 to PC 11

5
From VLAN 20 to VLAN 30

PC 8 to PC 10

From VLAN 30 to VLAN 20

PC 11 to PC 9

6
From VLAN 20 to Router PRIZE

PC 9 to router

From VLAN 30 to Router PRIZE


PC 10 to router

7
PC 8

PC 9

8
PC 10

PC 11

9
Router Configuration

Switch Configuration

10
Additional Lab Work to Complete and Submit
Configure the two VLANs as shown in the figure below. VLAN X straddles switch A and Switch B.
Similarly, VLAN Y straddles switch A and Switch B. The two VLANs communicate through the
half-router as shown. Make all necessary configurations on the switches, on the router as well as
on hosts and test communication between the different VLANs (show all IP settings on all the
device/host interfaces). Submit all the configurations and sample screen shots to illustrate
communication.

next page

next page

11
Screenshot of the network

Show Vlan command

Switch Configuration Switch A (show vlan command)

12
Switch Configuration Switch B (show vlan command)

next page

13
Ping Command (Switch B)

Within VLAN 40

PC 6 to PC 0

Within VLAN 50

14
PC 7 to PC 1

From VLAN 40 to VLAN 50


PC 6 to PC 7

From VLAN 40 to Router PRIZE

PC 0 to router

15
16
From VLAN 50 to Router PRIZE

PC 7 to router

From VLAN 40 to VLAN 20


PC 6 to PC 8

17
From VLAN 40 to VLAN 30

PC 0 to PC 12

From VLAN 50 to VLAN 20


PC 7 to PC 9

18
From VLAN 50 to VLAN 30

PC 6 to PC 10

From VLAN 20 to VLAN 40

PC 8 to PC 0

19
From VLAN 20 to VLAN 50

PC 9 to PC 1

From VLAN 30 to VLAN 40

PC 10 to PC 6

20
21
From VLAN 30 to VLAN 50

PC 12 to PC 7

Router Configuration

22
Switch Configuration (Switch A)

Switch Configuration (Switch B)

23
Within VLAN 40

PC6

PC0

24
Within VLAN 50

PC7

PC1

25
PC 8

PC 9

26
PC 10

PC 12

end. Thank you

27

You might also like