Jørgen Nordmoen
unread,Mar 27, 2012, 8:45:49 AM3/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ns-3-...@googlegroups.com
Hello.
I'm having a problem trying to crate a p2p to p2p network and then connecting the nodes to a TapBridge. What I want to do is create one node('server'), another node('router') and a third node('client') where there is a dedicated point to point link between 'server' and 'router' and between 'router' and 'client'. Then I want to connect each of the nodes to a TapBridge so I can connect to them from the outside. The problem is that when I create the devices from the point to point helper there is only communication from the TapBridges between the two nodes from the same device container.
To illustrate:
[code]
Ptr<Node> esb = CreateObject<Node> ();
Ptr<Node> r = CreateObject<Node> ();
Ptr<Node> client = CreateObject<Node> ();
NodeContainer net1 (esb, r);
NodeContainer net2 (r, client);
NodeContainer all (esb, r, client);
NodeContainer shortCut (esb, client);
PointToPointHelper p2p;
p2p.SetDeviceAttribute ("DataRate", StringValue (constDataRate));
//pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
NetDeviceContainer esbToRouterDevices;
esbToRouterDevices = p2p.Install (net1);
p2p.SetDeviceAttribute ("DataRate", StringValue (dataRate));
//pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
NetDeviceContainer routerToClientDevices;
routerToClientDevices = p2p.Install (net2);
TapBridgeHelper tapBridge;
tapBridge.SetAttribute ("Mode", StringValue ("UseLocal"));
tapBridge.SetAttribute ("Mtu", UintegerValue(mtu));
//Tap bridge setup for ESB
std::cout << "Adding tap bridge: tap-1\n";
tapBridge.SetAttribute ("DeviceName", StringValue ("tap-1"));
tapBridge.Install (esb, esbToRouterDevices.Get(0));
//Tap bridge setup for router
std::cout << "Adding tap bridge: tap-2\n";
tapBridge.SetAttribute ("DeviceName", StringValue ("tap-2"));
//tapBridge.Install (r, esbToRouterDevices.Get(1));
tapBridge.Install (r, routerToClientDevices.Get(0));
//Tap bridge setup for router
std::cout << "Adding tap bridge: tap-3\n";
tapBridge.SetAttribute ("DeviceName", StringValue ("tap-3"));
//tapBridge.Install (client, routerToClientDevices.Get(1));
tapBridge.Install (client, esbToRouterDevices.Get(1));
[/code]
The problem is, depending on which devices I extract the nodes from, only the nodes from the same device container can communicate.
Is there any solution to this problem or is there another way for me to create a similar network where I can control the sending rate from the 'server' to the 'router' and so on. The reason I ask is because I need some cases that are more advanced than this test case and need to have "router" nodes in the network.
Best regards Jørgen Nordmoen.