TCPIP Transmission Control ProtocolInternet Protocol 1 TCPIP Network

  • Slides: 146
Download presentation
TCP/IP ㈜ 올앳 나익채 Transmission Control Protocol/Internet Protocol 1

TCP/IP ㈜ 올앳 나익채 Transmission Control Protocol/Internet Protocol 1

목차 가. TCP/IP 개요 나. Network Interface Layer 다. Internet Layer 라. Transport Layer

목차 가. TCP/IP 개요 나. Network Interface Layer 다. Internet Layer 라. Transport Layer 마. 프로토콜 취약점을 이용한 대표적인 공격 바. TCP/IP 관리 명령어 Transmission Control Protocol/Internet Protocol 2

가. TCP/IP 개요 n 역사 n 1969년 n 미국방성의 ARPANet를 위하여 개발된 프로토콜 n

가. TCP/IP 개요 n 역사 n 1969년 n 미국방성의 ARPANet를 위하여 개발된 프로토콜 n 1982년 n 프로토콜 모델이 공개되면서, TCP/IP가 인터넷 프로토 콜로 지정 n 1990년 n ARPANet 없어짐 n 1992년 n WWW 시작 Transmission Control Protocol/Internet Protocol 3

OSI 7계층과 TCP/IP 프로토콜 Transmission Control Protocol/Internet Protocol 4

OSI 7계층과 TCP/IP 프로토콜 Transmission Control Protocol/Internet Protocol 4

TCP/IP에서 데이터의 전달 과정 T. H : TCP Header I. H : IP Header

TCP/IP에서 데이터의 전달 과정 T. H : TCP Header I. H : IP Header F. H : Frame Header F. T : Frame Trailer Transmission Control Protocol/Internet Protocol 5

응용층에서 제공하는 주요 프로토콜 �� 파일 �수신 �� �수신 Protocol �� FTP 파일 �

응용층에서 제공하는 주요 프로토콜 �� 파일 �수신 �� �수신 Protocol �� FTP 파일 � 수신 NFS ����� ���� 파일 ���� � �� SMTP �� 서버와 �� 서버간의 �� �수신 POP �� 서버와 ������� 간의 �� �수신 ��� 접속 Telnet �� ��� � 수 �� �� �관리 SNMP ����� 정보를 가지고 ���� 및 ���� �� 파악 �� DNS ������ 대한 IP Address� ���� �� HTTP Web 서비스 Protocol FTP : File Transfer Protocol NFS : Network File System SMTP : Simple Mail Transfer Protocol POP : Post Office Protocol Telnet : Telecommunication Network Protocol SNMP : Simple Network Management Protocol DNS : Domain Name System HTTP : Hyper Text Transfer Protocol Transmission Control Protocol/Internet Protocol 6

나. Network Interface Layer n Network Interface Layer 개요 n 실제 네트워크에서 전송매체에 프레임

나. Network Interface Layer n Network Interface Layer 개요 n 실제 네트워크에서 전송매체에 프레임 전송 n IP층에서 받은 패킷에 Preamble와 CRC 추가 Preamble : 프레임의 시작을 정의하는 바이트 n CRC : 프레임이 손상되지 않았음을 검증하는 수학적 계산값 n Transmission Control Protocol/Internet Protocol 7

다. Internet Layer n IP (Internet Protocol) Address n 각각의 컴퓨터를 네트워크에서 유일하게 구분

다. Internet Layer n IP (Internet Protocol) Address n 각각의 컴퓨터를 네트워크에서 유일하게 구분 해 줄 수 있는 고유번호 Transmission Control Protocol/Internet Protocol 8

ipconfig를 이용한 TCP/IP 구성 확인 Transmission Control Protocol/Internet Protocol 9

ipconfig를 이용한 TCP/IP 구성 확인 Transmission Control Protocol/Internet Protocol 9

Network ID의 이해 1 n 삼성동 100번지"에 사는 사람이, "대치동 100번지" 로 편지를 발송하는

Network ID의 이해 1 n 삼성동 100번지"에 사는 사람이, "대치동 100번지" 로 편지를 발송하는 상황 동 = Network ID 번지 = Host ID 우체국 = Router Transmission Control Protocol/Internet Protocol 11

Network ID의 이해 2 n 같은 "동"에 있는 "삼성동 200번지"로 편지를 배달 동 =

Network ID의 이해 2 n 같은 "동"에 있는 "삼성동 200번지"로 편지를 배달 동 = Network ID 번지 = Host ID 우체국 = Router Transmission Control Protocol/Internet Protocol 12

IP Address(주소지정) n 32비트 4바이트로 구성 n 0 -255 사이의 숫자 지정 n 10진수로

IP Address(주소지정) n 32비트 4바이트로 구성 n 0 -255 사이의 숫자 지정 n 10진수로 표기하며, dot로 구분 Transmission Control Protocol/Internet Protocol 14

IP Address 표기 Transmission Control Protocol/Internet Protocol 15

IP Address 표기 Transmission Control Protocol/Internet Protocol 15

IP Address 체계에서의 가장 큰 수 n IANA(Internet Assigned Numbers Authority)에서 관리 n ISP

IP Address 체계에서의 가장 큰 수 n IANA(Internet Assigned Numbers Authority)에서 관리 n ISP (Internet Service Provider)에게 발급 n 일반 사용자들은 ISP로부터 할당 Transmission Control Protocol/Internet Protocol 16

IP Address 구분 n A Class = Network ID(1바이트) + Host ID(3바이트) n B

IP Address 구분 n A Class = Network ID(1바이트) + Host ID(3바이트) n B Class = Network ID(2바이트) + Host ID(2바이트) n C Class = Network ID(3바이트) + Host ID(1바이트) Transmission Control Protocol/Internet Protocol 17

첫 번째 옥텟의 계산 근거 Transmission Control Protocol/Internet Protocol 18

첫 번째 옥텟의 계산 근거 Transmission Control Protocol/Internet Protocol 18

첫 번째 옥텟의 계산 근거 n A Class n 0000 (가장 작은 수) ->

첫 번째 옥텟의 계산 근거 n A Class n 0000 (가장 작은 수) -> 0, this Network n 00000001 (유효한 가장 작은 수) -> 1 n 01111110 (유효한 가장 큰 수) -> 126 n 01111111 (가장 큰 수) -> 127 Loopback Address n B Class n 10000000 (가장 작은 수) -> 128 n 10111111 (가장 큰 수) -> 191 n C Class n 11000000 (가장 작은 수) -> 192 n 11011111 (가장 큰 수) -> 223 Transmission Control Protocol/Internet Protocol 19

Host ID 범위의 계산 예제 Transmission Control Protocol/Internet Protocol 20

Host ID 범위의 계산 예제 Transmission Control Protocol/Internet Protocol 20

클래스별 Network ID & Host ID Transmission Control Protocol/Internet Protocol 21

클래스별 Network ID & Host ID Transmission Control Protocol/Internet Protocol 21

Subnet Mask & Default Gateway Transmission Control Protocol/Internet Protocol 22

Subnet Mask & Default Gateway Transmission Control Protocol/Internet Protocol 22

로컬인지 원격인지 결정하는 방법 Transmission Control Protocol/Internet Protocol 25

로컬인지 원격인지 결정하는 방법 Transmission Control Protocol/Internet Protocol 25

Subnet Mask 결정 방법 n IP Address 중 Network ID 부분은 “ 1”로 기록하고,

Subnet Mask 결정 방법 n IP Address 중 Network ID 부분은 “ 1”로 기록하고, Host ID 부분은 “ 0”으로 기록한다. Transmission Control Protocol/Internet Protocol 26

Subnetting 계산 방법 4. 서브넷 ID 계산 1. 서브넷팅된 Network ID (Subnet ID)를 계산

Subnetting 계산 방법 4. 서브넷 ID 계산 1. 서브넷팅된 Network ID (Subnet ID)를 계산 Transmission Control Protocol/Internet Protocol 30

Subnetting 계산 방법 5. 서브넷별 호스트ID의 범위 계산 n 예외 n n n 000000

Subnetting 계산 방법 5. 서브넷별 호스트ID의 범위 계산 n 예외 n n n 000000 : 해당 네트워크 주소 111111 : 해당 네트워크 브로드케스트 주소 207. 46. 230. 1 ~ 207. 46. 230. 62 207. 46. 230. 65 ~ 207. 46. 230. 126 207. 46. 230. 129 ~ 207. 46. 230. 190 207. 46. 230. 193 ~ 207. 46. 230. 254 Transmission Control Protocol/Internet Protocol 31

Subnetting 계산 방법 Transmission Control Protocol/Internet Protocol 32

Subnetting 계산 방법 Transmission Control Protocol/Internet Protocol 32

서브넷팅 빠른 계산 방법 Transmission Control Protocol/Internet Protocol 35

서브넷팅 빠른 계산 방법 Transmission Control Protocol/Internet Protocol 35

CIDR 표기법 n 207. 46. 230. 2/26 n 26비트가 Network ID n Subnet Mask

CIDR 표기법 n 207. 46. 230. 2/26 n 26비트가 Network ID n Subnet Mask : 255. 192 Transmission Control Protocol/Internet Protocol 36

2. Internet Layer 프로토콜 n 역할 n 패킷을 목적지까지 전달 n 종류 n n

2. Internet Layer 프로토콜 n 역할 n 패킷을 목적지까지 전달 n 종류 n n n IP (Internet Protocol) ICMP (Internet Control Message Protocol) IGMP (Internet Group Message Protocol) ARP (Address Resolution Protocol) RARP (Reserve Address Resolution Protocol) n IP는 패킷의 최단경로 제공하지만, 신뢰성은 없다. n Transport Layer의 TCP가 재전송 기능을 담당 Transmission Control Protocol/Internet Protocol 37

IP Header의 형식 Transmission Control Protocol/Internet Protocol 38

IP Header의 형식 Transmission Control Protocol/Internet Protocol 38

IP와 TCP/UDP와의 관계 Transmission Control Protocol/Internet Protocol 40

IP와 TCP/UDP와의 관계 Transmission Control Protocol/Internet Protocol 40

ICMP (Internet Control Message Protocol) n ICMP 메시지 유형 n Error-Reporting Message n Destination

ICMP (Internet Control Message Protocol) n ICMP 메시지 유형 n Error-Reporting Message n Destination Unreachable (목적지 전달 불가) : 3 n Time Exceeded (시간 초과) : 11 n Source Quench (발신지 억제) : 4 n Redirect (방향 재설정) : 5 n Query Message n Echo Request (응답 요구) : 8 n Echo Reply (응답 : 정상 상태) : 0 n Address Request(주소 요청) : 17 n Address Reply(주소 응답) : 18 Transmission Control Protocol/Internet Protocol 42

ICMP 메시지 유형 Transmission Control Protocol/Internet Protocol 43

ICMP 메시지 유형 Transmission Control Protocol/Internet Protocol 43

ARP (Address Resolution Protocol) n IP Address를 알고 Mac Address를 모를 때, n Data

ARP (Address Resolution Protocol) n IP Address를 알고 Mac Address를 모를 때, n Data Link 계층의 Mac Address를 알아내는 프로토콜 n Local Computer 에서의 ARP 통한 Mac Address 파악 Transmission Control Protocol/Internet Protocol 44

ARP (Address Resolution Protocol) n Remote Computer에서 ARP 통한 Mac Address 파악 Transmission Control

ARP (Address Resolution Protocol) n Remote Computer에서 ARP 통한 Mac Address 파악 Transmission Control Protocol/Internet Protocol 45

RARP (Reverse ARP) n Mac Address는 알고 있는데 IP Address를 모를 경우 n Network

RARP (Reverse ARP) n Mac Address는 알고 있는데 IP Address를 모를 경우 n Network 계층인 IP Address 알아내는 프로토콜 n Local Computer 에서의 RARP 통한 IP Address 파악 Transmission Control Protocol/Internet Protocol 46

RARP (Reverse ARP) n Remote Computer에서의 RARP 통한 IP Address 파악 Transmission Control Protocol/Internet

RARP (Reverse ARP) n Remote Computer에서의 RARP 통한 IP Address 파악 Transmission Control Protocol/Internet Protocol 47

Ethernet에서 TCP/IP를 이용한 데이터 전달과정 T. H : TCP Header I. H : IP

Ethernet에서 TCP/IP를 이용한 데이터 전달과정 T. H : TCP Header I. H : IP Header E. H : Ethernet Header E. T : Ethernet Trailer Ethernet Frame = Ethernet Header(14 Byte) + IP Header(20 Byte) + TCP Header(20 Byte) + Data + Ethernet Trailer(4 byte) Transmission Control Protocol/Internet Protocol 49

라. Transport Layer n Application Layer로부터 받은 Data를 Segment 형태 로 만들어 네트워크를 통해

라. Transport Layer n Application Layer로부터 받은 Data를 Segment 형태 로 만들어 네트워크를 통해 목적지까지 전달 n TCP 와 UDP 두 가지 프로토콜 제공 Transmission Control Protocol/Internet Protocol 50

라. Transport Layer n TCP n 연결지향형(Connection Oriented) 프로토콜 n Segment가 목적지까지 제대로 전달되었는지,

라. Transport Layer n TCP n 연결지향형(Connection Oriented) 프로토콜 n Segment가 목적지까지 제대로 전달되었는지, 확 인응답(Acknowledgment)을 주고받음으로써 신 뢰성 있는 전송 n Data를 Segment 별로 쪼개서 송신하고 목적지에 서 다시 재 조립 n 3 -Way Handshaking 이라는 방법으로 연결설정 Transmission Control Protocol/Internet Protocol 51

TCP Connection Sequence Transmission Control Protocol/Internet Protocol 52

TCP Connection Sequence Transmission Control Protocol/Internet Protocol 52

TCP Sequence & Acknowledgment Source : Source Port No Seq : Sequence Dest :

TCP Sequence & Acknowledgment Source : Source Port No Seq : Sequence Dest : Destination Port No Ack : Acknowledgment Transmission Control Protocol/Internet Protocol 53

Windows 2000에서의 netstat -an < windows 2000에서의 netstat -an > Transmission Control Protocol/Internet Protocol

Windows 2000에서의 netstat -an < windows 2000에서의 netstat -an > Transmission Control Protocol/Internet Protocol 54

TCP 프로토콜의 상태 n Closed n TCP Connection이 종료된 상태 n Listen n 주어진

TCP 프로토콜의 상태 n Closed n TCP Connection이 종료된 상태 n Listen n 주어진 Port번호에서 외부에서의 접속을 대기 중인 상태 n Syn_SENT n Connection을 요청하는 Syn Packet을 보내고 상대방으로부터 Ack Packet을 기다리는 상태 n Syn_RCVD Connection을 요청하는 Syn Packet을 수신하고 해당하는 Syn, Ack Packet을 보낸 상태 n 자신이 보낸 Syn에 대한 Ack를 기다린다. n n ESTABLISHED n TCP Connection이 연결된 상태로 실제 Data가 전송되는 상태 Transmission Control Protocol/Internet Protocol 55

TCP Segment 형식 Transmission Control Protocol/Internet Protocol 57

TCP Segment 형식 Transmission Control Protocol/Internet Protocol 57

Well-Known Port 번호 Protocol Port �� Telnet 23 Bgp 179 FTP 21 DNS 53

Well-Known Port 번호 Protocol Port �� Telnet 23 Bgp 179 FTP 21 DNS 53 www 80 Echo 7 POP 3 POP 2 Whois Gopher 110 109 43 70 SNMP Klogin Kshell Uucp 161 543 544 540 Transmission Control Protocol/Internet Protocol 59

Application Protocol 에 따른 Port 번 호 Transmission Control Protocol/Internet Protocol 60

Application Protocol 에 따른 Port 번 호 Transmission Control Protocol/Internet Protocol 60

UDP (User Datagram Protocol) n TCP와 달리 비연결지향형(Connectionless) 프로토콜 n Segment를 보내기만 하고 Acknowledgment를

UDP (User Datagram Protocol) n TCP와 달리 비연결지향형(Connectionless) 프로토콜 n Segment를 보내기만 하고 Acknowledgment를 주고받지 않기 때문에, 제대로 전달되었는지 확인하지 않는 특성(신뢰성 없 음) Transmission Control Protocol/Internet Protocol 61

UDP Segment 형식 Transmission Control Protocol/Internet Protocol 62

UDP Segment 형식 Transmission Control Protocol/Internet Protocol 62

UDP Protocol 과 DNS Transmission Control Protocol/Internet Protocol 63

UDP Protocol 과 DNS Transmission Control Protocol/Internet Protocol 63

netstat –na Transmission Control Protocol/Internet Protocol 70

netstat –na Transmission Control Protocol/Internet Protocol 70

CRON 을 이용한 공격을 감지방 법 #!/usr/bin/perl $TASK = `netstat -na|grep SYN_RECV`; $HOSTNAME =

CRON 을 이용한 공격을 감지방 법 #!/usr/bin/perl $TASK = `netstat -na|grep SYN_RECV`; $HOSTNAME = `/bin/hostname`; $TO_MAIL = 'antihong@tt. co. kr'; #사용자메일주소 $SUBJECT = "$HOSTNAME SYN_FLOODING 공격 감지"; $MAIL_PROGRAM = "/usr/sbin/sendmail"; if ($TASK){ $TASK_CONFIRM = `netstat -na|grep SYN_RECV|wc -l`; if($TASK_CONFIRM > 20){ #공격중이면 데몬 restart `/etc/rc. d/init. d/httpd stop`; `/etc/rc. d/init. d/httpd start`; Transmission Control Protocol/Internet Protocol 71

CRON 을 이용한 공격을 감지방 법 $HTTP_DONE ="httpd was Refreshed!!n"; } open(MAIL, "|$MAIL_PROGRAM -t");

CRON 을 이용한 공격을 감지방 법 $HTTP_DONE ="httpd was Refreshed!!n"; } open(MAIL, "|$MAIL_PROGRAM -t"); print MAIL "To: $TO_MAIL n"; print MAIL "Subject: $SUBJECT nn"; print MAIL "$HOSTNAME Server is Attacked by SYN_Flooding!!!n"; print MAIL "SYN_Flooding Process Number : $TASK_CONFIRM n"; print MAIL "$HTTP_DONEn"; print MAIL "$TASK n"; close(MAIL); } Transmission Control Protocol/Internet Protocol 72

Routing이 안 되는 IP Address n 0. 0/8 - Historical Broadcast n 10. 0/8

Routing이 안 되는 IP Address n 0. 0/8 - Historical Broadcast n 10. 0/8 - RFC 1918 에 의한 내부 네트워크 n 127. 0. 0. 0/8 - Loopback n 169. 254. 0. 0/16 - Link Local Networks n 172. 16. 0. 0/12 - RFC 1918 에 의한 내부 네트워크 n 192. 0/24 - TEST-NET n 192. 168. 0. 0/16 - RFC 1918에 의한 내부 네트워크 n 224. 0. 0. 0/4 - Multicast D Class n 240. 0/5 - 예약된 E Class n 248. 0. 0. 0/5 - 미할당 n 255/32 - 브로드캐스트 Transmission Control Protocol/Internet Protocol 75

대응책 n HOST단에서의 차단 방법 n 백로그큐를 늘려준다. n 백로그규 설정 방법 n Linux

대응책 n HOST단에서의 차단 방법 n 백로그큐를 늘려준다. n 백로그규 설정 방법 n Linux [root@net /root]# sysctl –w net. ipv 4. tcp_max_syn_backlog=1024 n 또는 [root@net/root]# echo 1024 > /proc/sys/net/ipv 4/tcp_max_syn_backlog n n AIX n /usr/sbin/no -o clean_partial_conns=1 Transmission Control Protocol/Internet Protocol 76

대응책 n Solaris /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 1024 n /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 0

대응책 n Solaris /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 1024 n /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 0 2048 n n HP-UX /usr/sbin/ndd -set tcp_syn_rcvd_max 1024 n /usr/sbin/ndd -set tcp_conn_request_max 200 n n Windows NT & 2000 Transmission Control Protocol/Internet Protocol 77

sniffing 공격 n 내부 네트워크 동작 원리 Transmission Control Protocol/Internet Protocol 78

sniffing 공격 n 내부 네트워크 동작 원리 Transmission Control Protocol/Internet Protocol 78

arp broadcast를 tcpdump로 잡은 모습 Transmission Control Protocol/Internet Protocol 79

arp broadcast를 tcpdump로 잡은 모습 Transmission Control Protocol/Internet Protocol 79

n Soft Kernel 튜닝 sysctl -w kernel_parameter=value으로 적절히 조절 # sysctl -a|grep gc_stale_time net.

n Soft Kernel 튜닝 sysctl -w kernel_parameter=value으로 적절히 조절 # sysctl -a|grep gc_stale_time net. ipv 4. neigh. eth 0. gc_stale_time = 60 net. ipv 4. neigh. lo. gc_stale_time = 60 net. ipv 4. neigh. default. gc_stale_time = 60 n n arp 캐시 정보 확인 Transmission Control Protocol/Internet Protocol 81

MAC 주소의 확인 Transmission Control Protocol/Internet Protocol 84

MAC 주소의 확인 Transmission Control Protocol/Internet Protocol 84

promisc 설정 여부 확인 Transmission Control Protocol/Internet Protocol 89

promisc 설정 여부 확인 Transmission Control Protocol/Internet Protocol 89

Windows 계열의 스니퍼 Transmission Control Protocol/Internet Protocol 90

Windows 계열의 스니퍼 Transmission Control Protocol/Internet Protocol 90

Solrais의 스니퍼 <�� 13> Solrais� ��� Transmission Control Protocol/Internet Protocol 91

Solrais의 스니퍼 <�� 13> Solrais� ��� Transmission Control Protocol/Internet Protocol 91

Sentinel n 미리 패킷 캡처 라이브러리인 Libnet 1. 0과 libpcap 가 설치 n http:

Sentinel n 미리 패킷 캡처 라이브러리인 Libnet 1. 0과 libpcap 가 설치 n http: //www. packetfactory. net/Projects/libnet n ftp: //ftp. ee. lbl. gov/libpcap-0. 4. tar. Z n 다운로드 받아 압축 해제 후, n 압축이 풀린 디렉토리에서 n. /configure; make install 로 설치 Transmission Control Protocol/Internet Protocol 93

Sentinel n http: //www. packetfactory. net/Projects/sentinel/ n 다운로드후 압축 해제를 하고, n 압축이 풀린

Sentinel n http: //www. packetfactory. net/Projects/sentinel/ n 다운로드후 압축 해제를 하고, n 압축이 풀린 디렉토리에서 make all 로 컴파 일하여 설치 n 원격지에서 스니핑 여부를 감지하는 방법 n DNS test n Etherping test n ARP test Transmission Control Protocol/Internet Protocol 94

실행 결과 n Results: 211. 47. 65. 4 tested positive to etherping test. n

실행 결과 n Results: 211. 47. 65. 4 tested positive to etherping test. n 위와 같이 탐지 결과가 positive 가 나오면 Promisc 모드로 설정되었다는 의미 n 세 가지 방법 중에 어느 하나라도 positive 라는 결과 가 나온다면 반드시 스니핑 작동 여부를 확인 Transmission Control Protocol/Internet Protocol 98

대응책 n Plain text로 전송되는 TCP/IP 대신 암호화 전송 프로 토콜을 사용 telnet 대신

대응책 n Plain text로 전송되는 TCP/IP 대신 암호화 전송 프로 토콜을 사용 telnet 대신 SSH n http 대신 https(SSL 웹서버) n n broadcasting을 하는 dummy 대신 스위치를 사용 n 기업간 통신시 암호화된 통신을 지원하는 가상 사 설망인 VPN(Virtual Provate Network)을 사용 Transmission Control Protocol/Internet Protocol 99

스위치 환경에서 가능한 스니핑 기법 n ARP Redirect 자신이 마치 Gateway 인 것처럼 위조된

스위치 환경에서 가능한 스니핑 기법 n ARP Redirect 자신이 마치 Gateway 인 것처럼 위조된 MAC 을 Broadcast 하여 모든 트래픽이 자신을 통과하게 하는 방법 n 공격자는 net. ipv 4. ip_forward=1 로 설정 n n MAC Duplicating 스니핑하고 싶은 서버의 MAC주소와 같은 MAC 정보로 설정 n Hunt n Dsniff n n http: //www. monkey. org/~dugsong/dsniff Transmission Control Protocol/Internet Protocol 101

바. TCP/IP 관리 명령어 1. 2. 3. 4. 5. 6. 7. 8. 9. ARP(Address

바. TCP/IP 관리 명령어 1. 2. 3. 4. 5. 6. 7. 8. 9. ARP(Address resolution protocol) 명령 Ping 도구 tracert (traceroute) 명령 IPConfig (ifconfig) 도구 Path. Ping 도구 (window 계열) Route 도구 Netstat 명령 NBTStat 명령 Nslookup 명령 Transmission Control Protocol/Internet Protocol 103

arp 사용 예제 Transmission Control Protocol/Internet Protocol 106

arp 사용 예제 Transmission Control Protocol/Internet Protocol 106

플라그멘테이션을 허용하지 않으며 Size 1472로 6개의 패킷 전송 Transmission Control Protocol/Internet Protocol 109

플라그멘테이션을 허용하지 않으며 Size 1472로 6개의 패킷 전송 Transmission Control Protocol/Internet Protocol 109

사용법 n reverse DN 점검 결과를 출력 n tracert 164. 124. 116. 4 //

사용법 n reverse DN 점검 결과를 출력 n tracert 164. 124. 116. 4 // Windows 계열 n traceroute 164. 124. 116. 4 // UNIX 계열 n reverse DN 점검 결과를 출력하지 않음 n 빠른 속도를 요하는 경우에 사용 n tracert -d 164. 124. 116. 4 // Windows 계열 n traceroute -n 164. 124. 116. 4 // UNIX 계열 Transmission Control Protocol/Internet Protocol 111

Reverse Domain Name Transmission Control Protocol/Internet Protocol 112

Reverse Domain Name Transmission Control Protocol/Internet Protocol 112

ICMP time exceed를 부하 때문에 전송 못하는 경우 Transmission Control Protocol/Internet Protocol 114

ICMP time exceed를 부하 때문에 전송 못하는 경우 Transmission Control Protocol/Internet Protocol 114

ICMP time exceed를 무시하는 경우 Transmission Control Protocol/Internet Protocol 115

ICMP time exceed를 무시하는 경우 Transmission Control Protocol/Internet Protocol 115

tracert로 병목 구간 찾기 Transmission Control Protocol/Internet Protocol 116

tracert로 병목 구간 찾기 Transmission Control Protocol/Internet Protocol 116

IPConfig (ifconfig)도구 n 호스트의 TCP/IP 관련 구성을 화면에 표시하는 명 령 유틸리티 n Ethernet

IPConfig (ifconfig)도구 n 호스트의 TCP/IP 관련 구성을 화면에 표시하는 명 령 유틸리티 n Ethernet 어댑터에 대한 특수한 정보를 나열 Physical Adderss(MAC 주소) n IP 주소 n n 서브넷마스크 n Windows 계열(ifconfig) n Host Name, Primary DNS Suffix, 기본 게이트웨이 n Unix계열 n Promiscuous 설정 Transmission Control Protocol/Internet Protocol 117

ipconfig 사용법 n ipconfig/all n 시스템 내의 모든 TCP/IP관련 정보를 출력 n ipconfig/renew n

ipconfig 사용법 n ipconfig/all n 시스템 내의 모든 TCP/IP관련 정보를 출력 n ipconfig/renew n 시스템 내의 모든 인터페이스의 TCP/IP관련 정보 를 Update n DHCP서버에서 IP를 못 받은 경우나 다시 받아와 야 하는 경우 많이 사용 n ipconfig/release n DHCP서버에게 IP 주소를 반납 Transmission Control Protocol/Internet Protocol 118

ifconfig/all 실행 예제 Transmission Control Protocol/Internet Protocol 119

ifconfig/all 실행 예제 Transmission Control Protocol/Internet Protocol 119

pathping 출력 결과 Transmission Control Protocol/Internet Protocol 121

pathping 출력 결과 Transmission Control Protocol/Internet Protocol 121

라우팅 테이블 예제 Network Destination Netmask default route 0. 0 loopback 127. 0. 0.

라우팅 테이블 예제 Network Destination Netmask default route 0. 0 loopback 127. 0. 0. 0 255. 0. 0. 0 subnet network 203. 255. 113. 0 255. 0 1 1 203. 255. 113. 34 1 127. 0. 0. 1 1 203. 255. 113. 34 1 224. 0. 0. 0 203. 255. 113. 34 1 255 203. 255. 113. 34 1 Subnet Broadcast 203. 255. 113. 255 224. 0. 0. 0 127. 0. 0. 1 Metric 127. 0. 0. 1 203. 255. 113. 34 255 Limited broadcast Interface 0. 0 203. 255. 113. 254 203. 255. 113. 34 LAN card Multicast Gateway Transmission Control Protocol/Internet Protocol 123

라우팅 테이블 설명(열) n Network Destination n AND 연산을 한 후 패킷의 Destination 주소와

라우팅 테이블 설명(열) n Network Destination n AND 연산을 한 후 패킷의 Destination 주소와 Network Destination을 비교 n Netmask n n 패킷의 Destination 주소에 Netmask를 AND 연산 어떤 Network Destination으로 갈지를 Netmask에서 결정 n Network Destination 이 일치한 Interface 로 패킷을 보낸다 n Interface ( 패킷을 밖으로 보낼 랜카드의 주소 ) n Gateway n n Interface 를 빠져 나간 패킷이 가야할 곳 자신의 랜카드 주소 또는 로컬 서브넷의 게이트웨이(일반적으로, 라 우터) n Metric n n n destination 까지의 hop 수 local LAN 은 하나의 hop으로 구성 Metric 은 가장 좋은 라우터경로를 결정할 때 사용 Transmission Control Protocol/Internet Protocol 124

라우팅 테이블 설명(행) n default route 여러 라우팅 테이블을 확인해서 일치하지 않을 경우, default

라우팅 테이블 설명(행) n default route 여러 라우팅 테이블을 확인해서 일치하지 않을 경우, default route의 Gateway 로 보낸다. n 위에서는 203. 255. 113. 254 로 가게 되며, 일반적으로 라우 터의 주소이다. n n loopback n n 127. 0. 0. 1 은 software loopback 주소이다. 자기 자신을 가리킨다. n subnet network n n IP 주소의 subnet network 주소를 가리킨다. IP 주소가 203. 255. 113. 34 이고 Subnet Mask 가 255. 0 이므로 AND 연산을 통해 203. 255. 113. 0 이 network 주소가 된다. Transmission Control Protocol/Internet Protocol 125

라우팅 테이블 설명(행) n LAN card n 자신의 IP 주소를 의미 n subnet broadcast

라우팅 테이블 설명(행) n LAN card n 자신의 IP 주소를 의미 n subnet broadcast n 위의 3)번에 나온 203. 255. 113. 0 의 마지막 주소인 203. 255. 113. 255 는 broadcast 로 사용된다. n multicast D Class 의 multicast 를 나타내는 행이다. n 특정한 그룹에게 메시지를 전달할 때 사용되는 주소이다. n n limited broadcast 라우터를 통과하지 못하는 broadcast 주소이다. n 같은 subnet 상의 모든 host 에 전달된다. n Transmission Control Protocol/Internet Protocol 126

라우팅 테이블 검색 순서 1. 2. 3. 4. Host address Subnet address Network address

라우팅 테이블 검색 순서 1. 2. 3. 4. Host address Subnet address Network address Default gateway Transmission Control Protocol/Internet Protocol 127

라우팅 테이블 검색 예제 #ping 207. 46. 131. 137 1. 207. 46. 131. 137

라우팅 테이블 검색 예제 #ping 207. 46. 131. 137 1. 207. 46. 131. 137 과 LAN card 행의 Netmask 열 (255. 255)과 AND 연산 : 207. 46. 131. 137 2. 위의 결과값인 207. 46. 131. 137 과 LAN card 행의 Network Destination 과 비교 같으면, LAN card 행의 Interface 로 패킷을 보낸다. n 다르면, 검색순서에 따라 다른 라우팅 테이블 비교 n 3. 일치되는 Network Destination 을 찾지 못하면 default route(0. 0)의 Gateway 로 패킷을 보낸다. 4. 다음 패킷을 보내기 위해 1번부터 반복한다. Transmission Control Protocol/Internet Protocol 128

netstat -e 이더넷 통계(window계열) Transmission Control Protocol/Internet Protocol 131

netstat -e 이더넷 통계(window계열) Transmission Control Protocol/Internet Protocol 131

netstat –i 3 이더넷 통계(Unix 계열) Transmission Control Protocol/Internet Protocol 132

netstat –i 3 이더넷 통계(Unix 계열) Transmission Control Protocol/Internet Protocol 132

Windows NT 결과 Transmission Control Protocol/Internet Protocol 136

Windows NT 결과 Transmission Control Protocol/Internet Protocol 136

Windows 2000 server 결과 <�� 8)> Windows 2000 server Transmission Control Protocol/Internet Protocol 137

Windows 2000 server 결과 <�� 8)> Windows 2000 server Transmission Control Protocol/Internet Protocol 137

Windows 98 결과 Transmission Control Protocol/Internet Protocol 138

Windows 98 결과 Transmission Control Protocol/Internet Protocol 138

Net. Bios �� �� 서비스 computer_name[00 h] Windows NT Workstation 서비스 computer_name[03 h] ��

Net. Bios �� �� 서비스 computer_name[00 h] Windows NT Workstation 서비스 computer_name[03 h] �� 저 서비스 computer_name[06 h] RAS 서버 서비스 computer_name[1 Fh] Net. DDE 서비스 computer_name[20 h] Windows NT Server 서비스 computer_name[21 h] RAS ����� 서비스 computer_name[BEh] ���� �� 전트 computer_name[BFh] ���� �� 프로그램 user_name[03] �� 저 서비스 domain_name[1 Dh] ��� 브라우저 domain_name[1 Bh] ��� 브라우저 �� �� 서비스 domain_name[00 h] ��� �� domain_name[1 Ch] ���� domain_name[1 Eh] 브라우저 서비스 �� \--__MSBROWSE__[01 h] ��� 브라우저 Transmission Control Protocol/Internet Protocol 139

Nslookup 사용법 n nslookup www. saferzone. com n www. saferzone. com의 IP를 resolve함 n

Nslookup 사용법 n nslookup www. saferzone. com n www. saferzone. com의 IP를 resolve함 n nslookup >server=210. 94. 0. 7 n 질의 서버를 210. 94. 0. 7로 바꿔서 query >set q=mx n 요청한 도메인의 메일서버를 알려줌 >set q=ns n 요청한 도메인의 네임서버를 알려줌 >set q=any n 요청한 도메인의 모든 정보를 출력 >ls “도메인” n 도메인에 소속된 모든 host 정보를 보여줌 Transmission Control Protocol/Internet Protocol 141

www. psi. net 의 IP 주소를 알기 Transmission Control Protocol/Internet Protocol 142

www. psi. net 의 IP 주소를 알기 Transmission Control Protocol/Internet Protocol 142

메일을 보내면 어느 메일서버로 가게 될지를 nslookup으로 확인 Transmission Control Protocol/Internet Protocol 143

메일을 보내면 어느 메일서버로 가게 될지를 nslookup으로 확인 Transmission Control Protocol/Internet Protocol 143

query 하려는 네임서버를 변경 Transmission Control Protocol/Internet Protocol 144

query 하려는 네임서버를 변경 Transmission Control Protocol/Internet Protocol 144

한국전산원에 등록된 네임서버를 확인 Transmission Control Protocol/Internet Protocol 145

한국전산원에 등록된 네임서버를 확인 Transmission Control Protocol/Internet Protocol 145

cache 에 남아있는 시간 확인 방법 Transmission Control Protocol/Internet Protocol 146

cache 에 남아있는 시간 확인 방법 Transmission Control Protocol/Internet Protocol 146