How to Simulate LAN Protocols Projects Using OMNeT++

To simulate Local Area Network (LAN) protocols in OMNeT++ using the INET framework has required setting up the network models with numerous LAN protocols, like Ethernet, VLANs, or spanning tree protocols. LAN protocols concentrate on Layer 2 (Data Link Layer) of the OSI model that manages data transfer among nodes on the same local network.

Here’s a step-by-step guide to simulating LAN protocols using OMNeT++ and the INET framework:

Steps to Simulate LAN Protocols Projects in OMNeT++

Step 1: Install OMNeT++ and INET Framework

Make sure that we have installed OMNeT++ and the INET framework, as INET includes essential models for replicating LAN protocols, like Ethernet, VLAN, and Spanning Tree Protocol (STP).

  1. Download OMNeT++: OMNeT++ official website
  2. Download INET Framework: INET Framework

Step 2: Set Up Network Topology in NED File

We will need to describe the LAN network in the .ned file. For replicating Ethernet-based LANs, we will utilize EthernetHost or EthernetSwitch modules delivered by the INET framework.

Here’s an example of a simple LAN with hosts and switches:

network LANExample

{

submodules:

host1: EthernetHost {

@display(“p=100,100”);

}

host2: EthernetHost {

@display(“p=200,100”);

}

host3: EthernetHost {

@display(“p=300,100”);

}

switch1: EthernetSwitch {

@display(“p=200,200”);

}

connections:

host1.ethg++ <–> Eth100M <–> switch1.ethg++;

host2.ethg++ <–> Eth100M <–> switch1.ethg++;

host3.ethg++ <–> Eth100M <–> switch1.ethg++;

}

In this setup:

  • EthernetHost: denotes hosts in the LAN (e.g., computers).
  • EthernetSwitch: signify a Layer 2 switch that associates the hosts.
  • Eth100M: Requires the Ethernet link type with a speed of 100 Mbps.

Step 3: Configure LAN Protocols in omnetpp.ini

Once the network topology is defined, we can set up the LAN protocols like Ethernet, VLAN, or Spanning Tree Protocol in the omnetpp.ini file.

Example Configuration for Ethernet:

[Config EthernetSimulation]

network = LANExample

sim-time-limit = 1000s

# Set up Ethernet configuration for hosts

*.host1.eth[0].mac.address = “00:00:00:00:01:00”

*.host2.eth[0].mac.address = “00:00:00:00:02:00”

*.host3.eth[0].mac.address = “00:00:00:00:03:00”

# Configure Ethernet switching

*.switch1.numPorts = 3

*.switch1.eth[*].macForwardingTableSize = 100  # Set MAC address forwarding table size

*.switch1.eth[*].macLearning = true  # Enable MAC address learning

Example Configuration for VLAN:

To configure VLANs, define VLAN tags in the network:

# Enable VLAN on the Ethernet switch

*.switch1.hasVlan = true

# Assign VLAN IDs to ports

*.switch1.eth[0].vlanId = 100

*.switch1.eth[1].vlanId = 200

*.switch1.eth[2].vlanId = 300

# Enable VLAN tagging on hosts

*.host1.eth[0].vlanId = 100

*.host2.eth[0].vlanId = 200

*.host3.eth[0].vlanId = 300

This set up will simulate the VLAN protocol, in which hosts are associated to different VLANs (VLAN 100, 200, 300), and making sure isolated communication inside a VLANs.

Step 4: Simulate Spanning Tree Protocol (STP)

STP is utilized to prevent loops in the LAN with redundant paths. Here’s how to enable STP:

# Enable Spanning Tree Protocol in Ethernet switches

*.switch1.stpEnabled = true

# Configure STP parameters (optional)

*.switch1.stpPriority = 32768

*.switch1.stpForwardDelay = 15s

*.switch1.stpMaxAge = 20s

*.switch1.stpHelloTime = 2s

STP will dynamically handle redundant paths among switches and mitigate broadcast storms triggered by loops.

Step 5: Implement Traffic Patterns

To create traffic among hosts in LAN network, we can utilize INET’s TCPBasicClientApp and TCPBasicServerApp or UDP applications to transmit traffic among the hosts.

For example, configure host1 to send TCP traffic to host2:

# Traffic generation: Host1 will send TCP traffic to Host2

*.host1.numApps = 1

*.host1.app[0].typename = “TcpBasicClientApp”

*.host1.app[0].localAddress = “10.0.0.1”

*.host1.app[0].connectAddress = “10.0.0.2”

*.host1.app[0].startTime = 10s

*.host1.app[0].numRequestsPerSession = 10

# Configure Host2 as a TCP server

*.host2.numApps = 1

*.host2.app[0].typename = “TcpBasicServerApp”

Step 6: Run the Simulation

After configuring the NED files and set up the LAN protocol settings in omnetpp.ini, we can execute the simulation:

  1. Build and compile the project in OMNeT++.
  2. Run the simulation via OMNeT++’s GUI or command line.
  3. Observe the network behavior such as packet forwarding, VLAN seperation, or STP loop mitigation.

Step 7: Analyse Results

Once the simulation is done, OMNeT++ will create output files (.sca and .vec) comprising detailed information about the simulation that contain:

  • Packet delivery: How many packets were delivered successfully among hosts?
  • Switch operation: How switches learned MAC addresses or mitigated loops using STP.
  • VLAN isolation: Test that communication only happens among devices in the same VLAN.

We can envision and measure these parameters using OMNeT++’s evaluation tool.

Step 8: Refine the Simulation

According to the outcome, we can refine the network parameters, traffic patterns, or LAN protocol configurations. For example:

  • Increase or decrease the size of the Ethernet forwarding table.
  • Modify VLAN assignments to monitor changes in traffic flow.
  • Add more switches and hosts to replicate larger LAN topologies.

Example Scenario Enhancements:

  1. Simulate a Redundant LAN: Incorporate multiple switches and permit STP to replicate a redundant network topology with backup links.
  2. Simulate a Mixed VLAN: set up some hosts to be part of multiple VLANs and validate the interaction among them using inter-VLAN routing (requires a Layer 3 device).

We clearly demonstrate on how to simulate and analyse the performance in local area network using OMNeT++ tool and it also focus on the data link area and it is utilized to transmit the communication among the same network. We plan to deliver more information regarding this process in the upcoming manual.

To Simulate LAN Protocols Projects Using OMNeT++ we will give you best simulation along with research ideas , get tailored projects done by us. We do guarantee on time delivery with brief explanation.

Opening Time

9:00am

Lunch Time

12:30pm

Break Time

4:00pm

Closing Time

6:30pm

  • award1
  • award2