Re: CSMA

From: Pascal Bourguignon (spam_at_mouse-potato.com)
Date: 09/24/05


Date: Sat, 24 Sep 2005 23:33:56 +0200


"rishi.shah@patni.com" <rishi.shah@patni.com> writes:

> I am implementing a project in c++/unix in which I need to simulate a
> CSMA MAC layer.
> The project is a simulation of peer to peer network where is each peer
> is a process on some unix machine. Though each client has a separate
> TCP communication line, I have to assume that they have a common line
> and each of the process has to follow the CSMA mechanism while
> transmitting that is if there is a collision while transmitting then
> both the processes have to revert back and transmit after some random
> interval of time. I have to assume that the entire network is runnning
> on a 9.6kbps line. Each peer notifies every other client if it sends a
> packet on the common line.
> I am struggling as to how to design such a network where I have to
> detect a collision since there is no delay in the unix socket
> communication. One idea could be to send the packet to a recipient,
> wait for x msec and then send a signal to the recipeint to go ahead. If
> the sender receives a packet from some other source during the xmsec
> wait time then it will not send the signal and the recipient will
> discard the packet.
> Are there any better ideas to solve this problem?

You need to have a line object and some packet objects, and the line
objects will be given packet objects at times and will compute when
there's a colision.

If your simulation runs on a distributed network, you have to maintain
a common clock to avoid some remote node sending packets in the past.

-- 
"I have challenged the entire quality assurance team to a Bat-Leth
contest.  They will not concern us again."


Relevant Pages

  • Re: CSMA
    ... > The project is a simulation of peer to peer network where is each peer ... > transmitting that is if there is a collision while transmitting then ... I have to assume that the entire network is runnning ... One idea could be to send the packet to a recipient, ...
    (comp.unix.programmer)
  • CSMA
    ... CSMA MAC layer. ... The project is a simulation of peer to peer network where is each peer ... One idea could be to send the packet to a recipient, ...
    (comp.unix.programmer)
  • alt.2600 FAQ Revision .014 (2/4)
    ... One type of firewall is the packet filtering firewall. ... Dropping packets instead of rejecting them greatly increases the time required to scan your network. ... Port scanning UDP ports is much slower than port scanning TCP ports. ... Chartreuse Use the electricity from your phone line Cheese Connect two phones to create a diverter Chrome Manipulate Traffic Signals by Remote Control ...
    (alt.2600)
  • RE: Securing a Local Network
    ... Show the Management of your company the insecurity of the Peer to Peer ... setup and discuss what risks are they willing to accept. ... -Cost of getting the web server and the mail server internally versus having ... -Use an older box for Intrusion Detection on the internal network as well. ...
    (Security-Basics)
  • Re: War
    ... you do realise that with most internet connections this is simply ... Because the entire point with "peer to peer" is to place all the processing ... at the "edges" of the network (that is, the peer machines do all the actual ... bandwidth so the bandwidth of the entire network becomes the _combination_ ...
    (alt.lang.asm)