123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- package inet.examples.bgpv4.BGPandOSPF;
- 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[3];
- }
- B: BGPRouter {
- parameters:
- @display("p=338,141");
- gates:
- pppg[3];
- }
- 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];
- }
- 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];
- }
- 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];
- }
- configurator: IPv4NetworkConfigurator {
- @display("p=305,34");
- 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];
- //OSPF A
- RA1.pppg[1] <--> LINK_100 <--> RA2.pppg[1];
- RA1.pppg[0] <--> LINK_100 <--> A.pppg[1];
- RA2.pppg[0] <--> LINK_100 <--> A.pppg[2];
- //BGP
- A.pppg[0] <--> LINK_100 <--> B.pppg[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];
- //OSPF B
- RB1.pppg[1] <--> LINK_100 <--> RB2.pppg[1];
- RB1.pppg[0] <--> LINK_100 <--> B.pppg[1];
- RB2.pppg[0] <--> LINK_100 <--> B.pppg[2];
- }
|