Set DSCP in NS3 packet

130 views
Skip to first unread message

Sunshine

unread,
Mar 17, 2017, 6:03:21 AM3/17/17
to ns-3-users
Hi, looking forward to your help.

I'm using NS3+ofswitch13+floodlight. In order to implement dscp_meter at OpenFlow Switch, I have to set the DSCP at low class(eg. AF11). So here is my question:
Is that possible to set DSCP a different value (different from 0x00) at NS3?

I have tried the following methods and both failed:

1) Modify the default value(0x00) of DSCP in NS3: CheckSum Error occurred and still CS0
2) Writing my own application and tag the packet as following:

       SocketIpTosTag my_tag;
       my_tag.SetTos(0x28);
       Ptr<Packet> packet = Create<Packet> (m_packetSize);
       packet -> AddPacketTag(my_tag);
       m_socket->Send (packet);
   
    Or
 
       Ptr<Packet> packet = Create<Packet> (m_packetSize);
       m_socket->SetIpTos(0x30);
       m_socket->Send (packet);

    Both were failed, again.

I also thought about generating my own packet. But I'm using ECN, OpenFlow at the same time. I'm afraid that OpenFlow will be discordant with my own packet.

I will be really appreciate for your time and kindness.

Best,
Yang

Sunshine

unread,
Mar 18, 2017, 10:00:18 PM3/18/17
to ns-3-users
Hi, anybody who may see this, still waiting for your help!

在 2017年3月17日星期五 UTC+8下午6:03:21,Sunshine写道:
Reply all
Reply to author
Forward
0 new messages