Step-by-step procedure for setting up CSMA/CD LANs
We have already learned how to set up a simple LAN in Chapter 3, ns-3 Key Building Blocks for Simulations, which helps to connect hosts in a network and exchange their data traffic. Now, we are going to learn a more realistic LAN setup (refer to Figure 4.1), which is generally deployed in educational institutes, offices, and common workspaces:

Figure 4.1 – A realistic CSMA/CD LAN setup
In this hands-on activity, we set up CSMA/CD LANs with the following objectives:
- Set up individual LANs for specific workplaces such as labs, departments, and so on
- Connect each LAN using CSMA links of link speed: 1 Gbps and delay: 1 ns
- Interconnect LAN-1 and LAN-2 using a router using CSMA link speed: 500 Mbps and delay: 1 ns
- Configure separate subnet IP addresses for each LAN to limit broadcast traffic
- Test link speed within a LAN
- Test link speed between LANs
- Demonstrate how to share...