data generator for testing switch

57 views
Skip to first unread message

shin...@gmail.com

unread,
Jan 25, 2015, 7:48:10 AM1/25/15
to ns-3-...@googlegroups.com
Hello All,

I am trying to develop a simple netdevice that can switch data between multiple nodes.
I am at a point where I need to use a traffic source to test my module. I tried to use to use the Echo Server/client application.
But I get the following error, possibly its trying to route the packet using SPF (but I am intersted to switch the packet)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2ff7c33 in ns3::GlobalRoutingLinkRecord::GetLinkData (this=0x0) at ../src/internet/model/global-router-interface.cc:91


So I wanted to know if there is any lower level (layer 2) packet generator availble for testing

Tommaso Pecorella

unread,
Jan 25, 2015, 8:08:14 AM1/25/15
to ns-3-...@googlegroups.com
Hi,

yes, there is, but that's not the root of the problem.
I warmly suggest to:
1) learn to use a debugger,
2) check your scripts

The simulation is only ding what you're asking to do. It's not using OSPF or GlobalRouting if you don't ask explicitly to do so.

Have fun,

T.

shin...@gmail.com

unread,
Jan 25, 2015, 8:23:22 AM1/25/15
to ns-3-...@googlegroups.com
Thanks Tomasso,

I used gdb and looked at the backtrace files. But they mainly point to the

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2ff7c33 in ns3::GlobalRoutingLinkRecord::GetLinkData (this=0x0) at ../src/internet/model/global-router-interface.cc:91
91      return m_linkData;
(gdb) bt
#0  0x00007ffff2ff7c33 in ns3::GlobalRoutingLinkRecord::GetLinkData (this=0x0) at ../src/internet/model/global-router-interface.cc:91
#1  0x00007ffff301a94d in ns3::GlobalRouteManagerImpl::SPFNexthopCalculation (this=0x7146b0, v=0x712460, w=0x712400, l=0x714d80, distance=1)
    at
../src/internet/model/global-route-manager-impl.cc:1059
#2  0x00007ffff3019e42 in ns3::GlobalRouteManagerImpl::SPFNext (this=0x7146b0, v=0x712460, candidate=...)
    at
../src/internet/model/global-route-manager-impl.cc:874
#3  0x00007ffff301d57a in ns3::GlobalRouteManagerImpl::SPFCalculate (this=0x7146b0, root=...)
    at
../src/internet/model/global-route-manager-impl.cc:1403
#4  0x00007ffff3018594 in ns3::GlobalRouteManagerImpl::InitializeRoutes (this=0x7146b0) at ../src/internet/model/global-route-manager-impl.cc:727
#5  0x00007ffff3010114 in ns3::GlobalRouteManager::InitializeRoutes () at ../src/internet/model/global-route-manager.cc:58
#6  0x00007ffff3036666 in ns3::Ipv4GlobalRoutingHelper::PopulateRoutingTables () at ../src/internet/helper/ipv4-global-routing-helper.cc:64
#7  0x000000000040eeb6 in main (argc=2, argv=0x7fffffffe318) at ../scratch/my-module/my-module.cc:203


Could you please specify the alternate way to test a module. I think that will be very helpful. In the meantime I will debut it.

Thanks,

Tommaso Pecorella

unread,
Jan 25, 2015, 9:43:50 AM1/25/15
to ns-3-...@googlegroups.com
Hi,

yes, the problem is in GlobalRoute, but it may be your device messing with the GlobalRoute assumptions and how it works.
Suggestion: you said that you're doing a switch. Test it without calling Ipv4GlobalRoutingHelper::PopulateRoutingTables () !

T.

shin...@gmail.com

unread,
Jan 25, 2015, 9:59:04 AM1/25/15
to ns-3-...@googlegroups.com

Thanks, I tried that and solved the issue.
Reply all
Reply to author
Forward
0 new messages