Point to Point connections and TapBridge problem

356 views
Skip to first unread message

Jørgen Nordmoen

unread,
Mar 27, 2012, 8:45:49 AM3/27/12
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.

Luca Costantino

unread,
Mar 27, 2012, 8:58:35 AM3/27/12
to ns-3-...@googlegroups.com
Il 27 marzo 2012 14:45, Jørgen Nordmoen <nordm...@gmail.com> ha scritto:
> 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.

how are the node supposed to talk to each other without routing policies?


--
Chiave pubblica http://luca.costantino.googlepages.com/luca.costantino.asc

Prima di tutto vennero a prendere gli zingari e fui contento, perché
rubacchiavano.
Poi vennero a prendere gli ebrei e stetti zitto, perché mi stavano antipatici.
Poi vennero a prendere gli omosessuali, e fui sollevato, perché mi
erano fastidiosi.
Poi vennero a prendere i comunisti, e io non dissi niente, perché non
ero comunista.
Un giorno vennero a prendere me, e non c’era rimasto nessuno a protestare.
(Martin Niemöller)

Jørgen Nordmoen

unread,
Mar 27, 2012, 9:04:01 AM3/27/12
to ns-3-...@googlegroups.com
Outside of the NS3 emulation I set up ARP tables in LXC which setts up all nodes in the network with the correct IP and Mac address, I'm using this framework: http://code.google.com/p/mobiemu/

On Tuesday, March 27, 2012 2:58:35 PM UTC+2, Luca Costantino wrote:

Jørgen Nordmoen

unread,
Mar 27, 2012, 9:24:12 AM3/27/12
to ns-3-...@googlegroups.com
I can add that when I instead in the code I pasted use just the shortCut nodes and not have any 'router' node the communication work. I have also tride to start a ping session from the 'router' node which is able to ping the one node in the same device group eg. if I use esbToRouterDevices in the TapBridge helper the esb and router node can ping each other, but if I use routerToClientDevices the router and client can ping each other.
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/as94jnQBWYcJ.
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.
Reply all
Reply to author
Forward
0 new messages