Compound Module OSPFRouter

Package: inet.nodes.inet
File: src/nodes/inet/OSPFRouter.ned

An OSPFv2 router.

NotificationBoard InterfaceTable RoutingTable OSPFRouting NetworkLayer PPPInterface EthernetInterface

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

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.

OneNetArea (compound module) (no description)
OSPF_Area1 (compound module) (no description)
OSPF_Area2 (compound module) (no description)
OSPF_Area3 (compound module) (no description)
TwoNetsArea (compound module) (no description)

Networks:

Backbone (network) (no description)
OSPF_TestNetwork (network) (no description)
SimpleTest (network) (no description)

Parameters:

Name Type Default value Description
routingFile string ""

Properties:

Name Value Description
node
labels node
display i=abstract/router

Gates:

Name Direction Size Description
pppg [ ] inout
ethg [ ] inout

Unassigned submodule parameters:

Name Type Default value Description
ospf.ospfConfigFile string

xml file containing the full OSPF AS configuration

networkLayer.ip.procDelay double 0s
networkLayer.arp.retryTimeout double 1s

number seconds ARP waits between retries to resolve an IP address

networkLayer.arp.retryCount int 3

number of times ARP will attempt to resolve an IP address

networkLayer.arp.cacheTimeout double 120s

number seconds unused entries in the cache will time out

ppp.ppp.mtu int 4470
eth.mac.promiscuous bool false

if true, all packets are received, otherwise only the ones with matching destination MAC address

eth.mac.address string "auto"

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

eth.mac.txrate double 100Mbps

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

eth.mac.duplexEnabled bool true

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

eth.mac.mtu int 1500

Source code:

//
// An OSPFv2 router.
//
module OSPFRouter
{
    parameters:
        @node();
        @labels(node,ethernet-node);
        @display("i=abstract/router");
        string routingFile = default("");
    gates:
        inout pppg[] @labels(PPPFrame-conn);
        inout ethg[] @labels(EtherFrame-conn);
    submodules:
        notificationBoard: NotificationBoard {
            parameters:
                @display("p=60,60");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=60,140");
        }
        routingTable: RoutingTable {
            parameters:
                IPForward = true;
                routerId = "auto";
                routingFile = routingFile;
                @display("p=60,220");
        }
        ospf: OSPFRouting {
            parameters:
                @display("p=300,140,row");
        }
        networkLayer: NetworkLayer {
            parameters:
                @display("p=200,140;q=queue");
            gates:
                ifIn[sizeof(pppg)+sizeof(ethg)];
                ifOut[sizeof(pppg)+sizeof(ethg)];
        }
        ppp[sizeof(pppg)]: PPPInterface {
            parameters:
                @display("p=90,257,row,110;q=l2queue");
        }
        eth[sizeof(ethg)]: EthernetInterface {
            parameters:
                @display("p=145,257,row,110;q=l2queue");
        }
    connections allowunconnected:
        ospf.ipOut --> networkLayer.ospfIn;
        ospf.ipIn <-- networkLayer.ospfOut;

        // connections to network outside
        for i=0..sizeof(pppg)-1 {
            pppg[i] <--> ppp[i].phys;
            ppp[i].netwOut --> networkLayer.ifIn[i];
            ppp[i].netwIn <-- networkLayer.ifOut[i];
        }

        for i=0..sizeof(ethg)-1 {
            ethg[i] <--> eth[i].phys;
            eth[i].netwOut --> networkLayer.ifIn[sizeof(pppg)+i];
            eth[i].netwIn <-- networkLayer.ifOut[sizeof(pppg)+i];
        }
}