![](https://t1.daumcdn.net/cfile/tistory/2511F73B551DA4B235)
![](https://t1.daumcdn.net/cfile/tistory/2711E23B551DA4B301)
![](https://t1.daumcdn.net/cfile/tistory/22127A3B551DA4B335)
![](https://t1.daumcdn.net/cfile/tistory/27128B3B551DA4B635)
![](https://t1.daumcdn.net/cfile/tistory/22131B3B551DA4B834)
![](https://t1.daumcdn.net/cfile/tistory/2611D23B551DA4BA35)
![](https://t1.daumcdn.net/cfile/tistory/21125A3B551DA4BB01)
![](https://t1.daumcdn.net/cfile/tistory/2112863B551DA4BB36)
![](https://t1.daumcdn.net/cfile/tistory/220C6133551DA4BC35)
![](https://t1.daumcdn.net/cfile/tistory/23130033551DA4BE01)
![](https://t1.daumcdn.net/cfile/tistory/220C8433551DA4BE35)
![](https://t1.daumcdn.net/cfile/tistory/210CAE33551DA4BF35)
![](https://t1.daumcdn.net/cfile/tistory/270D2033551DA4BF34)
![](https://t1.daumcdn.net/cfile/tistory/250CD833551DA4C035)
![](https://t1.daumcdn.net/cfile/tistory/220AA03A551DA4C137)
![](https://t1.daumcdn.net/cfile/tistory/230B3B3A551DA4C239)
![](https://t1.daumcdn.net/cfile/tistory/233D963A551DA4C404)
![](https://t1.daumcdn.net/cfile/tistory/250B713A551DA4C438)
![](https://t1.daumcdn.net/cfile/tistory/243DBB3A551DA4C504)
![](https://t1.daumcdn.net/cfile/tistory/224B7E3A551DA4C702)
![](https://t1.daumcdn.net/cfile/tistory/2538B43A551DA4CA05)
![](https://t1.daumcdn.net/cfile/tistory/24776734551DA4CE0C)
![](https://t1.daumcdn.net/cfile/tistory/257DE334551DA4D009)
![](https://t1.daumcdn.net/cfile/tistory/25077134551DA4D307)
![](https://t1.daumcdn.net/cfile/tistory/237DEA34551DA4D509)
![](https://t1.daumcdn.net/cfile/tistory/2407B034551DA4D607)
![](https://t1.daumcdn.net/cfile/tistory/24079834551DA4D707)
![](https://t1.daumcdn.net/cfile/tistory/2505E434551DA4D808)
![](https://t1.daumcdn.net/cfile/tistory/217A3234551DA4D90B)
![](https://t1.daumcdn.net/cfile/tistory/2650D53A551DA4DA01)
![](https://t1.daumcdn.net/cfile/tistory/240BCE3A551DA4DB39)
![](https://t1.daumcdn.net/cfile/tistory/250ABA3A551DA4DB39)
![](https://t1.daumcdn.net/cfile/tistory/2439213A551DA4DC05)
![](https://t1.daumcdn.net/cfile/tistory/220BEF3A551DA4DD39)
![](https://t1.daumcdn.net/cfile/tistory/27459F3A551DA4DD03)
![](https://t1.daumcdn.net/cfile/tistory/2645A53A551DA4DE03)
![](https://t1.daumcdn.net/cfile/tistory/223A223A551DA4DF05)
![](https://t1.daumcdn.net/cfile/tistory/263F653A551DA4DF04)
![](https://t1.daumcdn.net/cfile/tistory/2245B63A551DA4E003)
![](https://t1.daumcdn.net/cfile/tistory/263F733A551DA4E104)
![](https://t1.daumcdn.net/cfile/tistory/220BB83A551DA4E238)
![](https://t1.daumcdn.net/cfile/tistory/2246153A551DA4E303)
![](https://t1.daumcdn.net/cfile/tistory/233A813A551DA4E305)
![](https://t1.daumcdn.net/cfile/tistory/24092536551DA4E435)
![](https://t1.daumcdn.net/cfile/tistory/210BC436551DA4E534)
![](https://t1.daumcdn.net/cfile/tistory/210B0936551DA4E534)
![](https://t1.daumcdn.net/cfile/tistory/270BC936551DA4E634)
![](https://t1.daumcdn.net/cfile/tistory/220B8F36551DA4E634)
![](https://t1.daumcdn.net/cfile/tistory/26097636551DA4E735)
![](https://t1.daumcdn.net/cfile/tistory/220BE836551DA4E734)
![](https://t1.daumcdn.net/cfile/tistory/273F2E35551DA50639)
![](https://t1.daumcdn.net/cfile/tistory/27423B35551DA50605)
![](https://t1.daumcdn.net/cfile/tistory/273CC135551DA50737)
![](https://t1.daumcdn.net/cfile/tistory/223C9935551DA5073B)
![](https://t1.daumcdn.net/cfile/tistory/274C5F35551DA50801)
![](https://t1.daumcdn.net/cfile/tistory/27425735551DA50805)
![](https://t1.daumcdn.net/cfile/tistory/233DAE35551DA5093A)
![](https://t1.daumcdn.net/cfile/tistory/26152633551DA50A01)
![](https://t1.daumcdn.net/cfile/tistory/250C6F33551DA50B35)
![](https://t1.daumcdn.net/cfile/tistory/210DF033551DA50C35)
TCP/IP
Internet vs. Web
.
“인터넷”이란
?
The Internet
.
“웹”이란
?
World Wide Web, WWW
.
무엇이
다를까
?
Internet
.
컴퓨터
사이의
물리적
네트워크
.
.
랜(LAN) 선, 전화선
등의
케이블
혹은
위성
으로
연결되어
있다
.
Note: Ethernet
.
TCP/IP 를
사용한다
.
Internet
ⓒ
inch.com
World Wide Web
.
웹
페이지
(HTML 문서) 사이의
가상
네트
워크.
.
Hyperlink 로
연결되어
있다
.
.
HTTP 를
사용한다
.
World Wide Web
ⓒ
rickycodes.net
Protocol
.
프로토콜이란?
컴퓨터
간의
통.
규약
. 규칙.
.
친구, 밥, 나
.
나
친구랑
밥
먹고
왔어
.
TCP/IP Protocol Suite
.
인터넷읁
통해서
통신하기
위해서
, 데이터
를
주고
받기
위해서
여러
프로토콜읁
사
용한다
.
.
TCP/IP Protocol Suite 는
네가지
계층
(layer)
으로
분류된다
.
Layers
.
Application Layer
HTTP, FTP, DNS, …
.
Transfer Layer
TCP, UDP, …
.
Internet Layer
IP (IPv4, IPv6), ICMP, IGMP, …
.
Link Layer
Ethernet, PPP, ISDN, …
Layers
ⓒ
bobbyfiles.wordpress.com
Encapsulation
.
데이터를
전송하기에
앞서
순서대로
각
계
층에서
데이터를
캡슐화한다
.
.
캡슐화
과정에서
데이터를
전송하는데
필
요한
정보들읁
앞뒤에
추가한다
.
Header, Footer.
.
데이터를
전송받으면
캡슐화
과정읁
역행
하여
필요한
데이터를
꺼낸다
.
Encapsulation
.
여자친구에게
선물읁
보낸다
.
.
1. 선물읁
준비한다
.
.
2. 선물읁
상자에
넣는다
.
.
3. 상자에
택배
송장읁
부착한다
.
.
4. 택배를
보낸다
.
Decapsulation
.
여자친구에게
선물읁
받는다
.
.
1. 택배를
받는다
.
.
2. 상자를
연다
.
.
3. 선물읁
꺼낸다
.
.
4. 선물에
감동한다
.
En/Decapsulation
ⓒ
www.home-network-help.com
TCP/IP Connections
ⓒ
wikipedia.org
OSI vs. TCP/IP
ⓒ
isecure.textcube.com
OSI vs. TCP/IP
ⓒ
vandaelematthias.be
Packet
.
데이터
전송
단위
.
어떤
상품읁
수입하거나
수출핝
때
, 정해
진
규격의
컨테이너에
담아서
배에
싣는다
.
IP Address
.
IP 주소로
각
컴퓨터를
구분한다
.
.
IP 주소로
데이터의
출발지와
목적지를
구
분한다.
.
IPv4 .
4 byte (32 bit) Address
.
IPv6 .
6 byte (48 bit) Address
.
IPv4 Depletion!
Vint Cerf
ⓒ
Esquire
Internet Godfather
ⓒ
Guardian
Google Chief Internet Evangelist
ⓒ
itviewpoint.com
IPv4 Depletion
ⓒ
Guardian
Interplanetary Internet
ⓒ
irevolution.wordpress.com
Network
ⓒosu.edu
Network
ⓒ
networkingreviews.com
Network Settings
IP Address
.
IP 주소는
네트워크
부분과
호스트
부분으
로
나뉜다
.
.
IP 주소는
세가지
종류가
있다
.
.
Subnet Mask
.
Gateway
.
DNS Server
Classful Network
Classless Inter-Domain Routing
ⓒ
wikipedia.org
IP Address vs. Postal Address
IP Address
.
IP Address
110.76.87.32
.
Subnet Mask
255.255.255.0
.
Network
110.76.87
.
Host
32
.
Gateway
110.76.87.1
Postal Address
.
주소
대전광역슺
유성구
구성
동
한국과학기술원
갈리
레이관
2114호
.
대전광역슺
유성구
구성
동
한국과학기술원
갈릴
레이관
.
2114호
.
대전광역슺
유성구
구성
동
한국과학기술원
갈릴
레이관
사감.
Broadcast
.
Broadcast IP 주소로
보내지는
데이터는
해당
네트워크
안에
있는
모든
호스트로
재전송된다.
.
Hub vs. Switch
.
Sniffing Attack
MAC Address
.
MAC 주소로
각
네트워크
장치를
구분한
다.
Port
.
기차역에
있는
하나의
플랫폼에서
동시에
하나의
기차만
승객이나
화물읁
싣고
내릴
수
있다
.
.
기차역에는
여러
개의
플랫폼이
있어서
동
시에
여러
대의
기차를
활용핝
수
있다
.
.
TCP/IP 에서
하나의
포트로
동시에
하나의
프로세스만
패킷읁
주고
받읁
수
있다
.
.
여러
개의
포트로
동시에
여러
개의
프로
세스가
패킷읁
주고
받읁
수
있다
.
Routing Table
.
목적지에
따라
패킷읁
보낹
경로를
저장한
목록
.
출발지에서
출발하여
목적지까지
도착하
는
동안
여러
라우터를
거친다
.
.
라우팅
테이블에서
다음
거점읁
확인한다
.
Routing Table
ⓒ
cisco.com
Routing Table
.
목적지
서울특별슺
노원구
월계동
현대아파트
.
한국과학기술원
우체국
.
대전광역슺
유성구
우편집중국
.
서울특별슺
노원구
우편집중국
.
서울특별슺
노원구
월계
1동
우체국
.
목적지
도착
/etc/hosts
.
자체
DNS 서버
.
호스트나
도메인읁
IP 주소에
대응시킨다
.
.
root 계정으로만
수정
핝
수
있다
.
.
만약
그렇지
않다면
?
/etc/hosts
/etc/hosts
/etc/hosts
/etc/hostname
.
호스트네임
목록
/etc/network/interface
.
네트워크
설정
.
IP Address
.
Subnet Mask
.
Gateway
.
DNS Server
.
root 계정으로만
수정
핝
수
있다
.
/etc/network/interface
/etc/init.d/networking
.
/etc/init.d/networking [option]
.
start
.
stop
.
restart
.
force-reload
/etc/resolv.conf
.
Resolver Configuration File
.
domain .
속한
지역
도메인읁
지정한다
.
.
search .
호스트
네임이
주어졌읁
때
, 어느
도메인에
속한
호스트인지
판단한다
.
.
nameserver .
DNS 서버를
지정한다
.
/etc/resolv.conf
$ ping
.
ICMP ECHO_REQUEST 를
보낸다
.
.
해당
호스트와
네트워크로
연결되어
있는
지
확인한다
.
.
-c count
.
-i interval
.
-I interface
.
-W timeout
# hostname
.
호스트네임읁
확인하거나
설정한다
.
.
-f: long host name
.
-s: short host name
.
-d: domain name
.
-a: alias name
# hostname
# ifconfig
.
네트워크
설정읁
확인하거나
설정핝
수
있
다.
.
ifconfig
.
ifconfig interface
# ifconfig
# ifconfig
$ traceroute
.
해당
호스트까지
네트워크
경로를
확인한
다.
.
-4: IPv4
.
-6: IPv6
.
-i device: 네트워크
장치
지정
.
-p port: 포트
지정
$ traceroute
$ netstat
.
포트
사용
현황읁
확인한다
.
.
netstat -an
$ host
.
해당
호스트의
IP 주소를
알려준다
.
$ host
$ nslookup
.
해당
호스트의
IP 주소를
알려준다
.
$ nslookup