Wide Area Network Design OSPF

2015 Wide Area Network Design OSPF OMNET++ Workshop Mohamed Elshaikh SCHOOL OF COMPUTER AND COMMUNICATION ENGINEERING, UNIMAP Objectives WAN netwo...
Author: Carmella Poole
16 downloads 1 Views 918KB Size
2015

Wide Area Network Design OSPF OMNET++ Workshop

Mohamed Elshaikh SCHOOL OF COMPUTER AND COMMUNICATION ENGINEERING, UNIMAP

Objectives WAN network design concepts Routing configuration Internet routing Protocols (OSPF)

OSPF Open Short Path First OSPF is an Open Standards link-state routing protocol used to exchange routing information between devices dynamically. This document provides an example OSPF network diagram and describes some of the main configuration parameters for OSPF

Example 1:

Figure1. A network scenario with 2 OSPF routers and 3 VPNs The network in figure 1 describes a scenario of 2 OSPF routers connected through Ethernet link. Each OSPF router directly connected to VPN. The IP addressing scheme as depicted in the figure divides the network into three VPNs. Simulation Steps: 1- Preparing the simulation folder Create a new folder (OSPF) under inet->example folder

Figure 2 2- Create a network file (ospf.ned) under the just created directory.

Figure 3 3- Adding the network components Add the following components to the network ned file: abcd-

2 OSPFRouter (RA, AB) 1 IPv4NetworkConfigurator (configurator) 2 EtherSwitch (SW1,SW2) 2 StandardHost (A,B)

Add all components from the palette as:

Figure 4 4- Linking the network In this example we concern about the links and there for we must define the required gates for each component Assuming that all connections are Ethernet, Initialize the numer of gates to 2 for each router and one for each host. Firstly switch to source mode and under each sub-module add gates section and initialize the ethg gate to ethg[n] where n is the number of desired gates:

Figure 5.

Having our gates initialized the next step is to connect, however we need a channel to connect our modules. Create a new channel extends ThruputMeteringChannel module as:

Figure 6. Now connect the network according to the example scenario:

Figure 7 Under the connection section add the connections as:

Figure 8 Make sure the gates numbers are exactly the same as in the figure above as we use this for routers configurations. Now the network ned file is ready and looks like:

Figure 9 5 – OSPF routers configuration and IP Addressing The intension of this example is to configure the OSPF router and network IP addressing.

Create a new config.xml file under the same directory to assign IP address for all interfaces in the network.

Figure 10 This file is to assign the IP Addresses for all network interfaces:

Figure 11 Having all IP addresses assigned now it is time for OSPF configuration

Create a new xml file and name it (ASConfig.xml) under the same directory, and configure: Define the area id and its address range (network address can be more than one) Attach all interfaces connected to the area for each router ad define the external address rages for all VLANs at each router as:

Figure 12

6- Run the simulation Create ini file for the network and add the following configuration: Add a ping application at host A to generate traffic toward host B and vise versa. The config.xml file must be attached to the configurator and the ASConfig.xml is assigned to routers.

[General] network = inet.examples.OSPFLab.OSPF2Routers **.configurator.config = xmldoc("config.xml") **.configurator.addStaticRoutes = false **.configurator.addDefaultRoutes = false **.ospf.ospfConfig = xmldoc("ASConfig.xml") **.numPingApps = 1 **.A.pingApp[0].destAddr = "B" **.B.pingApp[0].destAddr = "A" **.pingApp[*].sendInterval = 1000ms **.arp.cacheTimeout = 1s

Figure 13

Run the simulation and observe the network results.

Figure 14

Example 2

Figure 15: OSPF network scenario with areas In this example a scenario of OSPF network with 3 routers and 2 areas is shown in figure 2 above. To create this network follow the steps 1 to 4 in the last example to have your network and its components connected as in figure 16. In this example we use Ethernet gate to connect internal network and PPP gates to connect routers. Make sure you have the correct gate connected in you .ned file

Figure 16 Create a new config2.xml file to assign IP addresses to the network as in figure 15 above.

Figure 17

The next step is to configure the OSPF routers. Create a new xml file and name it (ASConfig2.xml) and add the following code:

Figure 18 The last step here is to run the simulation Create ini file for this network and name it osfareas.ini Assign both config2.xml and ASConfig2.xml to the configurator and the OSPF routers [General] network = inet.examples.OSPFLab.OSPF2Routers **.configurator.config = xmldoc("config2.xml") **.configurator.addStaticRoutes = false **.configurator.addDefaultRoutes = false **.ospf.ospfConfig = xmldoc("ASConfig2.xml") **.numPingApps = 1 **.A*.pingApp[0].destAddr = "B1" **.B*.pingApp[0].destAddr = "A1" **.pingApp[*].sendInterval = 1000ms **.arp.cacheTimeout = 1s

Figure 19

Run the simulation and observe results.

Figure 20

Suggest Documents