NClientsPPP.ned 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 NClientsPPP
  24. {
  25. parameters:
  26. int n;
  27. @display("bgb=628,413");
  28. types:
  29. channel fiberline extends DatarateChannel
  30. {
  31. delay = 1us;
  32. datarate = 512Mbps;
  33. }
  34. submodules:
  35. configurator: FlatNetworkConfigurator6 {
  36. @display("p=63,72");
  37. }
  38. r1: Router6 {
  39. @display("p=219,245");
  40. }
  41. r2: Router6 {
  42. @display("p=336,178");
  43. }
  44. r3: Router6 {
  45. @display("p=458,107");
  46. }
  47. cli[n]: StandardHost6 {
  48. @display("p=63,334");
  49. }
  50. srv: StandardHost6 {
  51. @display("p=576,46");
  52. }
  53. connections:
  54. for i=0..n-1 {
  55. cli[i].pppg++ <--> fiberline <--> r1.pppg++;
  56. }
  57. r1.pppg++ <--> fiberline <--> r2.pppg++;
  58. r2.pppg++ <--> fiberline <--> r3.pppg++;
  59. r3.pppg++ <--> fiberline <--> srv.pppg++;
  60. }