Areas.ned 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package inet.examples.ospfv2.areas;
  2. import inet.common.misc.ThruputMeteringChannel;
  3. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  4. network OSPF_AreaTest
  5. {
  6. submodules:
  7. Area1: TwoNetsArea {
  8. parameters:
  9. @display("p=108,148;b=136,128");
  10. gates:
  11. ethg[1];
  12. }
  13. Area2: OneNetArea {
  14. parameters:
  15. @display("p=322,148;b=136,128");
  16. gates:
  17. ethg[1];
  18. }
  19. configurator: IPv4NetworkConfigurator {
  20. parameters:
  21. config = xml("<config>"+
  22. "<interface among='Area1.*' address='192.168.11.x' netmask='255.255.255.x' />"+
  23. "<interface among='Area2.*' address='192.168.22.x' netmask='255.255.255.x' />"+
  24. "<interface hosts='Area1.*' towards='Area2.*' address='192.168.0.x' netmask='255.255.255.x' />"+
  25. "<interface hosts='Area2.*' towards='Area1.*' address='192.168.0.x' netmask='255.255.255.x' />"+
  26. "<route hosts='Area*.H*' destination='*' netmask='0.0.0.0' interface='eth0' />"+
  27. "</config>");
  28. addStaticRoutes = false;
  29. addDefaultRoutes = false;
  30. assignDisjunctSubnetAddresses = false;
  31. @display("p=75,43");
  32. }
  33. connections:
  34. Area1.ethg[0] <--> ThruputMeteringChannel { delay = 0.1us; datarate = 100 Mbps; thruputDisplayFormat = "#N"; } <--> Area2.ethg[0];
  35. }