Skip to content

Instantly share code, notes, and snippets.

@appkr
Last active November 26, 2018 09:07
Show Gist options
  • Select an option

  • Save appkr/5aa72ce9d77ca50645ecab2711bf659a to your computer and use it in GitHub Desktop.

Select an option

Save appkr/5aa72ce9d77ca50645ecab2711bf659a to your computer and use it in GitHub Desktop.
Internet 101

Internet 101

https://en.khanacademy.org/computing/computer-science/internet-intro

Wires, cables, and WiFi

  • 우편 vs 인터넷? 우편의 전달 목적물이 우편물이라면, 인터넷은 bit
  • BIT? On or Off, Yes or No, 1 or 0
  • 8 bits == 1 byte
  • 사진, 비디오, 음악 모든 것이 bit으로 표현됨
  • 전기, 전파, 빛을 이용해서 bit를 전송
  • BANDWIDTH? Maximum transmission capacity of a device.
  • Bandwidth is measured by BIT RATE, which is the number of bits over a given period of time, usually mesaured in seconds.
  • LATENCY? Amount of time it takes for one bit to travel from one place to another.
  • How and through what? "Light beam" through "fiber optic cable". Depending on the bouncing angle of light, we can send multiple bits simultaneously.
  • 무선 통신은 서로 다른 주파수 대역(채널)에서 bit를 전파 신호로 바꾸어 전달. 수신측에서 전파를 다시 bit로 변경함.
  • 무선은 간섭이 심하고 커버리지가 좁으므로, 무선 신호를 받은 라우터가 유선 데이터로 변경해서 목적지로 전달

IP addresses and DNS

  • The Internet is a network of network
  • The Internet is really a design philosophy and an architecture expressed in a set of protocols
  • PROTOCOL? Well-known set of rules and standards that all parties agree to use it
  • IP? Internet Protocol
    • All the different divices on the Internet have UNIQUE ADDRESSES, and the address on the Internet is just a NUMBER
    • Sender는 ORIGIN ADDRESS를 제출하며, Receiver는 메시지가 어디에서 왔는지 알고 응답이 필요하면 ORIGIN ADDRESS로 응답 메시지를 보냄
    • 32bit IPv4, 2^32 = 40억 개의 고유 주소
    • 128bit IPv6, 2^128 = ?
174     .129     .14      .120
10101110 10000001 00001110 01111000
3FFE:F200:0234:AB00:0123:4567:8901:ABCD
# 16진수 1자리로 2진수 4bit를 표현할 수 있다 (∵ 2^4 = 16)
  • DNS? Domain Name System
    • Associates names, like www.example.com with the corresponding IP addresses
    • A computer uses the DNS to look up domain names and get the associated IP address, which is used to connect itself to the desitination on the Internet
    • DNS는 계층 구조를 가짐
+--------+    +--------+    +--------+    +--------+
| Client |    | DNS#1  |    | DNS#2  |    | example.com
+--------+    +--------+    +--------+    +--------+
     | ask IP for  |             |             |    
     | example.com |             |             |    
     | ----------> | ask         |             |    
     |             | ----------> |             |    
     |             | 174.127...  |             |    
     |             | <---------- |             |    
     |     caching |                           |    
     | 174.127...  |                           |    
     | <---------- |                           |    
     |                                         |    
     | --------------------------------------> |    
     | <-------------------------------------- |    
     |                                         |    
└── .com, .org, ...
    └── example
        └── host
  • The Internet is huge, and getting bigger every day. But the DNS and IP are designd to scale, no matter how much the Internet grows.

Packet, routers, and relibility

  • There is NO GUARANTEE that every wire and computer is working all the time.
  • The way information gets transferred from one computer to another computer is NOT FIXED PATH.
  • 마치 목적지에 도달하기 위해 교통 체증, 도로 상황 등을 고려해서 자동차를 운전하는 것처럼, 인터넷으로 전달되는 메시지도 그때그때 다른 경로로 목적지까지 이동한다. 그런데, 매우 큰 물건을 한 대의 자동차로 이동할 수 없는 경우를 상상해보면, 메시지도 여러 개의 패킷으로 쪼개서 이동하게 되는데... 모든 패킷이 목적지에 도달하면 재조립하게된다.
  • 인터넷을 이동하는 메시지는 목적지 IP 주소와 보낸이의 IP 주소만 있으며, 자동차처럼 운전사가 없다. 이때 인터넷 트래픽을 관리하는 특수 컴퓨터를 ROUTER라고 한다. 라우터는 트래픽 상황에 따라 라우트를 선택하고, 그에 따라 패킷의 순서가 뒤바뀌기도한다.
  • Router choose "CHEAPEST" route. Cheapest does not mean cost, but time and non-technical factor.
  • TCP? Transmission Control Protocol
    • 등기 우편으로 생각할 수 있음
    • TCP는 응답 패킷을 전부 검사하고, 받았으면 받았다고 보낸 쪽에 알려준다(ACK). 정해진 시간내에 ACK를 받지 못하면 보낸 쪽에서 메시지를 다시 보낸다.
  • Because of Fault Rolerence of TCP and Redundancy, More routers means more realibility.

Encryptions and public keys

  • 인터넷은 오픈 시스템이므로, 누구나 같은 통신 라인을 이용해서 메시지를 주고 받음. 그 메시지 중에는 카드 번호, 은행 계좌, 비밀번호, 이메일등 민감한 정보들도 포함되어 있음
  • ENCRYPTION? Scrambling or changing a message to hide the original text
  • KEYy? A secret password for unlocking a message
  • Too Hard? Too many possibilities to compute in a reasonable amount of time. 키를 찾아 메시지를 복호화하는데 들어가는 시간과 노력 대비 얻을 수 있는 경제적 이득
  • Symmetric Encryption? The same key used to encrypt and decrypt. 메시지를 교환하기 전에 미리 쌍방이 키를 교환해야 함.
  • Asymmetric Encryption? Different keys for encrypting and decrypting
    • A PUBLIC KEY can be exchanged with anybody
    • A PRIVATE KEY is not shared
    • The PUBLIC KEY is used to encrypt data, so anybody can use it to create a secret message
    • The secret can only be decrypted by a computer with access to the PRIVATE KEY
  • SSL & TLS protects us when we're browsing the web. 브라우저 주소창에 자물쇠 아이콘이 있으면 현재 열린 웹 페이지가 공개 키를 이용해서 암호화한 메시지를 서버와 주고 받고 있다는 의미임
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment