[Chap 1] Introduction

HyungSeop Lee·2023년 9월 16일
0

1.1 What is the Internet?

What's the Internet : "nuts and bolts" view

  1. billions of connected compuing devices

    • host = end systems
    • running network apps
      우선, 인터넷을 할 수 있는 system이 필요하고, 그 system에서 인터넷을 할 수 있는 application이 실행된다.
      여기서 인터넷을 할 수 있는 system(노트북, 자동차, 신호등, ...)을 = hosts = endsystem

      Server도 하나의 host = end system일 뿐이다.
  2. communication links

    • fiber(섬유), copper(구리), radio, satellite
    • transmission rate : bandwidth(대역폭)
      bandwidth = pipe의 관의 크기 ➡️ bandwidth가 클수록 data rate가 높아짐 ➡️ 빨라짐

      host들의 communication links마다 다양한 transmission rate = bandwidth가 있다.
  3. packet switches : forward packets

    • routers and switches
      host가 보내는 packet(data들의 묶음)을 전달, routing하여 destination까지 전달해주는 역할.
  4. Internet : "network of networks"

    • Interconnected ISPs(Internet Service Provider)
      각각의 host들은 직접 사용자에 연결되어 있지 않다.
      예를 들어, Instagram, Naver 등등의 Server는 나에게 직접 연결되어 있지 않다.
      device끼리 연결된 것이 아니라 network끼리 연결되어 있다.
  5. Protocols : network 안에서 data들을 주고 받고 하는 것을 제어하는 Rule.

  6. Internet Standards :
    Internet은 기본적으로 개방성을 갖는다. 그래서 대부분의 Protocol은 Internet Standards가 있다.

    • RFC : Request for comments
    • IETF : Internet Engineering Task Force

What's the Internet : a service view

  • application service를 제공해주는 infrastructure :
    우리의 computer에서 실행된는 Application에서 Internet을 통해서 정보를 받아 Service를 할 수 있게 하는 것이 Internet의 기본적이 역할이다

  • provides programming interface to apps

What's protocol?

  • Protocols define format, order of messages sent and received among network entities, and actions taken on message transmission, receipt.

1.2 network edge - ende systems, access networks, links

  • network edge : Internet application이 실행되고 있는 모든 system들은 edge에 있다.
    • hosts : clients and servers
    • servers often in data centers
      우리가 internet을 하는 목적은 network edge끼리 통신하기 위함이다.
      우리는 워싱턴에 있는 router와 통신하기 위해서 internet을 하는 것이 아니라,
      우리는 워싱턴에 있는 누군가와 통신하기 위해서 internet을 하는 것임.
  • access networks, physical media
    • wired, wireless communication links
  • network core :
    • interconnected routers
    • network of networks
      우리는 워싱턴에 있는 누군가와 통신을 하기 위해서는 network core의 도움을 받아야 한다.
      Google server가 어디에 있는지 모르지만, network core에게 data를 던져주면,
      network core는 마치 "우체국"처럼 우리의 data 또는 상대의 data를 destination까지 전달해준다.

      network core는 그냥 packet을 desination에게 잘 전달해주는 역할 밖에 안한다.
      network core에는 대단한 device가 있지 않고, 그냥 router들끼리 연결되어 있다.

      edge router : edge system들에 붙어있는 router
      access network : edge router에 연결하는 network. access
      access network는 3가지 type이 있다.

Access networks

  • How to connect end systems to edge router?
  1. residential access networks :
    ISP(Internet Service Provider = SKT, KT, LG U+)들에 돈을 내고 network를 사용

  2. institutional access networks :
    학교에서 Server를 만들어서 성공하고, 집에 가서 그 server에 접속하면 되지 않음.
    나의 집주소와 똑같은 곳은 아무도 없다.
    Internet도 host가 unique한 IP address를 갖는다.
    학교에서 사용하는 private IP address는 외부에 절대 드러나지 않는다.
    예를 들어, google을 검색한다. google server에 요청한다. 응답받기 위해 나의 IP address를 보낸다.
    google에서는 나의 IP address를 보지 못한다.
    그러면 어떻게 응답을 받는가? (Chap 3.에서 배울 기술로 인해 가능하다)

  3. mobile access networks
    : LTE, 5G

Access network : digital subscriber line(DSL)

  • digital subscriber line(DSL) :
    use existing telephone line to central office DSLAM
    (전화선을 통해 internet 연결)
    • 예전에는 internet을 사용하고 있다가 가족 구성원이 다른 곳에 전화를 하면, 인터넷이 끊김
      ➡️ 이를 해결 하기 위해 splitter 설치
      ➡️ 전화를 하면서 internet을 쓸 수 있게 되었다.
      data over DSL phone line goes to Internet
      voice over DSL phone line goes to telephone net
    • Upstream (typically < 1Mbps)
      Downstream (typically < 10Mbps)
      ➡️ upload보다 download의 횟수가 더 많으니까 Downstream의 속도를 더 빠르게 했다

Access network : cable network

  • freqeuncy divisoin multiplexing : different channels transmitted in different frequency bands. (나중에 배울 내용)
    • cable modem : 셋톱박스

Enterprise access network(Ethernet)

  • 기관에서는 많은 host들이 있다.
  • 기관에 있는 모든 host들이 access router로 연결되어야 하는데, 그러면 부하가 심하다.
    그래서 routing이 아니라 Ethernet switch hub를 통해서 분산적으로 기관 안에서 internet을 사용할 수 있다 = access network로 연결할 수 있다.
    swtich hub는 선 하나만 빼서 router에 연결해주기만 하면 된다.

Wireless access networks

  • 무선은 coverage 안에 있으면 모두 다 들을 수 있다.
    유선으로 연결되어 있다면, A 한번, B 한번, ... 이렇게 하나씩 연결하여 data를 보내야 하지만
    무선으로는 broadcasting으로 모두에게 한 번에 data를 보낼 수 있다.
    하지만 보안적으로 문제가 생길 수 있다
    • wireless LANs
      • within building (100 ft.)
      • 802.11 b/g/n (WiFi) : 11, 54, 450Mbps transmission rate
    • wide-area wireless access
      • provided by cellular operator
      • 3G, 4G, LTE : 1 and 10Mbps

Host : sends packets of data

  • host가 router로 packet을 유선으로 보낼 때, 그 선이 얼만큼 빠르게 보낼 수 있는 매체인가? 에 따라 달라짐.
    이러한 두 개 사이의 연결된 선을 link라고 한다.

  • R : link trasmission rate (bit / sec) : link가 초당 몇 bit 보낼 수 있는가?

  • packet trasmission delay : R을 갖는 link로 L-bit를 보내는 데에 걸리는 시간

    • packet trasmission delay = LR\frac{L}{R} = bitsbits/sec\frac{bits}{bits/sec} = secsec

Physical media (guided, unguided)

  • bit : transmitter/receiver 사이의 propagates

  • physical link : what lies between transmitter & receiver

  • guided media : 유선(copper(구리), fiber(광케이블), coax)

    • coaxial cable : two concentric copper conductors
    • fiber optic cable : glass fiber carrying light pulses, each pulse a bit
  • unguided media : 무선(radio)

    • radio : signal carried in electromagnetic spectrum
    • radio link types :
      1. terrestrial microwave
      2. LAN(WLAN=Wireless LAN, WPAN=Bluetooth=BLE)
        Bluetooth : 개인 공간에 있는 선들을 없애고 무선으로 대체하려는 목적에서 나옴
        Carply같은 경우, BLE만 사용하는 것이 아님. 그 많은 정보들이 BLE만으로 통신할 수 없기 때문에 Wifi도 같이 사용됨.
      3. wide-area(WAN : 기지국)
        기지국을 cover하는 여러 cell들이 있다.
        그러한 cell들은 통신사들이 관리하는데, 사용자는 그 범위 안에 있으면 해당 cell 기지국을 사용하는 것이다.
        이를 옛날에는 cellular phone이라고 했는데 요즘은 그냥 phone이라고 한다.
      4. satellite :
        이론적으로 무선 전파의 세기만으로 localization을 할 수 있지만,
        실내에서 하면 여러 물체를 타고 온 세기는 다 달라지기 때문에 오차가 심하다
        인공위성으로 하면, 위에서 전파를 쏴주니까 부딪히는 물체가 없어서 오차가 거의 없어 GPS를 위성으로 통신하는 것이다.
        하지만 GPS도 서울과 같이 고틍 건물들이 빼곡히 있으면 위성으로부터 위치 정보가 건물에 막혀서 오차가 매우 크게 될 수도 있긴 하다.
  • TP(Twisted Pair) :
    two insulated copper wires. 속도에 따라 category가 달라짐

    • Category 5 : 100Mbps, 1Gbps Ethernet
    • Category 6 : 10Gbps
      LAN선 안에 여러 선들이 꼬아져 있는데 왜 꼬았을 까?
      1. 내구성을 높이기 위해
      2. 꼬여져 있으면, 외부 noise를 어느 정도 막아 data가 잘못되는 것을 막을 수 있다.

1.3 network core

The network core

  • network core : mesh of interconnected routers

  • packet switching :
    수억, 수천 억개의 router들이 연결되어 있다.
    router들은 edge로부터 받은 message를 destination으로 전달해준다.
    그럼 어떠한 방식으로 data를 전달하는가? ➡️ packet switching
    packet switching에서 packet은 그냥 network에 던져진다.
    network 상황에 따라서 하나의 영상에서 보내지는 frame들이 각각 다른 route로 전달되어질 수 있다.

    • circuit switching : circuit switching방식도 있는데 유선전화기의 circuit switching이라는 말로부터 나왔다.
      지역번호 안에는 체계가 있다.
      032-123-4567은
      지역번호 - switch번호 - ?
      ➡️ 번호를 누르면 해당 지역(032)에 있는 main 교환기(123)에 연결되고, 그 안에 더 작은 지역(4567)에 있는 교환기와 연결해준다.
      ➡️ circuit switching은 destination과의 call setup을 마친 뒤, 상대가 통화중인지? 아닌지를? 파악하고 data를 보낸다.
      ➡️ 반면에 packet switching은 call setup과정 없이 우선 data를 보낸다.

Packet-switching : store-and-forward

  • packet switching은 store and forward 방식이다 :
    entire packet must arrive at router before it can be trasmitted on next link
    • L=7.5L=7.5 Mbits, R=1.5R=1.5 Mbps
      ➡️ one-hop transmission delay= 55 sec
    • end-end delay = 2LR2 \frac{L}{R}
      ➡️ 연결된 device 수에 따라서 성능이 저하된다.

Packet-switching : queueing delay, loss

  • queueing and loss :
    각각의 Router마다 내보낼 수 있는 Rate가 한정되어 있다.
    하지만 Router에 연결된 여러 device들이 한꺼번에 data를 보내면, router에서는 그 많은 data를 처리할 수 없다.
    그래서 router 안에 queue가 있는 것이다.

    하지만 queue에 data가 항상 저장되는 것이 아니다.
    router가 내보낼 수 있는 속도로 data가 들어온다면, 그대로 내보낼 수 있지만
    router가 내보낼 수 있는 속도보다 빠른 속도로 data가 들어온다면, queue에 쌓여서 줄을 서게 된다.

    하지만 queue size도 유한하기 때문에 queue가 꽉 차서 들어갈 수 없는 packet들은 drop된다.
    • Packet Switching만 있는 단점 :
    1. Loss
    2. Queueing delay
      ➡️ 그래서 Rink의 속도(R)을 높이는 방법이 있다.
      packet이 빨리 나갈 수 있도록 해서 queueing delay를 줄어들게 하고, Loss도 줄어들게 한다.
  • packet switching의 장점 중 하나는 call setup(data를 보내기 전에 미리 )이 없는 것이다.
    destination이 있든 없든, data를 받을 수 있는 상황이든 아니든 일단 보내고 보는 것이다.
    반면 Circuit switching 방식은 미리 call setup을 한다.
    A에서 D로 보내려면, D와 미리 call setup이 된 상태에서 보낸다.
    그래서 router에서 저장하고 보내는 것이 아니라 바로바로 보내기 때문에 delay와 loss가 없다.

Two key network-core functions

  • Two key network-core functions
    • routing : determines source destination route taken by packets
      destination에 바로 보낼 수 없으니까 그 방향 쪽으로 가까운 router에게 보내기 위한 algorithm이 수행된다.
      routing algorithm은 forwarding table에서 관리되어 있어서 packet마다 routing algorithm을 수행하여 본인이 갈 output link를 찾는 것이다.
    • forwarding : move packets from router's input to appropriate router output

Alternative core : Circuit switching

  • Circuit switching : end-end resources allocated to, reserved for "call" between source & dest
    data가 전송되기 전에 Call setup(미리 destination과 연결)을 해야 한다.
    미리 call setup된 rink를 통해서 data가 바로바로 보내진다.
    따라서 delay, loss가 생길 수 없다.
    Rink가 공유되어지고 있는데 통신되고 있는 rink 말고 나머지 rink들은 모두 놀게 된다.
    그래서 circuit switching은 multiple access(여러 user들이 한 번에 사용)를 하지 못한다.
    그래서 resource를 쪼개서 여러 device들끼리 통신하게끔 하는 방법이 있다.
    1. FDM(Frequency Division Multiplexing)
    2. TDM(Time Division Multiplexing)

Circuit switching : FDM VS TDM

  • FDM(Frequency Division Multiplexing) :
    모든 time에서 동시에 여러 device를 쓸 수 있게 frequency를 나누는 방법.

    frequency를 나누기 때문에 나머지 user들이 쓰든 안쓰든 정해진 frequency만큼만 사용할 수 있어서 속도가 느린 상태로 고정된다.

    또한 구현의 측면에서는 frequency 대역을 나누기 위해서 해당하는 공진 주파수를 맞춰야 한다.
    모든 Host에서 해당 주파수를 맞출 수 있는 추가적인 HW가 필요하다
    그리고 bandwidth가 다 다르기 때문에 해당하는 Rink도 다 다르게 되어 hop이 넘어갈수록 문제가 복잡해진다.
    ➡️ 위의 문제들로 인해 FDM은 Internet으로 사용될 수 없다. 주로 무선 network에 이용된다.

  • TDM(Time Division Multiplexing) :
    Time을 나누는 방법.
    해당하는 user가 모든 bandwidth를 사용할 수 있다.
    (시간으로 나눈 구간들을 slot이라고 한다. slot들이 반복되는 묶음을 1 frame이라고 한다.)
    user수가 늘어나면, slot이 늘어난다.
    TDM은 사용자가 적을 때는 효과적이지만, 사용자가 많아지면 내가 사용할 수 있는 slot이 짧고 오래 걸리기 때문에 문제가 된다.
    또한 internet의 접속자들은 시시각각 가변적이라 TDM은 취약하게 된다.
    TDM은 frame 구조를 만들기 위해서 centralized해주는 coordinator가 slot을 할당해준다.
    따라서 통신에 참여하는 모든 user들 간의 tight한 동기화가 필요하다.
    조금이라도 밀리면 누적되어 drift가 생긴다.
    따라서 지속적으로 동기화해주는 작업도 필요하다.
    TDM은 보통 BLE에 사용된다(Master와 slaves)

FDM, TDM은 여기저기서 사용되긴 하지만 위와 같은 이유로 Internet에 적용하기 어렵다.
그래서 Internet에 Circuit Switching 방식이 아닌 Packet Switching 방식이 사용된다.

Packet Switching VS Circuit Switching

  • Packet switching allows more users to use network.
    example :
    • 1 Mb/s Rink
    • each user :
      • 100kb/s when active
      • active 10% of time
        (전체 10%만 active인데, 그 동안 100kb/s를 사용한다)

        ➡️ circuit switching : 10 users (1M / 100k = 10)
        ➡️ packet switching :
        with 35 users, probability > 10 actives at same time is less than 0.0004
        (35 user가 있을 때, 10명이 동시에 active를 가질 확률은 0.0004% 보다 낮다.
        따라서 몇 천명의 user들도 붙을 수 있다.)
  • 그럼 packet switching이 압승인가?
    결론적으로 Internet에 더 적합한 packet switching이 사용되긴 하지만 단점이 존재하긴 한다 :
    queueing으로 바쁜 router들은 다음 router에 연결되고, 또 다음 router에 연결되고, ..., 하며
    어느 한 router에서는 더욱 심하게 packet들이 많이 들어온다 ➡️ congesetion
    congestion이 심하면, packet delay and loss가 발생한다.
    보내는 host는 packet이 delay되고 있는지 loss되고 있는지 모른채 계속 packet을 보낸다.
    그래서 Timer를 걸어서 Timeout이 되면, 기존의 data를 또 다시 보낸다.
    그런데 만약 이전에 보낸 data가 destination에 도달했다면 경로 상 똑같은 data가 쌓이게 되고,
    받는 쪽 host도 반복해서 response하게 된다.
    ➡️ 이렇게 delay, loss되면 잘 갔는지 확인할 바가 없으니 reliable data transfer가 필요하다
    = 추가적인 protocol이 필요하다
    그래서 나온게 TCP(Transmission Control Protocol)이다.
    엄밀히 말하면 TCP는 server와 client가 data를 주고 받는 데에 있어서 필수적이진 않지만
    reliable data transfer를 하기 위해 필요한 것이다.
    ➡️ 또 예를 들어, 30fps 영상에서 packet delay and loss 때문에 몇 개의 frame이 손실되었다면,
    이상한 동영상이 될 것이다.
    이렇게 audio/video에 필요한 guarantee를 위해 RTP(Real Time Transport Protocol)이 있다.
    (나중에 배움)

Internet structure : network of networks

  • End systems connect to Internet via access ISPs(Internet Service Providers)
    각각의 network들은 ISP(KT, SKT, U+)업체들이 관리하는데
    전세계모든 edge에 있는 device들은 해당하는 ISP network로 들어가는 것이다.
    ISP는 아무리 미국에 있는 대형 회사라고 하더라도 그 ISP가 직접 전 세계 core를 관리하지 않는다.
    core는 주인 없이 distributed하다.

  • Let's take a stepwise approach to describe current Internet structure.

  • Internet structure를 한 눈에 정리하자면, 다음과 같다.
    Internet은 다음과 같이 계층적으로 되어 있다.

    • 우리나라에는 Tier 1 ISP가 없다.
    • www.naver.com 은 사실상 internet network에 필요 없음. IP가 가장 중요하다.
      www.naver.com 은 그냥 IP를 나타내기 위한 name이다.
      IPv4, IPv6를 통해 Internet 체계, 주소를 찾아가는 것이다.
    • IPv4, IPv6를 통해 ➡️ 어느 ISP ➡️ IXP ➡️ 어느 Regional ISP ➡️ 어느 access ISP

1.4 delay, loss, throughput in networks

  • router는 data를 언제 받을지 모름.
    router는 queue에 data가 대기하지 않을 때(=Rink가 idle 할 때),
    router에 들어오는 속도가 내보내는 일정한 속도보다 빨라지면, queue에 쌓이기 시작.
    queue에 기다릴수록 delay되는 시간 = queueing delay

  • queue가 꽉 찼는데 data가 계속해서 들어오면, data가 drop된다.
    data를 보낸 host에게 drop되었다는 것을 알리지 않음.
    그럼 host는 어떻게 아는가?
    ➡️ congestion이 일어났다.
    (router에서는 자기가 가용할 수 있는 memory만큼 queue를 만들지 않음. delay가 많이 발생하기 때문.)

Four sources of packet delay

  • Four sources of packet delay :
    • dprocd_{proc} : nodal processing
      • check bit errors :
        packet에 대해서 router 내부적으로 processing하는 시간.
      • determine output link :
        output을 몇번째 port = output link로 보낼 것인지에 대한 routing algorithm 수행.
      • ( < msec) :
        algorithm의 최적화가 잘되어 있어서 일반적으로 적은 시간 소요
    • dqueued_{queue} : queueing delay
      • time waiting at output link for transmission
      • depends on congestion level at router
        ➡️ network에 대한 delay를 계산할 때, dqueued_{queue}를 가장 크게 고려함
    • dtransd_{trans} : transmission delay == link delay
      • LL : packet length (bits)
      • RR : link bandwidth (bps)
      • dtrans=LRd_{trans} = \frac{L}{R}
        ➡️ ➡️ network에 대한 delay를 계산할 때, dtransd_{trans}를 두번쨰로 크게 고려함
    • dpropd_{prop} : propagation delay
      • dd : length of physical link
      • ss : propagation speed
      • dprop=dsd_{prop} = \frac{d}{s}

Caravan analogy

  • How long until caravan is lined up before 2nd toll booth?

    • car : 100km/hr
    • toll booth takes 12 sec to service car
      ➡️ 10대가 1번째 tool booth에서 다 나왔음. 120초 소요 +
      첫번째 차가 2번째 tool booth까지 가는 시간 1시간 소요
      = 62분 소요
  • Will cars arrive to 2nd booth before all cars serviced at first booth?

    • car : 1000km/hr
    • toll booth takes 1 min to service car
      전체 차가 1번째 tool booth에서 다 나오는 시간 : 10분
      첫번째 차가 1번째 tool booth 빠져나오는 시간 1분 +
      첫번째 차가 2번째 tool booth까지 가는 시간 (1000kph로 100km 가니까) 6분 소요
      = 7분 소요.
      A. Yes!

Queueing delay

  • R : link bandwidth(bps) -> 내보내는 속도
    L : packet length(bits) ->
    LR\frac{L}{R} = transmission rate

  • a : average packet arrival rate

  • traffic intensity = 초당 얼마나 많은 packet들이 발생하는가?
    LaR\frac{La}{R} = tranmission rate x arrival rate (단위는 없음)

    • LaR0\frac{La}{R} \simeq 0 : avg. queueing delay small
    • LaR1\frac{La}{R} \simeq 1 : queueing delay large
    • LaR>1\frac{La}{R} > 1 : more "work" arriving than can be served

"Real" Internet delays and routes

  • traceroute program :
    provides delay measurement from source to router along end-end Internet path towards destination.
    • "* * * " :
      요청 시간이 만료되었다는 표시.
      우리 생각보다 delay가 많이 생김.
    • 위의 traceroute에서의 packet과는 달리 일반 packet들은 feedback이 없어서 훨씬 빠름
    • 똑같은 destination이더라도 또 다시 수행하면 다 다른 router를 거쳐감.

Throughput

  • Throughput : 단위 시간 동안 몇 bit를 받았는가?

  • instantaneous throughput : rate at given point in time (순간 속도)

  • average throughput : rate over longer period of time (평균 속도)
    ➡️ 우리는 average throughput을 고려한다. instantaneous throughput은 값이 너무 튀기 때문

  • Server side link의 capacity(RsR_s)와 Clienet side link의 capacity(RcR_c)가 다르다.

    • Rs<RcR_s < Rc : What is average end-end throughput? RsR_s
    • Rs>RcR_s > Rc : What is average end-end throughput? RcR_c
      ➡️ 100hop, 1000000hop을 지나든 가장 minimum한 Rate가 average end-end throughput이다.
      ➡️ 이때, 가장 작은 Link를 bottleneck link라고 한다.

Throughput : Internet scenario

  • 일반적으로 edge side Link들의 Rate는 작다.
  • in practice : RcR_c or RsR_s is often bottleneck
    • end-end throughput : min(Rc,Rs,R10R_c, R_s, \frac{R}{10})

1.5 protocol layers, service models

Why layering?

  • Why layering? :
    dealing with complex systems.
    복잡한 task들을 정해진 flow를 통해 수행되도록 한다.
    layering = modularization ➡️ system의 maintenance, updating이 쉽다.

Internet protocol stack

  • Internet protocol stack :

    • application :
      실제로 사용하고 있는 program, SW
    • transport :
      application layer의 다양한 service를 지원하기 위한 layer (나중에 자세히)
      어떤 application으로 보낼 것인가? 하는 port number가 있다.
      TCP, UDP가 대표적.
    • network :
      multi-hop. routing에 대한 내용 처리
      network layer에서 사용되는 address = IP address(source를 destination으로 routing하기 위해 사용되는 address)
    • link :
      나한테 직접 붙어있는 one-hop에 대한 처리.
      link layer에서 사용되는 address = MAC address
    • physical :
      통신을 하기 위한 physical한 것. Ethernet이나 모뎀
  • physical, link, network , transport layer는 OS에 있어서 건드릴 수 없음.
    우리가 건드릴 수 있는 것은 application layer.
    OS로부터 network를 사용할 수 있는 socket을 받아야 함. (나중에 공부)

ISO/OSI reference model

  • ISO : International Standards Organization
    OSI : Open System Interconnection

  • OSI 7-layers model이 왜 나왔는가?
    옛날 은행에는 computer(Unix)가 귀해서 한 대만 있었다.
    그 multi-user들이 키보드와 모니터만 서버에 연결해서 사용했다.
    그 각각의 모니터를 terminal이라고 함.
    terminal로 연결해서 쓰는 Server들이 제조사마다 각각의 HW와 protocol을 사용했다.
    그러다보니까 monitor와 keyboard가 그대로이고 Server만 바꿔도 호환이 되지 않았다.

    그러한 번거로움을 없애기 위해
    ISO에서 "개방형 형태로 통신, 네트워크를 통해서 가는 system들은 표준화된 rule을 따르면 다 호환이 될 수 있도록 해보자"해서 reference model을 만듦 ➡️ 7 layer

  • ISO/OSI reference model = OSI 7 layers model :

    • presentation :
      application에서의 data를 통신의 중요도에 따라서 encryption, compression과 특별한 같은 일을 하는 layer
    • session :
      synchronization을 맞추고, 정해진 시간동안 논리적인 연결(로그인)을 유지해놓는 일.
  • 그런데 왜 internet에서 presentation layer, session layer를 뺐을까?
    internet이 나오면서 가장 먼저 나온 application이 web이었다. (HTTP)
    HTTP는 기본적으로 stateless이다. (연결을 유지하지도 않고 server에 web page를 요청하면, 자료를 browser에 보여주고 끝)

    모든 Internet application들이 암호화, 로그인정보 유지가 필요하지 않기 때문에
    internet protocol stack에서는 presentation, session에 관련된 부분을 application layer와
    또한 암호화와 관련된 security들은 transport layer(TCP)에서도 처리하도록 한다. (TLS, SSL, HTTPS)

    그래서 원래는 OSI 7 layer가 먼저 생겼지만
    presentation, session layer를 application layer 또는 transport layer에 포함을 시키고,
    지금의 internet protocol stack이 되었다.

  • 참고로 이때부터 개방형 시스템의 붐이 일어남.
    상호호환 가능하게 만들어짐. IBM, NVIDIA 등 이때 많은 발전을 이룸.
    Apple은 그 누구와도 호환하지 않음. (독자 개발)

Encapsulation

  • source의 message를 destination으로 보내줘야 하는데,
    그 message를 어떻게 internet을 통해서 destination까지 잘 보내줄 수 있을까?
    ➡️ internet stack protocl

    • 각각의 protocl들은 위, 아래에 transparent하다. (data가 철저히 보호됨)
    • 자기가 해야할 일을 위해서 Header를 붙임.
      그래서 Protocol은 HeaderData가 있음.
  • Encapsulation :

    • application message가 transport layer로 보내짐.
    • transport layer에서 transport header를 붙임. (segment)
      Transport header와 message를 하위 layer(network layer)로 보냄.
    • network layer에서는 어디서부터가 transport header이고 message인지를 모름.(transparent)
      network layer service를 위해서 network header를 붙임.(datagram)
      network header와 message를 하위 layer(link layer)로 보냄.
    • link layer도 어디서부터가 transport header이고 network header이고 message인지를 모름. 그냥 통째로 다 data임.
      마찬가지로 link layer의 header를 붙임.(frame)
      link layer header가 붙은 packet을 physical layer를 통해서 보냄.

    • physical layer를 통해 보낸 packet이 어떠한 기관을 통해 간다고 가정했을 때,
      switch(hub)를 통과한다.
      switch(hub)는 link layer에 대한 service만 하는 device이기 때문에
      2-layer(link, physical)밖에 없음.
      link layer에서는 자신의 header를 extract해서 무슨 일을 수행해야 하는지 확인함
      (어디서 온 것이고, 어디로 보내라는 것이고, 무엇을 해야 하는지)
      그리고 link layer는 자신의 header를 다시 만듦.
    • router의 하는 일은 routing이다.
      routing은 network layer에서 하기 때문에
      모든 router들은 3-layer(network, link, physical)밖에 없음.
      network, link layer는 각각의 header를 extract해서 무슨 일을 수행해야 하는지 확인함
      (어디서 온 것이고, 어디로 보내라는 것이고, 무엇을 해야 하는지)
      그리고 각 layer는 자신의 header를 다시 만듦.
    • 최종적으로 destination까지 보내짐.
      destination에서는 physical layer에서 transport layer까지 역순으로
      각각 자신의 layer에 해당하는 header만 extract하여 위의 layer로 올려줌.
      transport layer까지 자신의 header를 extract했다면,
      마지막으로 남은 message는 application으로 보내짐.
  • 이렇게 각각의 layer에서 각각의 일을들을 header를 저장한다 (Encapsulation)
    access router에서 frame을 받으면 다음과 같다.
    여기서 Decapsulation을 통해 message를 얻는다.

  • 카톡을 보낼 때 encapsulation, decapsulation 과정이 항상 진행된다.
    각각의 modularization된 layered architecture에서 일을 수행하여 message가 보내지는 것이다.


1.6 networks under attack : security

Network security

  • network security는 모든 layer에서 고려되어야 한다.

  • catch-up : attack이 발생하고 나서, 수습을 한다.
    (나오지도 않은 virus에 대해서 백신을 먼저 만들지 않는 것처럼)

Bad guys : put malware into hosts via Internet

  • malware라는 이상한 SW를 Internet을 통해 host에 전달
    (internet에 연결된 host들을 이용)

    • virus : self-replicating infection, object(file)형태로 들어와서 내 컴퓨터에서 실행
      ex) 랜섬웨어 : 누군가 내 컴퓨터에 이상한 program을 실행시킴. system sw를 지우거나, ... 등
    • worm : self-replicating infection, 실행되어지고 있는 object 자체에서 수동적으로 내부를 조종
      ex) 어떤 사이트에 로그인할 때, id pw를 치는 키보드 입력을 받아서 개인정보를 빼간다.
      ➡️ 요즘은 virus와 worm이 hybrid하게 나와서 구분하기 어렵다.
  • infected host can be enrolled in botnet, used for spam.
    감염된 host들은 botnet이라는 group에 들어가게 된다.

Bad guys : attack server, network infrastructure

  • Denial of Service(DoS) : attackers make resources unavailable to legitimate traffic by overwhelming resource with bogus traffic

    1. select target
    2. break into hosts around the network(botnet)
      botnet으로 들어간 사용자는 본인이 DoS 공격을 하고 있는지 모름
    3. send packets to target from compromised hosts
  • Distributed DoS(DDOS) :
    단일 컴퓨터의 Process로 공격하는 것이 DoS.
    DDoS는 여러 host들이 분산적으로 동시에 공격하는 것.

Bad guys can sniff packets

  • packet sniffing :
    shared Ethernet, wireless를 사용하는 broadcast media를 통해 지나가는 packet을 빼돌린다.
    • A : destination
      payload : msg, e-mail, id/pw 등
      ➡️ C는 "B가 A로 msg를 보내는구나"를 알 수 있음
      ➡️ protocol을 정확히 안다면 payload까지 모두 알 수 있다

Bad guys can use take address

  • IP spoofing : send packet with false source address
    • C가 B인 척하고 A로 보냄.

1.7 history

skip

profile
efficient computer vision

0개의 댓글