개발하는 뚝딱이

컴퓨터 네트워크 ch2(1) 본문

컴퓨터 네트워크

컴퓨터 네트워크 ch2(1)

개발자뚝딱이 2019. 9. 27. 04:24

Application Layer : Principles of network applications

 


 

Creating a network app

Write programs that

  • run on different end systems
  • communication over a network
  • e.g., Web : 웹 서버 소프트웨어와 브라우저 소프트웨어 사이의 소통

 

No software written for devices in network core

  • Network core devices do not function at app layer, but instead function at the network layer and below
  • This design allows for rapid app development

네트워크 core에서는 layer3까지만 다룬다

 

Application architectures

possible structure of applications:

  • Client-server
  • Peer-to-peer (P2P)
  • Hybrid of client-server and P2P (사실은 P2P이지만, client-server 성격도 지녔다)

 

Client-server architecture

  • server :
    • always-on host
    • permanent IP address
    • server farms for scaling ; server 하나로는 힘드므로 여러 대 경영
  • clients:
    • communicate with server
    • may be intermittently connected
    • may have dynamic IP address
    • client끼리 직접 소통 X

자료 요청 : client

자료 제공 : server

 

 

 

Pure P2P architecture

  • no always on server
  • client가 server도 될 수 있다!
  • 임의의 peer와 직접 통신이 가능하다
  • Peers는 다른 Peer에게 서비스를 요청하기도 하고, 제공하기도 한다
    • Self scalability ; Peer가 많으면 client뿐 아니라 server의 개수도 많아짐 ; 확장성 GOOD!
  • peers are intermittently connected and change IP address
    • 관리가 힘들다

 

 

Hybrid of client-server and P2P

  • 프로그램 키면, 서버에 'On' 상태 올리고, 그 다음 communicate!
  • Skype
    • voice-over-IP (VoIP) P2P application (처음에는 음성만)
    • centralized server (directory) : finding address of remote party
    • client-client connection : direct (not through server)
  • Instant messaging
    • Chatting between two users is P2P
    • Presence detection/location centralized:
      • User registers its IP address with central server when it comes online
      • User contacts central server to find IP addresses of buddies

 

Processes communicating

process : program running with a host

  • within same host, two processes communicate using inter-process communication (defined by OS)
  • processes in different hosts communicate by exchanging messages

 

Sockets

socket interface 

  • located between application and TCP, UDP and other protocol stacks (common interface)
  • A process sends/receives messages to/from its socket

socket interface :: 표준화된 interface

TCP/UDP 인터넷 protocol 외에도 다른 프로토콜을 지원하기엔 복잡하다

 

Transport & Application layer를 왔다갔다하려면 socket 필요

 

 

Addressing processes

A host has a unique 32-bit IP address (IP v4)

Q : IP 주소만 알면 통신이 가능한가?

A : No! 한 host 내에서 여러 가지 process가 동작할 수 있다!

 

Identifier includes both the IP address and Port Number associated with the process on the host

 

ex) HTTP server : 80    SMTP(simple mail) : 25

 

 

 

Addressing

 

 

App-layer protocol

  • Types of messages exchanged
    • ex) request & response messages
  • Syntax of message
    • What fields in messages & how fields are delineated (field 구분성)
  • Semantic of the fields (의미론) 
    • meaning of information in fields
  • Rules for when and how processes send & respond to messages
  • Open and proprietary protocols
    • Open protocol : HTTP, SMTP
    • Proprietary protocol : skype (사설-공개 x)
      • 해커 - 역으로 파헤치기 ; sniffing ; reverse engineering ; 날아가는 packet을 중간에 캐치해서 분석함

 

What transport service does and app need?

Data integrity

some apps(e.g., audio) can tolerate some loss

other apps(e.g., file transfer, telnet) require 100% reliable data transfer

 

Throughput

some apps(e.g., multimedia) require minimum amount of bandwidth to be "effective"

 

Timing

some apps(e.g., Internet telephony, interactive games) require low delay to be "effective"

 

Security

Encryption, data integrity

 

 

Transport service requirements of common apps

real-time audio/video : Time sensitive :: 애매, no도 가능

stored audio/video : time sensitive :: 어느 정도의 boundary 이내에 들어오면 괜찮음 ; yes, no 가능

instant messaging :: time sensative :: yes and no

 

 

Internet transport protocols services

TCP service : end-to-end data transfer

  • reliable transport between sending and receiving process ; 에러 없이, 순서대로
  • flow control : sender won't overwhelm receiver (receiver buffer overflow 방지)
  • congestion control : throttle sender when network overloaded (라우터 버퍼)
  • does not provide : timing, minimum bandwidth guarantees
  • connection-oriented : setup a full-duplex connection between client and server processes ; handshaking phase - TCP connection

UDP service : 최선을 다하지만 loss 생김

  • 보내고 받는 과정에서  unreliable data
  • does not provide : reliablity, flow control, congestion control, timing, bandwidth guarantee or connection setup
  • 하지만 왜 UDP? : connection이 끊어지더라도 그 다음 정보를 바로 받기 위해서. TCP의 경우, 전송이 지연되면 순서대로 다 받아와야 하기 때문에 딜레이가 생긴다!

 

 

Internet apps : application, transport protocols

 

streaming multimedia, Internet telephony에서 요즘 트랜드는 TCP

 

 

Securing TCP

TCP&UDP

  • no encryption → presentation layer에서 지원됨

TLS (Transport Layer Security) or SSL(Secure Socket Layer)

  • provides encrypted TCP connection
  • 1:1, 상대가 결정되어 있어서 보안이 좀 쉬운 편
  • data/message confidentiatily, and message authentication
  • TLS is at app layer ; App use TLS libraries which talks to TCP
  • DTLS (Datagram TLS) for UDP :: N:1 보안이 좀 어렵다

 

 

 

'컴퓨터 네트워크' 카테고리의 다른 글

컴퓨터 네트워크 ch2(3)  (0) 2019.10.08
컴퓨터 네트워크 ch2 (2)  (0) 2019.10.08
컴퓨터 네트워크 ch1 (3)  (0) 2019.09.25
컴퓨터 네트워크 ch1 (2)  (0) 2019.08.29
컴퓨터 네트워크 ch1 (1)  (0) 2019.08.27