Computer Network Summary

TCP/IP is generally used for computer networks rather than the OSI model.


Network Layer Summary

1. Destination-based forwarding

200.23.16.0~200.23.23.255 => 0
200.23.24.0~200.23.24.255 => 1
200.23.25.0~200.23.31.255 => 2
otherwise => 3

longest prefix matching

왼쪽에서 오른쪽으로 패턴 비교 -> 일치하는 패턴의 길이가 가장 긴 것으로 인터페이스 결정


2. Switching fabrics

N개의 입력 포트가 있고, R의 속도로 패킷이 들어오고 있다면, switching fabrics에서 적절하게 패킷을 처리하려면, NxR의 속도가 돼야지 보내는 데이터와 내보내는 데이터의 딜레이가 없이 적절히 처리할 수 있다.


Input port queuing

한 시퀀스가 지나갔을 때는 다음과 같이 처리됨. 같은 색에 매칭되며 전달되는 구조이므로, 처음 초록색 output에는 아무 것도 안 옴

Output port queuing

라우터의 output port에 큐가 있는데, 버퍼라고 한다. 버퍼는 패킷이 라우터에 도착을 해서 switch fabric이 output port에 전하게 되는데, switch fabric이 처리하는 속도가 output port보다 빠르면 버퍼에 저장하는 개념이다. (큐를 사용하면 위처럼 빨간 패킷이 output port에서 쌓일 수 있음)


3. Dotted-decimal IP address notaiton

232개의 호스트에 대한 주소를 가질 수 있음


4. Subnet

작은 단위의 네트워크 (하늘색)
192.168.0.1이란 아이피가 있을 때, 192는 network id, 나머지는 host id가 된다. 근데 192.168이 network id가 될 수도 있다.

A class의 network id의 범위는 00000000~01111111이다.
즉 0부터 127까지이다. => A class subnet

B class는 10000000.00000000 ~ 10111111.11111111이다.
즉 128.0부터 191.255까지이다. => B class subnet

C class는 11000000.0.0 ~ 11111111.255.255이다.
즉 192.0.0부터 255. 255. 255까지이다.


5. NAT

all devices in local network share just one IPv4 address as far as outside world is concerned

LAN 안에 Host가 아무리 많아도 공인 IP만 사용해서 전달함 -> IPv4의 IP 부족 문제를 해결하였음

public ip에 해당하는 nat router로 이동한다.
nat router는 private ip에 해당하는 기기로 이동시킨다.


Transport Layer Summary

TCP: reliable, in order delivery, congestion control, flow control
UDP: unreliable, unordered delivery

TCP는 Transmission Control Protocol로 연결지향적이다.
UDP는 User Datagram Protocol로 비연결지향적이다.

congestion constrol: 네트워크 혼잡을 피하기 위해 패킷 양을 조절함
flow control: 수신자의 상황을 확인해가며 패킷 양을 조절함

Multiplexing: 여러 프로그램의 소켓들로부터 들어오는 데이터를 수집해서 세그먼트를 만들어 하위 레이어로 전송하는 것
Demultiplexing: 하위 레이어로부터 수신된 세그먼트를 여러 개의 소켓에 잘 분배하는 것

TCP: Transmission Control Protocol

– point to point: one sender, one receiver

– reliable, in order byte stream: no “message boundaries” <- message is seperated with small pieces. Pieces are delivered

– full duplex data: bi-directional data flow in same connection

– cumulative ACKs: ACK means check
– Connection oriented (handshaking, connection sender and receiver)
sequence number, ack number
– flow controlled: sender will not overwhelm receiver (they control flow speed)

Time limit 동안 host b 가 host a에게 메시지를 답장하지 못하면 time out이다. 이 때는 host a가 메시지를 다시 전송해야 한다.


Socket Summary

– process sends/receives messages to/from its socket
– sending process pushes message out
– locate between application layer and transport layer
– two sockets involved: one on each side

Leave a Reply

Your email address will not be published. Required fields are marked *