1일차
Network
|
ㄴ→ system -> widnows , Linux
|
ㄴ→ programming -> python(Flask), php(기본 php,
|
ㄴ→ 모의해킹
ㄴ→ 클라우드
- 식으로 진행
Network
- IP
- GW
- DNS
->TCP/IP
IP 확인 명령어
Window | Linux |
---|
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 :
class | ip 범위 | 용도 | 사설 IP 대역대 |
A class | 1.0.0.0~127.255.255.255(128개)/255.0.0.0 | 대규모 | 10.0.0.0~10.255.255.255 |
B class | 128.0.0.0~192.255.255.255(16,384개)/255.255.0.0 | 중규모 | 172.16.0.0~172.31.255.255 |
C class | 192.0.0.0~223.255.255.255(2,097,152개)/255.255.255.0 | 소규모 | 192.168.0.0~192.168.255.255 |
D class | 224.0.0.0~239.255.255.255 | 멀티캐스트 | |
E class | 240.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
Type | Code | Name |
0 | 0 | Echo Reply |
3 | 0 | Network Unreachable |
3 | 1 | Host Unreachable |
3 | 2 | Protocol Unreachable |
3 | 3 | Port Unreachable |
3 | 4 | Fragmentation Required |
3 | 5 | Source Route Failed |
3 | 6 | Dest. Network Unkown |
3 | 7 | Destination host Unkown |
3 | 8 | Source Host Isolated |
3 | 9 | Net Administratively Prohibited |
3 | 10 | Host Administratively Prohibited |
3 | 11 | Network unreachable for TOS(Type Of Service) |
3 | 12 | Host unreachable for TOS |
3 | 13 | Communication Admin. Prohibited |
5 | 0 | Source quench |
5 | 1 | Network Redirect |
5 | 2 | Host redirect |
5 | 3 | ToS & Network Redirect |
8 | 0 | ToS & Host Redirect |
9 | 0 | Echo [Echo Request] |
11 | 0 | Router Advertisement |
12 | 0 | Time to live exceeded to transit |
12 | 1 | Missing a required option |
12 | 2 | Bad length |
13 | 0 | Timestamp |
14 | 0 | Timestamp Reply |
15 | 0 | Imformation Request |
16 | 0 | Information Reply |
17 | 0 | Address Mask Request |
18 | 0 | Address Mask Reply |
30 | 0 | Traceroute |
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로 저장공간을설치하는 이유는 포렌식하려고