Back to Browse

ns3 Simulator tutorial - Two LANs and two routers

10.2K views
Jan 3, 2020
12:20

This is an example that I created. It is a modified version of examples/tutorial/second.cc In this example we have two Ethernet networks, LAN1 & LAN2 connected to one another. Ethernet network uses CsmaNetDevice. LAN1 nodes are attached to one Channel object of type CsmaChannel. This means that nodes in LAN1 can access one another directly. LAN2 nodes are attached to their own Channel object of type CsmaChannel as well. Router 1, and Router 2 are part of LAN1 & LAN2 respectively, but they also have an additional device of type PointToPointNetDevice and they attach to a single PointToPointChannel object. I test this by using UdpEcho client & server supplied by ns3. Downloading The Code =================== The code can be downloaded from my github repository. You can find it in the 'examples/TutorialLesson' directory on this link https://github.com/addola/NS3-HelperScripts git clone https://github.com/addola/NS3-HelperScripts.git PayPal Donations are appreciated, but please don't do it if you're broke. You don't owe me anything: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SEBM3SXHB55NS

Download

1 formats

Video Formats

360pmp421.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

ns3 Simulator tutorial - Two LANs and two routers | NatokHD