-
Notifications
You must be signed in to change notification settings - Fork 513
Open
Description
When I'm using inline XML configuration for IP-addresses with .x
type wildcard, it configures a netmask to be as minimal as possible with provided IP-addresses. Like with 192.168.1.26
and 192.168.1.31
it will go for /27
netmask. However, then UDP packets sent through the switch get stuck forever somewhere in the switch's bridging.
Either adding higher octet values to set it to /24 or explicitly specifying netmask='/24'
solves the issues and packets go smoothly.
Omnet++ 6.1, INET 4.5.4
Example:
ned file:
network netmask_bug extends TsnNetworkBase
{
parameters:
*.eth[*].bitrate = default(1Gbps);
submodules:
scenarioManager: ScenarioManager {
}
Node1: TsnDevice {
gates:
ethg[1];
}
Switch1: TsnSwitch {
gates:
ethg[2];
}
Node2: TsnDevice {
gates:
ethg[1];
}
connections:
Switch1.ethg[0] <--> EthernetLink { datarate = 1Gbps; } <--> Node1.ethg[0];
Switch1.ethg[1] <--> EthernetLink { datarate = 1Gbps; } <--> Node2.ethg[0];
}
ini file:
[General]
network = netmask_bug
**.crcMode = "computed"
**.fcsMode = "computed"
**.numPcapRecorders = 1
**.receivingSignalNames = ""
# all Ethernet interfaces have 1 Gbps speed
*.*.eth[*].bitrate = 1Gbps
# Using inline XML configuration for IP-addresses
*.configurator.config = xml("<config> \
<interface hosts='Node1' names='eth0' address='192.168.1.31' netmask='255.255.255.x'/> \
<interface hosts='Node2' names='eth0' address='192.168.1.26' netmask='255.255.255.x'/> \
</config>")
#*.configurator.config = xml("<config> \
# <interface hosts='Node1' names='eth0' address='192.168.1.31' netmask='/24'/> \
# <interface hosts='Node2' names='eth0' address='192.168.1.26' netmask='/24'/> \
# </config>")
*.Node1.numApps = 1
*.Node1.app[0].typename = "UdpSinkApp"
*.Node1.app[0].display-name = "Node1 endpoint"
*.Node1.app[0].io.localPort = 4101
*.Node2.numApps = 1
*.Node2.app[0].typename = "UdpSourceApp"
*.Node2.app[0].display-name = "Node2_Node1_Stream"
*.Node2.app[0].io.destAddress = "Node1"
*.Node2.app[0].io.destPort = 4101
*.Node2.app[0].io.localPort = 1101
*.Node2.app[0].source.packetLength = 238B - 54B
*.Node2.app[0].source.productionInterval = 1833.333us