# Establish N PFCP sessions for tunend, and emit massive GTP traffic to the UPF # to each established tunnel. # # osmo-upf-load-gen UPF "internet host" # |GTP-ep -------GTP-----> GTP-ep|UE-IP-addr -------IP------> arbitrary-IP| # |10.0.1.1 10.0.2.1|192.168.10.23 123.234.42.23| # |10.0.1.2 # ^ ^ ^ # ^ | | | # | | configure by configure by # configure by from UPF 'ue ip' 'payload target ip', # 'gtp ip' ("F-TEID=choose") 'payload target port' # Configure CPU related settings: cpu-sched !policy rr 18 ! All Rx in hyperthreads within same cores: ! core-id=0, processor=0: cpu-affinity GtpFloodTx0 0x0001 delay ! core-id=0, processor=6: cpu-affinity GtpFloodTx1 0x0040 delay ! core-id=1, processor=1: cpu-affinity GtpFloodTx2 0x0002 delay ! core-id=1, processor=7: cpu-affinity GtpFloodTx3 0x0080 delay ! core-id=2, processor=2: cpu-affinity GtpFloodTx4 0x0004 delay ! core-id=2, processor=8: SPARE !cpu-affinity GtpFloodTx5 0x0100 delay ! core-id=3, processor=3: cpu-affinity GtpFloodRx0 0x0008 delay ! core-id=3, processor=9: cpu-affinity GtpFloodRx1 0x0200 delay ! core-id=4, processor=4: cpu-affinity GtpFloodRx2 0x0010 delay ! core-id=4, processor=10: cpu-affinity GtpFloodRx3 0x0400 delay ! core-id=5, processor=5: cpu-affinity GtpFloodRx4 0x0020 delay ! core-id=2, processor=11: SPARE !cpu-affinity GtpFloodRx5 0x0800 delay # Configure one or more local GTP endpoints to emit GTP packets from. # Established sessions will use these round-robin. # These need to be local IP addresses for 'gtp flood' to work. gtp local 172.16.31.100 gtp local 172.16.31.101 gtp local 172.16.31.102 gtp local 172.16.31.103 gtp local 172.16.31.104 gtp local 172.16.31.105 gtp local 172.16.31.106 gtp local 172.16.31.107 gtp local 172.16.31.108 gtp local 172.16.31.109 gtp local 172.16.31.110 gtp local 172.16.31.111 gtp local 172.16.31.112 gtp local 172.16.31.113 gtp local 172.16.31.114 gtp local 172.16.31.115 gtp local 172.16.31.116 gtp local 172.16.31.117 gtp local 172.16.31.118 gtp local 172.16.31.119 gtp local 172.16.31.120 gtp local 172.16.31.121 gtp local 172.16.31.122 gtp local 172.16.31.123 gtp local 172.16.31.124 gtp local 172.16.31.125 gtp local 172.16.31.126 gtp local 172.16.31.127 gtp local 172.16.31.128 gtp local 172.16.31.129 gtp local 172.16.31.130 gtp local 172.16.31.131 gtp local 172.16.31.132 gtp local 172.16.31.133 gtp local 172.16.31.134 gtp local 172.16.31.135 gtp local 172.16.31.136 gtp local 172.16.31.137 gtp local 172.16.31.138 gtp local 172.16.31.139 gtp local 172.16.31.140 gtp local 172.16.31.141 gtp local 172.16.31.142 gtp local 172.16.31.143 gtp local 172.16.31.144 gtp local 172.16.31.145 gtp local 172.16.31.146 gtp local 172.16.31.147 gtp local 172.16.31.148 gtp local 172.16.31.149 gtp local 172.16.31.150 gtp core 172.16.32.2 # use UE IP addresses from this range, +1 for each new UE: # 192.168.0.1, 192.168.0.2, ... ue ip range 192.168.1.2 192.168.254.254 # now associate with UPF and start N sessions. pfcp-peer 172.16.31.2 tx assoc-setup-req sleep 1 date n 50000 session create tunend wait responses # All sessions established date # For each established PFCP session, emit GTP packets gtp flood rx-workers 5 tx-workers 5 io-uring queue-size 4000 flows-per-session 1 packets-per-flow infinite # configure the generated GTP payload: send UDP packets from the UE address # and these source UDP ports to these target addresses and target UDP ports. # They are used round-robin. # Source IP is the UE IP address. payload source port udp range 10000 10010 payload target ip range 172.16.32.200 172.16.32.223 payload target port udp range 23000 23000 date # All GTP is flowing. # osmo-upf-load-gen will keep this up for as long as there still are active GTP flows, # or until receiving a signal interrupt (ctrl-C). # give some time to gather counters before the tunnel is removed sleep 1