MIPv6Network.ned 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. // Copyright (C) 2007 Faqir Zarrar Yousaf
  2. // Communication Networks Institute
  3. // University of Dortmund, Germany
  4. // faqir.yousaf@uni-dortmund.de
  5. //
  6. // Copyright (C) 2004 Andras Varga
  7. //
  8. // This program is free software; you can redistribute it and/or
  9. // modify it under the terms of the GNU General Public License
  10. // as published by the Free Software Foundation; either version 2
  11. // of the License, or (at your option) any later version.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU General Public License
  19. // along with this program; if not, write to the Free Software
  20. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. //
  22. package inet.examples.mobileipv6;
  23. import inet.linklayer.ethernet.EtherHub;
  24. import inet.networklayer.configurator.ipv6.FlatNetworkConfigurator6;
  25. import inet.node.ipv6.Router6;
  26. import inet.node.wireless.AccessPoint;
  27. import inet.node.xmipv6.CorrespondentNode6;
  28. import inet.node.xmipv6.HomeAgent6;
  29. import inet.node.xmipv6.WirelessHost6;
  30. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  31. channel fiberline extends ned.DatarateChannel
  32. {
  33. parameters:
  34. delay = 1us;
  35. datarate = 512Mbps;
  36. }
  37. channel ethernetline extends ned.DatarateChannel
  38. {
  39. parameters:
  40. delay = 0.1us;
  41. datarate = 100Mbps;
  42. }
  43. network mIPv6Network
  44. {
  45. parameters:
  46. double total_mn;
  47. double total_cn;
  48. **.mgmt.numChannels = 5;
  49. @display("bgb=799,698");
  50. submodules:
  51. configurator: FlatNetworkConfigurator6 {
  52. parameters:
  53. @display("p=763,53");
  54. }
  55. radioMedium: Ieee80211ScalarRadioMedium {
  56. parameters:
  57. @display("p=753,123");
  58. }
  59. Home_Agent: HomeAgent6 {
  60. parameters:
  61. @display("p=249,229;i=abstract/router");
  62. }
  63. R_1: Router6 {
  64. parameters:
  65. @display("p=566,227");
  66. }
  67. R_2: Router6 {
  68. parameters:
  69. @display("p=406,355");
  70. }
  71. MN[total_mn]: WirelessHost6 {
  72. parameters:
  73. @display("p=220,404");
  74. }
  75. CN[total_cn]: CorrespondentNode6;
  76. AP_Home: AccessPoint {
  77. parameters:
  78. @display("p=249,172;i=device/accesspoint_s");
  79. }
  80. AP_1: AccessPoint {
  81. parameters:
  82. @display("p=566,172;i=device/accesspoint_s");
  83. }
  84. hub: EtherHub {
  85. parameters:
  86. @display("p=406,412;i=device/hub_s");
  87. }
  88. connections allowunconnected:
  89. //Home_Agent.ethOut++ --> ethernetline --> R_1.ethIn++;
  90. //Home_Agent.ethIn++ <-- ethernetline <-- R_1.ethOut++;
  91. R_1.ethg++ <--> ethernetline <--> R_2.ethg++;
  92. //R_2.ethOut++ --> ethernetline --> R_3.ethIn++;
  93. //R_2.ethIn++ <-- ethernetline <-- R_3.ethOut++;
  94. Home_Agent.ethg$o++ --> ethernetline --> R_2.ethg$i++;
  95. Home_Agent.ethg$i++ <-- ethernetline <-- R_2.ethg$o++;
  96. for i=0..total_cn-1 {
  97. CN[i].ethg$o++ --> ethernetline --> hub.ethg$i++;
  98. CN[i].ethg$i++ <-- ethernetline <-- hub.ethg$o++;
  99. }
  100. hub.ethg++ <--> ethernetline <--> R_2.ethg++;
  101. //R_1.ethOut++ --> ethernetline --> CN.ethIn++;
  102. //R_1.ethIn++ <-- ethernetline <-- CN.ethOut++;
  103. AP_Home.ethg$o++ --> ethernetline --> Home_Agent.ethg$i++;
  104. AP_Home.ethg$i++ <-- ethernetline <-- Home_Agent.ethg$o++;
  105. AP_1.ethg++ <--> ethernetline <--> R_1.ethg++;
  106. //AP_2.ethOut++ --> ethernetline --> R_2.ethIn++;
  107. //AP_2.ethIn++ <-- ethernetline <-- R_2.ethOut++;
  108. //AP_3.ethOut++ --> ethernetline --> R_3.ethIn++;
  109. //AP_3.ethIn++ <-- ethernetline <-- R_3.ethOut++;
  110. }