네트워크 (Networks)
[Networks] 3주 1차 : Application Layer
배승원
2022. 3. 16. 23:26
- Principle of Network Applications
- Some network apps
- E-mail
- Web
- Text massaging
- Remote login
- P2P file sharing
- Multi-user network games
- …
- Creating a network app
- Write programs that :
- Run on (different) end systems
- Communicate over network
- E.g. Web server software communicates with browser software
- No need to write software for network-core devices
- Network-core devices do not run user applications
- Applications on end systems allows for rapid app development & propagation
- Application architecture
- Client-server architecture
- Server
- Always-on host
- Permanent IP address
- Data center for scaling
- Clients
- Communicate with server
- May be intermittently (간헐적으로) connected
- May have dynamic IP addresses
- Do not communicate directly with each other
- P2P architecture
- No always-on server
- Arbitrary end systems directly communicate
- Peers request service from other peers, provide service in return to other peers
- Self-scalability : New peers bring new service capability, as well as new service demands
- Peers are intermittently connected and change IP addresses
- Process communicating
- Process : Program running within a host
- Within same host, two processes communicate using inter-process communication (defined by OS)
- Processes in different hosts communicate by exchanging messages
- Client process : Process that initiates communication
- Server process : Process that waits to be contacted
- Aside : application with P2P architecture have client processes & server processes
- Sockets
- 프로세스가 네트워크를 통해 데이터를 내보내거나 받는 창구 역할
- Protocol, IP address, port number로 구성
- Process sends / receives massages to / from its socket
- Socket analogous to (유사한) door
- Sending process shoves (밀치다) message out door
- Sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process
- Addressing processes
- To receive messages, process must have identifier
- Host device has unique 32-bit IP address
- Identifier includes both IP addresses and port numbers associated with process on host
- Example
- Example port numbers
- HTTP server : 80
- Mail server : 25
- To send HTTP message to ajou.ac.kr web server
- IP address : 128.xxx.xxx.xx
- Port number : 80
- App-layer protocol (규칙 체계) defines
- Types of messages exchanged
- Message syntax
- What fields in messages & how fields are delineated?
- Message semantics (의미)
- Meaning of information in fields
- Rules for when and how processes send & respond to messages
- Open protocols
- Defined in RFCs
- Allows for interoperability (상호 운용 가능)
- E.g. HTTP, SMTP
- Proprietary (소유권이 따로 있는) protocols
- What transport service does an app need?
- Data integrity
- Some apps (e.g. File transfer, web transactions) require 100% reliable data transfer
- Other apps (e.g. Audio) can tolerate some loss
- Timing
- Some apps (e.g. Internet telephony, interactive games) require low delay to be “effective”
- Throughput (처리율)
- Some apps (e.g. Multimedia) require minimum amount of throughput to be “effective”
- Other apps (“elastic apps”) make use of whatever throughput they get
- Security
- Transport service requirements : common apps
- Internet transport protocols services
- TCP service
- Reliable transport between sending and receiving process
- Flow control : Sender won’t overwhelm receiver
- Congestion control : Throttle sender when network overloaded
- Does not provide : Timing, minimum throughput guarantee, security
- Connection-oriented : Setup required between client and server processes
- UDP service
- Unreliable data transfer between sending and receiving process
- Does not provide : Reliability, flow control, congestion control, timing, throughput guarantees, security or connection setup
- 그럼에도 UDP를 사용하는 이유는 데이터 처리의 신속성 때문
- Securing TCP
- TCP & UDP
- No encryption
- Cleartext (암호문이 아닌 평문) passwords sent into socket traverse (횡단하다) internet in cleartext
- SSL
- Provides encrypted TCP connection
- Data integrity
- End-point authentication
- SSL is at app layer
- Apps use SSL libraries, that “talk” to TCP
- SSL socket API
- Cleartext passwords sent into socker traverse internet encrypted
'네트워크 (Networks)' Related Articles