<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gaser Hesham Mohamed Hanafy</title>
    <description>The latest articles on DEV Community by Gaser Hesham Mohamed Hanafy (@gaserhesham).</description>
    <link>https://dev.to/gaserhesham</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4276094%2Fe1f58006-8954-4ebd-acce-18e514e3a487.jpg</url>
      <title>DEV Community: Gaser Hesham Mohamed Hanafy</title>
      <link>https://dev.to/gaserhesham</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gaserhesham"/>
    <language>en</language>
    <item>
      <title>VLANs Explained: Network Segmentation and Inter-VLAN Routing</title>
      <dc:creator>Gaser Hesham Mohamed Hanafy</dc:creator>
      <pubDate>Tue, 01 Dec 2026 11:53:04 +0000</pubDate>
      <link>https://dev.to/gaserhesham/vlans-explained-network-segmentation-and-inter-vlan-routing-25b9</link>
      <guid>https://dev.to/gaserhesham/vlans-explained-network-segmentation-and-inter-vlan-routing-25b9</guid>
      <description>&lt;p&gt;Have you ever needed to design a network for a building but you wanted to divide this building into departments or floors and separate them?&lt;br&gt;
Have you ever thought about how you can divide a local network into separate segments?&lt;br&gt;
If so, have you considered a specific way to do this?&lt;br&gt;
There are multiple ways to do this like subnetting IP addresses but in my opinion, One of the most efficient ways to do this is by VLANs concepts.&lt;br&gt;
In most professional infrastructure you actually need the subnetting and VLANs together , because VLANs works as a LAYER 2 segmentation while subnetting is considered as Layer 3 seperation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkjt5e03krb0byexx5je.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkjt5e03krb0byexx5je.jpg" alt=" " width="554" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To understand how VLANs works you must understand LAN first , &lt;br&gt;
LAN stands for Local Area Network , It is a network connecting end devices like computers or servers with each other within a limited geographical area by specific device like switches , hubs or routers. On the other hand VLAN stands for Virtual LAN.&lt;br&gt;
VLANs have IDs (e.g. 10, 20, 30), and you can assign descriptive names such as HR, Finance, and IT.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2a6fmoci4g00821vzxn5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2a6fmoci4g00821vzxn5.jpg" alt=" " width="526" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why every one should use VLANs? The answer is very simple , Calculate the space and money could be costed if I got for every floor it's own switch and connected each floor with it's own LAN , It will absolutely cost a lot of money and space for this. Actually you could add switches in each floor if needed by a method called trunking , OK, It is not only about money... You could think Why not letting every floor to be connected for each other and it's simple and easy , In this case VLANs provide logical isolation that gives more privacy and security for each employee in the building if used the correct security system such as firewalls or ACLs it will perform perfectly.&lt;/p&gt;

&lt;p&gt;To demonstrate VLAN-based segmentation, I built a hospital network infrastructure using Cisco Packet Tracer.&lt;/p&gt;

&lt;p&gt;The project consists of two scenarios. The first demonstrates how four hospital departments can be logically separated using different VLANs through a central managed switch. The second demonstrates how VLANs can extend across multiple floors using two switches connected through an IEEE 802.1Q trunk link.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5oldc75we04n19dwrvc2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5oldc75we04n19dwrvc2.png" alt=" " width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can explore the complete topology, implementation details, and verification commands in my GitHub repository.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/GaserHesham" rel="noopener noreferrer"&gt;
        GaserHesham
      &lt;/a&gt; / &lt;a href="https://github.com/GaserHesham/Hospital-Network-Infrastructure-VLAN-Segmentation-Security" rel="noopener noreferrer"&gt;
        Hospital-Network-Infrastructure-VLAN-Segmentation-Security
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Hospital Network Segmentation &amp;amp; Multi-Floor VLAN Implementation&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Project Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;This project demonstrates VLAN-based network segmentation and inter-switch connectivity using &lt;strong&gt;Cisco Packet Tracer&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The project consists of two network scenarios designed to demonstrate how VLANs can be used to logically separate departments, reduce broadcast domains, and extend departmental networks across multiple physical locations.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Part 1: Hospital Department Segmentation&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;A hospital network is divided into four independent departments using VLANs, with all end devices connected to a central managed switch.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Department Distribution&lt;/h3&gt;

&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Department&lt;/th&gt;
&lt;th&gt;VLAN ID&lt;/th&gt;
&lt;th&gt;Number of Devices&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Administration&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Doctors&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nursery&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pharmacy&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;4 VLANs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;15 Devices&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Implementation&lt;/h3&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Created four separate VLANs on the central switch.&lt;/li&gt;
&lt;li&gt;Assigned switch ports to their corresponding departmental VLANs.&lt;/li&gt;
&lt;li&gt;Connected all departmental devices through dedicated access ports.&lt;/li&gt;
&lt;li&gt;Implemented logical network segmentation without requiring separate physical switches for each department.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Part 2: Multi-Floor VLAN Implementation Using Trunk Links&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;This…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/GaserHesham/Hospital-Network-Infrastructure-VLAN-Segmentation-Security" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>security</category>
      <category>networking</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
