LAN Switching
| Done |
|---|
Ethernet Data-link Header
Preamble
It is used to synchronize the receiver`s clock. Also, it is 7 bytes long, each being 10101010
SFD
Indicates that the end of the preamble and the beginning of the rest of the frame. It is 1 byte long, being: 10101011.
Destination
MAC Address (Physical Address) of the device to receive this frame
Source
MAC Address of the device that sent this frame
Type or Lenght
It is 2 bytes long, and if it is 1500 or less, it is a Length field, but if it is 1536 or greater it is a Type field.
Length
Indicates the size of the Packet (L3PDU), which can be 46-1500
Type
Indicates the type of the Packet (L3PDU). Example: 0x0800 indicates a IPv4 Packet
Packet
FCS
By using a complex formula, the result is matched with the sender of the frame, to check if any errors affected the frame.
CRC = Cyclical Redundancy Check
The Preamble+SFD is not considered part of the ethernet header and trailer. Therefore, the size of those are 18 bytes (6+6+2+4).
Unicast Frame
It is a frame destined to a single target.
Unknown Unicast Frame
If the destination`s MAC Address is not known to the switch, in other words, not present in its MAC Address table, it floods the interfaces besides the sender`s one. Therefore, the intended receiver will receive its frame and the other will drop each frame.
Known Unicast Frame
Differently from the occasion above, the destination`s MAC Address is referenced in the MAC Address table of the switch, so it forwards the frame only to the destination`s interface
Dynamically (learned) MAC Address
After receiving a frame, a switch adds the source mac address of the frame to its MAC Address table and associates it with the interface that the frame came from.
The minimun frame’s size is 64 bytes. Therefore, if we subtract the 18 bytes of the header and the trailer, the minimun payload is 46 bytes. So if a packet contais less than 46 bytes, paddings are added with zeros to fill that gap.
ARP (Address Resolution Protocol)
This protocol is a Layer 2 protocol used to discover a device’s MAC address when its IP address (Layer 3) is known.
Consists of:
- ARP Request
It is a broadcast frame that tries to reach the destination of the specified IP address.
💡Note: The Destination’s MAC Address of a broadcast frame is FFFF.FFFF.FFFF
- ARP Reply
It is a unicast frame that responds with the desired MAC Address of the original destination IP Address
In the PC, there is what is called an ARP Table. In which the computer remembers a device’s MAC Address and its associated IP Address.
Show MAC Address table CLI
show mac address-table Clear MAC Address table (Aging)
clear mac address-table dynamic
clear mac address-table dynamic address {MAC ADDRESS}
clear mac address-table dynamic interface {INTERFACE}Ping
It is an utility to know reachebility thorugh the use of ICMP (Internet Control Message Protocol).
- ICMP Echo Request
It is the broadcast frame sent
- ICMP Echo Reply