Notes on preparing a demo MAC model
I am working on a MAC model for demo. The model will be like:
- MAC as a root process model (based on simple_mac model from Session 1510 LAb of OPNETWORK)
- child process models for CSMA, ALOHA, slotted ALOHA respectvely
- used with a simple networking/routing layer
simple_mac can assign MAC addresses automatically, based on a global address pool. And the ARP model will also reference this address pool to do address resolution. The two address schemes, i.e. IP addresses and MAC addresses (or MAC identifiers), may not necessarily be needed, though it's the real-life fact.
Since we can reference an IP address in a higher layer application, such as a web browser, FTP client or PING program, why cannot we just use one address scheme all whole the protocol stack?
This sounds violating the principle of layering. Yes, it does. But we're violating it all the time, for the sake of less implementation effort and performance of running.
So I decide to use only 1 address scheme.
Network Layer PDU format:
- Source Address
- Destination Address
- Hop Limit
- Tag (a random integer)
Network Layer module:
- prepend a network layer header to upper layer SDU
- populate the fields of the network layer header (generate a tag via random number generator)
- on receiving a PDU from other nodes, deliver it to upper layer if it's destined for this node, otherwise re-send it after decreasing Hop Limit
MAC module:
- send out (broadcast) the network layer PDU
- implement CSMA to reduce collisions
There's no MAC header. So why do we need a MAC layer in this example? It's because we need it to perform CSMA (or other MAC algorithms).
阅读(1133) | 评论(0) | 转发(0) |