123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- package inet.examples.bgpv4.BGP3Routers;
- import inet.common.misc.ThruputMeteringChannel;
- import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
- import inet.node.bgp.BGPRouter;
- import inet.node.ethernet.EtherSwitch;
- import inet.node.inet.StandardHost;
- import inet.node.ospfv2.OSPFRouter;
- network BGPTest
- {
- types:
- channel LINK_100 extends ThruputMeteringChannel
- {
- parameters:
- delay = 0;
- datarate = 100Mbps;
- thruputDisplayFormat = "#N";
- }
- submodules:
- A: BGPRouter {
- parameters:
- @display("p=266,141");
- gates:
- pppg[4];
- }
- B: BGPRouter {
- parameters:
- @display("p=338,141");
- gates:
- pppg[4];
- }
- C: BGPRouter {
- parameters:
- @display("p=298,197");
- gates:
- pppg[4];
- }
- RA1: OSPFRouter {
- parameters:
- @display("p=198,113;i=device/router");
- gates:
- pppg[2];
- ethg[1];
- }
- RA2: OSPFRouter {
- parameters:
- @display("p=198,187;i=device/router");
- gates:
- pppg[2];
- ethg[1];
- }
- RB1: OSPFRouter {
- parameters:
- @display("p=406,105;i=device/router");
- gates:
- pppg[2];
- ethg[1];
- }
- RB2: OSPFRouter {
- parameters:
- @display("p=406,187;i=device/router");
- gates:
- pppg[2];
- ethg[1];
- }
- RC1: OSPFRouter {
- parameters:
- @display("p=262,273;i=device/router");
- gates:
- pppg[2];
- ethg[1];
- }
- RC2: OSPFRouter {
- parameters:
- @display("p=342,275;i=device/router");
- gates:
- pppg[2];
- ethg[1];
- }
- PA1: EtherSwitch {
- parameters:
- @display("p=124,70;i=device/switch");
- gates:
- ethg[3];
- }
- PA2: EtherSwitch {
- parameters:
- @display("p=114,190;i=device/switch");
- gates:
- ethg[3];
- }
- PB1: EtherSwitch {
- parameters:
- @display("p=484,78;i=device/switch");
- gates:
- ethg[3];
- }
- PB2: EtherSwitch {
- parameters:
- @display("p=492,190;i=device/switch");
- gates:
- ethg[3];
- }
- PC1: EtherSwitch {
- parameters:
- @display("p=244,350;i=device/switch");
- gates:
- ethg[3];
- }
- PC2: EtherSwitch {
- parameters:
- @display("p=364,350;i=device/switch");
- gates:
- ethg[3];
- }
- HA11: StandardHost {
- parameters:
- @display("p=42,34;i=device/pc");
- gates:
- ethg[1];
- }
- HA12: StandardHost {
- parameters:
- @display("p=34,90;i=device/pc");
- gates:
- ethg[1];
- }
- HA21: StandardHost {
- parameters:
- @display("p=34,156;i=device/pc");
- gates:
- ethg[1];
- }
- HA22: StandardHost {
- parameters:
- @display("p=34,218;i=device/pc");
- gates:
- ethg[1];
- }
- HB11: StandardHost {
- parameters:
- @display("p=558,34;i=device/pc");
- gates:
- ethg[1];
- }
- HB12: StandardHost {
- parameters:
- @display("p=558,90;i=device/pc");
- gates:
- ethg[1];
- }
- HB21: StandardHost {
- parameters:
- @display("p=558,156;i=device/pc");
- gates:
- ethg[1];
- }
- HB22: StandardHost {
- parameters:
- @display("p=558,220;i=device/pc");
- gates:
- ethg[1];
- }
- HC11: StandardHost {
- parameters:
- @display("p=206,426;i=device/pc");
- gates:
- ethg[1];
- }
- HC12: StandardHost {
- parameters:
- @display("p=262,426;i=device/pc");
- gates:
- ethg[1];
- }
- HC21: StandardHost {
- parameters:
- @display("p=334,428;i=device/pc");
- gates:
- ethg[1];
- }
- HC22: StandardHost {
- parameters:
- @display("p=398,428;i=device/pc");
- gates:
- ethg[1];
- }
- configurator: IPv4NetworkConfigurator {
- @display("p=71,374");
- config = xmldoc("IPv4Config.xml");
- //assignAddresses = false;
- //assignDisjunctSubnetAddresses = false;
- addStaticRoutes = false;
- addDefaultRoutes = false;
- addSubnetRoutes = false;
- }
- connections:
- //LAN A1 et A2
- HA11.ethg[0] <--> LINK_100 <--> PA1.ethg[0];
- HA12.ethg[0] <--> LINK_100 <--> PA1.ethg[1];
- HA21.ethg[0] <--> LINK_100 <--> PA2.ethg[0];
- HA22.ethg[0] <--> LINK_100 <--> PA2.ethg[1];
- PA1.ethg[2] <--> LINK_100 <--> RA1.ethg[0];
- PA2.ethg[2] <--> LINK_100 <--> RA2.ethg[0];
- //LAN B1 et B2
- HB11.ethg[0] <--> LINK_100 <--> PB1.ethg[0];
- HB12.ethg[0] <--> LINK_100 <--> PB1.ethg[1];
- HB21.ethg[0] <--> LINK_100 <--> PB2.ethg[0];
- HB22.ethg[0] <--> LINK_100 <--> PB2.ethg[1];
- PB1.ethg[2] <--> LINK_100 <--> RB1.ethg[0];
- PB2.ethg[2] <--> LINK_100 <--> RB2.ethg[0];
- //LAN C1 et C2
- HC11.ethg[0] <--> LINK_100 <--> PC1.ethg[0];
- HC12.ethg[0] <--> LINK_100 <--> PC1.ethg[1];
- HC21.ethg[0] <--> LINK_100 <--> PC2.ethg[0];
- HC22.ethg[0] <--> LINK_100 <--> PC2.ethg[1];
- PC1.ethg[2] <--> LINK_100 <--> RC1.ethg[0];
- PC2.ethg[2] <--> LINK_100 <--> RC2.ethg[0];
- //OSPF A
- RA1.pppg[1] <--> LINK_100 <--> RA2.pppg[1];
- RA1.pppg[0] <--> LINK_100 <--> A.pppg[2];
- RA2.pppg[0] <--> LINK_100 <--> A.pppg[3];
- //OSPF B
- RB1.pppg[1] <--> LINK_100 <--> RB2.pppg[1];
- RB1.pppg[0] <--> LINK_100 <--> B.pppg[2];
- RB2.pppg[0] <--> LINK_100 <--> B.pppg[3];
- //OSPF C
- RC1.pppg[1] <--> LINK_100 <--> RC2.pppg[1];
- RC1.pppg[0] <--> LINK_100 <--> C.pppg[2];
- RC2.pppg[0] <--> LINK_100 <--> C.pppg[3];
- //BGP
- A.pppg[0] <--> LINK_100 <--> B.pppg[0];
- A.pppg[1] <--> LINK_100 <--> C.pppg[0];
- B.pppg[1] <--> LINK_100 <--> C.pppg[1];
- }
|