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.

NetworkLayer ARP ErrorHandling ICMP IGMP IP MFMobileHost MobileHost BurstHost OSPFRouter QuaggaRouter Router StandardHost TCPSpoofingHost LDP_LSR RSVP_LSR WirelessHost WirelessHostSimplified RTPHost

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.

MFMobileHost

Models a mobile host with a wireless (802.11b) card in ad-hoc mode. This model contains the Mobility Framework's 802.11 implementation, Nic80211, and IP, TCP and UDP protocols. The mobility model can be dynamically specified with the mobilityType parameter.

MobileHost

Models a mobile host with a wireless (802.11b) card in ad-hoc mode. This model contains the new IEEE 802.11 implementation, Ieee80211Nic, and IP, TCP and UDP protocols. The mobility model can be dynamically specified with the mobilityType parameter.

BurstHost

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

OSPFRouter

IP router.

QuaggaRouter

Quagga-based IP router.

Router

IP router.

StandardHost

IP host with TCP, UDP layers and applications.

TCPSpoofingHost

IP host with TCPSpoof in the application layer.

LDP_LSR

An LDP-capable router.

RSVP_LSR

An RSVP-TE capable router.

WirelessHost

Models a host with one wireless (802.11b) card in infrastructure mode. This module is basically a StandardHost with an Ieee80211NicSTA added. It should be used in conjunction with WirelessAP, or any other AP model which contains Ieee80211NicAP.

WirelessHostSimplified

Models a host with one wireless (802.11b) card in infrastructure mode, but using a simplified NIC that does not support handovers. This module is basically a StandardHost with an Ieee80211NicSTASimplified added. It should be used in conjunction with WirelessAPSimplified, or any other AP model which contains Ieee80211NicAPSimplified.

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