multihomed.ned 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // Copyright (C) 2008 Irene Ruengeler
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU General Public License
  6. // as published by the Free Software Foundation; either version 2
  7. // of the License, or (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. //
  18. import inet.node.inet.Router;
  19. import inet.node.inet.StandardHost;
  20. import ned.DatarateChannel;
  21. network multihomed
  22. {
  23. parameters:
  24. double testTimeout @unit(s) = default(0s);
  25. bool testing = default(false);
  26. types:
  27. channel BottlePath extends DatarateChannel
  28. {
  29. parameters:
  30. datarate = 1Mbps;
  31. per = 0.01;
  32. }
  33. channel NormalPath extends DatarateChannel
  34. {
  35. parameters:
  36. datarate = 1Gbps;
  37. }
  38. submodules:
  39. sctp_client: StandardHost {
  40. parameters:
  41. routingTable.routingFile = "../../lib/multi_client.mrt";
  42. networkLayer.configurator.networkConfiguratorModule = "";
  43. gates:
  44. pppg[2];
  45. }
  46. sctp_server: StandardHost {
  47. parameters:
  48. routingTable.routingFile = "../../lib/multi_server.mrt";
  49. networkLayer.configurator.networkConfiguratorModule = "";
  50. gates:
  51. pppg[2];
  52. }
  53. router1: Router {
  54. parameters:
  55. routingTable.routingFile = "../../lib/multi_router1.mrt";
  56. networkLayer.configurator.networkConfiguratorModule = "";
  57. gates:
  58. pppg[4];
  59. }
  60. router2: Router {
  61. parameters:
  62. routingTable.routingFile = "../../lib/multi_router2.mrt";
  63. networkLayer.configurator.networkConfiguratorModule = "";
  64. gates:
  65. pppg[4];
  66. }
  67. connections:
  68. sctp_client.pppg[0] <--> NormalPath <--> router1.pppg[0];
  69. sctp_client.pppg[1] <--> NormalPath <--> router1.pppg[1];
  70. router1.pppg[2] <--> BottlePath <--> router2.pppg[0];
  71. router1.pppg[3] <--> BottlePath <--> router2.pppg[1];
  72. router2.pppg[2] <--> NormalPath <--> sctp_server.pppg[0];
  73. router2.pppg[3] <--> NormalPath <--> sctp_server.pppg[1];
  74. }