
router가 패킷을 처리하는 방법은 두 가지로 나뉠 수 있다.
Time-critical: fast path
거의 모든 패킷들에게 영향을 주기 때문에 highly optimized 되어야 하는 패킷을 처리할 때 이 방법을 사용한다.
두 단계로 나뉜다.
1. Header processing
- packet validation
- packet lifetime control
- calculate TTL and checksum
2. Forwarding
- dst. address lookup
- 서비스에 따른 패킷의 분류
- packet buffering
- queue 관리 및 스케쥴링
Fast path는 대부분 하드웨어에 기능이 구현되어 있다.
Non-time-critical: slow path
Management, control, error handling을 위한 패킷을 처리하는 방법이다.
- fast path 과정이나 ICMP(TCP/IP에서 IP 패킷 처리할 때 일어난 문제를 알려주는 프로토콜) 패킷을 생성하는 과정에서 오류가 발생했을 시 해당 패킷 처리
- keep-alive/update 메세지 처리
- ARP
- Packet Segmentation 처리
Slow path는 대부분 소프트웨어(CPU 등)에 구현되어 있다.