Ospf

Package: inet.routing.ospfv2

Ospf

simple module
  • <VirtualLink>
    • @endPointRouterID - the router ID of the endpoint of the virtual link (required)
    • @transitAreaID - the ID of the area which is used for tansit
    • @retransmissionInterval - An optional integer
    • @interfaceTransmissionDelay - An optional integer
    • @helloInterval - An optional integer that must be the same for all router interfaces attached to the same network
    • @routerDeadInterval - An optional integer that must be the same for all router interfaces attached to the same network
    • @authenticationType - Optional OSPF packet authentication protocol (SimplePasswordType | CrytographicType | NullType)
    • @authenticationKey - Optional 8 byte hexadecimal value e.g. 0x5D8ABDAEDFCB8BEE
Ospf

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
interfaceTableModule string
routingTableModule string
crcMode string "disabled"
startupTime double 0s

delay before starting OSPF

ospfConfig xml xml(" \ \ \ \ ")

xml containing the full OSPF AS configuration

routerPriority int 1

Priority in DR/BDR election (Specify 0 to exclude the router from the election)

areaID string "0.0.0.0"
RFC1583Compatible bool false

if 'false', prune the set of routing table entries for the ASBR (RFC 3101)

DistributeDefaultRoute bool false

distribute the default route (if exists) using AS-External LSA

helloInterval int 10s

specifies the time in seconds between hello packets that the other router sends on an interface

pollInterval int 120s

specifies the length of time, in seconds, between OSPF packets that the router send before adjacency is established with a neighbor

routerDeadInterval int 40s

the interval during which at least one hello packet must be received from a neighbor before the router declares that neighbor as down

retransmissionInterval int 5s

The time between OSPF LSA retransmissions for adjacencies that belongs to the interface

interfaceTransmissionDelay int 1s

The number of seconds required to transmit a link state update packet. Valid values are 1 to 65535

interfaceMode string "Active"

NoOSPF: the interface is not advertized by OSPF Passive: the interface is advertised, but no OSPF message is send out

referenceBandwidth int 1e8bps

reference bandwidth for cost calculation

interfaceOutputCost int 0

cost of link on the interface (1-1000), 0 means use reference bandwidth

externalInterfaceOutputCost int 1

cost of link (1-1000)

externalInterfaceOutputType string "Type2"

Type1|Type2

forwardingAddress string "0.0.0.0"
linkCost int 1

cost of link (1-1000) for HostInterface and LoopbackInterface only

authenticationType string "NullType"
authenticationKey string "0x00"

0xnn..nn

Properties

Name Value Description
display i=block/network2

Gates

Name Direction Size Description
ipIn input
ipOut output

Source code

//   - <VirtualLink>
//     - @endPointRouterID - the router ID of the endpoint of the virtual link (required)
//     - @transitAreaID - the ID of the area which is used for tansit
//     - @retransmissionInterval - An optional integer
//     - @interfaceTransmissionDelay - An optional integer
//     - @helloInterval - An optional integer that must be the same for all router interfaces attached to the same network
//     - @routerDeadInterval - An optional integer that must be the same for all router interfaces attached to the same network
//     - @authenticationType - Optional OSPF packet authentication protocol (SimplePasswordType | CrytographicType | NullType)
//     - @authenticationKey - Optional 8 byte hexadecimal value e.g. 0x5D8ABDAEDFCB8BEE
//
simple Ospf like IOspf
{
    parameters:
        string interfaceTableModule;
        string routingTableModule;
        string crcMode @enum("disabled","computed") = default("disabled");
        volatile double startupTime @unit(s) = default(0s); // delay before starting OSPF
        // xml containing the full OSPF AS configuration
        xml ospfConfig = default(xml("<OSPFASConfig> \
                <Router name='**' RFC1583Compatible='true'> \
                    <BroadcastInterface ifName='eth[*]' areaID='0.0.0.0' interfaceOutputCost='0' /> \
                    <PointToPointInterface ifName='ppp[*]' areaID='0.0.0.0' interfaceOutputCost='0' /> \
                </Router> </OSPFASConfig>"));

        // default values for attributes of interface xml entries:

        int routerPriority = default(1);  // Priority in DR/BDR election (Specify 0 to exclude the router from the election)
        string areaID = default("0.0.0.0");
        bool RFC1583Compatible = default(false); // if 'false', prune the set of routing table entries for the ASBR (RFC 3101)
        bool DistributeDefaultRoute = default(false); // distribute the default route (if exists) using AS-External LSA

        int helloInterval @unit(s) = default(10s);  // specifies the time in seconds between hello packets that the other router sends on an interface
        int pollInterval @unit(s) = default(120s);  // specifies the length of time, in seconds, between OSPF packets that the router send before adjacency is established with a neighbor
        int routerDeadInterval @unit(s) = default(40s);  // the interval during which at least one hello packet must be received from a neighbor before the router declares that neighbor as down
        int retransmissionInterval @unit(s) = default(5s);  // The time between OSPF LSA retransmissions for adjacencies that belongs to the interface
        int interfaceTransmissionDelay @unit(s) = default(1s);  // The number of seconds required to transmit a link state update packet. Valid values are 1 to 65535
        string interfaceMode @enum("Active","Passive","NoOSPF") = default("Active"); // NoOSPF: the interface is not advertized by OSPF
                                                                                     // Passive: the interface is advertised, but no OSPF message is send out

        int referenceBandwidth @unit(bps) = default(1e8bps);   // reference bandwidth for cost calculation
        int interfaceOutputCost = default(0);  // cost of link on the interface (1-1000), 0 means use reference bandwidth
        int externalInterfaceOutputCost = default(1);  // cost of link (1-1000)
        string externalInterfaceOutputType = default("Type2");  // Type1|Type2 
        string forwardingAddress = default("0.0.0.0");
        int linkCost = default(1);  // cost of link (1-1000) for HostInterface and LoopbackInterface only      

        string authenticationType @enum("SimplePasswordType","CrytographicType","NullType") = default("NullType");
        string authenticationKey = default("0x00");  // 0xnn..nn

        @display("i=block/network2");
    gates:
        input ipIn @labels(Ipv4ControlInfo/up);
        output ipOut @labels(Ipv4ControlInfo/down);
}

File: src/inet/routing/ospfv2/Ospf.ned