NClientsEth.ned 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.nclients;
  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. types:
  28. channel fiberline extends DatarateChannel
  29. {
  30. delay = 1us;
  31. datarate = 512Mbps;
  32. }
  33. channel ethernetline extends DatarateChannel
  34. {
  35. delay = 0.1us;
  36. datarate = 10Mbps;
  37. }
  38. submodules:
  39. configurator: FlatNetworkConfigurator6;
  40. r1: Router6;
  41. r2: Router6;
  42. r3: Router6;
  43. cli[n]: StandardHost6;
  44. srv: StandardHost6;
  45. connections:
  46. for i=0..n-1 {
  47. cli[i].ethg++ <--> ethernetline <--> r1.ethg++;
  48. }
  49. r1.ethg++ <--> ethernetline <--> r2.ethg++;
  50. r2.ethg++ <--> ethernetline <--> r3.ethg++;
  51. r3.ethg++ <--> ethernetline <--> srv.ethg++;
  52. //XXX
  53. // Mixing ethernet and ppp currently doesn't work, due to a bug in
  54. // FlatNetworkConfigurator6::determineGateIndex.
  55. //
  56. // r1.pppg++ <--> fiberline <--> r2.pppg++;
  57. // r2.pppg++ <--> fiberline <--> r3.pppg++;
  58. // r3.pppg++ <--> fiberline <--> srv.pppg++;
  59. //
  60. }