add ethernet lan part 2
This commit is contained in:
111
05. Ethernet LAN Switching (part 1).md
Normal file
111
05. Ethernet LAN Switching (part 1).md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: 1772845705-JEBL
|
||||
aliases:
|
||||
- Ethernet LAN Switching
|
||||
tags: []
|
||||
---
|
||||
|
||||
# Ethernet LAN Switching (part 1)
|
||||
|
||||
## [[OSI model]] - physical layer
|
||||
|
||||
- Defines physical characteristics of the medium used to transfer data between devices
|
||||
- For example, [[voltage]] levels, maximum transmission distances, physical connectors, cable specifications, etc..
|
||||
- Digital [[bits]] converted into electrical (for wired connections) or radio (for wireless connections) signals
|
||||
- All of the information in day 2 [[02. Interfaces and Cables]] (cables, pin layout, etc.) is related to the Physical layer.
|
||||
|
||||
## OSI model - Data Link Layer
|
||||
|
||||
- Provides node-to-node connectivity and data transfer (for example, PC to switch, switch to router, router to router)
|
||||
- Defines how data is formatted for transmission over a physical medium (for example, copper UTP cables)
|
||||
- Detects and (possibly) corrects Physical Layer errors.
|
||||
- Uses Layer 2 addressing separate from Layer 3 addressing
|
||||
- Switches operate at Layer 2.
|
||||
|
||||
## OSI Models - PDUs
|
||||
|
||||
Layer 4 header - Data
|
||||
Layer 3 header - Segment
|
||||
Layer 2 header - Packet
|
||||
Layer 1 header - Frame
|
||||
|
||||
Protocol Data Units | PDUs
|
||||
|
||||
## Ethernet Frame
|
||||
|
||||
ethernet header | Packet | Ethernet Trailer
|
||||
|
||||
### Ehternet Header
|
||||
|
||||
Preamble | Start Frame Delimiter (SFD) | Destination | Source | Type or Length
|
||||
7 bytes 1 byte 6 byte 6 byte 2 bytes
|
||||
|
||||
#### Preamble
|
||||
|
||||
- Length : 7 Bytes (56 bits)
|
||||
- Alternating 1's and 0's
|
||||
- 10101010 * 7
|
||||
- Allows devices to synchronize their receiver clocks
|
||||
|
||||
#### SFD
|
||||
|
||||
- Start Frame Delimiter
|
||||
- Length: 1 byte (8 bits)
|
||||
- 10101011
|
||||
- Marks the end of the preamble, and the beginning of the rest of the frame
|
||||
|
||||
#### Destination & Source
|
||||
|
||||
Indicate the devices sending and receiving the frame
|
||||
- Consist of the desination and source [[MAC Address]]
|
||||
- MAC = Media Access Constol
|
||||
- = 6 byte (48-bit) address of the physical device
|
||||
|
||||
#### Type / Length
|
||||
|
||||
- 2 byte (16-bit) field
|
||||
- A value of 1500 or less in this field indicate the LENGTH of the encapsulated packet (in bytes)
|
||||
- A value of 1536 or greater in this field indicates the TYPE of the encapsulated packet (Usually [[IPv4]] or [[IPv6]])
|
||||
and the length is determined via other methods
|
||||
|
||||
IPv4 = 0x0800 ([[hexadecimal]])
|
||||
(2048 in decimal)
|
||||
IPv6 = 0x86DD (hexadecimal)
|
||||
(34525 in decimal)
|
||||
|
||||
### Ethernet Trailer
|
||||
|
||||
Frame Check Sequence (FCS)
|
||||
4 bytes
|
||||
|
||||
#### Frame Check Sequence
|
||||
|
||||
- 4 bytes (32 bits) in length
|
||||
- Detects corrupted data by running a 'CRC' algorithm over the received data
|
||||
- CRC = Cycling Redundancy Check
|
||||
|
||||
## Mac Address
|
||||
|
||||
- 6-byte (48-bit) physical address assigned to the device when it is made
|
||||
- AKA ' Burned-in Address' (BIA)
|
||||
- Is globally unique
|
||||
- The first 3 bytes are the OUI (Organizationally Unique Identifier), which is assigned to the company making the device
|
||||
- The last 3 bytes are unique to the device itself
|
||||
- Written as 12 hexadecimal character
|
||||
|
||||
Unicast frame: a frame destined for a single target
|
||||
|
||||
### Dynamically learned Mac Address
|
||||
|
||||
Is a mac address learned by the switche automatically by looking at the frame Destination Frame
|
||||
|
||||
if the Mac address is not in the switch mac address table it will flood the frame (send the frame at all the interfaces except the source mac address)
|
||||
until the PC replied to another pc
|
||||
**Unknown Unicast Frame** -> *Flood*
|
||||
|
||||
if the Mac address is knowned by the switch it will directly send it in the interface
|
||||
**Known Unicast Frame** -> *Forward*
|
||||
|
||||
*Dynamically Mac Addresses are removed from the MAC address table after 5 minutes of inactivity*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user