packet spray in NS3

78 views
Skip to first unread message

Richard

unread,
Jun 23, 2024, 11:14:55 PM6/23/24
to ns-3-users
Dear all, 

I would like to know how can I enable packet spray routing in NS3? 

Config::SetDefault ("ns3::Ipv4GlobalRouting::RandomEcmpRouting",BooleanValue(true)); 
The wiki told me "Set to true if packets are randomly routed among ECMP; set to false for using only one route consistentl". Does it equal to packet spray? Or all packets of the flow will stick to one route, which is chosen randomly (which is not packet spray)?

Best, 
Richard

Richard

unread,
Jun 23, 2024, 11:26:10 PM6/23/24
to ns-3-users
I looked into the code, I think the RandomEcmpRouting is random packet spray, while FlowEcmpRouting is per-flow ECMP. Am I correct?

Tommaso Pecorella

unread,
Jun 26, 2024, 11:17:18 AM6/26/24
to ns-3-users
First things first: one has to define "packet spray routing".

Please define it, and/or send a link to the standard using it. Thanks



Michele Zhu

unread,
Jul 11, 2025, 9:12:17 AMJul 11
to ns-3-users
Dear Tommaso, I also have the same question in mind.
I'm working with a datacenter network, and we consider per-flow routing.
Packet spraying: The packets are spread equally across the shortest paths between the source and the destination.
Equal-Cost-Multi-Path (ECMP): The packets belonging to a flow are routed along one of the shortest paths.

I did some visualization with NetAnim and believe that PacketSpraying is RandomEcmpRouting, but I'm not completely sure about it. Can you confirm my assumption?

Michele Zhu

unread,
Jul 11, 2025, 9:17:28 AMJul 11
to ns-3-users
p.s. In datacenter ECMP the flow selection is performed by a hashing of the IP packet

Tommaso Pecorella

unread,
Aug 30, 2025, 7:57:39 AMAug 30
to ns-3-users
From the look of it, yes.

압둘하미드이드리스

unread,
Aug 30, 2025, 4:07:38 PMAug 30
to ns-3-...@googlegroups.com
Good Morning from Korea,

I was trying to implement a Winner II B1 model (3GPP) in my Qlearning algorithm, but got some challenges.
Can anyone help as am using ns3.45?


On Saturday, August 30, 2025, Tommaso Pecorella <tomm...@gmail.com> wrote:
From the look of it, yes.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ns-3-users/2708c344-cafb-43c7-b5ff-9077238ef99bn%40googlegroups.com.
Message has been deleted

Michele Zhu

unread,
Sep 19, 2025, 10:59:28 AMSep 19
to ns-3-users
I can confirm. Btw, anyone looking for switch nodes implementation can be found from Vasmi's work/prior research here: https://github.com/inet-tub/ns3-datacenter?tab=readme-ov-file. There is also datacenter ECMP.
Il giorno sabato 30 agosto 2025 alle 22:07:38 UTC+2 압둘하미드이드리스 ha scritto:
Good Morning from Korea,

I was trying to implement a Winner II B1 model (3GPP) in my Qlearning algorithm, but got some challenges.
Can anyone help as am using ns3.45?


On Saturday, August 30, 2025, Tommaso Pecorella <tomm...@gmail.com> wrote:
From the look of it, yes.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages