mininet.ned 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package inet.examples.ospfv2.areatests;
  2. import inet.common.misc.ThruputMeteringChannel;
  3. import inet.common.scenario.ScenarioManager;
  4. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  5. import inet.node.inet.StandardHost;
  6. import inet.node.ospfv2.OSPFRouter;
  7. network OSPF_mininet
  8. {
  9. parameters:
  10. int numBBr = 2;
  11. int numSBr = 2;
  12. int numHst = 2;
  13. types:
  14. channel C extends ThruputMeteringChannel
  15. {
  16. delay = 0.1us;
  17. datarate = 100Mbps;
  18. thruputDisplayFormat = "#N";
  19. }
  20. submodules:
  21. BBR[numBBr]: OSPFRouter;
  22. BBRtoS1: OSPFRouter;
  23. S1R[numSBr]: OSPFRouter;
  24. S1H[numHst]: StandardHost;
  25. BBRtoS2: OSPFRouter;
  26. S2R[numSBr]: OSPFRouter;
  27. S2H[numHst]: StandardHost;
  28. configurator: IPv4NetworkConfigurator {
  29. parameters:
  30. config = xml("<config>"+
  31. "<interface hosts='BBR[*]' address='192.168.100.x' netmask='255.255.255.x' />"+
  32. "<interface hosts='BBRtoS*' towards='BBR[*]' address='192.168.100.x' netmask='255.255.255.x' />"+
  33. "<interface hosts='BBRtoS1' towards='S1R[*]' address='192.168.201.x' netmask='255.255.255.x' />"+
  34. "<interface hosts='S1H[*] S1R[*]' address='192.168.201.x' netmask='255.255.255.x' />"+
  35. "<interface hosts='BBRtoS2' towards='S2R[*]' address='192.168.202.x' netmask='255.255.255.x' />"+
  36. "<interface hosts='S2H[*] S2R[*]' address='192.168.202.x' netmask='255.255.255.x' />"+
  37. "<route hosts='S*H[*]' destination='*' netmask='0.0.0.0' interface='eth0' />"+
  38. "</config>");
  39. addStaticRoutes = false;
  40. addDefaultRoutes = false;
  41. @display("p=75,43");
  42. }
  43. scenarioManager: ScenarioManager {
  44. @display("p=187,43");
  45. }
  46. connections:
  47. BBRtoS1.ethg++ <--> C <--> BBR[0].ethg++;
  48. BBRtoS1.ethg++ <--> C <--> S1R[0].ethg++;
  49. BBRtoS2.ethg++ <--> C <--> S2R[0].ethg++;
  50. BBRtoS2.ethg++ <--> C <--> BBR[numBBr-1].ethg++;
  51. for i=1..numBBr-1 {
  52. BBR[i-1].ethg++ <--> C <--> BBR[i].ethg++;
  53. }
  54. for i=1..numSBr-1 {
  55. S1R[i-1].ethg++ <--> C <--> S1R[i].ethg++;
  56. S2R[i-1].ethg++ <--> C <--> S2R[i].ethg++;
  57. }
  58. for i=0..numHst-1 {
  59. S1R[numSBr-1].ethg++ <--> C <--> S1H[i].ethg++;
  60. S2R[numSBr-1].ethg++ <--> C <--> S2H[i].ethg++;
  61. }
  62. }