You are on page 1of 8

Computer Networks Lab

Lab No. 8

Inter-VLAN

Mannahel Iftikhar (170860)

BACHELOR OF ELECTRICAL ENGINEERING


(Spring 2021)

Submitted To:
Engr. Sharoze Sohail
Lab Engineer

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING


FACULTY OF ENGINEERING
AIR UNIVERSITY,ISLAMABAD
Lab#08
INTER-VLAN
OBJECTIVE:
This lab has the following objectives:

1. Understanding the concept of Inter-VLAN in networking.


2. Introduction to RIP routing in networking.
3. To establish Inter-VLAN using a router in a network.

DISCUSSION:
Following are the resources required for this experiment

1. Computer
2. Packet Tracer

Introduction:
This lab introduces Cisco IOS (Internetwork Operating System) which is the proprietary CLI
(command line interface) based software empowering nearly all the Cisco devices. IOS is a
package of routing, switching, internetworking and telecommunications functions tightly
integrated with a multitasking operating system. A broadcast domain is a logical division of a
computer network, in which all nodes can reach each other by broadcast at the data link layer. A
simple LAN is a single broadcast domain. To reduce the numbers of devices in a broadcast
domain, we have to divide broadcast domain. VLAN serve for this purpose. The whole idea of
VLAN technology is to divide LAN into logical, instead of physical, segments. VLANs are
created at the Data Link layer so switches apply them to a network. Computers in different
VLANs can’t communicate with each other so Inter-VLAN routing is required for this purpose.

Procedure For Simulations Of Lab Tasks


1. For Task, pick a switch and four PCs from the menu.
2. Join four PCs with the switch through Copper straight through cable.
3. Assign IP address to the four PCs following as:
• PC0: 192.168.10.2
• PC1: 192.168.10.3
• PC2: 192.168.20.2
• PC3: 192.168.20.3
4. Connect Console cable between switch and one the PCs and click on it.
5. Go to the terminal tab and tap OK, a Command Line Interface window will appear.
6. Enter in privileged mode by typing a command enable.
7. Type a command show vlan to view the existing/default VLAN.
8. Make two VLANs using the following commands:
• Switch# vlan database
• Switch# vlan 2 name VLAN2
• Switch# vlan 3 name VLAN3
9. Add Fa0/1 and Fa0/2 in vlan 2, using the following commands:
a) Switch# configure terminal
b) Switch (config) # interface fastethernet0/1
c) Switch (config-if) # switchport mode access
d) Switch (config-if) # switchport access vlan 2
e) Switch (config-if) # interface fastethernet0/2
f) Switch (config-if) # # switchport access vlan 2
10. Similarly, add Fa0/3 and Fa0/4 in vlan 3, using the following commands:
g) Switch (config-if) # interface fastethernet0/3
h) Switch (config-if) # switchport mode access
i) Switch (config-if) # switchport access vlan 3
j) Switch (config-if) # interface fastethernet0/4
k) Switch (config-if) # switchport access vlan 3
11. In order to view the newly created VLANs, type a command show vlan after Switch#.
12. Create a trunk between a switch and router using following commands:
a) Switch# configure terminal
b) Switch (config) # interface fastethernet0/5
c) Switch (config-if) # switchport mode trunk
d) Switch (config-if) # switchport trunk vlan 2,3.
13. Connect Console cable between router and one the PCs and click on it.
14. Go to the terminal tab and tap OK, a Command Line Interface window will appear.
15. Enter in privileged mode by typing a command enable.
16. In order to enable the Fast Ethernet connection between a Switch and Router type the
following commands:
a) Switch# configure terminal
b) Switch (config) # interface fastethernet0/5
c) Switch (config-if) # ip address 192.168.10.1 255.255.255.0.
d) Switch (config-if) # no shutdown.
17. Create sub-interfaces of router using following commands:
a) Switch# configure terminal
b) Switch (config) # interface fastethernet0/0.1
c) Switch (config-subif) # encapsulation dot1q 2
d) Switch (config-subif) # ip address 192.168.10.1 255.255.255.0.
e) Switch (config-subif) # interface fastethernet0/0.2
f) Switch (config-subif) # encapsulation dot1q 3
g) Switch (config-subif) # ip address 192.168.20.1 255.255.255.0.
18. Send a message from one VLAN to the other and view its status.
LAB TASKS
Task#01 Inter VLAN
Network Simulations:

IP address:

IP address to the four PCs following as:

a. PC0: 192.168.10.2
Default gateway: 192.168.10.1
b. PC1: 192.168.10.3
Default gateway: 192.168.10.1
c. PC2: 192.168.20.2
Default gateway: 192.168.20.1
d. PC3: 192.168.20.3
Default gateway: 192.168.20.1
Commands:
Message conformation
Learning Outcomes

The lab achieved the following learning outcomes:

1. Understood the concept of Inter- VLANs in networking.


2. Created Inter-VLANs in a network using a router.

You might also like