5. Link layer

ushin20
|2023. 5. 1. 16:13

1. Link layer

wired links, wireless links, LANs

different link protocol over different link

NIC (network interface card)를 통해 link layer 접속

 

Framing, link access

MAC address가 header에 추가되어 destination에서 사용됨

 

Reliable delivery between adjacent nodes

wired link에서는 bit-error가 low

wireless link에서는 high bit-error

 

Error detection

noise에 의해 error가 발생함

receiver가 retransmisson이나 frame drop을 보고 error가 발생했음을 알 수 있음

 

Error correction

receiver가 bit error를 retransmission 없이 corrects할 수 있음

 

Flow control

Half-duplex, Full-duplex

 

 

2. MAC address

기기를 specify하기 위해 필요한 고유 넘버

Manufacturer identifier : Random digits allocated by manufacturer

 

 

3. ARP (address resolution protocol)

dest가 subnet에 존재할 때, IP address를 가지고 dest를 찾음

(1) router에서 ARP request message about IP address broadcast on subnet

(2) one host response

(3) router to host packet 전달

 

 

4. Multiple Access Link

bandwidth가 R일 때, link를 사용하는 노드의 수를 N이라 한다면, 모두 R/N만큼 주는게 목표

 

4.1. Channelization protocol

TDMA slot frame마다 RR 실행
FDMA frequency마다 실행
OFDMA time + frequency마다 실행
CDMA frequency + power마다 실행

 

4.2. Random Access protocol

Collision 해결이 제일 중요한 문제 (collision시 data 전송 실패)

Pure Aloha User가 원할때, 전송
Max throughput rate = 18.4%
Slotted Aloha Time slot을 만들어서 해당 slot에 맞게 user가 전송
Max throughput rate = 36.8%
CSMA carrier sensing으로 link가 사용되고 있는지 확인하고 packet 전송
CSMA/CD
(wired)

CSMA with collision detection -> channel이 idle일 때 전송

(1) 1-persistent
channel을 계속 sensing하다가,
channel이 idle이면 바로 전송

(2) p-persistent
channel을 계속 sensing하다가, channel이 idle이면 p의 확률로 전송

(3) non-persistent
random하게 wait을 하다가 channel이 idle이면 전송, busy면 다시 random하게 wait
Collision 발생하면, current transmission 중단
random time에 retransmission 진행
collision이 일어날 때마다, random time interval x2
-> binary exponetrial backoff
CSMA/CA
(wireless)
CSMA with collision avoidance -> channel이 idle이면 window size 내에서 random하게 전송

802.11 DCF
동등한 우선순위를 가지고 경쟁하는 방식
(1) IFS
Channel이 idle해도 대기 시간을 가짐
  -  SIFS (short IFS) :  data frame과 ack의 교환 in process
  -  DIFS (DCF IFS)  :  channel idle 파악을 위한 시간

(2) Contention window
backoff time = contention window x slot time
DIFS 이후 각 station은 backoff time을 기다리고 channel을 사용함
남은 backoff time이 없으면 channel 사용

(3) 전체 과정
- DIFS channel idle 판단
- backoff time 소모
- backoff time이 없는 station에서 packet 전송
  (DATA전송+SIFS+ACK전송) 시간 소모
- 다시 DIFS 수행

 

4.3. Controlled Access protocol

Reservation 미리 예약해두고 사용
Polling 말하고 사용
Token passing token 있어야 사용

 

 

 

 

 

'Study > Network' 카테고리의 다른 글

6. Mobile  (0) 2023.05.01
4. Network layer  (0) 2023.05.01
3. Transport layer  (0) 2023.05.01
2. Application layer  (0) 2023.05.01
1. Overview  (0) 2023.05.01