当前位置:网站首页>Detailed explanation of network foundation

Detailed explanation of network foundation

2022-07-06 14:07:00 Unknown white hat

Catalog

Network foundation

The composition of the network

Network topology

Ethernet frame structure

Protocol stack

Network hierarchical model structure

IP Head structure

IP Address calculation

Transport layer protocol

Data encapsulation and de encapsulation


Network foundation

The composition of the network

What is the Internet ?

Use the transmission medium to connect the terminal devices in different areas to realize information and data sharing

What are the components of the network ?

Network devices

Wired network : Router 、 Switch 、 A hub 、 bridge 、 The server

Wireless network :AC( Wireless network controller )、AP( Wireless access control access point )

Terminal equipment ( Devices that users can directly contact )

mobile phone 、PC( Personal computer )、ipad……

Transmission medium

Twisted pair 、 Coaxial cable 、 Optical fiber 、 Serial cable

Network protocol

Routing protocol

Exchange network protocol

Network topology

 

Operator network

LAN

Access layer The network equipment used to connect users to the network constitutes the access layer

Convergence layer The equipment composition range used to involve the access layer equipment into the core layer is the convergence layer

Core layer The range of network devices used to forward LAN data is the core layer

Ethernet frame structure

MAC A representation of an address

1 byte =8 The bit

48 A bit ---6 Bytes

Binary system 、 Decimal system 、 Hexadecimal (10-A、11-B、……、15-F)

MAC The composition of the address

48 A bit : 24 IEEE( Institute of electrical and Electronics Engineers )---OUI( Organization unique identifier )

Huawei 、 Hua three 、 American Cisco 、 Agility

24 Distributed by the manufacturer

MAC The role of address

It is used to uniquely identify a device in the network

Ethernet frame structure

 

SMAC: Source mac Used to identify the device that sends data

DMAC: Purpose mac Used to identify the device that receives this data

Protocol stack

What is a protocol stack ?

The sum of protocols of all layers in the network

ISO International Organization for Standardization - Standardize the protocol stack of the network

Network hierarchical model structure

OSI Seven layer model structure

application layer

The presentation layer

The session layer

Transport layer

The network layer

Data link layer

Physical measurement

TCP/IP Model Protocol data unit

application layer :  Generate data data

Transport layer : TCP/UDP agreement — encapsulation TCP/UDP Head Data segment

The network layer : IP( Internet Protocol )、ARP( Address resolution protocol )-- encapsulation IP Head    Data packets

Data link layer : Ethernet frame header Data frame

The physical layer

IP Head structure

IP Address representation

IPv4 Address :

192.168.1.4

IP The address is expressed in dotted decimal .32 Bit binary number to represent

IP The composition of the address

IP Address = The Internet is + Host bit

IP Address function

Used to identify a device in the network

IP Address classification

A、0.0.0.0~127.255.255.255

B、128.0.0.0~191.255.255.255

C、192.0.0.0~223.255.255.255

D、224.0.0.0~239.255.255.255

E、240.0.0.0~255.255.255.255

Subnet mask

Representation form 255.255.255.0

from 32 Binary numbers to form , It is usually expressed in dotted decimal numbers

The binary number between each bit in the subnet mask must be continuous ,

1 And 1 There can be no 0,0 And 0 There can be no 1

effect

Used to distinguish IP The network bit and host bit in the address , Bits for 1 The position of indicates the network bit

Bits for 0 Indicates the host bit

IP Address calculation

Internet address All hosts are 0 Of IP Address means network address

The host address The host bit is not all 1 And all 0 The address of

Broadcast address All hosts are 1 Indicates the broadcast address

IP Address and subnet mask calculate the maximum number of hosts that can be accommodated in a network segment 、 Number of available hosts 、

Calculate the network address of each network segment 、 Broadcast address 、 Available host address range

192.168.20.0/24

24 What does it mean ? The length of subnet mask is 24 position , Network bit 24 position , Host bit 8 position

network address 0000 0000 –192.168..2.0

Broadcast address  1111 1111 – 192.168.2.255

The maximum number of hosts that can be accommodated ( Including network address and broadcast address ):

Number of available hosts ( The number of addresses in the network segment other than broadcast address and network address ):

VLSM( Variable length subnet mask )

192.168.3.0/24

192.168.3.0/26 4 Subnet - Divided into four departments

IP Head structure

IP Head fixed length size —20 byte

SIP: Source IP, Used to identify the device that sends data

DIP: Purpose IP, Used to identify the device that receives data

Transport layer protocol

The transport layer protocol consists of TCP( Transmission control protocol )、UDP( User packet protocol )

TCP characteristic : High reliability 、 The transmission rate is slow

UDP characteristic : Low reliability 、 Fast transmission rate

TCP agreement

Is a connection oriented transport layer protocol

What is connection oriented ? Before transmitting data, a communication channel must be established

TCP Head structure

Source port( Source port number ) Dport( Destination port number )

Syn( Request bit ) 、ack( Confirmation bit )、fin( End bit )、seq number( Serial number )、ack number( Confirmation no. )

TCP Why is the protocol reliable 、 Slow speed ?

Before transmitting data : Establish a communication channel

TCP Three times mobile phone system ( request 、 Respond to ):

Ack=seq+1

Transmitting data :

Packet loss retransmission mechanism :

After data transmission :

Four times breakup mechanism :

UDP agreement

It is a connectionless transmission protocol

What is for connectionless ? There is no need to establish a communication channel before transmitting data

Data encapsulation and de encapsulation

During the unpacking process, if the Ethernet frame structure DMAC With the receiving device MAC When the address does not match , Then the device will refuse to receive data

In the process of data encapsulation and de encapsulation , Source and purpose IP The address is always maintained , Source and purpose MAC The address will change according to different scenes

 

 

原网站

版权声明
本文为[Unknown white hat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060918047945.html