How to connect Two different networks (INternet example)

251 views
Skip to first unread message

RBM-IT

unread,
Sep 16, 2014, 5:25:39 AM9/16/14
to ns-3-...@googlegroups.com
Hello everyone,

I am a new user of ns-3. I started reading the tutorial and a lot of examples.

Now i am trying to implement my scenario based on third.cc example. 

In fact i want to connect mobile nodes via wifi to a server (in the cloud). Mobile nodes are connected to different APs with different IP addresses.

Thus I want to know how to connect all these networks (APs) to the server (node in another network). Is it better to have a node as a router ? or CSMA link? or both (router (APs) and Switch (server-network) )

Please guide me :)


Thank you for your answer.

Tommaso Pecorella

unread,
Sep 16, 2014, 9:29:07 AM9/16/14
to ns-3-...@googlegroups.com
Hi,

it depends on the network topology you want to simulate and test. The solutions you said are all (more or less) viable, but they are quite different.
May I suggest to analyze a bit more your network and its routing requirements ? Before simulating, maybe it's best to have a clear idea of the difference between a bridge, a switch and a router, and ns-3 isn't the best wayto clarify these concepts. A book is definitely easier and clearer.

Cheers,

T.

RBM-IT

unread,
Sep 16, 2014, 9:35:59 AM9/16/14
to ns-3-...@googlegroups.com
Hello Tomasso,

Thank you for your answer. I almost know the difference between bridge router and switch since i had networking studies. I can imagine the real architecture but i don't know if all the nodes mentioned before exist in ns-3 or not. 

In other words, I have a set of networks and i want them to communicate. what is the missed element? to my mind a router ...

Any suggestions for an example that is closer to my scenario.. I looked into mixed-wireless.cc as well.

Any recommendations are welcomed since i am really a totally new user to simulations and ns-3 ..

Regards

Tommaso Pecorella

unread,
Sep 16, 2014, 12:31:29 PM9/16/14
to ns-3-...@googlegroups.com
Hi,

that clarify a lot your request...
- Bridge/Switch: it's implemented by the BridgeNetDevice. It works... like a bridge (and like a switch).
- Router: any node can be a router. As a matter of fact, any IPv4 node is a router by default (for IPv6 it's the opposite).
What's missing is a hub, but... see below.

NetDevices. A NetDevice is a model for a Network Device (hence the name). You can play with different technologies like:
- LTE
- WiFi
- 802.15.4
- WiMAX
- csma and point-to-point

Mind that CSMA and PointToPoint are similar to an Ethernet and a serial link,but they are also quite different. E.g., CSMA is similar to a bus Ethernet (the old Think and Thick Ethernet), and it's not extremely realistic for modern star topologies for what collisions are concerned. Anyway, it will only matter if you want to play with very high speed networks.

My suggestion is to read the tutorial and the first manual chapters, then to play a bit with the examples. Of course, feel free to ask if you have any doubt.

Cheers,

T.

RBM-IT

unread,
Sep 16, 2014, 12:42:07 PM9/16/14
to ns-3-...@googlegroups.com
Thank you, you clarified most of the points.
I stopped by the tutorial (90%), and i am using in parallel all documentation as well as this group.

I will start first with a simple router, then extend my architecture with more elements like switches or hub.

Regards

mehrdad manoochehri

unread,
Apr 12, 2017, 10:38:27 AM4/12/17
to ns-3-users
Hello.  can you help how to use a router in order to connect two different networks for Ipv4?

Tommaso Pecorella

unread,
Apr 22, 2017, 9:19:00 AM4/22/17
to ns-3-users
Yes, of course. But first...
1) Read the posting guidelines,
2) Read (and understand) the ns-3 tutorial,
3) Re-read the posting guidelines.
4) Check the ns-3 examples.
5) Re-re-read the posting guidelines.

T.
Reply all
Reply to author
Forward
0 new messages