WirelessNetWith2DHCP.ned 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // Copyright (C) 2016 OpenSim Ltd.
  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.StandardHost;
  21. import inet.node.inet.WirelessHost;
  22. import inet.node.wireless.AccessPoint;
  23. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  24. import inet.visualizer.contract.IIntegratedVisualizer;
  25. network WirelessNetWith2DHCP
  26. {
  27. @display("bgb=590,407;bgl=2");
  28. int numHosts;
  29. submodules:
  30. visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
  31. @display("p=305,35");
  32. }
  33. radioMedium: Ieee80211ScalarRadioMedium {
  34. @display("p=64,34");
  35. }
  36. client: WirelessHost {
  37. @display("p=64,124");
  38. }
  39. ap1: AccessPoint {
  40. @display("p=64,238");
  41. }
  42. dhcpServer1: StandardHost {
  43. @display("p=64,307");
  44. }
  45. ap2: AccessPoint {
  46. @display("p=511,231");
  47. }
  48. dhcpServer2: StandardHost {
  49. @display("p=511,307");
  50. }
  51. configurator: IPv4NetworkConfigurator {
  52. @display("p=180,35");
  53. }
  54. server: StandardHost {
  55. @display("p=283,363");
  56. }
  57. connections:
  58. dhcpServer1.ethg++ <--> Eth100M <--> ap1.ethg++;
  59. dhcpServer2.ethg++ <--> Eth100M <--> ap2.ethg++;
  60. dhcpServer1.ethg++ <--> Eth100M <--> server.ethg++;
  61. dhcpServer2.ethg++ <--> Eth100M <--> server.ethg++;
  62. }