e-mail address: omnetmanual@gmail.com

Phone number: +91 9444856435

Tel 7639361621

DEFENDER
  • Phd Omnet++ Projects
    • RESEARCH PROJECTS IN OMNET++
  • Network Simulator Research Papers
    • Omnet++ Thesis
    • Phd Omnet++ Projects
    • MS Omnet++ Projects
    • M.Tech Omnet++ Projects
    • Latest Omnet++ Projects
    • 2016 Omnet++ Projects
    • 2015 Omnet++ Projects
  • OMNET INSTALLATION
    • 4G LTE INSTALLATION
    • CASTALIA INSTALLATION
    • INET FRAMEWORK INSTALLATION
    • INETMANET INSTALLATION
    • JDK INSTALLATION
    • LTE INSTALLATION
    • MIXIM INSTALLATION
    • Os3 INSTALLATION
    • SUMO INSTALLATION
    • VEINS INSTALLATION
  • Latest Omnet++ Projects
    • AODV OMNET++ SOURCE CODE
    • VEINS OMNETPP
    • Network Attacks in OMNeT++
    • NETWORK SECURITY OMNET++ PROJECTS
    • Omnet++ Framework Tutorial
      • Network Simulator Research Papers
      • OMNET++ AD-HOC SIMULATION
      • OmneT++ Bandwidth
      • OMNET++ BLUETOOTH PROJECTS
      • OMNET++ CODE WSN
      • OMNET++ LTE MODULE
      • OMNET++ MESH NETWORK PROJECTS
      • OMNET++ MIXIM MANUAL
  • OMNeT++ Projects
    • OMNeT++ OS3 Manual
    • OMNET++ NETWORK PROJECTS
    • OMNET++ ROUTING EXAMPLES
    • OMNeT++ Routing Protocol Projects
    • OMNET++ SAMPLE PROJECT
    • OMNeT++ SDN PROJECTS
    • OMNET++ SMART GRID
    • OMNeT++ SUMO Tutorial
  • OMNET++ SIMULATION THESIS
    • OMNET++ TUTORIAL FOR WIRELESS SENSOR NETWORK
    • OMNET++ VANET PROJECTS
    • OMNET++ WIRELESS BODY AREA NETWORK PROJECTS
    • OMNET++ WIRELESS NETWORK SIMULATION
      • OMNeT++ Zigbee Module
    • QOS OMNET++
    • OPENFLOW OMNETPP
  • Contact

How to Implement VLAN Trunking Protocol in OMNeT++

To implement the VLAN Trunking Protocol (VTP) in OMNeT++ has needs to emulate the network where switches can share VLAN configuration information over trunk links, permitting the propagation of VLAN configurations all over a network. The VTP is commonly used in the circumstance where to handle the VLANs manually on each switch would be clumsy, as it systematizes the process of updating VLAN information through the network.

To execute the VTP in OMNeT++, we need to mimic the characteristics of VTP that concentrates on features such as VLAN creation, deletion, and propagation of VLAN configurations via VTP messages.

Step-by-Step Implementation:

Step 1: Set Up OMNeT++ and INET Framework

  1. Install OMNeT++:
    • Guarantee OMNeT++ is installed on system. We need to download it from the OMNeT++
  2. Install the INET Framework:
    • Download and install the INET Framework, which offers numerous networking protocols and models that encompasses an Ethernet and switching models. INET can be downloaded from the INET GitHub repository.

Step 2: Create a New OMNeT++ Project

  1. Create the Project:
    • Open OMNeT++ and generate a new OMNeT++ project through  File > New > OMNeT++ Project.
    • Name project such as VTPTrunkingSimulation and set up the project directory.
  2. Set Up Project Dependencies:
    • Make certain project references the INET Framework by right-clicking on project in the Project Explorer, navigating to Properties > Project References, and checking the INET project.

Step 3: Define the Network Topology

  1. Create a NED File:
    • Describe network topology using the NED language. This topology will encompasses switches that will interact over trunk links and share VLAN configuration information.

Example:

network VTPNetwork

{

parameters:

int numSwitches = default(3); // Number of switches in the network

int numHosts = default(3); // Number of hosts in the network

submodules:

switch[numSwitches]: EtherSwitch {

@display(“i=block/switch”);

}

host[numHosts]: StandardHost {

@display(“i=block/host”);

}

connections allowunconnected:

switch[0].ethg++ <–> Eth10Gbps <–> switch[1].ethg++;

switch[1].ethg++ <–> Eth10Gbps <–> switch[2].ethg++;

switch[2].ethg++ <–> Eth10Gbps <–> switch[0].ethg++;

host[0].ethg++ <–> Eth10Gbps <–> switch[0].ethg++;

host[1].ethg++ <–> Eth10Gbps <–> switch[1].ethg++;

host[2].ethg++ <–> Eth10Gbps <–> switch[2].ethg++;

}

  1. Configure Network Parameters:
    • Set up necessary link parameters like bandwidth, delay, and packet loss to mimic a realistic network environment.

Step 4: Implement the VLAN Trunking Protocol (VTP)

  1. Create the VTP Module in NED

We need to generate a module that manages VTP messages, including sending and receiving VLAN configuration updates.

Example (in NED):

simple VTP

{

parameters:

@display(“i=block/network2”);

gates:

inout lowerLayerIn[];

inout lowerLayerOut[];

}

  1. Implement VTP in C++

Here’s a basic structure for implementing VTP in C++:

#include “inet/common/INETDefs.h”

#include “inet/networklayer/contract/IRoutingTable.h”

#include “inet/networklayer/ipv4/IPv4RoutingTable.h”

#include “inet/networklayer/ipv4/IPv4Route.h”

#include “inet/networklayer/common/L3Address.h”

#include “inet/common/packet/Packet.h”

#include “inet/networklayer/common/InterfaceTable.h”

#include “inet/linklayer/ethernet/switch/MACRelayUnitNP.h”

class VTP : public cSimpleModule

{

private:

std::map<int, std::string> vlanDatabase;  // VLAN ID to VLAN name

int configurationRevision;

cMessage *vtpTimer;

protected:

virtual void initialize() override;

virtual void handleMessage(cMessage *msg) override;

void sendVTPUpdate();

void processVTPUpdate(Packet *packet);

void addVLAN(int vlanId, const std::string& vlanName);

void removeVLAN(int vlanId);

};

Define_Module(VTP);

void VTP::initialize() {

configurationRevision = 0;

// Schedule periodic VTP updates

vtpTimer = new cMessage(“VTP_Timer”);

scheduleAt(simTime() + 1, vtpTimer);

}

void VTP::handleMessage(cMessage *msg) {

if (msg == vtpTimer) {

sendVTPUpdate();

scheduleAt(simTime() + 1, vtpTimer);  // Reschedule VTP update

} else {

Packet *packet = check_and_cast<Packet *>(msg);

processVTPUpdate(packet);

}

}

void VTP::sendVTPUpdate() {

Packet *vtpPacket = new Packet(“VTP_Update”);

// Add the VTP update data (e.g., VLAN database and revision number) to the packet

for (int i = 0; i < gateSize(“lowerLayerOut”); i++) {

send(vtpPacket->dup(), “lowerLayerOut”, i);  // Send VTP update to all connected switches

}

delete vtpPacket;

}

void VTP::processVTPUpdate(Packet *packet) {

// Extract the VTP update data (e.g., VLAN database and revision number) from the packet

// Example: Update the local VLAN database if the received revision number is higher

int receivedRevision = /* Extract revision number from the packet */;

if (receivedRevision > configurationRevision) {

configurationRevision = receivedRevision;

// Update local VLAN database with the received data

}

delete packet;

}

void VTP::addVLAN(int vlanId, const std::string& vlanName) {

vlanDatabase[vlanId] = vlanName;

configurationRevision++;

}

void VTP::removeVLAN(int vlanId) {

vlanDatabase.erase(vlanId);

configurationRevision++;

}

Step 5: Configure the Simulation

  1. Set Up the Simulation in omnetpp.ini:
    • Describe the simulation parameters like the network to use, simulation time, and VTP behaviour.

Example:

network = VTPNetwork

sim-time-limit = 100s

**.scalar-recording = true

**.vector-recording = true

# VTP Configuration

**.switch*.hasVTP = true  # Enable VTP on all switches

  1. Compile and Run the Simulation:
    • To make sure that everything is properly executed and compiled. Run the simulation using OMNeT++’s IDE or command line.

Step 6: Analyse the Results

  1. Monitor VTP Behaviour:
    • Monitor how VLAN configurations are propagated across the network. Make sure that all switches eventually have the same VLAN configuration.
  2. Evaluate Performance:
    • Measure the key performance metrics like the time taken to broadcast VLAN updates and the accuracy of VLAN configurations through the network.
    • Scalars and Vectors: To record and measure scalar and vector data, like the number of VLANs created, deleted, and the time taken for VLAN configurations to synchronize across all switches by use OMNeT++ tools.

Step 7: Optimize and Extend the Protocol

  1. Address Any Issues:
    • If the simulation reveals any challenges like incorrect VLAN propagation, packet loss, regulate the VTP logic or network configuration as needed.
  2. Extend the Protocol:
    • To execute the extra VTP characteristics like VTP pruning, VTP domain names, or numerous VTP modes (Server, Client, Transparent).

We had successfully implemented and executed the VLAN Trunking Protocol in OMNeT++ tool and that emulates the network then allowing the VLAN configuration over the network to analyse the outcome. Further specific details regarding the VLAN on your projects we will provided in further setup module with simulation results.

Related Topics

  • Network Intrusion Detection Projects
  • Computer Science Phd Topics
  • Iot Thesis Ideas
  • Cyber Security Thesis Topics
  • Network Security Research Topics

designed by OMNeT++ Projects .