Compound Module NetworkLayer

File: Nodes/INET/NetworkLayer.ned

Network layer of an IP node.

Interfaces to transport layer: TCP, UDP, echo/ping, RSVP

ip: IP arp: ARP icmp: ICMP igmp: IGMP errorHandling: ErrorHandling

Usage diagram:

The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.

Contains the following modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

ARP

Implements the Address Resolution Protocol for IPv4 and IEEE 802 6-byte MAC addresses.

ErrorHandling

Handles error notifications that arrive from other protocol modules.

ICMP

ICMP implementation

IGMP

Placeholder for the IGMP protocol

IP

Implements the IP protocol. The protocol header is represented by the IPDatagram message class.

Used in compound modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

StandardHost

IP host with TCP, UDP layers and applications.

QuaggaRouter

Quagga-based IP router.

MobileHost

Models a mobile host with a wireless (802.11b) card. This module is a WirelessHost less the PPP and Ethernet interfaces, plus mobility support (BasicMobility). It is intended mainly for mobile ad-hoc networks.

WirelessHost2

Models a host with zero, one or more wireless (802.11b) cards. This module is a variation of WirelessHost.

Router

IP router.

WirelessHost

Models a host with one wireless (802.11b) card. This module is basically a StandardHost with a Nic80211 added.

BurstHost

Definition of an IP node with a transport generator that connects to IP directly, without TCP or UDP.

OSPFRouter

IP router.

TCPSpoofingHost

IP host with TCPSpoof in the application layer.

LDP_LSR

An LDP-capable router.

RSVP_LSR

An RSVP-TE capable router.

RTPHost (no description)

Parameters:

Name Type Description
proxyARP bool

Gates:

Name Direction Description
ifIn [ ] input
TCPIn input
UDPIn input
RSVPIn input
OSPFIn input
pingIn input
ifOut [ ] output
TCPOut output
UDPOut output
RSVPOut output
OSPFOut output
pingOut output

Unassigned submodule parameters:

Name Type Description
ip.procDelay numeric const
arp.retryTimeout numeric

number seconds ARP waits between retries to resolve an IP address

arp.retryCount numeric

number of times ARP will attempt to resolve an IP address

arp.cacheTimeout numeric

number seconds unused entries in the cache will time out

Source code:

module NetworkLayer
    parameters:
        proxyARP: bool;
    gates:
        in: ifIn[];
        in: TCPIn;
        in: UDPIn;
        in: RSVPIn;
        in: OSPFIn;
        in: pingIn;
        out: ifOut[];
        out: TCPOut;
        out: UDPOut;
        out: RSVPOut;
        out: OSPFOut;
        out: pingOut;

    submodules:
        ip: IP;
            parameters:
                timeToLive = 32,
                multicastTimeToLive = 32,
                fragmentTimeout = 60,
                protocolMapping = "6:0,17:1,1:2,2:3,46:4,89:5";
            gatesizes:
                transportIn[6],
                transportOut[6],
                queueIn[sizeof(ifIn)];
            display: "p=85,95;i=block/routing;q=queue";
        arp: ARP;
            parameters:
                proxyARP = proxyARP;
            gatesizes:
                nicOut[sizeof(ifOut)];
            display: "p=163,206;i=block/layer;q=pendingQueue";
        icmp: ICMP;
            display: "p=160,63;i=block/control_s";
        igmp: IGMP;
            display: "p=160,122;i=block/cogwheel_s";
        errorHandling: ErrorHandling;
            display: "p=239,63;i=block/process_s";
    connections nocheck:
        // transport Layer
        ip.transportOut[0] --> TCPOut;
        ip.transportIn[0] <-- TCPIn;

        ip.transportOut[1] --> UDPOut;
        ip.transportIn[1] <-- UDPIn;

        ip.transportOut[2] --> icmp.localIn;
        ip.transportIn[2] <-- icmp.sendOut;

        ip.transportOut[3] --> igmp.localIn;
        ip.transportIn[3] <-- igmp.sendOut;

        ip.transportOut[4] --> RSVPOut;
        ip.transportIn[4] <-- RSVPIn;

        ip.transportOut[5] --> OSPFOut;
        ip.transportIn[5] <-- OSPFIn;

        icmp.pingOut --> pingOut;
        icmp.pingIn <-- pingIn;

        icmp.errorOut --> errorHandling.in;

        ip.queueOut --> arp.ipIn;

        // L2 interfaces to IP and from ARP
        for i=0..sizeof(ifOut)-1 do
            ifIn[i] --> ip.queueIn[i] display "m=s";
            ifOut[i] <-- arp.nicOut[i] display "m=s";
        endfor;
endmodule