Package: inet.examples.bgpv4.BgpOpen
BGPRouterSimple
compound moduleExample Ipv4 router with BGPv4 support.
Usage diagram
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
Used in
| Name | Type | Description |
|---|---|---|
| BgpNetwork | network | (no description) |
Properties
| Name | Value | Description |
|---|---|---|
| networkNode | ||
| labels | node | |
| display | i=abstract/router |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| pppg [ ] | inout |
Unassigned submodule parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| interfaceTable.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| interfaceTable.displayAddresses | bool | false |
Whether to display IP addresses on links |
| routingTable.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| routingTable.interfaceTableModule | string |
The path to the InterfaceTable module |
|
| routingTable.netmaskRoutes | string | "*" |
Maintain netmask routes for interfaces |
| routingTable.multicastForwarding | bool | false |
Turns multicast forwarding on/off |
| routingTable.useAdminDist | bool | false |
Use Cisco-like administrative distances |
| routingTable.routingFile | string | "" |
Routing table file name |
| bgp.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| bgp.interfaceTableModule | string | ||
| bgp.routingTableModule | string | ||
| bgp.startupTime | double | 0s |
Delay before starting BGP |
| bgp.bgpConfig | xml | ||
| bgp.ExternalPeerStartDelayOffset | double | 0.5s | |
| bgp.redistributeRip | bool | false |
Redistribute routes learned by RIP into BGP |
| bgp.redistributeOspf | string | "" |
Redistribute routes learned by OSPF into BGP (O IA E1 E2) |
| bgp.redistributeInternal | bool | false |
Redistribute BGP routes into OSPF (as external routes) |
| bgp.nextHopSelf | bool | false | |
| bgp.localPreference | int | 100 | |
| bgp.connectedCheck | bool | true | |
| bgp.ebgpMultihop | int | 1 | |
| snifferIn.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| snifferIn.config | xml |
Configuration file |
|
| snifferOut.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| snifferOut.config | xml |
Configuration file |
|
| tn.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| tn.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| tn.forwardServiceRegistration | bool | true | |
| tn.forwardProtocolRegistration | bool | true | |
| tn.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| tn.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| tn.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| ipv4.routingTable.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.routingTable.interfaceTableModule | string |
The path to the InterfaceTable module |
|
| ipv4.routingTable.routerId | string | "auto" |
For routers, the router id using IPv4 address dotted notation; specify "auto" to select the highest interface address; should be left empty ("") for hosts |
| ipv4.routingTable.netmaskRoutes | string | "*" |
Maintain netmask routes for interfaces |
| ipv4.routingTable.forwarding | bool | true |
Turns IP forwarding on/off |
| ipv4.routingTable.multicastForwarding | bool | false |
Turns multicast forwarding on/off |
| ipv4.routingTable.useAdminDist | bool | false |
Use Cisco-like administrative distances |
| ipv4.routingTable.routingFile | string | "" |
Routing table file name |
| ipv4.natTable.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.natTable.networkProtocolModule | string | "^.ip" | |
| ipv4.natTable.config | xml | xml(" |
XML configuration parameters for network address translation |
| ipv4.up.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.up.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| ipv4.up.forwardServiceRegistration | bool | true | |
| ipv4.up.forwardProtocolRegistration | bool | true | |
| ipv4.up.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| ipv4.up.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| ipv4.up.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| ipv4.icmp.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.icmp.interfaceTableModule | string |
The path to the InterfaceTable module |
|
| ipv4.icmp.routingTableModule | string | ||
| ipv4.icmp.checksumMode | string | "declared" | |
| ipv4.icmp.quoteLength | int | 8B |
Number of bytes from original packet to quote in ICMP reply |
| ipv4.mp.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.mp.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| ipv4.mp.forwardServiceRegistration | bool | true | |
| ipv4.mp.forwardProtocolRegistration | bool | true | |
| ipv4.mp.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| ipv4.mp.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| ipv4.mp.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| ipv4.ipsec.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.ipsec.networkProtocolModule | string | "^.ip" | |
| ipv4.ipsec.interfaceTableModule | string | ||
| ipv4.ipsec.spdModule | string | "^.spd" | |
| ipv4.ipsec.sadModule | string | "^.sad" | |
| ipv4.ipsec.spdConfig | xml | ||
| ipv4.ipsec.defaultProtection | string | "" |
If not "": value to use where <Protection> element is absent from the configuration |
| ipv4.ipsec.defaultEspMode | string | "" |
If not "": value to use where <EspMode> element is absent from the configuration |
| ipv4.ipsec.defaultEncryptionAlg | string | "" |
If not "": value to use where <EncryptionAlg> element is absent from the configuration |
| ipv4.ipsec.defaultAuthenticationAlg | string | "" |
If not "": value to use where <defaultAuthenticationAlg> element is absent from the configuration |
| ipv4.ipsec.defaultMaxTfcPadLength | int | 0 |
Value to use where <MaxTfcPadLength> element is absent from the configuration |
| ipv4.ipsec.ahProtectOutDelay | double | 0.0s | |
| ipv4.ipsec.ahProtectInDelay | double | 0.0s | |
| ipv4.ipsec.espProtectOutDelay | double | 0.0s | |
| ipv4.ipsec.espProtectInDelay | double | 0.0s | |
| ipv4.spd.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.sad.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.lp.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| ipv4.lp.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| ipv4.lp.forwardServiceRegistration | bool | true | |
| ipv4.lp.forwardProtocolRegistration | bool | true | |
| ipv4.lp.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| ipv4.lp.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| ipv4.lp.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| nl.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| nl.interfaceTableModule | string |
Module path to the ~InterfaceTable module |
|
| nl.forwardServiceRegistration | bool | true | |
| nl.forwardProtocolRegistration | bool | true | |
| nl.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| nl.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| nl.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
Source code
// // Example Ipv4 router with BGPv4 support. // module BGPRouterSimple { parameters: @networkNode(); @labels(node,ethernet-node); @display("i=abstract/router"); *.interfaceTableModule = default(absPath(".interfaceTable")); *.routingTableModule = default(absPath(".routingTable")); gates: inout pppg[] @labels(PppFrame-conn); submodules: interfaceTable: InterfaceTable { parameters: @display("p=100,100;is=s"); } routingTable: Ipv4RoutingTable { parameters: forwarding = true; routerId = "auto"; @display("p=100,200;is=s"); } bgp: Bgp { parameters: ospfRoutingModule = ""; @display("p=325,80;i=block/network"); } snifferIn: MessageChecker { parameters: @display("i=block/uparrow_s;p=250,160"); } snifferOut: MessageChecker { parameters: @display("i=block/downarrow_s;p=400,160"); } tcp: <default(firstAvailable("Tcp","TcpLwip","TcpNsc"))> like ITcp if typename != "" { parameters: @display("p=325,240;i=block/transport"); } tn: MessageDispatcher { parameters: @display("b=300,5,,,,1;p=325,320"); } ipv4: Ipv4NetworkLayer { parameters: @display("p=325,400;i=block/layer;q=queue"); } nl: MessageDispatcher { parameters: @display("b=300,5,,,,1;p=325,480"); } ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface { parameters: @display("p=325,560,row,110;q=l2queue;i=block/ifcard"); } connections allowunconnected: bgp.socketOut --> { @display("m=s"); } --> snifferOut.in; bgp.socketIn <-- { @display("m=s"); } <-- snifferIn.out; snifferOut.out --> { @display("m=s"); } --> tcp.appIn; snifferIn.in <-- { @display("m=s"); } <-- tcp.appOut; tcp.ipOut --> { @display("m=s"); } --> tn.in++; tcp.ipIn <-- { @display("m=s"); } <-- tn.out++; tn.out++ --> { @display("m=s"); } --> ipv4.transportIn; tn.in++ <-- { @display("m=s"); } <-- ipv4.transportOut; ipv4.ifOut --> { @display("m=s"); } --> nl.in++; ipv4.ifIn <-- { @display("m=s"); } <-- nl.out++; // connections to network outside for i=0..sizeof(pppg)-1 { pppg[i] <--> { @display("m=s"); } <--> ppp[i].phys; ppp[i].upperLayerOut --> nl.in++; ppp[i].upperLayerIn <-- nl.out++; } }File: examples/bgpv4/BgpOpen/BGPRouterSimple.ned