Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Copyright (C) 2005 Andras Varga
- //
- // This program is free software; you can redistribute it and/or
- // modify it under the terms of the GNU General Public License
- // as published by the Free Software Foundation; either version 2
- // of the License, or (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
- //
- // You should have received a copy of the GNU General Public License
- // along with this program; if not, write to the Free Software
- // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- //
- package inet.examples.inet.LISPMNmultihoming;
- import inet.nodes.inet.DHCPServer;
- import inet.nodes.ethernet.EtherSwitch;
- import inet.nodes.inet.StandardHostWithDHCP;
- import inet.nodes.inet.Router;
- import inet.nodes.inet.LISPMapServer;
- import inet.nodes.inet.LISPRouter;
- import inet.nodes.wireless.WirelessRouter;
- import inet.nodes.wireless.LISPMobileNodeWithDHCPmimo;
- import inet.nodes.wireless.WirelessAP;
- import inet.nodes.wireless.WirelessHost;
- import inet.world.ChannelControl;
- import inet.nodes.inet.DHCPServer;
- import inet.nodes.wireless.WirelessAPWithEth;
- import inet.networklayer.lisp.autorouting.LISPEIDConfigurator;
- import ned.DatarateChannel;
- import inet.networklayer.autorouting.FlatNetworkConfigurator;
- import inet.world.ScenarioManager;
- import ned.IdealChannel;
- channel ethernet extends DatarateChannel
- {
- delay = 0.1us;
- //datarate = 1 Gbps; parameter is set in EtherMAC module as txrate
- }
- channel ppLink extends DatarateChannel
- {
- delay = 1ms;
- datarate = 40 Gbps;
- }
- channel ppLinkMS extends DatarateChannel
- {
- delay = 10ms;
- datarate = 40 Gbps;
- }
- network MultiHomingNetwork
- {
- parameters:
- double playgroundSizeX;
- double playgroundSizeY;
- @display("bgb=871,600");
- submodules:
- channelcontrol: ChannelControl {
- playgroundSizeX = playgroundSizeX;
- playgroundSizeY = playgroundSizeY;
- @display("p=60,50");
- }
- lispMobileNode: LISPMobileNodeWithDHCPmimo {
- useLocatorTypeBit = true;
- mobileEID = "132.187.0.20";
- @display("p=81,119");
- }
- wirelessRouter1: WirelessRouter {
- routingFile = "wirelessRouter1.irt";
- numUdpApps = 1;
- udpAppType = "DHCPServer";
- mgmtType = default("Ieee80211MgmtAP");
- @display("p=147,204");
- }
- wirelessRouter2: WirelessRouter {
- numUdpApps = 1;
- udpAppType = "DHCPServer";
- mgmtType = default("Ieee80211MgmtAP");
- routingFile = "wirelessRouter2.irt";
- @display("p=320,204");
- }
- lispRouter1: LISPRouter {
- routingFile = "lisprouter1.irt";
- @display("p=160,314");
- }
- mapServer: LISPMapServer {
- routingFile = "mapserver.irt";
- @display("p=160,394");
- }
- router: Router {
- routingFile = "router.irt";
- @display("p=252,394");
- }
- lispRouter2: LISPRouter {
- routingFile = "lispRouter2.irt";
- @display("p=339,314");
- }
- PITR: LISPRouter {
- parameters:
- mapServerAddress = "mapServer";
- routingFile = "PITR.irt";
- @display("p=252,314;is=n");
- }
- lispRouter3: LISPRouter {
- parameters:
- routingFile = "lispRouter3.irt";
- @display("p=339,394;is=n");
- }
- standardHost: StandardHostWithDHCP {
- parameters:
- @display("is=n;p=494,394");
- }
- etherSwitch: EtherSwitch {
- @display("p=416,393");
- }
- dhcpServer: DHCPServer {
- parameters:
- @display("p=416,461;is=n");
- routingFile = "dhcpServer.irt";
- }
- etherSwitch1: EtherSwitch {
- @display("p=147,260");
- }
- etherSwitch2: EtherSwitch {
- @display("p=314,260");
- }
- lispRouter4: LISPRouter {
- parameters:
- routingFile = "lispRouter4.irt";
- @display("p=640,322");
- }
- etherSwitch3: EtherSwitch {
- @display("p=640,278");
- }
- PITR2: LISPRouter {
- parameters:
- mapServerAddress = "mapServer";
- routingFile = "PITR.irt";
- @display("p=442,314");
- }
- wirelessRouter3: WirelessRouter {
- routingFile = "wirelessRouter3.irt";
- numUdpApps = 1;
- udpAppType = "DHCPServer";
- mgmtType = default("Ieee80211MgmtAP");
- @display("p=640,224");
- }
- connections:
- router.pppg++ <--> ppLink <--> lispRouter3.pppg++;
- router.pppg++ <--> ppLink <--> lispRouter1.pppg++;
- router.pppg++ <--> ppLink <--> lispRouter2.pppg++;
- router.pppg++ <--> ppLinkMS <--> mapServer.pppg++;
- router.pppg++ <--> ppLink <--> PITR.pppg++;
- PITR.pppg++ <--> ppLink <--> lispRouter1.pppg++;
- PITR.pppg++ <--> ppLink <--> lispRouter2.pppg++;
- lispRouter3.ethg++ <--> ethernet <--> etherSwitch.ethg++;
- standardHost.ethg++ <--> ethernet <--> etherSwitch.ethg++;
- etherSwitch.ethg++ <--> ethernet <--> dhcpServer.ethg++;
- etherSwitch1.ethg++ <--> ethernet <--> wirelessRouter1.ethg++;
- etherSwitch2.ethg++ <--> ethernet <--> wirelessRouter2.ethg++;
- lispRouter1.ethg++ <--> ethernet <--> etherSwitch1.ethg++;
- lispRouter2.ethg++ <--> ethernet <--> etherSwitch2.ethg++;
- PITR2.pppg++ <--> ppLink <--> lispRouter4.pppg++;
- router.pppg++ <--> ppLink <--> PITR2.pppg++;
- lispRouter4.ethg++ <--> ethernet <--> etherSwitch3.ethg++;
- etherSwitch3.ethg++ <--> ethernet <--> wirelessRouter3.ethg++;
- router.pppg++ <--> ppLink <--> lispRouter4.pppg++;
- }
Advertisement
Add Comment
Please, Sign In to add comment