[General] abstract = true network = TimeAwareShapingShowcaseNetwork sim-time-limit = 1s # configure Ethernet speed *.*.eth[*].bitrate = 100Mbps # configure client applications *.client*.numApps = 1 *.client*.app[*].typename = "UdpSourceApp" *.client1.app[0].display-name = "best-effort" *.client2.app[0].display-name = "high-priority" *.client*.app[*].io.destAddress = "server" *.client1.app[0].io.destPort = 1000 *.client2.app[0].io.destPort = 1001 *.client1.app[0].io.displayStringTextFormat = "{numSent} best-effort" *.client2.app[0].io.displayStringTextFormat = "{numSent} high-priority" *.client1.app[0].source.packetLength = 1500B - 58B # 58B = 8B (UDP) + 20B (IP) + 4B (Q-TAG) + 14B (ETH MAC) + 4B (ETH FCS) + 8B (ETH PHY) *.client2.app[0].source.packetLength = 72B - 58B # 58B = 8B (UDP) + 20B (IP) + 4B (Q-TAG) + 14B (ETH MAC) + 4B (ETH FCS) + 8B (ETH PHY) *.client1.app[0].source.productionInterval = exponential(200us) # ~60 Mbps (PHY rate) *.client2.app[0].source.productionInterval = 1ms # ~576 kbps (PHY rate) # configure server applications *.server.numApps = 2 *.server.app[*].typename = "UdpSinkApp" *.server.app[0].display-name = "best-effort" *.server.app[1].display-name = "high-priority" *.server.app[0].io.localPort = 1000 *.server.app[1].io.localPort = 1001 *.server.app[0].io.displayStringTextFormat = "{numReceived} best-effort" *.server.app[1].io.displayStringTextFormat = "{numReceived} high-priority" # display number of packets sent and received on network nodes *.visualizer.infoVisualizer.displayInfos = true *.visualizer.infoVisualizer.placementHint = "top" *.visualizer.infoVisualizer.modules = "*.*.app[*].io" *.visualizer.networkNodeVisualizer.annotationSpacing = 12 [NoTrafficShaping] description = "Transmission of large best-effort frames may increase end-to-end delay for high-priority frames" # no additional configuration [TimeAwareShaping] description = "Time-aware traffic shaping makes end-to-end delay small for high-priority frames" # enable outgoing streams *.client*.hasOutgoingStreams = true # configure client stream identification *.client*.bridging.streamIdentifier.identifier.mapping = [{stream: "best-effort", packetFilter: expr(udp.destPort == 1000)}, {stream: "high-priority", packetFilter: expr(udp.destPort == 1001)}] # configure client stream encoding *.client*.bridging.streamCoder.encoder.mapping = [{stream: "best-effort", pcp: 0}, {stream: "high-priority", pcp: 4}] # enable egress traffic shaping *.switch.hasEgressTrafficShaping = true # disable forwarding IEEE 802.1Q C-Tag *.switch.bridging.directionReverser.reverser.excludeEncapsulationProtocols = ["ieee8021qctag"] # configure time-aware traffic shaping *.switch.eth[*].macLayer.queue.numTrafficClasses = 2 *.switch.eth[*].macLayer.queue.*[0].display-name = "best-effort" *.switch.eth[*].macLayer.queue.*[1].display-name = "high-priority" *.switch.eth[*].macLayer.queue.transmissionGate[0].initiallyOpen = false *.switch.eth[*].macLayer.queue.transmissionGate[0].durations = [20us, 980us] # 1ms cycle *.switch.eth[*].macLayer.queue.transmissionGate[1].initiallyOpen = true *.switch.eth[*].macLayer.queue.transmissionGate[1].durations = [20us, 980us] # 1ms cycle # configure gate schedule visualization *.visualizer.gateScheduleVisualizer.displayGateSchedules = true *.visualizer.gateScheduleVisualizer.gateFilter = "**.eth[1].**" *.visualizer.gateScheduleVisualizer.width = 200 *.visualizer.gateScheduleVisualizer.height = 16 *.visualizer.gateScheduleVisualizer.placementHint = "top"