Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOS/DSCP values for different traffic classes/queues #47

Closed
vivianchiong opened this issue Mar 15, 2023 · 2 comments
Closed

TOS/DSCP values for different traffic classes/queues #47

vivianchiong opened this issue Mar 15, 2023 · 2 comments

Comments

@vivianchiong
Copy link

vivianchiong commented Mar 15, 2023

Hello,

Question on using TOS/DSCP values in MGEN in a EMANE+ETCE environment. I am also using OLSRD environment, where my config file has IpVersion set to 4. I am using IEEE 802.11abg radio model from EMANE and want to simulate traffic for video/voice.

My assumption was that if I changed the TOS value in the flow definitions in MGEN scripts, this would change the Class of the flow's traffic (e.g. TOS 64==0x40=>CS2, TOS 32==0x20=>CS1), which should map to all the different queues corresponding to the "[four different traffic classes](four different traffic classes)" in the IEEE 802.11abg radio model.

Below is my mgen.script for node-1 to test this:

TTL 64

0.0 LISTEN UDP 5001

0.0 JOIN 225.1.20.1 INTERFACE bmf0

1.0 ON 1 UDP SRC 5001 DST 225.1.20.1/5001 BURST [RANDOM 10.0 PERIODIC [1 1024] EXPONENTIAL 5.0] TOS 32 INTERFACE bmf0

10.0 ON 100 UDP SRC 5001 DST 225.1.20.1/5001 BURST [RANDOM 10.0 PERIODIC [1 1024] EXPONENTIAL 5.0] TOS 64 INTERFACE bmf0

20.0 ON 200 UDP SRC 5001 DST 225.1.20.1/5001 BURST [RANDOM 10.0 PERIODIC [1 1024] EXPONENTIAL 5.0] TOS 96 INTERFACE bmf0

900.0 OFF 1

900.0 OFF 100

900.0 OFF 200

900.0 LEAVE 225.1.20.1 INTERFACE bmf0

900.0 IGNORE UDP 5001

However, when I looked at the EMANE tables for node-1, I only saw packets on queues 0 and 3:

[emanesh (node-1:47000)] ## get table 1 mac
nem 1   mac BroadcastPacketAcceptTable0
| NEM | Num Pkts Tx | Num Bytes Tx | Num Pkts Rx | Num Bytes Rx |
| 1   | 1118        | 1241047      | 0           | 0            |
| 2   | 0           | 0            | 1527        | 435138       |
| 3   | 0           | 0            | 1523        | 434606       |
| 4   | 0           | 0            | 1525        | 434930       |
| 5   | 0           | 0            | 1522        | 434420       |
| 6   | 0           | 0            | 1523        | 434826       |
| 7   | 0           | 0            | 1519        | 433450       |
| 8   | 0           | 0            | 1521        | 433710       |
| 9   | 0           | 0            | 3           | 210          |
| 10  | 0           | 0            | 1524        | 434432       |
| 11  | 0           | 0            | 1522        | 434208       |
| 12  | 0           | 0            | 1525        | 435014       |
| 13  | 0           | 0            | 1524        | 434732       |
| 14  | 0           | 0            | 1520        | 434164       |
| 15  | 0           | 0            | 1525        | 435258       |
| 16  | 0           | 0            | 1525        | 434506       |
| 17  | 0           | 0            | 1528        | 435568       |
| 18  | 0           | 0            | 1524        | 434692       |
| 19  | 0           | 0            | 1526        | 435440       |
| 20  | 0           | 0            | 1528        | 435336       |

nem 1   mac BroadcastPacketAcceptTable1
| NEM | Num Pkts Tx | Num Bytes Tx | Num Pkts Rx | Num Bytes Rx |

nem 1   mac BroadcastPacketAcceptTable2
| NEM | Num Pkts Tx | Num Bytes Tx | Num Pkts Rx | Num Bytes Rx |

nem 1   mac BroadcastPacketAcceptTable3
| NEM | Num Pkts Tx | Num Bytes Tx | Num Pkts Rx | Num Bytes Rx |
| 1   | 871         | 215975       | 0           | 0            |

Is there something in my understanding I'm missing? I have seen issue #28 and my understanding is that I want to change the DSCP value, not the ECN value; thus I calculated some good TOS values to be 32, 64, and 96.

Please let me know if this question is more suited for the EMANE repo.

Thank you so much!

@weston-nrl
Copy link
Collaborator

My suggestion would be to capture the packets with tcpdump ("-v" option), wireshark, or similar pcap methods and verify that the TOS/DSCP field is getting set correctly (those values work for me, corresponding to 0x20, 0x40, 0x60). Once they're set correctly, what happens to them is more a function of your system queueing discipline and EMANE in this case. It looks like WMM needs to be enabled in EMANE as well if it's not already (see here).

I do not know for sure what DSCP values correspond to the different WMM traffic classes. Various sources online lead me to believe the DSCP values corresponding to the 4 classes may be 0, 8, 32, 48 -- if that's correct, it might make sense that one of the values you tried corresponds to one of those, while the others all went into the default class.

@vivianchiong
Copy link
Author

Yes, I saw that my TOS values are indeed being set by using tcpdump and wmm is indeed enabled. Hopefully there isn't some other configuration or detail in the algorithm that I'm missing.

When I viewed the EMANE logs, I couldn't confidently say that my packets are even being processed by other nodes. After looking at the EMANE IEEE 802.11abg code, you are correct that the TOS values map to DSCP values with min values of 0, 8, 32, 48 so I adjusted my TOS values a bit so that the mgen flows would disperse into the different queues, but sadly no luck.

I opened an issue for this in the EMANE repo. If there is any other insight you can provide I would really appreciate it! Otherwise feel free to close this issue and I'll keep debugging on that other issue.

Thank you so much for your help thus far and have a great weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants