Omnet++/Inet: how to adjust routing files when add

2019-07-14 04:49发布

问题:

For an exam we are studying LISP Mobile (Locator/Identifier Separation Protocol) and we have asked to some researchers from a German University to send us their LISP simulator with Omnet++/Inet. Inside, we have found the following scenario which is very useful to us:

where we have a lispMobileNode multihomed with two wlan interfaces which receives UDP packets (in particular VoIP or video) from a correspondent node which is not mobile called standardHost. This scenario works perfectly as expected and the routers correctly implement the LISP protocol. Now, our teacher asked us to extend this scenario: in particular we should collect data with two handover/handoff among three different LISP networks and so have added the needed modules and the scenario has become like this:

The problem is that even if the lispMobileNode correctly connects to wirelessRouter 3 and gets a relative correct IP address after stopping receiving from wirelessRouter2, however this information is not forwarded to the LISP routers networks below and thus the UDP packets coming from the standardHost keep on being routed to wirelessRouter2. I am sure that there must be a problem with the .irt routing files we have written for each new component and so I am wondering if you can help me dealing with them because in my previous Omnet++ experiences I didn't need to manage with .irt files and so I am not an expert. First of all here are the files we have found in the simulator:

lisprouter1.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.1    MTU: 1500   Metric: 1
name: ppp1  inet_addr: 192.168.0.1    MTU: 1500   Metric: 1
name: eth0  inet_addr: 132.187.1.1 Mask: 255.255.255.0   MTU: 1500   Metric: 1

ifconfigend.

route:

192.168.0.0    0.0.0.0      255.255.255.0 H 0 ppp0
132.187.1.0    0.0.0.0      255.255.255.0 H 0 eth0

routeend.

lisprouter2.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.2    MTU: 1500   Metric: 1
name: ppp1  inet_addr: 192.168.0.2    MTU: 1500   Metric: 1
name: eth0  inet_addr: 132.187.2.1  Mask: 255.255.255.0  MTU: 1500    Metric: 1

ifconfigend.

route:

192.168.0.0    0.0.0.0      255.255.255.0 H 0 ppp0
132.187.2.0    0.0.0.0      255.255.255.0 H 0 eth0

routeend.

lispRouter3.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.3    MTU: 1500   Metric: 1
name: eth0  inet_addr: 132.187.3.1 Mask: 255.255.255.0   MTU: 1500   Metric: 1

ifconfigend.

route:

192.168.0.0    0.0.0.0      255.255.255.0 H 0 ppp0
132.187.3.0    0.0.0.0      255.255.255.0 H 0 eth0

routeend.

mapserver.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.254    MTU: 1500   Metric: 1

ifconfigend.

route:

192.168.0.0    0.0.0.0      255.255.0.0 G 0 ppp0
132.187.0.0    192.168.0.4  255.255.0.0 G 0 ppp0

routeend.

PITR.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.5    MTU: 1500   Metric: 1
name: ppp1  inet_addr: 192.168.0.5    MTU: 1500   Metric: 1

ifconfigend.

route:

192.168.0.4    0.0.0.0       255.255.255.255 H 0 ppp0
192.168.0.1    0.0.0.0       255.255.255.255 H 0 ppp1
192.168.0.2    0.0.0.0       255.255.255.255 H 0 ppp2
192.168.0.254  0.0.0.0       255.255.255.255 H 0 ppp0

routeend.

WirelessRouter1.irt

ifconfig:
name: wlan  inet_addr: 132.187.1.2 Mask: 255.255.255.0  MTU: 1500   Metric: 1
name: eth0  inet_addr: 132.187.1.2 Mask: 255.255.255.0  MTU: 1500   Metric: 1
ifconfigend.

route:
132.187.1.0 *   255.255.255.0   H   0   wlan
default:    132.187.1.1 0.0.0.0 G   0   eth0
routeend.

wirelessRouter2.irt

ifconfig:
name: wlan  inet_addr: 132.187.2.2 Mask: 255.255.255.0  MTU: 1500   Metric: 1
name: eth0  inet_addr: 132.187.2.2 Mask: 255.255.255.0  MTU: 1500   Metric: 1
ifconfigend.

route:
132.187.2.0 *   255.255.255.0   H   0   wlan
default:    132.187.2.1 0.0.0.0 G   0   eth0
routeend.

and finally these are the files we have added (except for router.irt where we have added only some lines)

lispRouter4.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.7    MTU: 1500   Metric: 1
name: ppp1  inet_addr: 192.168.0.7    MTU: 1500   Metric: 1
name: eth0  inet_addr: 132.187.7.1  Mask: 255.255.255.0  MTU: 1500   Metric: 1

ifconfigend.

route:

192.168.0.0    0.0.0.0      255.255.255.0 H 0 ppp0
132.187.7.0    0.0.0.0      255.255.255.0 H 0 eth0

routeend.

PITR2.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.6    MTU: 1500   Metric: 1
name: ppp1  inet_addr: 192.168.0.6    MTU: 1500   Metric: 1

ifconfigend.

route:

192.168.0.4    0.0.0.0       255.255.255.255 H 0 ppp0
192.168.0.7    0.0.0.0       255.255.255.255 H 0 ppp1
192.168.0.254  0.0.0.0       255.255.255.255 H 0 ppp0

routeend.

router.irt

ifconfig:

# interface 0 to router
name: ppp0  inet_addr: 192.168.0.4    MTU: 1500   Metric: 1
name: ppp1  inet_addr: 192.168.0.4    MTU: 1500   Metric: 1
name: ppp2  inet_addr: 192.168.0.4    MTU: 1500   Metric: 1

ifconfigend.

route:

192.168.0.3    0.0.0.0      255.255.255.255 H 0 ppp0 
192.168.0.1    0.0.0.0      255.255.255.255 H 0 ppp1 
192.168.0.2    0.0.0.0      255.255.255.255 H 0 ppp2 
192.168.0.254  0.0.0.0      255.255.255.255 H 0 ppp3 
192.168.0.5    0.0.0.0      255.255.255.255 H 0 ppp4 
192.168.0.6    0.0.0.0      255.255.255.255 H 0 ppp5 
192.168.0.7    0.0.0.0      255.255.255.255 H 0 ppp6 
132.187.1.0    192.168.0.5  255.255.0.0     G 0 ppp4
132.187.2.0    192.168.0.5  255.255.0.0     G 0 ppp4
132.187.7.0    192.168.0.6  255.255.0.0     G 0 ppp5

routeend.

wirelessRouter3.irt

ifconfig:
name: wlan  inet_addr: 132.187.7.2 Mask: 255.255.255.0  MTU: 1500   Metric: 1
name: eth0  inet_addr: 132.187.7.2 Mask: 255.255.255.0  MTU: 1500   Metric: 1
ifconfigend.

route:
132.187.7.0 *   255.255.255.0   H   0   wlan
default:    132.187.7.1 0.0.0.0 G   0   eth0
routeend.

Last but most important here is the omnet.ini file:

[General]
network = MultiHomingNetwork
tkenv-plugin-path = ../../../etc/plugins
#debug-on-errors = true

*.playgroundSizeX = 900
*.playgroundSizeY = 600
**.debug = true
**.coreDebug = false
sim-time-limit = 36s
seed-set = 1

cmdenv-express-mode = true
cmdenv-autoflush = false
cmdenv-status-frequency = 10000000s

repeat = 1

# channel physical parameters
*.channelcontrol.carrierFrequency = 2.4GHz
*.channelcontrol.pMax = 3.0mW
*.channelcontrol.sat = -82dBm
*.channelcontrol.alpha = 2
*.channelcontrol.numChannels = 2
#*.channelcontrol.numChannels = 2

# wireless channels
#**.wirelessRouter.wlan.radio.channelNumber = 1
#**.ap2.wlan.radio.channelNumber = 2
**.wirelessRouter1.wlan.radio.channelNumber = 0  # just initially -- it'll scan
**.wirelessRouter2.wlan.radio.channelNumber = 1
**.wirelessRouter3.wlan.radio.channelNumber = 0
**.lispMobileNode.wlan[0].radio.channelNumber = 0
**.lispMobileNode.wlan[1].radio.channelNumber = 1

**.lispMobileNode.numWirelessInterfaces = 2
**.mapResolver.processRequestsInterval = 0
**.lispMobileNode.mapResolver.usePiggy = ${usePiggy=true,false}
**.lispMobileNode.mapResolver.useSMR = !${usePiggy}

# wireless configuration
**.wlan*.agent.activeScan = true
**.wlan[0].agent.channelsToScan = "0"  # "" means all
**.wlan[1].agent.channelsToScan = "1"  # "" means all
**.wlan*.agent.probeDelay = 0.1s
**.wlan*.agent.minChannelTime = 0.15s
**.wlan*.agent.maxChannelTime = 0.3s
**.wlan*.agent.authenticationTimeout = 5s
**.wlan*.agent.associationTimeout = 5s

**.mac.address = "auto"
**.mac.maxQueueSize = 14
**.mac.rtsThresholdBytes = 4000B
**.mac.bitrate = 2Mbps
**.wlan.mac.retryLimit = 7
**.wlan.mac.cwMinData = 7
**.wlan.mac.cwMinBroadcast = 31

**.radio.bitrate = 54Mbps
**.radio.transmitterPower = 2.0mW
**.radio.thermalNoise = -110dBm
**.radio.sensitivity = -85mW
**.radio.pathLossAlpha = 2
**.radio.snirThreshold = 4dB

# access point
**.mgmt.frameCapacity = 10

# bandwidth settings
**.txrate = 1000Mbps

# mobility
**.lispMobileNode.mobilityType = "LinearMobility"
**.lispMobileNode.mobility.speed = 30 mps
**.lispMobileNode.mobility.angle = 0
**.lispMobileNode.mobility.acceleration = 0
**.lispMobileNode.mobility.updateInterval = 100ms


# DHCP Server

**.dhcpServer.dhcpServer.net         = "132.187.3.0"
**.dhcpServer.dhcpServer.mask        = "255.255.255.0"
**.dhcpServer.dhcpServer.ip_begin    = "132.187.3.10"
**.dhcpServer.dhcpServer.client_num  = 100
**.dhcpServer.dhcpServer.gateway     = "132.187.3.1"
**.dhcpServer.dhcpServer.dns         = "132.187.3.1"
**.dhcpServer.dhcpServer.lease_time  = 900s # seconds

# Applications

**.standardHost.numUdpApps = 1
**.standardHost.udpAppType = "UDPVideoStreamSvr"
**.standardHost.udpApp[0].serverPort = 4711
**.standardHost.udpApp[0].waitInterval = 0.055s
**.standardHost.udpApp[0].packetLen = 100 B
**.standardHost.udpApp[0].videoSize = 1000000000 B

**.lispMobileNode.numUdpApps = 1
**.lispMobileNode.udpAppType = "UDPVideoStreamCli"
**.lispMobileNode.udpApp[0].serverPort = 4711
**.lispMobileNode.udpApp[0].localPort = 4710
**.lispMobileNode.udpApp[0].serverAddress = "standardHost"
**.lispMobileNode.udpApp[0].startTime = 3s

**.lispRouter2.lisp.assignedEID = "132.187.2.0"
**.lispRouter2.lisp.assignedEIDLength = 24
**.lispRouter1.lisp.assignedEID = "132.187.1.0"
**.lispRouter1.lisp.assignedEIDLength = 24
**.lispRouter3.lisp.assignedEID = "132.187.3.0"
**.lispRouter3.lisp.assignedEIDLength = 24
**.lispRouter4.lisp.assignedEID = "132.187.7.0" 
**.lispRouter4.lisp.assignedEIDLength = 24      
**.lispRouter*.mappingCacheTimeout = 60s

# all nodes use enhanced version
**.useLocatorTypeBit = true

# Wireless Router  DHCP Server

**.wirelessRouter1.udpApp[0].net         = "132.187.1.0"
**.wirelessRouter1.udpApp[0].mask        = "255.255.255.0"
**.wirelessRouter1.udpApp[0].ip_begin    = "132.187.1.10"
**.wirelessRouter1.udpApp[0].client_num  = 100
**.wirelessRouter1.udpApp[0].gateway     = "132.187.1.2"
**.wirelessRouter1.udpApp[0].dns         = "132.187.1.1"
**.wirelessRouter1.udpApp[0].iface       = "wlan"
**.wirelessRouter1.udpApp[0].lease_time  = 12s # seconds


# Wireless Router 2 DHCP Server

**.wirelessRouter2.udpApp[0].net         = "132.187.2.0"
**.wirelessRouter2.udpApp[0].mask        = "255.255.255.0"
**.wirelessRouter2.udpApp[0].ip_begin    = "132.187.2.10"
**.wirelessRouter2.udpApp[0].client_num  = 100
**.wirelessRouter2.udpApp[0].gateway     = "132.187.2.2"
**.wirelessRouter2.udpApp[0].dns         = "132.187.2.1"
**.wirelessRouter2.udpApp[0].iface       = "wlan"
**.wirelessRouter2.udpApp[0].lease_time  = 12s # seconds

############### new added wireless Router 3
**.wirelessRouter3.udpApp[0].net         = "132.187.7.0"
**.wirelessRouter3.udpApp[0].mask        = "255.255.255.0"
**.wirelessRouter3.udpApp[0].ip_begin    = "132.187.7.10"
**.wirelessRouter3.udpApp[0].client_num  = 100
**.wirelessRouter3.udpApp[0].gateway     = "132.187.7.2"
**.wirelessRouter3.udpApp[0].dns         = "132.187.7.1"
**.wirelessRouter3.udpApp[0].iface       = "wlan"
**.wirelessRouter3.udpApp[0].lease_time  = 12s # seconds

Please forgive me for the long post, I'm sure I'm making a silly mistake in those routing files but I can't find where. Thank you for your attention.

ps: if you want here you can file the complete source code of the .NED

EDIT: I have just noticed that the problem could be in the intial configuration phase. In fact, on the console EV I can read several messages of this type:

INFO(lispRouter4): srcAddress=192.168.0.7, dstAddress=192.168.0.254
INFO: Source IP=192.168.0.7 address not in EID space.
Destination IP=192.168.0.254 address not in EID space.
Handing over packet to regular IPv4-routing
output interface is ppp0, next-hop address: <unspec>
** Event #26  T=0  MultiHomingNetwork.lispRouter1.networkLayer.arp (ARP,    id=109), on `LISPMapRegister-#1' (IPDatagram, id=263)
Packet (IPDatagram)LISPMapRegister-#1 arrived from higher layer, output  interface ppp0 is not broadcast, skipping ARP
** Event #27  T=0  MultiHomingNetwork.lispRouter2.networkLayer.arp (ARP,  id=185), on `LISPMapRegister-#2' (IPDatagram, id=264)
Packet (IPDatagram)LISPMapRegister-#2 arrived from higher layer, output  interface ppp0 is not broadcast, skipping ARP
** Event #28  T=0  MultiHomingNetwork.lispRouter3.networkLayer.arp (ARP,  id=233), on `LISPMapRegister-#3' (IPDatagram, id=265)
Packet (IPDatagram)LISPMapRegister-#3 arrived from higher layer, output  interface ppp0 is not broadcast, skipping ARP
** Event #29  T=0  MultiHomingNetwork.lispRouter4.networkLayer.arp (ARP,  id=307), on `LISPMapRegister-#4' (IPDatagram, id=266)
Packet (IPDatagram)LISPMapRegister-#4 arrived from higher layer, output    interface ppp0 is not broadcast, skipping ARP

There are many of this message concerning 192.168.0.7 and at a certain point it gives up. In other words the PITR2 does not forward the MapRequest from lispRouter4 to MapServer and to the central router; instead, the PITR2 sends MapRequest back to lispRouter4. So there's something about that ppp0 on lispRouter4?