D22CS097 P7 CN

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

CS362 Computer Networks D22CS097

Practical-7
AIM: Virtual Local Area Network.

Basic Understanding:

VLAN

Virtual LAN (VLAN) is a concept in which we can divide the devices logically on layer 2 (data link
layer). Generally, layer 3 devices divide broadcast domain but broadcast domain can be divided by
switches using the concept of VLAN.
A broadcast domain is a network segment in which if a device broadcast a packet then all the
devices in the same broadcast domain will receive it. The devices in the same broadcast domain will
receive all the broadcast packets but it is limited to switches only as routers don’t forward out the
broadcast packet. To forward out the packets to different VLAN (from one VLAN to another) or
broadcast domain, inter Vlan routing is needed. Through VLAN, different small-size sub-networks
are created which are comparatively easy to handle.
Types of connections in VLAN –
There are three ways to connect devices on a VLAN, the type of connections are based on the
connected devices i.e. whether they are VLAN-aware(A device that understands VLAN formats and
VLAN membership) or VLAN-unaware(A device that doesn’t understand VLAN format and
VLAN membership).
1. Trunk Link –
All connected devices to a trunk link must be VLAN-aware. All frames on this should
have a special header attached to it called tagged frames.
2. Access link –
It connects VLAN-unaware devices to a VLAN-aware bridge. All frames on the access
link must be untagged.
3. Hybrid link –
It is a combination of the Trunk link and Access link. Here both VLAN-unaware and
VLAN-aware devices are attached and it can have both tagged and untagged frames.
Advantages –
 Performance –
The network traffic is full of broadcast and multicast. VLAN reduces the need to send
such traffic to unnecessary destinations. e.g.-If the traffic is intended for 2 users but as
10 devices are present in the same broadcast domain, therefore, all will receive the
traffic i.e. wastage of bandwidth but if we make VLANs, then the broadcast or
multicast packet will go to the intended users only.
 Formation of virtual groups –
As there are different departments in every organization namely sales, finance etc.,
VLANs can be very useful in order to group the devices logically according to their
departments.
 Security –
In the same network, sensitive data can be broadcast which can be accessed by the
outsider but by creating VLAN, we can control broadcast domains, set up firewalls,
restrict access. Also, VLANs can be used to inform the network manager of an intrusion.
Hence, VLANs greatly enhance network security.
 Flexibility –
VLAN provide flexibility to add, remove the number of host we want.
 Cost reduction –
VLANs can be used to create broadcast domains which eliminate the need for

Page 1 of 8
CS362 Computer Networks D22CS097

expensive routers.
By using Vlan, the number of small size broadcast domain can be increased which are
easy to handle as compared to a bigger broadcast domain.
Disadvantages of VLAN
1. Complexity: VLANs can be complex to configure and manage, particularly in large or
dynamic cloud computing environments.
2. Limited scalability: VLANs are limited by the number of available VLAN IDs, which
can be a constraint in larger cloud computing environments.
3. Limited security: VLANs do not provide complete security and can be compromised
by malicious actors who are able to gain access to the network.
4. Limited interoperability: VLANs may not be fully compatible with all types of
network devices and protocols, which can limit their usefulness in cloud computing
environments.
5. Limited mobility: VLANs may not support the movement of devices or users between
different network segments, which can limit their usefulness in mobile or remote cloud
computing environments.
6. Cost: Implementing and maintaining VLANs can be costly, especially if specialized
hardware or software is required.
7. Limited visibility: VLANs can make it more difficult to monitor and troubleshoot
network issues, as traffic is isolated in different segments.

Page 2 of 8
CS362 Computer Networks D22CS097

Practical-7
AIM: Virtual Local Area Network.

Tools Required: Cisco Packet Tracer.


Submission: After writing answer into this word document, Student need to change name to
his ID followed by practical number. Ex 20cs005_Pr1.docx. Upload on assignment segment.
Rubrics: Nicely drafted document with clarity in answers leads to full marks. Otherwise,
submission carries proportional mark.
Note: While applying IP address, student need to allocate IP address as per his/her student ID.
For Example, if student ID is 20cs005 then IP address allocation for first network should start
with 5.0.0.0. For subsequent network, it should start with ID+1 i.e. 6.0.0.0, 7.0.0.0. and so on.
---------------------------------------------------------------------------------------------------------------

Task 1: Create VLAN in a given topology.

Topology:

Page 3 of 8
CS362 Computer Networks D22CS097

Step-1 Create following topology in Cisco packet tracer. Take the IP address and MAC
address as per instruction. Copy and paste reply from one of the machine in packet tracer.

Step-2 Now ping PC1 to rest of the other PCs.

Page 4 of 8
CS362 Computer Networks D22CS097

Step-3 Create VLAN area for PC1 and PC2 same for PC3 and PC4.

Switch>enable
Switch#iconfig terminal
Ente: configuration commands, one per line.
Switch (config) Ian 10
Switch (config—vlan) #name HR
Switch (config—vlan) #vlan 20
tch (config—vlan) #name CSE
switch (config—vlan) # int faO/1
Switch (config—if) #int faO/2
Switch (config—if) #switchport
switch (config—if) iswitchport
Switch (config—if) #int faO/4
Switch (config—if) # switchport
swi tch (config—if) #switchport
End with CNTL/Z.
switch (config—if) iswitchport
tch (config—if) #switchport
Switch (config—if) #switchport
Switch (config—if) #switchport
Switch (config) # int faO/3
Switch (config
mode access
access vlan IO
mode access
access vlan 10
mode access
s 20
mode access
access vlan 20

Step-4 Once VLAN is created ping from PC1 to PC4.

Conclusion:
The successful ping from PCl to PC4 despite being in different VLANs suggests that inter-
VLAN routing is enabled or configured within the network. This means that despite the
segregation of PCl and PC2 into one VLAN and PC3 and PC4 into another, there exists a
mechanism allowing communication between VLANs. This setup enables communication
between devices in separate VLANs, enhancing network segmentation while allowing
controlled data exchange between segments.
Page 5 of 8
CS362 Computer Networks D22CS097

Task 2: Create VLAN for given topology.

Topology:

Step-1 Create following topology in Cisco packet tracer. Take the IP address and MAC
address as per instruction. Copy and paste reply from one of the machine in packet tracer.

Page 6 of 8
CS362 Computer Networks D22CS097

Step-2 Now ping PC1 to rest of the other PCs.

Step-3 Create VLAN1 area for PC1 and PC2 same for PC5and PC6.
Create VLAN2 area for PC3 and PC4 same for PC7 and PC8.

Switch>enable
Switch#iconfig terminal
Ente: configuration commands, one per line.
Switch (config) Ian 10
Switch (config—vlan) #name HR
Switch (config—vlan) #vlan 20
switch (config—vlan) #name CSE
switch (config—vlan) # int faO/1
Switch (config—if) #int faO/2
Switch (config—if) #switchport
switch (config—if) iswitchport
Switch (config—if) #int faO/4
Switch (config—if) # switchport
swi tch (config—if) #switchport
Page 7 of 8
CS362 Computer Networks D22CS097

End with CNTL/Z.


switch (config—if) iswitchport
tch (config—if) #switchport
Switch (config—if) #switchport
Switch (config—if) #switchport
Switch (config) # int faO/3
Switch (config
mode access
access vlan IO
mode access
access vlan 10
mode access
s 20
mode access
access vlan 20

Step-4 Once VLAN is created ping from PC1 to PC4.

Step-4 Once VLAN is created ping from PC2 to PC6.

Conclusion:
The inability to ping between PCs within the same VLANs (PC3 to PC4 and PC7 to PC8)
suggests potential issues with VLAN configuration or inter-switch connectivity. Likely
causes include misconfigured VLAN settings, inadequate VLAN trunking between switches,
or absence of inter-VLAN routing. To resolve, verify and correct VLAN configurations,
ensure proper VLAN trunking between switches, and implement inter-VLAN routing if
required. Once resolved, communication within VLANs should be restored.

Student Signature Grade/Marks Examiner


Signature
Page 8 of 8

You might also like