A closer look at network structure
Network edge
좀 더 세부적으로 분류하면 다음과 같다.
- end systems (hosts)
- run application programs
- e.g. Web, email
- client/server model
- client host request, receives service from always on server
- e.g. Web browser/server; email client/server
- peer-peer model
- minimal use of dedicated servers
- e.g. Skype, BitTorrent
Transmission을 하는 방식은 2가지가 존재한다. 각각에 대해서 알아보면 다음과 같다.
Connection-oriented service
Goal : data transfer between end systems
TCP (Transmission Control protocol) service의 특징은 다음과 같다
- reliable, in-order byte stream data transfer
→ 메세지가 유실되지 않고 간다는 것. 추가적으로 in-order라는 것은 보낸 순서를 지키면서 도착지까지 간다는 것
- flow control
→ sender와 receiver의 속도가 다르면 조절을 해줘야 한다. 소화할 수 있는 능력에 맞춰서 전달해야한다.
- congestion control
→ senders “slow down sending rate” when network congested
→ 중간 네트워크 회선의 상황을 고려해서 보낸다는 것이다.
Connectionless-oriented service
TCP와 반대되는 개념인 UDP (User Datagram Protocol)이다. 특징은 다음과 같다.
- connectionless
- unreliable data transfer
- no flow control
- no congestion control
이때, TCP와 UDP는 Protocol의 일종이다. 그렇다면 Protocol란 무엇인지 알아보도록 하자.
What is a protocol?
메세지를 주고받기 위한 준비동작정도로 이해하면 된다.
All communication in Internet coordinated
by protocols
Network core
- router : 데이터를 받아서 전송해주는 역할을 수행한다
그렇다면 정확히 어떤 방식으로 data가 network를 통해 transfer되는 것일까? 이에는 2가지 방식이 존재한다.
- circuit switching
→ dedicated circuit per call : telephone net
- packet switching
→ data sent through net in discrete “chunks”
Compare Packet switching versus Circuit switching
다음과 같은 상황을 생각해보자
Link의 bandwidth는 1Mbps이다. (즉, 1초에 1Mb를 전송할 수 있는 능력이 있는 것이다.) 추가적으로 각 유저는 100kb/s를 active상태일 때 필요로 하며, 전체 시간의 10%만큼만 active상태이다.
- Circuit switch : 10명의 유저까지만 지원해줄 수 있다.
- Packet switch : 제약이 크게 없음. 하지만 몰리면 문제가 발생할 수는 있다. 하지만, 35명이 유저라고 했을 때 10명 이상이 몰릴 가능성이 0.004보다 작다.
즉 이러한 이유때문에 packet switch는 delay가 발생하게 되는 것이다.
How to loss and delay occur?
기본적으로 router가 packet를 받으면,
- 정상적인 packet인지 목적지가 어딘지에 대한 정보를 확인한다.
→ 이게 processing delay
이다.
- check bit errors
- determine output link
- 현재 유저가 몰려서 link의 bandwidth보다 더 많은 양의 packet이 들어온 경우 router/switch안에 있는 queue (
buffer
라고도 불린다)에 머무르게 된다. (안그러면 loss가 발생할 것이기 때문이다.)→ 이게 queueing delay
이다.
- 2번 단계를 지나서 queue의 맨 앞에 섰다고 가정하자. 이때, 결국 packet은 bit로 구성되어 있기 때문에, 첫번째 bit부터 마지막 bit까지 link로 뿜어져 나가는데 시간이 걸린다.
→ 이게 transmission delay
이다.
- R : link bandwidth (bps) : data rate이라고도 부름
- L : packet length (bits)
- 3번을 지나서 마지막 bit가 link에 올라온 상황이다. 이 상황에서 마지막 bit가 다음 router까지 도달하는데까지 시간이 걸린다.
→ 이게 propagation delay
이다.
- d : length of physical link
- s : propagation speed in medium (빛의 속도라고 가정)
Access networks, physical media
Throughput
Throughput은 송신자와 수신자가 통신을 할 때, 전송되는 데이터의 rate 이다.
앞서 언급한 Bandwidth는 최대로 전송할 수 있는 데이터의 rate이고, Throughput은 실제로 측정하는 값이므로 Throughput < Bandwidth 라고 볼 수 있다.
참고로 Throughput은 bottleneck link라고 하는데, 이는 여러개의 link를 거쳐갈 때 가장 rate이 낮은 곳을 기준으로 Throughput이 결정되기 때문이다.
예를 들어 차가 아무리 10차선 도로로 쌩쌩 달려도 목적지 부근이 1차선 도로라면, 결국 걸리는 시간은 1차선 도로를 기준으로 측정되는 것처럼 말이다.