1. 컴퓨터 네트워크와 인터넷

조준형·2022년 12월 29일
0

컴퓨터 네트워크

목록 보기
1/6

1.1 인터넷이란?

구성요소적 측면

  • 수십억 개의 연결된 컴퓨팅 장치(computing devices)
    • 호스트 = 종단시스템(end system)
    • 인터넷의 가장자리에서 동작하는 네트워크 앱
  • 패킷 스위치: 패킷을 발송
    • 패킷: chunks of data
    • routers, switches
  • 통신링크
    • fiber, copper, radio, satellite
    • transmission rate: bandwidth
  • 네트워크
    • 장치 라우터, 링크의 모임
    • 조직에 의해 관리됨
  • 인터넷: network of networks
    • Interconnected ISPs
  • 프로토콜
    • 메시지 전송과 수신 제어
    • ex) HTTP(web), streaming video, skype, tcp, ip, wifi, 4G, Ehternet
  • 인터넷 표준
    • RFC: Request For Comments
    • IETF(Internet Engineering Task Force)에 의해 개발

서비스적 측면

  • 각 종단 시스템 상에서 수행되는 분산 응용들이 서로 데이터를 교환할 수 있게 하는 통신 인프라
    • Web, email, games, e-commerce, database, voting, file(MP3) sharing, social media, inter-connected appliances,…
  • 인터넷은 분산 응용들에게 programming interface를 제공
    • 송신/수신 앱이 연결할 수 있는 후크, 인터넷 전송 서비스 사용
    • 우편 서비스와 유사한 서비스 옵션 제공
  • 인터넷의 구성 요소들에 있어서의 발전은 새로운 응용들에 대한 필요성에 의해 좌우
  • 인터넷은 새로운 응용들이 지속적으로 개발되고 설치되는 기반 구조임

프로토콜이란?

  • 인터넷에서의 모든 통신 행위는 프로토콜에 의해 제어됨
  • 프로토콜은 네트워크 개체들 간에 송/수신되는 메시지들의 포맷과 순서를 정의하고, 메시지를 전송하고 수신할 때 해야할 행동들을 정의

1.2 가장자리 네트워크

  • 네트워크 가장자리
    • 호스트(end system): clients and servers
    • servers often in data centers
  • 엑세스 네트워크, 물리 매체: 사용자 디바이스가 처음으로 네트워크에 연결되는 부분
    • 유선, 무선 통신 링크
  • 네트워크 코어
    • 상호연결된 라우터
    • network of networks
  • 종단 시스템(end system, host)
    • 인터넷에 연결된 컴퓨터들
    • 응용프로그램을 수행
    • ex) Web, email
    • at edge of network
  • 클라이언트/서버 모델
    • 클라이언트 호스트가 서버에게 요청하고, 서버로부터 서비스를 수신(서버스 항상 동작 중)
    • ex) Web browser/server; email client/server
  • P2P(peer-to-peer) model:
    • 전용 서버들의 최소 사용 또는 서버 없이 동작(그때 그때 상황이 다름)
    • ex) Gnutella, KaZaA, Skype, BitTorrent
  • 연결지향형 서비스
    • Goal: 종단 시스템들간의 데이터 전송
      • 핸드셰이킹
        • 클라이언트와 서버가 패킷 전달 이전에 통신할 수 있는 준비를 함
        • 핸드셰이킹 과정이 끝나면 두 종단시스템간에 연결이 설정되었다고 함
        • 두 종단시스템들만이 연결 상태 정보를 유지
        • 할당된 버퍼와 상태 변수들로 구성
    • TCP(Transmission Control Protocol) service(RFC 793)
      • 신뢰적 데이터 전송(loss: acknowledgements and retransmissions)
      • 흐름 제어(sender won’t overwhelm receiver)
      • 혼잡 제어(senders “slow down sending rate” when network congested) ⇒ 수용 가능 이상의 traffic이 들어왔을 때
      • ex) HTTP(Web), FTP(file transfer), Telnet(remote login), SMTP(email)
  • 비연결형 서비스
    • Goal: 종단 시스템들 간의 데이터 전송

      • 핸드셰이킹 과정이 없음
    • UDP(User Datagram Protocol) service(RFC 768)
      - unreliable data transfer
      - no flow control
      - no congestion control
      - ex) streaming media, teleconferencing, DNS, Internet telephony

      엑세스 네트워크와 물리적 매체

      종단 시스템을 종단 라우터에 어떻게 연결하는가?

  • 가정 접속
    • point to point access
      • Dialup via modem
        • up to 56 Kbps direct access to router (often less)
        • Can’t surf and phone at same time: can’t be always on
    • digital subscriber line(DSL)
      • use existing telephone line to central office DSLAM
        • data over DSL phone line goes to Internet
        • voice over DSL phone line goes to telephone net
      • 24~52 Mbps dedicated downstream transmission rate
      • 3.5~16 Mbps dedicated upstream transmission rate
      • ADSL: asymmetric digital subscriber line
        • up to 1 Mbps upstream(today typically < 256 kbps)
        • up to 8 Mbps downstream(today typically < 1Mbps)
        • 주파수분할 다중화(FDM) 이용
          • 50kHz - 1MHz for downstream
          • 4kHz - 50kHz for upstream
          • 0kHz - 4kHz for ordinary telephone
      • VDSL(very high-data rate digital subscriber line)
      • FTTH(fiber to the home)
    • cable modems
      • HFC: hybrid fiber coax
        • Asymmetric
          • 40Mbps ~ 1.2Gbps downstream transmission rate
          • 30~100 Mbps upstream transmission rate
      • 중요 특징: 공유 방송 매체
        • 다운스트림과 업스트림 채널 모두 여러 사용자에 의해 공유
  • 기관 접속(local area networks)
    • company/univ local area network(LAN) connects end system to edge router
    • mix of wired, wireless link technologies, connecting a mix of switches and routers
      • Ethernet: wired access at 100Mbps, 1Gbps, 10Gbps
      • Wifi: wireless access points at 11, 54, 450Mbps
  • 이동 접속/무선 접속
    • 공유된 무선 액세스 네트워크가 종단 시스템을 라우터에 연결
      • 기지국 또는 액세스 포인트(AP)를 통해
    • wireless LANs
      • within building(100 ft.)
      • 802.11b/g/n (WiFi): 11, 54, 450 Mbps transmission rate
    • Wide-area cellular access networks
      • provided by telco(cellular) operator, 10’s km
      • Between 1~10Mbps over cellular system
      • 3G, 4G cellular networks(5G coming)
  • Access networks: data center networks
    • high-bandwidth links(10s to 100s Gbps) connect hundreds to thousands of servers together, and to Internet
  • 물리 매체
    • Bit: 소스에서 목적지로 일련의 송신기 - 수신기 쌍을 거쳐 전달됨
      • 각 송신기-수신기 쌍에 대해 이 비트는 물리매체 상에서 전자파 혹은 광펄스를 전파함으로써 전달됨
    • physical link: 송신기와 수신기 사이에 존재
    • 유도 매체
      • signals propagate in solid media: copper, fiber, coax
    • 비유도 매체
      • signals propagate freely: radio
    • Twisted Pair(TP)
      • two insulated copper wires
      • UTP(UUnshielded TP)
        • category 3: traditional phone wires, 10 Mbps Ethernet
        • category 5 TP: 100Mbps Ethernet
  • 물리 매체: 동축케이블, 광케이블
    • 동축케이블
      • two concentric copper conductors
      • baseband
        • 비트스트림이 직접 케이블로 보내지고, 그 신호가 다른 주파수 대역으로 이동되지 않음
        • single channel on cable
        • legacy Ethernet
      • broadband
        • 송신기는 디지털 신호를 특정 주파수 대역으로 이동하고 그 결과의 아날로그 신호는 그 송신기로부터 하나 이상의 수신기로 이동
        • multiple channel on cable
        • HFC
    • 광케이블
      • glass fiber carrying light pulses, each pulse a bit
      • high-speed operation
        • high-speed point-to-point transmission(e.g. 5 Gps)
      • 낮은 에러율, 신호 감쇄 현상이 매우 적음, 전자기적인 간섭에 영향을 받지 않음, 도청이 매우 어려움
  • 물리 매체: 라디오
    • 전자기 스펙트럼으로 신호를 전달
    • no physical wire
    • 전파 환경과 거리에 영향을 받음
      • reflection
      • obstruction by objects
      • interference
    • Radio link types
      • terrestrial microwave
        • e.g. up to 45 Mbps channels
      • LAN(e.g. WiFi)
        • 11Mbps, 54Mbps
      • wide-area(e.g. cellular)
        • 3G cellular: ~1Mbps
        • 4G cellular: ~10Mbps
      • satellite
        • kbps to 45Mbps channel(or multiple smaller channels)
        • 270 msec end-end delay
        • 정지 위성과 저궤도 위성

1.3 코어 네트워크

회선 교환

  • 전화망의 경우
    • 송신자와 수신자 사이에 연결을 먼저 설정
    • 송신자와 수신자 사이의 경로에 있는 교환기들이 그 연결에 대한 연결 상태를 유지해야 하는 연결 → 회선
  • 네트워크가 회선을 설정할 때 그 연결동안 네트워크 링크에 일정한 전송률을 예약
    • 송신자는 수신자에게 보장된 고정 전송률로 데이터 전송 가능
  • 각 링크가 n개의 회선을 가진 경우, 각 링크는 n개의 동시 연결을 지원
  • 종단간 연결이 사용되는 링크에 대해, 그 연결은 연결이 지속되는 동안 그 링크 대역폭의 1/n을 사용
  • 회선 예약 → 독점 사용
  • 콜 셋업이 요구됨(단점)
  • network resources(e.g. bandwidth) divided into pieces
    • pieces allocated to calls
  • 다중화: dividing link bandwidth in pieces
    • 주파수 분할(FDM)
      • 링크의 주파수 스펙트럼을 링크를 통해 설정된 연결들이 공유
      • 각 연결에게 주파수 대역을 고정으로 제공
      • 전화망의 경우, 4kHz 주파수 대역을 제공
    • 시분할(TDM)
      • 시간을 일정 주기의 프레임으로 나누고 각 프레임은 고정된 수의 시간 슬롯으로 나눔
      • 네트워크가 링크를 통해 하나의 연결을 설정할 때, 그 네트워크는 모든 프레임 내의 한 시간 슬롯을 그 연결에 할당

패킷 교환

  • 소스는 응용 계층 메시지를 패킷으로 알려진 작은 데이터 묶음으로 분할
  • 각 패킷은 통신 링크와 패킷 교환기들을 통해 전달됨
  • 사용자 A와 B의 패킷들은 네트워크 자원을 공유
  • 각 패킷은 그 링크의 최대 전송률과 같은 속도로 전송됨
  • 각 패킷은 목적지 주소를 포함
  • 각 패킷은 독립적으로 처리
  • 각 패킷은 일시적인 과부하를 제거하기 위한 버퍼가 존재
  • 통계적 다중화: A&B 패킷의 순서가 고정된 패턴을 따르지 않음
    • TDM에서 각 호스트는 주기적으로 돌아오는 TDM프레임에서 일정한 슬롯을 얻음
  • host sending fuction
    • 응용프로그램 메시지를 받음 → 패킷으로 쪼갬(L-bits 길이) → R전송률(대역폭)을 가진 엑세스 네트워크로 보냄
    • 패킷 전송지연 = L(bits)/R(bits/sec)
  • store-and-forward
    • 다음 링크로 전송될 수 있기 전에 전체 패킷이 라우터에 도착해야 한다
    • L비트 패킷을 한 호스트에서 다른 호스트로 보내는데 걸리는 시간
      • Q개의 링크, 각각 R bps의 속도, 전체시간 = Q*L
  • 패킷 교환 vs 회선 교환
    • 패킷 교환 반대론자
      • 가변적이고 예측할 수 없는 지연 때문에 실시간 서비스에 부적당
    • 패킷 교환 옹호론자
      • 회선 교환보다 대역폭을 보다 효율적으로 공유
      • 더욱 간단하고 효율적이고, 구현하는데 비용이 적게듬
  • 메시지 분할
    • 분할과 재조립
      • 송수신측 설계를 복잡하게 하지만, 분할을 통해 더 많은 이점을 얻음
    • 메시지 교환
      • 메시지를 분할하지 않는 패킷 교환망
    • 장점
      • 메시지 교환으로 얻는 지연보다 훨씬 적은 종단간 지연을 얻는다.
        • 메시지 교환은 순차적인 전송을 하는 반면, 패킷 교환은 동시 전송을 함
      • 비트 오류 발생의 경우
        • 교환기에서 패킷 내의 오류 발견시, 교환기는 전체 패킷을 버림
        • 메시지 교환의 경우, 한 비트 오류가 발생하면 전체 메시지가 버려짐
        • 패킷 교환의 경우, 오류가 발생한 패킷만 버려짐
    • 단점
      • 제어 정보의 전달
        • 송수신자의 식별자, 패킷 또는 메시지 식별자와 같은 정보들이 패킷 또는 메시지 헤더에 포함
        • 데이터의 바이트당 헤더 오버헤드의 양에 있어서 메시지 교환보다 패킷 교환의 경우가 더 높다
  • 가상 회선 네트워크
    • 가상 회선 번호에 따라 패킷을 전달하는 네트워크
    • 가상회선(VC)
      • 소스와 목적지 호스트 사이의 경로: 일련의 링크들과 패킷 교환기들
      • 가상 회선 번호: 경로 상의 각 링크에 대해 하나의 번호 할당
      • 경로 상의 각 패킷 교환기 내의 VC번호 전환 테이블 내에 엔트리들로 구성
    • 각 패킷은 태그(가상회선 ID)를 포함하고 태그는 다음 홉(next hop)을 결정
    • 호 설정 시간에 고정된 경로가 결정됨
    • 라우터들은 진행 중인 연결에 대해 상태 정보 유지
    • 경로 상의 각 링크마다 VC 번호가 바뀌는 이유
      • 링크마다 번호를 바꿈으로써, VC 필드의 길이를 줄일 수 있음
      • VC 경로 상의 각 링크에 대해 서로 다른 VC 번호를 허용함으로써 네트워크 관리 기능이 간편해짐
        • 경로 상의 모든 링크에 대해 공통의 번호가 요구되면, 교환기들이 연결에 사용될 VC번호 협의를 위해 추가적인 메시지 교환을 해야함
  • 데이터그램 네트워크
    • 호스트의 목적지 주소에 따라 패킷을 전달하는 네트워크
    • 각 패킷은 헤더에 목적지 주소를 포함
    • 각 패킷 교환기(router)는 목적지 주소를 외부로 나가는 링크로 매핑하는 라우팅 테이블을 가지고 있음
    • VC 네트워크와 비교하여, 교환기 내에 연결 상태 정보를 유지하지 않음
    • 세션동안 경로는 변경될 수 있음

Internet structure: network of networks

  • roughly hierarchical
  • ISP들간의 연결
  • hosts connect to Internet via access Internet Service Providers(ISPs)
  • access ISPs in turn mush be interconnected
    • so that any two hosts(anywhere!) can send packets to each other
  • resulting network of networks is very complex
    • evolution driven by economics, national policies
  • at center: small # of well-connected large networks
    • tier-1 commercial ISPs(e.g. Level 3, Sprint, AT&T, NTT), national & international coverage
    • content provider network(e.g. Google): private network that connects it data centers to Internet, often bypassing tier-1 regional ISPs
  • IXP: ISP 사이의 exchange point ; ISP끼리 peering link통해 이동하기도 함; 엑세스 네트워크끼리 regional network를 만들기도 함

1.4 패킷 교환망에서 지연과 손실

  • 패킷들은 라우터 큐(또는 버퍼)에 대기 → 순서대로
    • 패킷은 큐에 대기하고 차례를 기다림
    • 패킷 도착률이 출력 링크 용량을 초과
    • 대기중인 패킷을 보관할 메모리가 가득 차면 패킷 손실이 발생
  • d_proc: 노드 처리 지연
    • 헤더 조사 후 출력 링크 결정을 하는데 걸리는 시간
    • 비트 오류 검사
  • d_queue: 큐잉 지연( 크게 변하는 값 ⇒ depends on congestion)
    • 전송을 위해 출력 링크에서 대기하는 시간
    • 라우터에서의 congestion 정도에 의존
    • 버퍼에서 자기 차례가 올때까지 시간
    • R = link bandwidth(bps), L =packet length(bits) a = average packet arrival rate(packets/sec)
    • 트래픽 강도: La/R
      • La/R ~0: average queuing delay small
      • La/R → 1: delays become large
      • La/R > 1: more “work” arriving than can be serviced, average delay infinite
  • d_trans: 전송 지연
    • R: 링크 대역폭(band,width, bps)
    • L: 패킷 길이(bits)
    • 전송지연 = L/R
      • 저장 후 전달 지연
      • 패킷의 모든 비트를 링크로 전송하는데 필요한 시간
  • d_prop: 전파 지연
    • d = length of physical link
    • s = 전파 속도
      • 물리적 매체에 따라 다름
      • 210^8m/sec~310^8m/sec
    • 전파 지연 = d/s
      • 링크의 처음에서 다음 라우터까지 전파되는데 걸리는 시간
  • d_nodal = d_proc + d_queue + d_trans + d_prop
    • 전송지연은 패킷의 길이와 전송률의 함수, 거리와 무관
    • 전파지연은 거리의 함수, 패킷길이 혹은 전송률과 무관
  • 패킷 손실
    • queue(aka buffer) preceding link in buffer has finite capacity
    • when packet arrives to full queue, packet is dropped(aka lost)
    • lost packet may be retransmitted by previous node, by source end system, or not retransmitted at all
  • Throughput(처리율)
    • rate(bits/time unit) at which bits transferred between sender/receiver
      • Instantaneous(순간 처리율): rate at given point in time
      • Average(평균 처리율): rate over longer period of time

1.5 프로토콜 계층과 서비스 모델

  • Internet protocol stack
    • application: supporting network applications
      • HTTP, IMAP, SMTP, DNS
    • transport: process-process data transfer
      • TCP, UDP
    • network: routing of datagrams from source to destination
      • IP, routing protocols
    • link: data transfer between neighboring network elements
      • Eternet, 802.11(WiFi), ppp
    • physical: bits “on the wire”
    • presentation: allow applications to interpret meaning of data, e.g. encryption, compression, machine-specific conventions
    • session: synchronization. checkpointing, recovery of data exchange
    • presentation과 session계층은 application계층에 포함
  • Layering: logical communication
    • 패킷 교환기
      • 1-3계층 구현
      • 브리지: 1,2 계층 구현(스위치)
    • 호스트는 5계층을 모두 구현
    • 인터넷 구조가 네트워크 “가장자리”에 그 복잡성을 유지
  • Protocol layering and data
    • Each layer takes data from above
      • adds header information to create new data unit
      • passes new data unit to layer below

1.6 공격받는 네트워크

  • Bad guys: put malware into hosts via Internet
    • Trojan horse
      • hidden part of some otherwise useful software
      • today often in Web page(Active -X plugin)
    • virus
      • infection by receiving object(e.g. e-mail attachment), actively executing
      • self-replicating: propagate itself to other hosts, users
    • worm
      • infection by passively receiving object that gets itself executed
      • self-replicating: propagates to other hosts, users
  • Bad guys: attack server, network infrastructure
    • Denial of Service(Dos): attackers make resources (server, bandwidth) unavailable to legitimate traffic by overwhelming resource with bogus traffic
      1. select target
      2. break into hosts around the network (see botnet)
      3. send packets to target from compromised hosts
  • The bad guys can sniff packets
    • packet sniffing
      • broadcast media (shared Ethernet, wireless)
      • promiscuous network interface reads/records all packets(e.g. including passwords!) passing by
  • The bad guy can use false source addresses
    • IP spoofing: send packet with false source address
  • The bad guy can record and playback
    • record-and-playback: sniff sensitive info(e.g. password), and use later
      • password holder is that user from system point of view
profile
코린이

0개의 댓글