WirelessNetWithDHCP.ned 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // Copyright (C) 2010 Juan-Carlos Maureira
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU Lesser General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (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 Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public License
  15. // along with this program. If not, see http://www.gnu.org/licenses/.
  16. //
  17. package inet.examples.dhcp;
  18. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  19. import inet.node.ethernet.Eth100M;
  20. import inet.node.inet.Router;
  21. import inet.node.inet.StandardHost;
  22. import inet.node.inet.WirelessHost;
  23. import inet.node.wireless.AccessPoint;
  24. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  25. network WirelessNetWithDHCP
  26. {
  27. @display("bgb=590,407;bgl=2");
  28. int numHosts;
  29. **.mgmt.numChannels = 5;
  30. submodules:
  31. radioMedium: Ieee80211ScalarRadioMedium {
  32. @display("p=64,34");
  33. }
  34. gateway: Router {
  35. @display("p=365,35");
  36. }
  37. client[numHosts]: WirelessHost {
  38. @display("r=,,#707070;p=245,285");
  39. }
  40. ap: AccessPoint {
  41. @display("p=126,98");
  42. }
  43. dhcpServer: StandardHost {
  44. @display("p=64,307");
  45. }
  46. configurator: IPv4NetworkConfigurator {
  47. parameters:
  48. @display("p=180,35");
  49. }
  50. remote: StandardHost {
  51. @display("p=540,204");
  52. }
  53. connections:
  54. gateway.ethg++ <--> Eth100M <--> ap.ethg++;
  55. gateway.ethg++ <--> Eth100M <--> remote.ethg++;
  56. dhcpServer.ethg++ <--> Eth100M <--> ap.ethg++;
  57. }