CS

컴퓨터 네트워크 개론 (1) - Internet Overview

Internet Overview(95)
  • The internet: a ‘nuts and bolts’(Component) view
    • Billions of connected computing devices:
      • hosts = end systems(devices)
      • running network apps at Internet’s “edge”
    • Packet switches: forward packets(데이터 chunks)
      • routers, switches
    • Communication links
      • fiber, copper, radio, satellite
      • transmission rate: bandwidth 대역폭
    • Networks
      • collection of devices, routers, links: managed by an organization
    • Internet: “Network of network”
      • Interconnected ISPs(Internet Service Providers)
    • Protocols - 어디에나 있음
      • Control sending, receiving of messages
      • ex) HTTP, Video Streaming, Skype, TCP, IP, Wifi, 4G, Ethernet
    • Internet standards
      • RFC: Requests for Comments(IETF에서 제공하는 인터넷 표준을 명시해 놓은 문서)
      • IETF: Internet Engineerging Task Force(국제 인터넷 표준화 기구)
  • The Internet: a ‘Services’ view
    • Internet = Infrastructure that provides services to applications:
      • Web, email, games, social media, video, ...
    • Internet은 distributed applications에게 프로그래밍 인터페이스를 제공함
      • ‘hooks’ allowing sending/receiving apps to ‘connect’ to, use internet transport service
      • 우편 서비스처럼 service options을 제공함
  • Network Protocol
    • 인터넷에서의 모든 communication 활동은 protocol에 의해 통제됨
    • Needs to be very clear and strict
    • The protocol defines format, order of messages sent and received among network entities, and actions taken on message transmission, receipt

Internet Structure - Network Edge

  • A closer look at Internet Structure
    • Network Edge:
      • hosts: clients and servers
      • servers는 주로 데이터 센터에 있음(구글, 아마존)
     
    • Access network, physical media
      • 유/무선 communication links
    • Network core
      • Interconnected routers
      • 네트워크들의 네트워크

 

  • Access networks and physical media
    • End systems을 edge router에 연결하는 방법
      • Residential access network(집)
      • Institutional access network(학교, 기업)
      • 모바일 access network(Wifi, 4G)
  • Access network: cable-based access 
    • FDM(Frequency Division Multiplexing)
      • 서로 다른 주파수 대역에서 서로 다른 채널을 전송
      • 주파수 분할 다중화
      • 총 대역폭을 겹치치 않는 일련의 주파수 하부 대역으로 분리
      • 분리된 대역을 각각 개별 신호를 전달하는 데 사용
    • HFC(Hybrid Fiber coax) 광동축혼합망
      • 비대칭적임
        • downstream 전송률: 40Mbps-1.2Gbps
        • upstream 전송률: 30-100Mbps
    • A network of cable, fiber attaches homes to an ISP router
      • homes share access network to the cable headend
      • Cable head-end: 케이블 서비스를 가입자들에게 제공하기 위해 지역 케이블 사무실에 있는 설비
      • CMTS(Cable Modem Termination System): 케이블 모뎀 데이터를 인터넷 전송을 위한 데이터용 패킷으로 바꾸어 주는 장비
  • Access networks: DSL(Digital Subsriber Line)
    • 지역 전화망을 통해 디지털 데이터 전송을 제공하는 기술
    • DSL은 높은 주파수를 사용, 일반 전화는 낮은 주파수
    • CO(Central Office)까지 이어진 기존의 전화선을 사용
      • DSL 전화선을 통해 data와 voice 모두 전송
    • Downstream 전송률: 24-52Mbps
    • Upstream 전송률: 3.5-16 Mbps ⇒ 매우 느림
    • DSLAM: DSL Access Multiplexer
  • Access networks: Fiber to the home(FTTH)
    • CO부터 home까지 광섬유 path 제공
    • Optical network
      • Data 전달을 위해 광섬유 사용
      • HFC나 전화선보다 빠른 속도
      • ONT(Optical Network Terminator)
        • 이웃 splitter(광신호 분배기)까지 전용(dedicated) 광섬유 회선으로 연결
      • OLT(Optical Line Terminator)
        • Splitter가 OLT 연결, 광신호 ↔ 전기 신호 변환해줌
    • 이른바 Gigabit 속도를 위해 필수적
      • 한국에서는 Dominant 기술임
  • Access networks: Home networks
    • Wifi 무선 AP(Access Point)
    • Wired Ethernet: 직접 연결
    • NAT(Network Address Translator → Private Network)
  • WAN, Wireless Access Networks
    • Shared wireless access network은 end system을 router와 연결
      • AP, Access Point’라고도 불리는 base station을 통해
        • AP = 무선랜 서비스를 제공하는 소형 무선 단말기(ex: 인터넷 공유기)
    • Wirless local are networks(WLANs)
      • 일반적으로 건물 내외(~30m)
      • 802.11b/g/n (Wifi): 11, 54, 450Mbps transmission rate
    • Wide-area cellular access networks
      • 모바일 cellular network operator가 제공함(수십 km)
      • 수십 Mbps
      • 4G, 5G 네트워크

 

  • Access networks: Enterprise networks
    • Companies, universities, etc
    • 유/무선 link 기술 혼합, switches and routers 모두 연결
      • Ethernet: 유선 access(100Mbps, 1Gbos, 10Gbos)
      • Wifi: 무선 access point(11, 54, 450 Mbps)서로 다른 대역폭

 

  • Access networks: Data center networks
    • High-bandwidth links(수십 ~ 수백 Gbps or Tbps)가 수백개의 servers를 함께 연결하며 Internet과도 연결함

 

  • Host: sends packets of data
    • Host sending function:
      • takes application message
      • 패킷이라 불리는 작은 덩어리로 나눔(길이: L bits)
      • 나눠진 패킷을 Transmission rate R access network로 전송함
      • Link transmission rate = Link Capacity = Link bandwidth
    • 패킷 전송 Delay = L bit의 패킷을 link로 전송하는 데 필요한 시간 = L(bits) / R(bits/sec)

 

  • Links: Physical Media
    • Bit: Transimitter/Receiver 쌍 사이로 전파
    • Physical link: Transmitter와 Receiver 사이에 있는 것
    • Guided media: 유도매체, sold 매체를 통해 전파(copper, fiber, coax)
    • Unguided media: 신호가 자유롭게 전파(Radio)
    • Twisted Pair(TP) - Guided media에 속함
      • Two insulated copper wires
        • Category 5: 100Mbps, 1Gbps Ethernet
        • Category 6: 10Gbps Ethernet ⇒ 점점 더 많이 사용
      • Unshiled twisted pair(UTP)
        • LAN에 보통 많이 사용
    • Coaxial cable(동축 케이블)
      • 두 개의 동심 동축 전도체로 이루어짐
      • 양방향
      • Broadband:
        • Multiple frequency channels on cable
        • 수백 Mbps
    • Fiber optic cable: 광섬유
      • 유리섬유가 light pulses를 전달, 각 pulse가 1bit
      • 고속 연산
        • 고속 P2P 전송(수십-수백Gbps)
      • Error가 적음
        • Repeater가 존재함
        • 전자기적 noise로부터 면역임
    • Wireless radio
      • 신호는 전자기적 스펙트텀 중 다양한 bands에서 전달됨
      • 물리적인 wire가 없음
      • broadcast, Half-duple’: 반이중전송방식(한번에 하나만)
      • Propagation environment effects:
        • Reflection(반사)
        • Obstruction by objects(방해)
        • 간섭/noise

    • Radio link types:
      • Wireless LAN(Wifi): 수십~백 Mbps, 수십 m
      • Wide-Area(4G): 수십 Mbps, 수 km
      • Blutooth: Cable 대체, 짧은 유효거리 및 limited rates
      • Satellite: 채널당 최대 45mbp, 270ms end-end delay

Internet Structure - Network Core

  • The Network Core
    • 서로 연결된 수많은 라우터들
  • Packet Switching: Hosts는 applicaion layer message를 packets으로 분해
    • 네트워크는 패킷들을 source부터 desination까지의 길을 따라서 다음으로 포워딩함

 

  • Two key network-core functions: 포워딩 & 라우팅
    • Forwarding(Switching이라고도 부름)
      • Local action: arriving 패킷을 router의 input link로부터 적절한 router output link로 옮김
    • Routing
      • Global action: 패킷이 지나갈 Source-destination 경로를 결정
      • 라우팅 알고리즘

 

  • Packet switching: store-and-forward
    • Packet transmission delay: L-bit의 패킷을 R bps 속도로 link에 전송할 때 L/R seconds가 소요됨
    • Store and forward: 다음 link로 전달되기 전에 모든 패킷이 라우터에 도착해야 함
    • L= 10kbits, R = 100Mbps이면 one-hope 전송 delay = 0.1msec
  • Packet switching: queueing(FIFO)
    • Queueing은 처리되는 속도보다 작업이 더 빠르게 도착할 떄 발생
    • Packet queuing and loss: 만약 일정 기간 동안 도착 rate(bps 단위)가 전송 rate(bps 단위)를 초과하면:
      • Packets은 전송되기를 기다리며 queueing
      • 만약 라우터의 memory(buffer)가 꽉 찬다면 packet은 버려질 수도 있음

 

  • Alternative to packet switching: Circuit switching 서킷 스위칭통신 이전에 우선 Circuit이라는 연결을 두 장비 사이에 만든 다음 데이터가 그 서킷을 통해 이동(하나의 회선을 할당받아 데이터를 주고 받는 방식)
    • End-End resources allocated to, reserved for ‘call’ between source and destination
    • Dedicated resouces: no sharing(리소스 독점 → 공유 불가)
      • Circuit-like(guaranteed) performance
    • Circuit segment idle if not used by call(no sharing)
    • 전통적인 전화망에서 일반적으로 사용됨

 

  • Circuit Switching: FDM and TDM
    • FDM(Frequency Divison Multiplexing)
      주파수를 쪼개서 공유하는 방식(시간은 고정)TV나 라디오 방송에 쓰임
      • optical, electromagnetic frequencies이 좁은 주파수 대역으로 나뉘어짐
      • 각자의 call은 각자 대역을 할당할 수 있으며 그 대역 안에서 max rate로 전송 가능
    • 채널 간의 상호 간섭을 막기 위해 보호대역이 필요 → 채널 이용률 감소
    • TDM(Time Division Multiplexing)
      주파수를 시간 단위로 분할하여 공유하는 방식(주파수는 고정)
      • time divided into slots
      • 각 call은 배정된 time slot에 최대 rate으로 전송 가능
    • 링크의 높은 대역폭을 여러 연결이 시간을 분할하며 사용
  • Packet switching VS Circuit Switching
    • Links: 1Gb/s, User: 100Mbps(active) & active 10% of time
    • 서킷스위칭: 1000/100 = 10명(자원을 할당하기 때문에 바로 계산 가능)
    • 패킷스위칭: 35명의 경우 10명 이상이 동시에 접근할 확률은 0.004
      • On-demand 형식이라 확률적으로 계산해야 함
      • 매우 작으므로 35명 이용이 가능하다고 볼 수 있음
      • 어느 시점에 35명 중 k명이 사용할 확률 = 35Ck X 0.9^(35-k) X 0.1 ^k
    • 패킷스위칭은 간헐적인 데이터에 좋음
      • Resource sharing
      • Simpler, no call setup
      • Excessive congestion 과도한 혼잡이 발생할 수도 있음(Buffer overflow로 인한 packet delay와 loss)
    • 서킷스위칭의 장점
      • Better Application performance(대역폭 예약)
      • 예측하기 쉽고 이해하기도 쉬움(without failures)
    • 패킷스위칭의 장점
      • Better efficiency
      • Simpler State in switches(not per-flow)
      • Network Failure로부터 복구가 쉬움
      • Fast startup to the first packet delivered
  • Internet Structure: a ‘network of networks’
    • Hosts는 Access ISP(Internet Service Provider)를 통해 인터넷에 연결함
    • Access ISP는 차례로 상호 연결되어 있어야 함
      • 그래야 임의의 두 hosts가 서로 패킷을 주고받을 수 있음
    • Networks의 Network의 결과는 매우 복잡함
      • 경제학적, 지정학적 영향을 받음
    • Customer와 provide는 경제적 동의를 맺음
    • 여러 ISP 업체가 경쟁을 함
    • IXP(Internet Exchange Point): ISP와 같은 인터넷 인프라 회사가 서로 연결되는 물리적 위치
      • 대기 시간을 줄이고 왕복 시간 개선 → 비용 절감
      • 스위치(네트워크를 서로 연결하는 인터넷)를 통해 로컬 트래픽을 서로 교환하고 서로 다른 IP 네트워크가 만나는 물리적인 위치
      • 인터넷 트래픽이 교환되는 통신 센터
      • IP 트래픽을 연결하고 교환할 수 있는 물리적 인프라를 제공
    • Peer link(붉은 선): 과금 없이 돈 절약 가능, 이게 없다면 IXP를 거쳐야 하고 돈을 내야 함
      • ISP끼리 서로 네트워크를 연결하고 트래픽을 교환하는 링크
    • Regional ISP: 지역의 네트워크를 모아서 서비스를 해줌
      • 여러 Global ISP에 연결이 되어 있음
    • Content Provider Networks: 회사 자체의 Data센터와 인터넷을 연결하는 사설 네트워크
      • tier-1이나 regional과 같은 다른 ISP를 우회하고 end user와 직접 연결하기도 함
      • Tier-1 ISP, IXP, Regional ISP, End user 모두와도 연결 가능
      • Google, MS, Akamai 등
    • Tier-1 commercial ISPs(AT&T, NTT 등): international coverage

 

 

Performance: Loss, delay, throughput

  • How do packet delay and loss occur?
    • 패킷은 router buffers에서 자기의 차례를 기다리며 queue함
      • Queueing delay
    • 처리 속도보다 도착 속도가 더 빠르다면 queue 길이 증가
    • Queued 패킷을 보관할 memory가 꽉 차면 packet loss가 발생
      • 여유 buffer가 없다면 도착한 packet을 버림
  • Packet delay: four sources
    • 전체 노드 지연 Nodal delay = Processing delay + Queueing delay + Transmission delay + Propagation delay
    • Processing delay: 매우 짧아서 보통 고려하지 않음
      • 패킷의 비트 오류 및 헤더 조사
      • Table look-up
    • Queueing delay: 패킷이 큐에서 출력 링크로 전송되기를 기다리는 시간
      • 라우터 혼잡 수준(congestion level)에 좌우됨
    • Transmission delay: 패킷의 모든 비트들을 link로 밀어내는(전송하는)데 필요한 시간
      • 저장 후 전달 지연
      • L/R
      • L: Packet length(bits)
      • R: Link transmission rate=bandwidth(bps)
    • Propagation delay: 매우 짧아서 보통 고려하지 않음
      • d = 두 physical link 사이의 거리
      • s = propagation speed(거의 빛의 속도)
      • d/s
  • Packet queueing delay
    • a: 패킷이 큐에 도착하는 평균 비율(packets/sec)
    • L: 패킷 길이(bits)
    • R: 링크 전송률, bit가 큐에서 나가는 비율(bits/sec)
    • Traffic intensity: L*a/R
      • 0에 가까우면 delay가 조금 있음
      • 1에 접근하면 큐잉 지연이 아주 커짐
      • 1보다 커지면 서비스 용량을 초과하여 평균 지연이 무한대로 커짐
      • 1보다 작을 때도 큐잉 지연이 존재하는 이유: packet 도착의 무작위성 때문. arrival rates가 오르락 내리락 하며 피크일때 큐 발생 가능

 

  • Trace route 프로그램
    • 지정된 목적지 경로에 따라 출발지에서 라우터까지 delay를 측정
    • 감소하는 것 처럼 보이는 이유: Congestion 상황이 random이기 때문에 그 순간에 waiting이 더 적었을 수도 있음
    • 경로상 모든 라우터 o에 대해 다음을 수행
      • 경로 상의 라우터 i에 대해 3개의 패킷을 송신
      • 라우터 i는 송신자에게 패킷을 리턴
      • 송신자는 패킷 송신과 응답 사이 시간을 측정
  • Packet loss
    • 실제로는 queue(buffer)용량이 유한하고, 큐가 꽉 차서 새로 도착한 패킷을 저장할 수 없으면 패킷을 잃어버리게 되어 packet loss 발생
    • 잃어버린 패킷은 이전 노드 혹은 source end system에서 재전송 될 수도 있고 재전송이 안될수도 있음
  • Throughput 처리율
    • Sender to Reciever 간에 비트가 전송되는 속도, 비율(bits/time unit)
      • Instantaneous: 주어진 순간에의 전송 속도
      • Average: 주어진 긴 시간 동안의 전송 비율
    • 링크 Rs, Rc가 있을 때 병목 링크(Bottle link)의 처리율은 min(Rs, Rc)
    • Bottleneck link: end-end 처리율을 제한하는 end-end path 위의 link
      • 많은 양의 data가 drop될 수 있음
    • 연결마다 end-end 처리율 = min(Rc, Rs, R/10)
      • R: Fairness가 고려되지 않으면 독식 가능성 존재
    • 하지만 현실적으로는 Rs와 Rc가 자주 bottleneck이 됨
      • average는 낮더라도 Peak일 때 높아질 수 있어서
      ⇒ 훨씬 높은 성능을 버틸 수 있도록 해야함(
      peak load 방지
      )
    •  
  • Bandwidth-Delay Product(BDP)
    • Link bandwidth: 기준 시간마다 처리되는 bits의 수
    • Propagation delay: 하나의 비트가 link를 통과하는 데 걸리는 시간
    • BDP: 특정한 시점에 해당 link를 통과하고 있는 bits의 수(sent, not received)
    • BDP = bandwidth x propagation

Security

  • Internet과 보안
    • 초기에는 보안에 대한 고려를 하지 않았으나 인터넷이 널리 퍼진 지금은 보안을 고려하는 것이 필수이다.
  • Packet sniffing
    • 트래픽을 캡쳐하고 정보를 빼냄
    • Wireshark: Free packet sniffer(모든 packet을 캡쳐할 수 있음)
    • broadcast media(shared Eternet, wireless)
    • 난잡한 network 인터페이스는 지나치는 모든 패킷을 읽고 기록함(including password)

 

  • IP Spoofing
    • 한 사용자가 다른 사용자인 것처럼 위장하여 행동
    • Service Quality를 저하시킬 수도 있음
    • Injection of the packet with false source address

 

  • DoS(Deniak os Service)
    • 공격자가 매우 많은 양의 패킷을 담은 트래픽을 발생시킴으로써 server나 bandwidth와 같은 resources를 무용지물로 만듦
    1. Select target
    1. Break into hosts around the network(botnet)
    1. Target에게 패킷을 보냄
  • Defense 방안
    • Authentication: 본인 증명
    • Confidentiality: Encrypton 암호화를 통해
    • Integrity checks: 디지털 서명 → 변조 방지
    • Access restriction: Password-protected VPNs
    • Firewalls: 특수화된 ‘middleboxes’ in access and core networks:
      • off-by-default: Sender, Receivers, Application을 제한함으로써 들어오는 패킷들을 필터링함
      • Detecting/Reacting to DOS 공격

Protocol layers, service models

  • Layers
    • 복잡한 system이라 layer 구조를 사용
    • layers: each layer implements a service
      • via its own internal-layer actions
      • 아래 있는 layer에서 제공하는 serives에 의존함
    • The explicit structure allows identificaion, relationship of system’s pieces.
      • layered reference model for discussion
    • 모듈화는 유지보수를 쉽게 함
      • change in layer’s service implementation: transparent to rest of system
  • Layered Internet Protocol Stack
    • Application: supporting network applications(HTTP, IMAP, SMTP, DNS)
    • Transport: 프로세스 간 데이터 교환(TCP, UDP)
    • Network: source부터 destination까지 데이터그램 라우팅
    • Link: 인접한 네트워크 요소들끼리 데이터 전달
    • Physical: bits on the wire

 

  • Services, Layering, and Encapsulation
    • Application은 message를 교환함. Transport layer의 service를 사용해서 Application 단의 service 구현
    • Transport-layer 프로토콜: [M]을 캡슐화하고 Ht를 붙임 → Segment
    • Network-layer 프로토콜: [Ht|M]을 캡슐화하고 Hn을 붙임 → 데이터그램
    • Link-layer 프로토콜: [Hn|[Ht|M]]을 캡슐화하고 Hl을 붙임 → Frame

 

 

728x90