Regarding ECMP

73 views
Skip to first unread message

hari krishna yadavalli

unread,
Feb 23, 2012, 2:25:54 PM2/23/12
to ns-3-users
Hi all,

I am implementing ECMP and is there any way that we can calculate how
a node is dividing the traffic?
I mean if the application Rate is say 120Mbps and there are two equal
cost paths from that node.
That node is not going to divide the traffic exactly equal to half
(eg: 60Mbps in one way and another 60Mbps)
So I would like to know how much traffic is going through each path.
Any kind of suggestion is helpful.

Regards,
Hari Yadavalli

hari krishna yadavalli

unread,
Feb 25, 2012, 1:01:41 PM2/25/12
to ns-3-users
anyone?

John Abraham

unread,
Feb 25, 2012, 1:14:39 PM2/25/12
to ns-3-...@googlegroups.com
ns-3's ECMP does not have sophisticated load balancing needed for ECMP. It is currently a random coin toss.
To make this deterministic

edit
src/internet/model/ipv4-global-routing.cc

      if (m_randomEcmpRouting)
        {
          selectIndex = m_rand.GetInteger (0, allRoutes.size ()-1);
        }
      else
        {
          selectIndex = 0;
        }


to something like

uint32_t myRouteIndex()
{
    static index = 0;
    if(index == 2)
    index = 0;
    return index++;
}

      if (m_randomEcmpRouting)
        {
          selectIndex = myRouteIndex();
        }
      else
        {
          selectIndex = 0;
        }


anyone?
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

hari krishna yadavalli

unread,
Feb 27, 2012, 3:18:44 PM2/27/12
to ns-3-...@googlegroups.com
Thanks for the info.

But the code you suggested works if there are only two equal paths I guess.

I no need to change the routing process, instead I just want to measure how much traffic is divided in to each path?

Any Ideas?

Regards,
Hari Yadavalli

John Abraham

unread,
Feb 27, 2012, 3:27:42 PM2/27/12
to ns-3-...@googlegroups.com
Essentially you will be just measuring how the random variable chooses an index, but since that is what you want to do:

1. Obtain the pointer to the p2p net device and trace for macTx
example:


  1168 void NetDeviceCombo2::Connectp2pTraces()
1171 ns3::Ptr <ns3::PointToPointNetDevice> pnd = DynamicCast<ns3::PointToPointNetDevice> (m_nd);
  1172     NS_ASSERT(pnd);
  1186     pnd->TraceConnectWithoutContext("MacTx",MakeCallback(&NetDeviceCombo2::p2p_macTxTrace,this));


2. or Enable pcaps and use a wireshark filter .
Reply all
Reply to author
Forward
0 new messages