The problem statement is to write a program to simulate an Ethernet network on a SINGLE MACHINE and code it

The problem statement is to write a program to simulate an Ethernet network on a SINGLE MACHINE and code it

Question:

The problem statement is to write a program to simulate an Ethernet network on a SINGLE MACHINE and code it in C language. The various ethernet stations will be modelled as processes running on the same machine, each process representing a “network card” of each Ethernet station. Now, a process will send some message (say just a few bytes for simplicity) to another process, which will contain the destination and source address and some data. This sending will represent ethernet communication. Collision on the ethernet cable will be detected by CSMACD (carrier Sense Multiple Access Collision Detection) method where the process reads the bus to see if some other process is transiting or not and accordingly either transmits or waits for a random amount of time. This is how it as to be simulated.

How to simulate the common bus or “cable” of the ethernet?

Expert Answer:

Answer rating: 100% (QA)

Simulating a common bus or cable for an Ethernet network on a single machine in C involves creating multiple processes representing Ethernet stations
View the full answer