Is MAC (Media Access Control) considered a protocol? - networking

I am currently learning about networking. I am going through the TCP IP and OSI model and try to pick apart what protocol belongs to which layer. I am a bit confused over Media Access Control. Does it just refer to the hardware id of the network card or is it the name of the protocol responsible for it? I tried to find any RFCs for MAC on IETF to provide some definitions for me, but I couldn't find anything.

"MAC" stands for media access control - it's a sublayer of the data link layer (L2) in the OSI model.
One of the most popular protocols in this layer is Ethernet which covers the physical layer and the data link layer. You can find all about Ethernet at IEEE 802.3 (requires registration but is free).
Another extremely popular L1/L2 protocol stack is WiFi (IEEE 802.11) but that's a lot more complicated and hard to start with.

No, the MAC is not a protocol in that you won't find any 'MAC spec' that you can implement. MACs are typically embedded in hardware devices and expose functionality to send and receive frames to the media that they're controlling.
How they expose that functionality is up to the manufacturer of the MAC. They don't follow any standard protocol. You might find simple SPI interfaces, register-based access, DMA transfer or others.

Related

Is ARP contained into MAC sublayer (OSI Model)?

Well, I've read that the Data Link layer is further divided into LLC and MAC sublayers.
However, the description of the MAC functions seems just like what the ARP does, which left me a bit confused.
Is the MAC sublayer a purely conceptual thing while the ARP is a concrete implementation?
Thanks in advance for your patience :)
The main point of the MAC sublayer of the data-link layer is to abstract hardware details to the LLC, which is often implemented in software. Therefore the way, how an ARP request is implemented actually depends on the physical medium below - but I'd say ARP in general is just a service part of the MAC layer whose implementation depends on various linklayer protocols (e.g. Ethernet vs Wifi).

Transmitting data rate and Receive Window Size

Nowadays, I am making a project relating to protocol communication between 2 FPGA.
When I read information about TCP/IP ethernet, the window receive which the amount data that computer can accept.
And there are a relationship between Window receive and transmitting data rate.
But in my project, I connect two FPGA by Aurora Protocol (Xilinx) not TCP/IP. I wonder that is there definition as window receive for protocol between 2 FPGA ?
I am not good at about electronics as well as networks.
Thanks
I am not much aware of Aurora Protocol (link level), but it is not directly comparable to TCP/IP which is a higher level protocol. See OSI Model.
The TCP/IP sliding window mechanism helps in providing a reliable transmission by controlling the flow of packets between sender and receiver. The Ethernet which is usually the link layer for TCP/IP has its own flow control mechanisms.
Check the section 3 of this document which might give you some insight.

same functionality in osi model

Transport layer and datalink layer of OSI model provide similar functionality. If one of said was already there, why was the other needed
They do provide some similar functionality, but at a different level. The link layer provides for communications for MAC addresses on the same LAN; the transport layer provides for communication between any devices anywhere.
A good design typically includes the concept of separation of concerns. That is, the data link layer need only be concerned with how to get packets to other hosts on that specific link. Remember that Ethernet is not the only link type in the world. You might need to get packets to the other side of a PPP link over an analog modem. Since the network layer is separate, you can use a different data link type and your network layer packets can remain the same.
You may refer to an image here for reference.
Physical: Only knows about bits. Handled byires and hubs
Data Link: Knows about MAC addresses. Handled by layer 2 switches
Network: Knows about IP addresses. Handled by routers or layer 3 switches
Transport: TCP comes here

Linux TCP stack packet injection

Could i inject packets to Linux TCP stack without modifying the ethernet driver? Could i do this with using a library or sth ?
Thank you,
If by 'inject packets to Linux TCP stack' you mean send some data that the Linux kernel will treat as a frame coming from an Ethernet interface then you can use a 'tap' device. If an IP packet (layer 3) is good enough, then use a 'tun' device.
http://en.wikipedia.org/wiki/TUN/TAP
http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/networking/tuntap.txt
Libnet
Libnet is a generic networking API that provides access to several protocols. It is not designed as a 'all in one' solution to networking. Currently many features that are common in some network protocols are not available with Libnet, such as streaming via TCP/IP. We feel that Libnet should not provide specific features that are possible in other protocols. If we restrict Libnet to the minimal needed to communicate (datagram/packets) then this allows it to support more interfaces.
Otherwise, if you're just wondering about injecting hand-crafted packets into the network, read the man pages and look for online help with raw sockets. Some good places to start are man 7 raw, man packet, and there are some ok tutorials at security-freak.net, though the code there is not written particularly well for my tastes.

How Ethernet receives the bits and forms the Data Link Layer Frame

I am curious to know how the incoming bits at the physical layer are properly framed and sent to the data link layer. How the OS deal with this process.
It would be grateful if you explained it in detail or give me some links/pdf.
I am interested to know in depth about Layer 1 and 2 operations.
Advance Thanks.
The physical layer depends on your hardware. You're probably connected via ethernet, see here. The operating system doesn't do a lot here, it's mostly left up to the network card and the device drivers written by the card's manufacturer.
The good thing about today, is you seldom have to remember anything but Google.
http://en.wikipedia.org/wiki/Ethernet
However, the question is NOT about the physical layer as that is really the wires and interfaces for the wires; hence physical connections. His questions addresses the Data-Link layer in OSI Model terms.
As Ethernet Does not match the OSI model and the fact that the OSI model is a strategic rather than a tactical model, in Ethernet terms you are interested in the 802.3 MAC Frame. But then as Ethernet is old, there are actually a several of different EtherTypes.
For sharing the data, some protocol is needed as human .so here 7 layers are given .
Physical layer direct connect with the hardware( when pulse sends in Bit format ).
It deals with mechanical and electrical specification of the interface and transmission medium.
OS have only authority to run the application not any participation in any software .
If you want detail then better read SIGNAL AND SYSTEM.

Resources