[THM][-ws] Introductory Networking

·

3 min read

This is a summary of thm Introductory Networking Room.

This room introduces a little about Wireshark, more information will be checked in this article: [article link]

0x01 Mind Map

图片.png

0x02 About Network

1. Subnet mask

In this section, I'm going to summary the key information about subnet mask (Hard to believe it's still a tough question for me =.=), and solve these following points: 1.What is subnet mask?

It is a 32 bits address that is used in conjunction with IPv4 address(128 bits in IPv6), and is composed of a series 0 or 1 (1 and 0 are continuous respectively).

Default Subnet mask

We know that the IP address is divided into 5 classes, and A~C classes have different default subnet masks:

A Class: 255.0.0.0 or /8 (for it has 8 one in subnet mask, 255.0.0.0 => 11111111,00000000,00000000,00000000)

B Class: 255.255.0.0 or /16

C Class: 255.255.255.0 or /24

2.How do we use it?

Subnet mask is used to:

  • Divide subnet: We know IP address is splited into 2 parts, which means IP addr. ={Network ID,Host ID}; Subnet IP addr. = {Network ID,Subnet ID,Host ID}.

  • Avoid broadcast storm.

3.Relevant calculation.

Get network addr.: IP & Subnet mask

Get host addr.: IP ^ Network address

How to divide a B class IP address such as 168.192.0.0 into 30 subnet?:

  • We know that 32 subnets can contain 30 subnets, it means 2^5=32 is enough, that is 11111000.00000000
  • so the subnet mask is 168.192.248.0

What if we need 70 subnets, each subnets contain 300 machine, how can we offer an available plan.

  • From 300 we can get it might be a B class IP address.
  • 70 subnets mean 2^7= 128 is enough, that is 11111110.000000, which means the subnet mask equals to 255.255.254.0
  • So here is a plan: 168.27.0.1-168.27.1.254

2. Commonly used protocols

TCP(Transmission Control Protocol)

IP(Internet Protocol)

UDP(userdatagram protocol)

ICMP(internet control manager protocol)

ARP(Address Resolution Protocol)

DHCP(Dynamic Host Configuration Protocol)

DNS(Domain Name Service)

HTTP(hypertext transfer protocol) & HTTPS

FTP(file transfer protocol)

POP3 & SMTP(Post Office Protocol - Version 3 & Simple Mail Transfer Protocol)

blog.csdn.net/dobest/article/details/80398469