ARPTest.ned 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // Copyright (C) 2006 Andras Varga
  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.arptest;
  14. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  15. import inet.node.ethernet.EtherSwitch;
  16. import inet.node.inet.Router;
  17. import inet.node.inet.StandardHost;
  18. import ned.DatarateChannel;
  19. network ARPTest
  20. {
  21. types:
  22. channel fiberline extends DatarateChannel
  23. {
  24. delay = 1us;
  25. datarate = 512Mbps;
  26. }
  27. channel ethline extends DatarateChannel
  28. {
  29. delay = 50ns;
  30. datarate = 100Mbps;
  31. }
  32. submodules:
  33. client: StandardHost {
  34. @display("p=71,64;i=device/laptop_l");
  35. }
  36. host1: StandardHost {
  37. @display("p=65,131;i=device/pc");
  38. }
  39. host2: StandardHost {
  40. @display("p=60,191;i=device/pc");
  41. }
  42. switch: EtherSwitch {
  43. @display("p=202,156");
  44. }
  45. net: Router {
  46. @display("p=394,166");
  47. }
  48. router: Router {
  49. @display("p=311,74");
  50. }
  51. server: StandardHost {
  52. @display("p=512,58;i=device/server_l");
  53. }
  54. configurator: IPv4NetworkConfigurator {
  55. @display("p=495,160");
  56. }
  57. connections:
  58. client.ethg++ <--> ethline <--> switch.ethg++;
  59. switch.ethg++ <--> ethline <--> host1.ethg++;
  60. switch.ethg++ <--> ethline <--> host2.ethg++;
  61. router.ethg++ <--> ethline <--> switch.ethg++;
  62. router.pppg++ <--> fiberline <--> net.pppg++;
  63. server.pppg++ <--> fiberline <--> net.pppg++;
  64. }