Area2.ned 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package inet.examples.ospfv2.areas;
  2. import inet.linklayer.ethernet.EtherHub;
  3. import inet.node.inet.StandardHost;
  4. import inet.node.ospfv2.OSPFRouter;
  5. import ned.DatarateChannel;
  6. module OneNetArea
  7. {
  8. parameters:
  9. @display("p=10,10;b=404,108");
  10. gates:
  11. inout ethg[];
  12. types:
  13. channel C extends DatarateChannel
  14. {
  15. delay = 0.1us;
  16. datarate = 100Mbps;
  17. }
  18. submodules:
  19. H3: StandardHost {
  20. parameters:
  21. @display("p=372,72;i=device/laptop");
  22. gates:
  23. ethg[1];
  24. }
  25. N3: EtherHub {
  26. parameters:
  27. @display("p=264,72");
  28. gates:
  29. ethg[2];
  30. }
  31. R5: OSPFRouter {
  32. parameters:
  33. @display("p=160,72");
  34. gates:
  35. ethg[2];
  36. }
  37. R4: OSPFRouter {
  38. parameters:
  39. @display("p=64,72");
  40. gates:
  41. ethg[2];
  42. }
  43. connections:
  44. R4.ethg[0] <--> C <--> R5.ethg[1];
  45. R5.ethg[0] <--> C <--> N3.ethg[1];
  46. N3.ethg[0] <--> C <--> H3.ethg[0];
  47. // towards other areas
  48. ethg[0] <--> R4.ethg[1];
  49. }