1일차


Network
|
ㄴ→ system -> widnows , Linux
|
ㄴ→ programming -> python(Flask), php(기본 php,
|
ㄴ→ 모의해킹
ㄴ→ 클라우드
- 식으로 진행

Network

- IP
- GW
- DNS
->TCP/IP

IP 확인 명령어

WindowLinux
ipconfig(192.168.0.204 255.255.255.0 192.168.0.1)ifconfig

IP 주소 : 4,294,967,296 대 (0.0.0.0~255.255.255.255)
A : 0*, B : 10*, C : 110*, D : 1110*, D : , E :

classip 범위용도사설 IP 대역대
A class1.0.0.0~127.255.255.255(128개)/255.0.0.0대규모10.0.0.0~10.255.255.255
B class128.0.0.0~192.255.255.255(16,384개)/255.255.0.0중규모172.16.0.0~172.31.255.255
C class192.0.0.0~223.255.255.255(2,097,152개)/255.255.255.0소규모192.168.0.0~192.168.255.255
D class224.0.0.0~239.255.255.255멀티캐스트
E class240.0.0.0~255.255.255.255연구 및 개발 목적

255.255.255.0 = 1111 1111.1111 1111.1111 1111.0000 0000(2진수)
→ C class는 서브넷 마스크로 네트워크를 나눌 수 있다?
256개지만, 0과 255를 제외한 192.168.0.1~192.168.0.254 (하지만 192.168.0.1은 GW이기 때문에 컴퓨터에다 줄 수 있는 IP는 GW를 제외한 253개가 된다)

서브넷 마스크, 서브넷 개수 ...

window 명령어

? Print help
! COMMAND [ARG ...] Invoke an OS COMMAND with optional ARG(s)
arp Shortcut for: show arp. Show arp table
clear ARG Clear IPv4/IPv6, arp/neighbor cache, command history
dhcp [OPTION] Shortcut for: ip dhcp. Get IPv4 address via DHCP
disconnect Exit the telnet session (daemon mode)
echo TEXT Display TEXT in output. See also set echo ?
help Print help
history Shortcut for: show history. List the
command history
ip ARG ... [OPTION] Configure the current VPC's IP settings.
See ip ?
load [FILENAME] Load the configuration/script from the file FILENAME
ping HOST [OPTION ...] Ping HOST with ICMP (default) or TCP/UDP. See ping ?
quit Quit program
relay ARG ... Configure packet relay between UDP ports. See relay ?
rlogin [ip] port Telnet to port on host at ip (relative to host PC)
save [FILENAME] Save the configuration to the file FILENAME
set ARG ... Set VPC name and other options. Try set ?
show [ARG ...] Print the information of VPCs (default). See show ?
sleep [seconds] [TEXT] Print TEXT and pause running script for seconds
trace HOST [OPTION ...] Print the path packets take to network HOST
version Shortcut for: show version

ICMP의 주요 목적

1, 에러메세지 전달 : 네트워크 상의 문제가 발생했을 때 이를 사용자에게 알려줍니다
2, 네트워크 진단 : 네트워크 연결을 테스트하고 문제가 있는 부분을 식별할 수 있습니다.

PING Code

TypeCodeName
00Echo Reply
30Network Unreachable
31Host Unreachable
32Protocol Unreachable
33Port Unreachable
34Fragmentation Required
35Source Route Failed
36Dest. Network Unkown
37Destination host Unkown
38Source Host Isolated
39Net Administratively Prohibited
310Host Administratively Prohibited
311Network unreachable for TOS(Type Of Service)
312Host unreachable for TOS
313Communication Admin. Prohibited
50Source quench
51Network Redirect
52Host redirect
53ToS & Network Redirect
80ToS & Host Redirect
90Echo [Echo Request]
110Router Advertisement
120Time to live exceeded to transit
121Missing a required option
122Bad length
130Timestamp
140Timestamp Reply
150Imformation Request
160Information Reply
170Address Mask Request
180Address Mask Reply
300Traceroute

Summary of Message Types

    0  Echo Reply

    3  Destination Unreachable

    4  Source Quench

    5  Redirect

    8  Echo

   11  Time Exceeded

   12  Parameter Problem

   13  Timestamp

   14  Timestamp Reply

   15  Information Request

   16  Information Reply

ARP(address resolution protocol)

180초가 지나면 사라짐 //휘발성 데이터
ping을 때리면 1, ARP + 2, ICMP가 작동됨
router와 switch를 연결할때, switch의 ethernet0에 연결
router ip 주소 할당 : gw = 192.168.0.254,int fa0/0 //연결될 pc와 닿아있는 switch와 연결된 포트
명령어
conf t
int fa0/0
no sh
ip addr 192.168.0.254 255.255.255.0


제시 문제

네트워크 환경 : 192.168.100.56/29 - IP : 할당가능한 주소 중 첫번째, 게이트웨이 : 할당 가능한 주소 중 마지막 ...
-> 서브넷 마스크 : 255.255.255.248
IP는 192.168.100.57~62가 쓰일 수 있다.(56,63 //IP의 끝들은 제외) IP : 192.168.100.57 , GW : 192.168.100.62

제시 문제

네트워크 환경 : 210.150.120.6/28 - IP : 할당가능한 주소 중 마지막, 게이트웨이 : 210.150.120, 주 DNS : 168.192.63.1, 보조 DNS : 168.192.63.2 ...
-> 서브넷 마스크 : 255.255.255.248
IP는 210.150.120.1~15가 쓰일 수 있다.(0, 16은 제외 //IP의 끝들은 제외) IP : 210.150.120.15 sh ip route sh ip int b



GNS3에 새 가상기기를 추가하고싶으면 VMware, VirtualBox에서 새 가상 기기를 생성한 후, Preference에서 추가하면 된다.
125.242.95.11 //내 도메인에 연결
192.168.0.129 //packet 관제 VMDK로 저장공간을설치하는 이유는 포렌식하려고