학교공부/컴퓨터네트워크

[컴퓨터네트워크] 컴퓨터네트워크 (Computer Network) 1단원 정리

yunmap 2017. 10. 23. 20:38

communication : 정보 교환

communication network : 2개 이상의 entity들이 정보를 교환

 

element of network

   (1) node : store and process information

   (2) link : "physical" medium connecting nodes.

node가 연결되어 있는 방법을 topology라고 함. 대표적으로 point to point와 multiple access가 있음.

 

Link 기술 : twisted pair -> coaxial cable -> terrestrial microwave -> satellite microwave -> optical fiber(전반사)

 

network : a set of communicating nodes connected by link (network can be recursively defined). SHARING resource

router : network들을 연결시켜주는 node

domain : router의 집합

 

resource sharing : switching, multiplexing

만약 N개의 node가 서로 communicate 하고 싶어 할 때 full connection을 이용하면 N^2개의 link가 필요.

하지만, switching을 이용하면 node를 shared device로 연결할 수 있음. Shared device엔 switch 또는 router가 있다.

directly connected : full connection

indirectly connected : 다른 node에게 바로 통신이 불가능하고 router를 거쳐야 한다.

 

Switching

   - circuit switching : dedicated connection. (친구한테 연락하는 것처럼 상대방이 정해져 있는 것.)

guaranteed performance

data is continuous stream of information

fixed resource allocated (Constant bandwidth, unused resource is wasted. 다른 사용자에 의해 방해받을 수 없음.)

ex) Telephone network : 연결이 되기만 하면 사용하든 안하든 상관이 없음. 단, 사용하지 않으면 waste 됨. 전화 통화에서 듣기만 할 때가 있는 것처럼.

만약 여러 명의 user가 circuit을 share하고자 하면 : busy signal

만약 너무 많은 user가 resource를 request 하면 : block calls!! Admission control (Accept call request only if resource is available)

   - packet switching : store and forward

data is in packets (a finite size block of data)

ON DEMAND resource allocated (variable bandwidth_flexible)

efficient resource usage (그러나, data의 flow가 each other에게 영향을 줄 수 있음.)

ex) data networks, internet

만약 너무 많은 user가 resource를 request 하면 : user들이 긴 delay를 겪게 되고, congestion(혼잡) control이 필요.

 

Multiplexing : multiple data streams getting merged and sharing resource <-> demultiplexing

   한 switch에선 multiplex(packing)되고, 다른 switch에서 demultiplex 된다. (Circuit switch)

   method : TDM, FDM, Statistical(정적) multiplexing

TDM : Sharing temporal resource : data is packed into time 'slots' (time slot이 작으면 거의 continuous)

FDM : sharing spectral resource : data is packed into frequency 'bands' (resource가 정적으로 사용자에게 할당되어 있음. 그래서 user가 사용하지 않으면 waste 된다. -> statically assigned)

Statistical multiplexing : ON DEMAND sharing of resource : resource is dynamically allocated to users. suited for packet switching networks. -> 동적 할당. switch에서 store and forward를 진행한다. (issues : overflow, unfair allocation of resource)

switch에 Queue 형태의 waiting 저장소가 있음. 여기서 모아서 전송하는데 request가 많은 node의 packet이 많이 쌓여있을 가능성이 높음. -> unfair

 

Performance metric : delay and bandwidth

Data rate (=bandwidth) : how many bits per 1 second. (kbps, MBps) -> 소문자 b는 bit고, 대문자 B는 byte이다.

Number of bit transmitted per unit time

Delay (=latency) : time required for a message to reach destination (packet 단위)

Latency = Propagation + Transmit + Queue(store & forward 과정에서 Queue에서 대기하는 시간)

Propagation = Distance / c (physical limitation) (첫 bit가 도착하는데 걸리는 시간)

Transmit : Size / Bandwidth (packet의 size. Packet을 보내는데 소요되는 시간.) (한 패킷이 전송되는데 걸리는 시간)

RTT (round-trip time) = Delay of A to B + Delay of B to A

 

Delay * Bandwidth : The number of bits a channel can hold until the receiver can detect message arrival.

  수신자가 전송된 메세지가 있다는 것을 알아챌 때까지 channel이 보낼 수 있는 bit의 수.

  error 메세지가 발신자에게 도착하면 왕복이므로 2*delay 만큼의 시간이 소요되고, Bandwidth*2*delay 만큼이 waste

Efficient use of resource인지 아닌지 파악할 수 있다.

Delay와 Bandwidth 중 뭐가 더 중요할까? 동영상 재생에선 해상도라 Bandwidth가 중요하고 call은 delay가 중요.

 

Circuit switching vs Packet switching

packet switching이 더 많은 user가 network를 사용할 수 있음.

그런데, packet switching에서 QUEUE가 full이면 packet이 버려질 수 있음. (loss) + delay(Queue에서의 대기시간)

 

packet switching

   pros : more efficient utilization of bandwidth

   cons : suffers from delay and loss = service quality(QoS) is not guaranteed

packet switch는 circuit switch를 따라할따라 할 수 있지만, circuit switch는 packet switch를 따라 할 수 없다.

   datagram network : destination address in packet determines next hop. routes may change during session

들어온 순서대로 전송되는 것은 아님. Connectionless

   virtual circuit network : each packet carries tag, tag determines next hop. Fixed path determined at call setup time, remains fixed thru call.

들어온 순서대로 전송됨. Connection oriented

 
Circuit switch : FDM, TDM
Packet switch : Virtual circuit, Datagram