How to best simulate a modern Ethernet network using a switch/hub?

92 views
Skip to first unread message

GBH

unread,
May 11, 2023, 4:55:17 PM5/11/23
to ns-3-users
I have been using a ns-3 CSMA net to simulate an Ethernet network.  But CSMA seems to simulate the classic co-axial Ethernet, which is no longer how a modern Ethernet works based in the use of an intelligent switch or a hub that allows multiple pairs of stations to communicate simultaneously.

In addition, modern home router seamlessly integrates a wired and a WiFi LAN together.  Can we simulate this environment in ns-3 as well?

Thanks!

Tommaso Pecorella

unread,
May 11, 2023, 6:38:17 PM5/11/23
to ns-3-users
Hi,

WiFi and Ethernet in the same node is not an issue - it just depends on what you mean by "seamlessly".
Switched Ethernet... is an open issue.

First thing first: seamlessly. Usually home routers do this integration seamlessly just because they pack a lot of things with "standard" configurations and the user doesn't even check what's inside (if they would they'd be horrified):
  • Router,
  • NAT,
  • RADVD,
  • Access control
  • WiFi,
  • etc.
The only thing that is not in ns-3 is... NAT (and there's no short-term plan to add it). Access control is usually unnecessary for simulations.
You'll have to configure the various services tho, because we don't have a "standard" home router configuration. Speaking of, it might be a good idea: a helper to setup a home router-like device.

About switched Ethernet, we had some half-finished modules implementing a switched ethernet, but none of them made it to the point of being integrated. Contributions are welcome (as usual). Right now the "closest" thing is using a node acting as a router and several P2P links between the devices. It's a non-optimal model, but it should be "close enough". At least until someone will be motivated enough to make a good model for switched Ethernet. 

GBH

unread,
May 12, 2023, 12:39:00 PM5/12/23
to ns-3-users
Tommaso,

Thanks for your quick response.  I think your suggestion of having a ns-3 helper class to help us set up a home router like network is a great idea.

I guess what I mean by "seamless" is that a home router allows both wired and wireless devices appear to be living in the same LAN (and in the same subnet) without knowing that, in reality, the home router may have used a bridge-like device to bridge the wired LAN with the WiFi LAN.

Tom Henderson

unread,
May 12, 2023, 4:46:50 PM5/12/23
to ns-3-...@googlegroups.com
Regarding the past work on this, the most recent work that I'm aware of
is here:
https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/431

It links to past work that can be found from our wiki:
https://www.nsnam.org/wiki/Current_Development#CSMA_model

The main reason that the past work did not merge to ns-3-dev was that it
was lacking unit/regression tests and documentation about what exactly
was being modeled.
Reply all
Reply to author
Forward
0 new messages