NClientsEth.ned 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // Copyright (C) 2004 Andras Varga
  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. package inet.examples.ipv6.ipv6nclients;
  19. import inet.networklayer.configurator.ipv6.FlatNetworkConfigurator6;
  20. import inet.node.ipv6.Router6;
  21. import inet.node.ipv6.StandardHost6;
  22. import ned.DatarateChannel;
  23. network NClientsEth
  24. {
  25. parameters:
  26. int n;
  27. @display("bgb=569,296");
  28. types:
  29. channel fiberline extends DatarateChannel
  30. {
  31. delay = 1us;
  32. datarate = 1Gbps;
  33. }
  34. channel ethernetline extends DatarateChannel
  35. {
  36. delay = 0.1us;
  37. datarate = 100Mbps;
  38. }
  39. submodules:
  40. configurator: FlatNetworkConfigurator6 {
  41. @display("p=73,70");
  42. }
  43. r1: Router6 {
  44. @display("p=245,173");
  45. }
  46. r2: Router6 {
  47. @display("p=338,121");
  48. }
  49. r3: Router6 {
  50. @display("p=430,75");
  51. }
  52. cli[n]: StandardHost6 {
  53. @display("p=56,236");
  54. }
  55. srv: StandardHost6 {
  56. @display("p=524,33");
  57. }
  58. connections:
  59. for i=0..n-1 {
  60. cli[i].ethg++ <--> ethernetline <--> r1.ethg++;
  61. }
  62. r1.ethg++ <--> ethernetline <--> r2.ethg++;
  63. r2.ethg++ <--> ethernetline <--> r3.ethg++;
  64. r3.ethg++ <--> ethernetline <--> srv.ethg++;
  65. //XXX
  66. // Mixing ethernet and ppp currently doesn't work, due to a bug in
  67. // FlatNetworkConfigurator6::determineGateIndex.
  68. //
  69. // r1.pppg++ <--> fiberline <--> r2.pppg++;
  70. // r2.pppg++ <--> fiberline <--> r3.pppg++;
  71. // r3.pppg++ <--> fiberline <--> srv.pppg++;
  72. //
  73. }