[General] network = ClockDriftShowcase sim-time-limit = 0.1s #abstract-config = true (requires omnet 7) # disable legacy Ethernet *.*.ethernet.typename = "EthernetLayer" # avoid ARP **.hasGlobalArp = true # source applications *.source*.numApps = 1 *.source*.app[*].typename = "UdpSourceApp" *.source*.app[0].source.packetLength = 800B *.source*.app[0].source.productionInterval = 20us *.source*.app[0].io.destPort = 1000 *.source1.app[0].io.destAddress = "sink1" *.source1.app[0].source.packetNameFormat = "source1-%c" *.source2.app[0].io.destAddress = "sink2" *.source2.app[0].source.initialProductionOffset = 10us *.source2.app[0].source.packetNameFormat = "source2-%c" # sink applications *.sink*.numApps = 1 *.sink*.app[*].typename = "UdpSinkApp" *.sink*.app[0].io.localPort = 1000 # gate schedule visualization **.displayGateSchedules = true **.gateScheduleVisualizer.height = 16 # Ethernet interface and queueing *.*.eth[*].typename = "LayeredEthernetInterface" *.*.eth[*].bitrate = 1Gbps *.switch1.eth[0].macLayer.queue.typename = "GatingPriorityQueue" *.switch1.eth[0].macLayer.queue.numQueues = 2 *.switch1.eth[0].macLayer.queue.classifier.typename = "ContentBasedClassifier" *.switch1.eth[0].macLayer.queue.classifier.packetFilters = ["source1*", "source2*"] *.switch1.eth[0].macLayer.queue.queue[*].typename = "DropTailQueue" *.switch1.eth[0].macLayer.queue.gate[*].initiallyOpen = false *.switch1.eth[0].macLayer.queue.gate[*].durations = [10us, 10us] *.switch1.eth[0].macLayer.queue.gate[0].offset = 3.118us *.switch1.eth[0].macLayer.queue.gate[1].offset = 13.118us [Config NoClockDrift] description = "Without clocks, network nodes are synchronized by simulation time" [Config ConstantClockDrift] description = "Clocks with constant drift rate diverge over time" *.source*.clock.typename = "OscillatorBasedClock" *.source*.clock.oscillator.typename = "ConstantDriftOscillator" *.source1.clock.oscillator.driftRate = 500ppm *.source2.clock.oscillator.driftRate = -400ppm *.source*.app[0].source.clockModule = "^.^.clock" *.switch1.clock.typename = "OscillatorBasedClock" *.switch1.clock.oscillator.typename = "ConstantDriftOscillator" *.switch1.clock.oscillator.driftRate = 300ppm *.switch1.eth[0].macLayer.queue.gate[*].clockModule = "^.^.^.^.clock" [Config RandomClockDrift] description = "Clocks with random drift rate" *.source*.clock.typename = "OscillatorBasedClock" *.source*.clock.oscillator.typename = "RandomDriftOscillator" *.source1.clock.oscillator.driftRateChange = uniform(-125ppm, 125ppm) *.source2.clock.oscillator.driftRateChange = uniform(-100ppm, 100ppm) *.source1.clock.oscillator.changeInterval = 0.1ms *.source2.clock.oscillator.changeInterval = 0.1ms *.source*.app[0].source.clockModule = "^.^.clock" *.switch1.clock.typename = "OscillatorBasedClock" *.switch1.clock.oscillator.typename = "RandomDriftOscillator" *.switch1.clock.oscillator.driftRateChange = uniform(-75ppm, 75ppm) *.switch1.clock.oscillator.changeInterval = 0.1ms *.switch1.eth[0].macLayer.queue.gate[*].clockModule = "^.^.^.^.clock" [Config OutOfBandSyncBase] description = "Base config for out-of-band synchronization" #abstract-config = true (requires omnet 7) *.source*.clock.typename = "SettableClock" *.source*.clock.defaultOverdueClockEventHandlingMode = "execute" *.source*.numApps = 2 *.source*.app[1].typename = "SimpleClockSynchronizer" *.source*.app[1].masterClockModule = "^.^.switch1.clock" *.source*.app[1].slaveClockModule = "^.clock" *.source*.app[1].synchronizationInterval = 500us *.source*.app[1].synchronizationClockTimeError = uniform(-10ns, 10ns) [Config ConstantClockDriftOutOfBandSync] description = "Clocks are periodically synchronized out-of-band, without a real protocol. Clocks use constant drift oscillators." extends = OutOfBandSyncBase, ConstantClockDrift [Config RandomClockDriftOutOfBandSync] description = "Clocks are periodically synchronized out-of-band, without a real protocol. Clocks use random drift oscillators." extends = OutOfBandSyncBase, RandomClockDrift [Config RandomClockDriftGptpSync] description = "Clocks are periodically synchronized using gPTP" extends = RandomClockDrift *.switch*.hasGptp = true *.switch*.gptp.syncInterval = 500us *.switch*.gptp.pdelayInterval = 1ms *.switch*.gptp.pdelayInitialOffset = 0ms *.switch*.clock.typename = "SettableClock" *.switch1.gptp.gptpNodeType = "MASTER_NODE" *.switch1.gptp.masterPorts = ["eth0", "eth1", "eth2"] # eth* *.switch2.gptp.gptpNodeType = "SLAVE_NODE" *.switch2.gptp.slavePort = "eth0" *.source*.clock.typename = "SettableClock" *.source*.numApps = 2 *.source*.app[1].typename = "Gptp" *.source*.app[1].gptpNodeType = "SLAVE_NODE" *.source*.app[1].slavePort = "eth0" *.source*.app[1].syncInterval = 500us *.source*.app[1].pdelayInterval = 1ms