ARPTest.ned 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // Copyright (C) 2004 Emin Ilker Cetinbas (niw3@yahoo.com)
  3. //
  4. // This library is free software, you can redistribute it and/or
  5. // modify it under the terms of the GNU Lesser General Public License
  6. // as published by the Free Software Foundation;
  7. // either version 2 of the License, or any later version.
  8. // The library is distributed in the hope that it will be useful,
  9. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. // See the GNU Lesser General Public License for more details.
  12. //
  13. package inet.examples.ethernet.arptest2;
  14. import inet.linklayer.ethernet.EtherBus;
  15. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  16. import inet.node.inet.Router;
  17. import inet.node.inet.StandardHost;
  18. import ned.DatarateChannel;
  19. network ARPTest
  20. {
  21. types:
  22. channel ethline extends DatarateChannel
  23. {
  24. delay = 500ns;
  25. datarate = 10Mbps;
  26. }
  27. submodules:
  28. server: StandardHost {
  29. @display("p=480,198;i=device/server_l");
  30. }
  31. router8: Router {
  32. @display("p=478,100");
  33. }
  34. router7: Router {
  35. @display("p=329,100");
  36. }
  37. router6: Router {
  38. @display("p=254,100");
  39. }
  40. bus2: EtherBus {
  41. positions = "";
  42. propagationSpeed = 2e8 mps;
  43. @display("p=260,40;b=260,10");
  44. }
  45. router5: Router {
  46. @display("p=187,98");
  47. }
  48. bus1: EtherBus {
  49. positions = "";
  50. propagationSpeed = 2e8 mps;
  51. @display("p=280,170;b=260,10");
  52. }
  53. router4: Router {
  54. @display("p=386,240");
  55. }
  56. router3: Router {
  57. @display("p=320,240");
  58. }
  59. router2: Router {
  60. @display("p=247,240");
  61. }
  62. router1: Router {
  63. @display("p=182,283");
  64. }
  65. client: StandardHost {
  66. @display("p=54,274;i=device/laptop_l");
  67. }
  68. configurator: IPv4NetworkConfigurator {
  69. @display("p=46,111");
  70. }
  71. connections:
  72. server.ethg++ <--> ethline <--> router8.ethg++;
  73. bus2.ethg++ <--> ethline <--> router5.ethg++;
  74. bus2.ethg++ <--> ethline <--> router6.ethg++;
  75. bus2.ethg++ <--> ethline <--> router7.ethg++;
  76. router8.ethg++ <--> ethline <--> router7.ethg++;
  77. bus1.ethg++ <--> ethline <--> router1.ethg++;
  78. bus1.ethg++ <--> ethline <--> router5.ethg++;
  79. bus1.ethg++ <--> ethline <--> router2.ethg++;
  80. bus1.ethg++ <--> ethline <--> router3.ethg++;
  81. bus1.ethg++ <--> ethline <--> router4.ethg++;
  82. client.ethg++ <--> ethline <--> router1.ethg++;
  83. }