Network.ned 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. package inet.examples.bgpv4.BGPandOSPFSimple;
  3. import inet.common.misc.ThruputMeteringChannel;
  4. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  5. import inet.node.bgp.BGPRouter;
  6. import inet.node.inet.StandardHost;
  7. import inet.node.ospfv2.OSPFRouter;
  8. network BGPNet
  9. {
  10. types:
  11. channel LINK_100 extends ThruputMeteringChannel
  12. {
  13. parameters:
  14. delay = 0;
  15. datarate = 100Mbps;
  16. thruputDisplayFormat = "#N";
  17. }
  18. submodules:
  19. A: BGPRouter {
  20. parameters:
  21. @display("p=226,109");
  22. gates:
  23. pppg[2];
  24. }
  25. B: BGPRouter {
  26. parameters:
  27. @display("p=314,109");
  28. gates:
  29. pppg[2];
  30. }
  31. RA1: OSPFRouter {
  32. parameters:
  33. @display("p=134,105;i=device/router");
  34. gates:
  35. pppg[1];
  36. ethg[1];
  37. }
  38. RB1: OSPFRouter {
  39. parameters:
  40. @display("p=406,105;i=device/router");
  41. gates:
  42. pppg[1];
  43. ethg[1];
  44. }
  45. HA11: StandardHost {
  46. parameters:
  47. @display("p=42,98;i=device/pc");
  48. gates:
  49. ethg[1];
  50. }
  51. HB11: StandardHost {
  52. parameters:
  53. @display("p=494,98;i=device/pc");
  54. gates:
  55. ethg[1];
  56. }
  57. configurator: IPv4NetworkConfigurator {
  58. @display("p=275,23");
  59. config = xmldoc("IPv4Config.xml");
  60. //assignAddresses = false;
  61. //assignDisjunctSubnetAddresses = false;
  62. addStaticRoutes = false;
  63. addDefaultRoutes = false;
  64. addSubnetRoutes = false;
  65. }
  66. connections:
  67. //LAN A1 et A2
  68. HA11.ethg[0] <--> LINK_100 <--> RA1.ethg[0];
  69. //OSPF A
  70. RA1.pppg[0] <--> LINK_100 <--> A.pppg[1];
  71. //BGP
  72. A.pppg[0] <--> LINK_100 <--> B.pppg[0];
  73. //LAN B1 et B2
  74. HB11.ethg[0] <--> LINK_100 <--> RB1.ethg[0];
  75. //OSPF B
  76. RB1.pppg[0] <--> LINK_100 <--> B.pppg[1];
  77. }