Computer Network - Introduction

Jeehyun Kim·2022년 10월 24일
0

Computer Network CSI4106

목록 보기
1/2

This post retrieved from Yonsei University Computer Network course (CSI4106)

Credits :

우선 Computer Network를 공부하기에 좋다고 생각하는 흐름에 대해 얘기해보자. Computer Network를 짧게나마 공부하며 느낀 전체적으로 관통하고 있는 흐름은 다음과 같다.

  • Network Design 소개 + 몇몇 중요한 point
  • 해당 Design의 pros and cons
  • Problem and Solution ( and more -not solved- problems )

어떤 챕터든 이러한 형태를 띄고 있는 것은 비슷했던 것 같다. Computer Network도 굳이 대분류로 분류했을 때 System 분야에 속하는 것 같아서 대부분은 Memory나 Bandwidth같은 현실적으로 Algorithm으로 해결이 어려운 부분들의 문제점이 많은 것 같다.

Operating System에서 Scheduling Policy들을 배울 때 어느 것이 가장 좋다고 말하기 어려웠듯이 여러 Policy들을 소개하고 있지만 어느것이 가장 좋다고 말하기 애매한 경우가 대부분이다. 각각의 장단점을 알고 어떤 문제점이 있으며 어떻게 보완할 수 있고 그럼에도 불구하고 가질 수 밖에 없는 단점이 무엇인지에 초점을 맞추면 공부하기 편한 것 같다. Introduction에서는 거의 모든 분야를 훑어보는 느낌이기에 이런 방법론적인 관점이 필요 없는 것 같지만 본격적으로 공부할 때에는 기억해 놓으면 편할 것 같다.

Introduction Overview

Terminology의 느낌 정도만 받는 걸로도 충분하다고 한다.

What is the Internet?

두가지 시각이 있다. "Nuts and Bolts view"와 "Service view". 전자는 구성 요소에 조금 더 집중하고 후자는 무슨 역할을 하는지에 조금 더 집중한다.

Nuts and Bolts view

Internet은 많은 computing device들의 집합이다. device들을 host라고 하고 host들은 Network의 end system이다. 이러한 host들이 communication을 위해 연결되어 있는데 이러한 연결의 medium을 communication links라고 한다. copper나 fiber를 많이 쓰는데 wireless로는 radio나 satellite도 쓴다. bandwidth가 중요하다! chunks나 data인 packet을 주고받는 내부 작용이 일어난다.

Internet은 networks of network다. 이러한 거대한 구조를 유지하기 위해서는 강력한 rule이 있어야한다. Network를 만든 이유는 sending, receiving이기에 이러한 sending receiving을 지배하는 rule을 protocol이라고 한다. (TCP, IP, HTTP, 802.11, Skype...)

Protocol은 fotmat, order of messages sent and received, actions taken on message transmission, receipt를 결정한다.

cf. InternetComputer  NetworkInternet \subset Computer\;Network

A Service view

Internet은 application에 services와 API를 제공하는 infrastructure다.

Network Edge

hosts : clients and servers

Host : sends packets of data

간단한 성능 측정 방법. 더 간단한 계산식

Host sending function :
  \;  \; 1. takes applicatoin message
  \;  \; 2. breaks into smaller chunks, known as packets of length L bits
  \;  \; 3. transmits packet into access network at transmission rate R
  \;  \;  \;  \; link transmission rate == link capacity, link bandwidth
R : (bits/sec)
L/R의 단위 계산식은 sec가 되는데 이를 transmission delay라고 한다.

Access networks and physical media

End system을 edge router에 연결해야 Network를 제대로 형성할 수 있다. 어떻게 연결할 것인가? 에 대한 얘기다. Router의 종류는 두가지 인데 part of Access Network와 part of Core Network이다. 여기서 Access Network의 router를 edge router라고 부른다.

Residential access nets(아파트 동마다 하나씩 있다고 생각하면 된다.) Institutional access networks(학교나 회사에 있다. 좀 다른 얘기긴 한데 yonsei web WiFi 너무 느리다), mobile access networks등이 있다.

연결 방법은 DSL과 cable network, home network가 있다.

DSL은 Digital Subscriber Line의 약자이다. 인터넷 초기 시절에 새로운 media를 설치하기에는 부담이 있어서 기존에 있던 telephone line을 사용했다. Frequency를 이용해 internet인지 telephone인지 구분했는데, 집과 센터에 muliplexer를 두고 신호를 transmission했다고 한다. Upstream보다 Downstream 속도가 훨씬 빠른데, 인터넷 초기임을 생각하면 당연한 얘기다. 초기에는 UCC가 많지 않았으니 Downstream 속도에 집중해야 했다. 하지만 그래도 old technology기에 많이 느리다.

Cable network는 TV에 사용하던 media라고 생각하면 된다. DSL과 다르게 하나의 선을 여러 집이 공유하고 있고, coaxial cable을 사용한다. 이것도 Unused frequency를 internet에 사용했다. Video data가 오고가야 하기 때문에 Telephone line보다 Capacity가 더 크다(-> 더 빠르다). 현재는 physical cable을 광섬유(fiber)로 교체해서 사용하고 있다.

Home network는 router(firewall, NAT)가 집 안에 있는 경우이다. Wireless access point도 있는데 router와 함께 공유기에 들어있다. Wireless access point로 WiFi가 작동한다.

Enterprise access networks (Ethernet)

학교나 회사에서 많이 사용한다.

Wireless access networks

Wireless access network는 공유되며, end system과 router를 연결해준다. (Access point같은 base station을 경유한다.)

wireless LANs(Local Access Network)는 빌딩에 있고 30m 이내 범위를 케어한다.

wide-area wireless access는 cellular를 생각하면 된다. 3G, 4G:LTE, 5G(?), 6G(2022-2 기준 Concept 잡는 중이라고 한다.)

Physical Media

이러한 연결들이 텔레파시로 이루어지지는 않는다. 여러 physical media가 존재하는데, guided media, unguided media로 분류할 수 있다. guided media는 "guided"에서 특정 line을 따라 흘러가는 모습을 상상할 수 있다. solid media이고 copper, fiber, coax가 있다. 안전하고, 빠르다.
unguided media는 자유롭게 퍼지는 형태다. "흘러가는"것과 구분하자. radio가 있다.

Twisted Pair(TP) : DSL에서 쓰던 전선이다. copper다.

Coaxial cable : Coaxial은 동축의 라는 뜻이다. copper선 두개 꼬아놓은 형태이고 TP cable보다 capacity와 safety가 높다. 정보를 양쪽에서 보낼 수 있다.

Fiber optic cable : coaxial cable보다 higher capacity. 주로 core network에서 사용하고 가끔 access network에서도 사용한다. electric voltage가 전송되는 것이 아닌 light가 전송된다. High speed, Low error

Radio : 전자기 스펙트럼으로 전달된다. link type에 여러가지가 있는데 terrestrial microwave, LAN, wide-area, satellite가 있다.

Network Core

Interconnected routers의 mesh형으로 연결된 것이다. Ring이나 Tree처럼 계획적이지 않고 mesh형태인 것 정도를 기억하면 될듯하다.

Packet-switching

Packet을 옮긴다고 생각하면 된다. src에서 dst로.

Store-and-Forward를 이용하는데 이는 entire packet이 도착한 이후에 next link로의 이동을 시작한다는 의미다. 하나의 packet이 이동할 때에는 link를 fully하게 사용하므로 router에 packet들이 쌓일 수 밖에 없는 구조이다.

Two key network core functions

  • Rounting : src-dst 결정하기
  • Forwarding : Move packet from src to dst
    routing table에 header에 따른 output link가 저장되어 있다. -> 모든 packet에 ouput link에 대한 정보(header value)가 저장되어 있다.

Circuit switching

Router의 경로가 정해져 있는 경우. packet-switching과 다른 점은 dedicated하다는 점이다. 그래서 performance가 guaranteed하다. 또한 store가 필요 없으며 circuit의 순서를 기록한 table만 필요하다. data가 packet단위로 쪼개지지도 않는다.

다만 독점적이고, 사용하지 않는 circuit은 idle하기 때문에 효율적이지 않다. circuit을 사용하는 동안 다른 사람이 작업할 수 없다. 또한 circuit중 하나만 고장 나더라도 이용이 불가능하고 교체를 필요로 한다.

circuit switching에는 두가지 여러 user를 관리하는 방법이 있는데 FDM(Frequency division multiplexing)과 TDM(Time division multiplexing)이다. 이건 그림으로 보는게 이해가 빠를듯.
1/4Bandwidth x Time VS 1/4Time x Bandwidth냐의 차이이다.

Packet-switching VS Circuit-switching
something : (packet, circuit)
Break data into chunks : (Y, N)
Store(Queueing) : (Y, N)
Queueing delay : (Y, N)
Dedicated : (N, Y)
Many users at the same time : (Y, N)
Guaranteed Performance : (N, Y)

packet-switching이 여러 user들을 만족시킬 수 있기에 많이 사용되지만 너무 많은 data가 오고가는 경우 delay와 loss가 커진다. 그래서 packet-switching을 사용하지만 circuit-like behavior를 갖게 하는 것을 목표로 한다. unsolved problem.

Delay, Loss, Throughput in Network

Delay와 Loss는 store-and-forward 때문에 생긴다.

End-to-end delay : propagation delay + transmission delay + queueing delay (+ nodal processing delay)

Nodal Processing : packet이 이미 corrupted 되었는지, 그렇다면 packet drop. Next packet 결정 (in routing table). 소요되는 시간이 매우 짧다.

Propagation Delay : 한 Node에서 다음 Node까지 data가 이동할 때 필요한 시간. length of pyhysical link / propagation speed. 위성 전송과 같은 경우에는 d가 커서 값이 클 수도 있다.

Transmission Delay : 어떤 Node에서 data를 전송하는데 걸리는 시간. packet length / link bandwidth = bits / bps

Queueing delay : Router에 여러개의 packet이 한 번에 들어오면 next link로 보내는 순서에 따라 저장을 해놔야 한다. 이때 저장하는 자료구조가 queue이다. 거기서 기다리는 시간이다.

R : link bandwidth (bps)
L : packet length (bits)
a : average packet arrival rate
aL : 모든 packet이 도달하는데 걸리는 시간

La/R ~ 0 : avg.queueing delay small
La/R -> 1 : avg.queueing delay large
La/R > 1 : more "work" arriving -> packet loss
TCP의 목표는 a를 줄이는 것이다.

Linux에서 traceroute [URL]로 실제 delay를 확인할 수 있다.

Queueing loss : Router도 memory의 size가 정해져있다. 따라서 queue의 capacity를 초과할 만큼 packet이 들어오면 packet loss가 발생한다. 매우 critical 하다.

Throughput : 얼마나 많은 bit을 보낼 수 있는가?
(bits/time unit) -> bps
src에서 dst까지 성공적으로 보내진 packet만 고려한다.
Instantaneous : rate at given point in time
Average : rate over longer period of time
Total_Bits-Time Graph에서 미분값 vs end-to-end 기울기값 이라고 이해하면 될듯하다.

Protocol Layers, Service Models

Layers : each layer implements a service. 각 layer마다 action이 있다. 윗 단계의 layer는 아랫 단계에 의존한다. - 아랫 단계가 준비되어 있지 않으면 윗 단계를 실행할 수 없다. -

-이륙 할 수 없다면 gate로 들어갈 이유가 없다.-

Layering : reuse! common functionality of under line layers를 공유한다. Modularization하기 편하다.

Nework는 매우 복잡한 형태이다. 이를 조금 더 쉽기 다루기 위한 개념이라고 생각하자. 특정 layer의 service를 바꾸기 위해 모든 layer의 기능을 다 알 필요는 없다. Object Oriented Programming 개념과 비슷한 느낌이 있다. 그러나 Accessible한 정보는 interface parameter밖에 없기에 어느정도의 성능 저하도 감수해야 한다.
Internet Protocol Stack

Application : supporting network applications (HTTP, SMTP, FTP)
Transport : process-process data transtfer (TCP, UDP)
Network : routing of datagrams from src to dst (IP, routing protocol)
Link : data transfer between neighboring network elements (Ethernet, WiFi(802.111), PPP)
Physical : bits "on the wire"

Ex)
application : Web browser가 HTTP protocol message 생성
Transport : TCP는 message를 받아 Header 생성. 결과는 segment가 된다.
Network : Transport의 segment를 받고 고유의 encapsulation을 수행해 own header를 붙인다. -> datagram (이걸 packet이라고 부른다.)
Link : Frame의 header를 이용해 switching decision(dst addr)을 정함.

End-system : layer 7 device
Switch : layer 2 device (link + physical)
Router : layer 3 device (network + link + physical)

ISO/OSI reference model
현재는 Internet protocol stack쪽으로 기울었고 ISO model은 이론적인 부분으로만 배운다.

Internet protocol stack + 아래의 layer들

Presentation : allow applications to interpret meaning of data (encryption, compression, machine-specific conventions(machine마다 다른 binary data 처리))
Session : synchronization, checkpointing, recovery of data exchange

Internet protocol stack에서는 application이 이러한 부분들을 포함한다.

Network under attack : Security

초창기 internet은 자료 공유 / 연구 목적이었기에 보안에 대해선 크게 중요하지 않았다. -> 취약하다.

DDoS(Distributed Denial of Service) : packet 많이 보내서 마비 시키는 공격
Sniffing : Read data
Spoofing : Send false data (pretend)

History

1961~1972 : Early packet-switching principles

1961 : queueing theory가 packet-switching에 좋다!
1964 : packet-switching in military nets
1967 : ARPAnet conceived by Advanced Research Projects Agency
1969 : ARPAnet first node operational
1972 : ARPAnet public demo -> 대학들끼리 network 형성, first e-mail program

1972~1980 : Internetworking, new and proprietary nets

1970 : ALOHAnet satellite network in Hawaii
1974 : Architecture for interconnecting networks
1976 : Ethernet at Xerox PARC
late 70's : switching fixed length packets

1980~1990 : New protocols, a proliferation of networks

1983 : deployment of TCP/IP
1982 : smtp e-mail protocol defined
1983 : DNS defined for name-to-IP-address translation
1985 : ftp protocol defined
1988 : TCP congestion control

1990~2000's : commercialization, the Web, new apps

1991 : NSF lifts restrictions on commercial use of NSFnet
early 1990s : Web, hypertext Nelson, HTML, HTTP ...
late 1990's ~ 2000's : instant messaging(like kakaotalk)

2005~present

~5B device attached to Internet
emergence of SNS
service providers(Google, Microsoft) create their own networks
Cloud

2개의 댓글

comment-user-thumbnail
2022년 10월 24일

1) 저도 이거 보고 공부할게오
2) 월간 어쩌구도 합병하실 생각은 없으신지요?
3) 저도 벨로그 쓰면 봐줌?
-폐급대하건생-

1개의 답글