对于考试,我们正在研究LISP Mobile(定位器/标识符分离协议),我们已要求德国大学的一些研究人员向我们发送他们的LISP模拟器和Omnet ++ / Inet。在内部,我们发现了以下对我们非常有用的场景:
我们有一个带有两个wlan接口的lispMobileNode多宿主,它从一个名为standardHost的不可移动的通信节点接收UDP数据包(特别是VoIP或视频)。此方案按预期完美运行,路由器正确实现LISP协议。现在,我们的老师要求我们扩展这种情况:特别是我们应该在三个不同的LISP网络中通过两次切换/切换来收集数据,因此添加了所需的模块,并且场景已经变成这样:
问题是即使 lispMobileNode正确连接到wirelessRouter 3并在停止从wirelessRouter2 接收后获得相对正确的IP地址,但是此信息不会转发到下面的LISP路由器网络,因此来自standardHost的UDP数据包继续路由到wirelessRouter2。我确信我们为每个新组件编写的.irt路由文件一定存在问题,所以我想知道你是否可以帮助我处理它们,因为在我以前的Omnet ++经历中我并不需要管理与.irt文件,所以我不是专家。首先,这里是我们在模拟器中找到的文件:
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.
最后这些是我们添加的文件(除了router.irt,我们只添加了一些行)
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.
最后但最重要的是 omnet.ini 文件:
[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
请原谅我的长篇文章,我确定我在这些路由文件中犯了一个愚蠢的错误,但我无法找到。谢谢你的关注。
ps:如果你想要here,你可以提交.NED的完整源代码
修改 我刚刚注意到问题可能出在初始配置阶段。事实上,在控制台EV上我可以阅读这种类型的几条消息:
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
有许多关于192.168.0.7的消息,并且在某个时刻它放弃了。换句话说,PITR2不会将MapRequest从lispRouter4转发到MapServer和中央路由器;相反,PITR2将MapRequest发送回lispRouter4。 那么在lispRouter4上有关于ppp0的东西吗?