MindMap Gallery Computer network detailed notes mind map
Mind map of detailed notes on computer networks, including application layer, transport layer, data link layer, etc. The most comprehensive mind map notes on network engineering and computer networks. I hope it will be helpful to you!
Edited at 2023-11-10 11:38:10This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
"Computer Network" - basic knowledge of byHappy Network Engineer
Overview
concept
network of networks
Composed of several nodes and links connecting these nodes
structure
component
edge part
end system
core part
Network and router
Architecture
OSI seven-layer model
theoretically
Conceptually
TCP/IP layer four
in fact
Feature
Principle-based five layers
Network topology diagram
star
ring
Bus type
tree shape
mesh type
The topological structure of the Internet
Main criteria
Internet Society ISOC
Internet Architecture Board IAB
Internet Engineering Department IETF
Internet Research Task Force (IRTF)
Develop a process
1Internet Draft
2 Recommended standards
3Internet standards
Classification
local area network
Ethernet
ppp
metropolitan area network
Wan
personal access network
Several forms of interconnection between networks
LAN-LAN
LAN-WAN
WAN-WAN
LAN-WAN-LAN
Performance
rate
transmission
port speed
Send and receive rates
spread
The rate of data on the channel, usually a fixed value
concept
Refers to the transmission rate of data, also known as data rate or bit rate.
unit
b/s or bps
bandwidth
concept
The "highest data rate" that a channel can pass per unit time
Unit bit/s
Throughput
The amount of data passing through a certain network (channel, interface) per unit time
Delay
concept
The time it takes for data to travel from one end of the network to the other
spread
The time from the first bit sent to the last bit
transmission
The time an electromagnetic wave spends in the channel
Delay bandwidth product
Link length in bits
network utilization
Channel utilization
The percentage of time the channel is utilized
network utilization
Weighted average of channel utilization of the entire network
RTT
The time elapsed from the time the sender sends the data to the time the receiver receives the data
Important basic features
connectivity
shared
data communication system
composition
source system
Source point, source station, source
Transmitter
Transmission system
target system
receiver
terminus, destination, destination
Purpose
deliver message
The relationship between data and signals
Data is the entity that carries the message
A signal is an electrical or electromagnetic representation of data
effect
Resource Sharing
data communication
Centralized management
network layer protocol
PDU=packet
IP protocol
IP address
traditional classification
A:1
B:128
C:192
D:224
E:240
composition
4-byte 32-bit dotted decimal
Network number
IP and mask operation results
host number
IP-network number income
special IP address
Network number
Host bits are all zeros
host number
The network number is all zero
private address
10.*
172.16.*~172.31.*
A total of 16 third-digit network segments
192.168.*
reserved address
169.254.*
DHCP
Scope of use
Subnetting
Ideas
The division of subnets is an internal matter, and there is no division for external performance.
method
Allocate some host bits to network bits, original host number = subnet number host number
mask
principle
IP&mask = network address (network number)
CIDR Classless Addressing
express
IP/n
/n represents the network prefix, which is the binary code of the mask
address block
special address block
32
Host-specific routing
31
Direct route, representing a point-to-point link
0
Default (default) route
calculate
Number of available hosts in the subnet
Calculation of the number of subnets that can be divided
most
least
IP aggregation (supernet)
definition
A CIDR address can represent many network addresses. This aggregation is called route aggregation.
effect
Reduce routing table entries, thereby reducing the exchange of routing information between routers and improving the performance of the entire Internet
The last bit of the two address blocks is called the aggregation bit
condition
Address block size is the same
The aggregation bits are different, one is 0 and the other is 1
Aggregation bits are all the same before
IP message
head
Field meaning
Version 4
version
Distinguish between IPv6 and IPv4
Head length 4
Header length
Convert to decimal number and multiply by 4 to represent the head length.
Differentiated Services 8
Traffic class
The priority level of datagrams in the network
Total length 16
Total Length
The length of the entire datagram
When all are 1, the decimal number is 65535, which is the maximum value of IP packets.
Logo 16
ID
Counter used to generate the ID of the IP datagram
Determine whether the message is duplicated
Flag 3
Flags
MF1
Are there any shards later?
DF1
Whether sharding is allowed
Reserve 1
Chip offset 13
Fragment Offset
The relative position of the fragment in the original group after fragmentation
8 bytes are the offset unit
The field sequence number where the data starts/8
Survival time 8
TTL
Maximum number of hops along the route
Protocol 8
Protocol
Header checksum 16
Header Checksum
Do not use CRC but simply calculate the method and only check the header
Source address 32
Source Address
Destination address 32
Destination Address
Optional fields 0~40
IP Option
filling
The total number of bytes is a multiple of 4
ICMP
Internet control messages
effect
Allows hosts or routers to report error conditions and provide reports on exceptions, increasing the chance of successful IP datagram delivery
capital
12 bytes
type
error message
3
Key points are unreachable
11
time out
12
Parameter error
5
change route
Inquiry message
8 or 0
Will send request (echo) and corresponding response
13 or 14
(Timestammp) timestamp request and answer
RIP
principle
distributed
based on distance vector
The distance from a router to the directly connected network is set to 1
The distance from a router to an indirectly connected network is defined as the number of routers passed plus 1
A path can have a maximum of 15 routers, and 16 means it is unreachable.
internal routing protocol
Features
Only exchange information with neighboring routers
After receiving the message, first change the distance in the table to 1
Then compare and update it·
different next hop
shorter distance, newer
Longer distance, no update
same next hop
All updated
What is exchanged is the routing table, which is all the information
Fixed time interval exchange
advantage
Simple to implement and low overhead
shortcoming
RIP limits network size
The routing information exchanged between routers is the complete routing table in the router, so as the network scale expands, the overhead increases.
Bad news travels slowly
Based on distance vector
definition
The route distance submitted directly is 1, and the distance increases by one for each router passed through.
message
Field
Address family identifier (category)
The address protocol used by the flag
route tag
Autonomous system number ASN
Considering the possibility of receiving routing information from outside the AS
Routing table contents
OSPF
Open Shortest Path First
Adopts distributed link state routing protocol
Currently the most widespread
OSPF v2
IPv4
OSPF v3
IPv6
principle
Based on link status
message
structure
capital
Group
type
1.hello grouping
2.Database Description grouping
3.Link State Request grouping
4.Link State Update grouping
Use flooding
Link State Acknowledgment grouping
Features
openness
Shortest path limited
distributed
link status
IP address, mask, network type and metrics
flood method
condition
When the link status changes
principle
Convergence is fast
Hierarchical partition management
Has identification function
Support variable length subnetting and CIDR
Link status has a 32-bit sequence number
build database
Essentially a topological structure diagram of the entire network
Network-wide consistency - database synchronization
Can be updated quickly so that each router can update the routing table in a timely manner
Refresh regularly
No limit on scale
Specify router
Each router can represent the area
area
unit of scope secondary to the autonomous system
Identification using a 32-bit identifier
Have a hierarchical structure
The backbone area is represented by 0.0.0.0
Used to connect other areas
Size does not exceed 200 routers
Basic operations
Two greetings 4 descriptions n synchronization (request, update, confirm)
BGP
concept
External Gateway Protocol
For routing information exchange between different autonomous systems
"Accessibility" information
Find the better route instead of the best route
path vector
BGP spokesperson
An autonomous system has at least one
Typically a border router
message
masthead
type
Open (OPEN) message to establish a relationship with another BGP speaker
Routing information sent or revoked by update message (UPDATE)
The keep-alive message (KEEPALIVE) confirms the OPEN message and periodically confirms the neighbor station relationship.
Notification message (NOTIFICATION) to send detected errors
Features
The number of speakers and ASs is basically the same order of magnitude
The number of nodes and the amount of information exchanged by the protocol are much smaller than that of AS.
Support CIDR
When BGP starts, the entire routing table is exchanged, and then only updated
principle
Routing and switching
TCP connection
The two speakers thus become neighboring stations or peer stations.
ARP
effect
Resolve the physical address based on the IP address
principle
When host A sends a datagram to B
Check the ARP cache to see if there is B’s IP
The saved correspondence table of the latest host IP address and hardware address in this local area network can reduce network communication volume and delay.
If so
Find out hardware address and write to Mac frame
If not
The ARP process broadcasts ARP request packets on the LAN
Write to cache after receiving response packet
Forward
router
forwarding table
Construct using network address
<destination network, next hop>
Data forwarding process
1. Extract the source and destination IP addresses D and N from the received packet header.
#2. Determine whether it can be delivered directly
If possible, deliver it
else->3.
3. Determine whether there is a specific host route
If so, forward it to the next hop of the table
else->4.
4. Determine whether there is a matching common entry (longest match)
If so, forward it
else->5.
5. Determine whether there is a default route
If so, forward it
else->6.
6. Discard and report grouping error
longest match principle
Select the longest match of the prefix as the best match
Forwarding table sorting
The longer the prefix, the higher it ranks.
Search principle
binary clue
principle
The depth from top to bottom from the root node of the binary clue is up to 32 levels, and each level corresponds to one bit of the IP address.
optimization
unique prefix
compression technology
routing table
ideal route
algorithm
Features
correct, complete
Simple
adaptive
Have stability
fairness
The best
Classification
Whether to automatically select
Adaptive
non-adaptive
Internet management levels
Select within domain
Inter-domain selection
Internal routing vs. external routing
Distinguished by whether it is in an autonomous system
best route
The absolute best routing algorithm does not exist
The so-called best is only the relative best
physical layer
PDU=bit stream bit
physical link
channel
concept
media used to transmit information in a certain direction
Classification
One-way communication
two-way alternating communication
Two-way simultaneous communication
ultimate capacity
Ney's formula
ideal conditions
Shannon's theorem
Reuse
Wavelength division WDM
time division TDM
Statistical time and minute SRDM
code division CDM
Frequency division FDM
Signal
Digital signal
Discrete
analog signal
continuous
code element
A waveform that represents a discrete value of a digital signal
transmission media
Guidance
twisted pair
coaxial cable
Optical cable
optical fiber
multimode
concept
There can be multiple light rays entering at different angles and transmitted in one optical fiber.
shortcoming
prone to distortion
Only suitable for short distance transmission
single mode
concept
Reduce the diameter of the fiber to only one wavelength of light, allowing the light to travel all the way forward
shortcoming
higher cost
advantage
Smaller attenuation
Suitable for long distance transmission
Features
Small transmission loss, long relay distance, low cost for long-distance transmission
Good anti-lightning and electromagnetic interference performance
No crosstalk interference, good confidentiality
Small size and light weight
empty topstitch
terminated
non-guidance
equipment
hub
Features
1. Practical electronic devices simulate the operation of actual cables so that the entire system still operates like a traditional Ethernet
2. After connection, the Ethernet is still a bus network, using CSMA/CD to share the logical bus
3. Much like a multi-interface forwarder, it belongs to the physical layer
4. Using a dedicated chip, it can adaptively cancel crosstalk echoes and reduce near-end crosstalk.
network
Star Ethernet with shared bus
802.3i
10BASE-T
BASE
baseband transmission
T
twisted pair
10
bandwidth
data link layer
PDU=frame
basic concept
framed
method
Add delimiter
Frame header
SOH
end of frame
EOT
Mac layer
Mac address
Classification
Number of dissemination sites
unicast address
Multicast (multicast) address
The lowest bit of the first byte is 1
Only used for destination address
broadcast address
48 bits are all 1
Only used for destination address
Management scope
global address
The lowest two bits of the first byte are 0
local address
The lowest bit of the first byte is 0
No registration required
express
Gong points hexadecimal
Allows 47 bits to be allocated for use
2^47 available physical addresses
6 bytes
Top 24
Organization unique identifier
Registration required
Last 24 digits
extended unique identifier
Free to use
Mac frames
Max=Frame header Frame tail 1500=1518 bytes
IEEE规定的最大数据帧长度
capital
18 bytes
Field meaning
Source and destination IP addresses
type
FCS
Determine invalid frame
Field length and length field are inconsistent
The length of the frame is not an integer number of bytes
FCS verification failed
Data length is between 46~1500 bytes
The total length is not between 64~1518
Ethernet adapter (network card)
Transparent transmission
filling
Add special character escapes
Synchronize
【0】Bit stuffing method
asynchronous
Character filling method?
error detection
Bit error rate (EBR)
The ratio of bits with transmission errors to the total number of bits transmitted within a period of time
Error rate
Same reason
Group error rate>=bit error rate
In a group, if one bit is wrong, it is considered that all bits in the entire group are wrong.
FCS
CRC redundant cyclic code
Use a fixed generator polynomial to calculate the data and obtain a check code
After receiving the data, the receiver uses the same generator polynomial again to calculate the check code.
Compare the calculation result with the received check code
calculation steps
1. Obtain the divisor C[i] according to the polynomial
2. Zero padding at the end of the data block
3. Process all data with bitwise XOR
1) Left align the divisor
2) Bitwise XOR operation
3) The result is merged with the remaining number and returned to 1)
End when the divisor is right aligned
Get crc checksum
protocol
point-to-point channel
ppp agreement
Max=5 3 1500=1508
frame
Head 5B
Tail 3B
data
broadcast channel
CSMA/CD
concept
Carrier sense multiple access with collision detection
Carrier monitoring
Each station on the network continuously checks whether there is data transmission on the bus before sending data.
conflict detection
Continuously detect whether conflicts occur during the process of sending data
Conflict: Two or more stations on the same network send data at the same time, resulting in a mixture of signals on the bus, making it impossible for the receiving station to distinguish the real data, which is a data conflict.
Listen before speaking, speak while listening, wait for conflicts
When a collision is detected, the colliding stations simultaneously send 32 or 48 bits of data.
artificial interference signal
Notify all sites
condition
Multipoint access (multiple access)
All stations use the same bus
Send data as broadcast
Minimum 64 bytes per frame
advantage
The principle is simple
Technically easy to implement
All stations have equal status
shortcoming
Only half duplex
Efficiency drops dramatically when the network load is heavy
Transmission process
1. Detect the channel before sending
2. When detecting the channel
If the channel is busy, it will continue to detect until the channel is free.
If it is idle and the channel is still idle within 96 bits, send
Guaranteed minimum interval between frames
3. Detect collision when sending
If successful
Back to 1.
fail
Perform truncated binary exponential backoff algorithm
After detecting a collision, it immediately stops sending, delays (dynamic backoff) for a random time, and sends artificial interference signals, waiting for a basic backoff time (512 bits) and then returns to 2.
Retransmission delay
Continue to detect the channel. If it still fails after 16 times, stop retransmitting and report an error upward.
shared channel method
static
dynamic
random
All users can send random messages (current technology)
controlled
Users cannot send random messages. Such as multi-point line exploration (rarely used)
local area network
Mainly uses Ethernet
Traditional Ethernet
Standard commonly used when discussing Ethernet theory: 10M
standard
IEEE802.3
DIX Ethernet V2
Features
Two-way bandwidth communication available
Can be flexibly upgraded according to user needs
Improve transmission efficiency and reduce costs
Enables end-to-end transmission without converting frame formats
shortcoming
User authentication is not supported
Features
The network is owned by one organization and has a limited geographical scope and number of sites
advantage
Has broadcast function
Easy to expand and evolve
Improved the three natures
reliability
Availability
survivability
shortcoming?
Distance is limited
Main extension
star shape
Bus type
ring
tree shape
mesh shape
VLAN
significance
Limits the number of workstations that receive broadcast messages so that network performance does not deteriorate due to spreading too many messages (broadcast storms)
Relevant equipment and resources can be conveniently combined as needed, allowing users to access resources as needed.
switch
Features
Multiple interfaces
full duplex
Parallel transfer
Exclusive media bandwidth
Has a dedicated hardware structure
Has storage function
plug and play
Filter forwarding frames
Self-learning function
advantage
Each port has exclusive bandwidth, increasing total capacity
Convert shared Ethernet to switched Ethernet without changing hardware or software
Interfaces with multiple speeds available
shortcoming
Unable to automatically quarantine broadcast storms
Easy to cause loops
Viruses spread easily
There is a switching capacity issue (number of MAC addresses limited)
Generally wire speed forwarding
No measures such as congestion avoidance
exchange method
store and forward
After buffering the obtained frames, perform error checking, filtering and forwarding
cut-through exchange
Received frames (including invalid ones) are directly filtered and forwarded
step
Study by yourself first
Check the exchange table and compare whether there is an item in the table that matches the original address of the received frame.
have
Update effective time
none
add an item
original address
Enter interface
Effective time
Forward later
Check the exchange table to see if there is an item in the table that matches the destination address of the received frame.
have
If the source destination comes from the unified interface
throw away
Otherwise, the interface given in the security table will be filtered and forwarded.
none
Broadcast to all interfaces except ingress
transport layer
PDU = segment
protocol
UDP
message
20 bytes
Features
connectionless
try your best
Low initial cost
No congestion control
Supports one-to-one, one-to-many, many-to-one and many-to-many
Message-oriented
reason
sender
Square UDP neither merges nor splits the packets provided by the application. After adding the header, it is handed over to the IP layer and one packet is sent at a time.
receiver
After removing the header, deliver the complete message to the upper layer at once
TCP
message
Fixed 20 bytes, maximum 60
Features
connection oriented
Need to maintain connection status
reliable delivery
One to one
full duplex
byte stream oriented
connect
three handshakes
establish connection
wave four times
Release connection
socket
socket=(IP: port number)
【Calculation】Checksum
1.Initialized to 0
2. Treat the header as a group of 16 digits, and then calculate the sum in reverse order.
3. Store the obtained sum in the checksum field
Reliable ARQ protocol
Essentially related to the window size
Stop and Wait Protocol ARQ
Send one, stop and wait for confirmation
Wt=Wr=1
Continuous ARQ
Roll back N
Resend from the timeout data
Wt>1,Wr=1
Select retransmit
Only transmit timeout data
?
Wr>=Wt>1
protocol port
16-bit binary
belong
software port
Differentiate local application processes
summary
Classification
Server
Well-known port numbers
Also known as system port number, default port number
0~1023
Register port number
1024~49151
Also known as registration port number
Registration purpose to avoid duplication
client
Also known as ephemeral port, temporary port
49152~65535
summary
window
size
Defined by the maximum number of PDUs that can be saved
effect
Save data temporarily
Classification
Send window
Save data that has been sent but not confirmed
receive window
Save data that has been received but not submitted yet
congestion window
congestion control
congestion
definition
At a certain period of time, the demand for a certain resource on a certain network exceeds the supply capacity, and the performance of the network deteriorates drastically.
Generate conditions
Demand for resources is greater than available resources
judge
Retransmission timer expired
Multiple duplicate ACKs received (frame dropped)
The transmission quality of modern networks is generally very good, the probability of transmission errors is very small, and the cause of timeout is most likely due to congestion.
control algorithm
slow start
congestion avoidance
Multiplicative decrease
Fast retransmission
Quick recovery
step
subtopic
subtopic
General principles
Increase investment in available resources
Reduce demand on available resources
method
open loop control
Take relevant factors into consideration when designing the network and strive to avoid congestion when the network operates.
Closed-loop control
Based on feedback loop
Test network system
So that we can detect when and where congestion occurs in time
Set information return location
Deliver congestion information in a timely manner to where action can be taken
Adjust network system
Solve the problem
measure
Set congestion window
Real sending window value = MIN (announcement window value, congestion window value)
Features
global control
Involves all factors of the entire network
flow control
concept
Control the sending rate of the sender not to exceed the data processing rate of the receiver
rwnd field
Features
Point-to-point control
local control
effect
Provide logical communication for application processes
Reuse
sender
Divide
receiver
Provide a port for the application process
shield
The lower layers are shielded from the higher layers to obtain specific implementation details.
Application layer
PDU=message
message, message
software
domain name system
URL
FTP
file transfer system
www
world wide web
Distributed Hypermedia Information Store
Hypertext
Text containing links to other documents
URL
Uniform Resource Locator
Format
protocol://hostname:port (usually omitted)/path
DHCP
Dynamic Host Configuration Protocol
port
Common port numbers and loading protocols
UDP
RPC
111
DNS
53
TFTP
69
Simple file transfer
advantage
Available for UDP
When programs or files need to be downloaded to many machines at the same time
Occupies small memory
shortcoming
Interaction is not supported
no command set
User authentication is not supported
No directory function
DHCP
C
68
S
67
Dynamic Host Configuration Protocol
SNMP
161
Server
162
client
SNMP(trap)
Simple Network Management Protocol
simple network management protocol
Designed to be as simple as possible
Function
Network performance monitoring and statistics
error detection
recovery function
Configure network devices
basic skills
read
Write
composition
Ontology
Defines the packet format exchanged between the management station and the agent
Complete network management actions
SMI
Structure of Management Information Structure of Management Information
Defines general rules for naming objects
General rules for defining object data types
Defines rules for encoding objects and object values
Establish rules
Naming of managed objects
Object naming tree
object naming tree
The data type of the managed object
Abstract Syntax ASN.1
simple type
structured type
sequence
Similar to struct
sequence of
similar to array
MIB
management information base
Creates a named object in the managed entity and specifies its type
Describe the variables
TCP
SMTP
25
FTP
20 (transmission port)
21 (control port)
Work steps
1. Open port 21 (well-known) so that customers can connect
2. Wait for the client process to issue a connection request
3. Hand the request to the slave process, and the slave process can be started immediately.
continue waiting
Telnet
twenty three
simple remote terminal protocol
HTTP
80
hypertext transfer protocol
connectionless, stateless
HTTP/1.1
persistent connection
Pipeline approach
The client can then send a new request before receiving the HTTP response message.
advantage
Only one RTT is spent, which reduces the idle time of the TCP connection and improves the efficiency of downloading documents.
non-pipeline approach
The client cannot make the next request until it receives the previous response.
advantage
Saves an RTT required by TCP to establish a connection
shortcoming
After sending an object, TCP is in an idle state, which wastes server resources.
text-oriented
HTTP/2
Features
Responses sent back by the server can be sent back in parallel (using the same TCP connection)
Greatly shortened response time
Allow clients to reuse TCP connections for multiple requests
Saves the time it takes for TCP to establish and release multiple times in a row
Divide all messages into many smaller binary-coded frames, use new compression algorithms, and do not send repeated header fields
Greatly reduces the overhead of the header and improves transmission efficiency
proxy server
a network entity
World Wide Web Cache
Serve
Temporarily store the URL visited by the customer, and return local data when making repeated requests.
advantage
This greatly reduces the traffic of dedicated lines and reduces the delay in accessing the Internet.
Constitute a content distribution network CDN
Content Distribution Network
Akamai USA
Communication traffic up to 40TB per second
Message structure
request message
response message
meaning
start line
CR
Enter
LF
newline
Used to distinguish whether it is a request message or a response message
First line
Describes information about the browser, server, and message body
Can have multiple lines or no lines
CRLF is required at the end of each line
Use a blank line at the end to separate it from the entity body.
entity body
Status code (return code)
1xx
Notification information
100
continue
The client continues to request
101
Switch protocol based on client's request (up only)
2xx
200
success
201
Resource created successfully
202
Request received, but processing not completed
3xx
Redirect
301
Permanently transfer new URL
4xx
client error
400
Bad Request (bad request)
404
Not Found
5xx
Server side error
500
Internal Server Error
502
A server working as a gateway or proxy received an invalid response from the remote server while trying to perform a request.
HTTPS
443
CGI
Common Gateway Interface
Domain Name System DNS
effect
Convert hostname to IP address
Features
hierarchical tree structure
distributed
Efficient
Jurisdiction based on "district"
Size cannot be larger than 'domain'
local domain name server
Inquire
recursive query
Iterative query
domain name
Top level domain
National level
General grade
com
Company
net
Network service organization
org
non-profit organization
int
International organizations
edu
educational institution
gov
government departments
Mil
united states military department
infrastructure level
arpa
reverse domain name
Make all hosts connected to the Internet have unique names
SMTP
Simple Mail Transfer Protocol
pop3
post office agreement
Very simple, limited functionality mail reading protocol
Illustration
IMAP
Internet Message Access Protocol
Forgot the insulation access agreement
MIME
Common Internet Mail Extensions Protocol
p2p
P2P with centralized directory server
File transfer is decentralized
File positioning is centralized (CS)
Fully distributed structure of P2P
Limited scope flooding queries
torrent
A collection of all peers participating in file distribution
tracking device
infrastructure node
Responsible for registration of new users
Popular applications
BT
Rareest technology first
Application layer
PDU=message
message, message
software
domain name system
URL
FTP
file transfer system
www
world wide web
Distributed Hypermedia Information Store
Hypertext
Text containing links to other documents
URL
Uniform Resource Locator
Format
protocol://hostname:port (usually omitted)/path
DHCP
Dynamic Host Configuration Protocol
port
Common port numbers and loading protocols
UDP
RPC
111
DNS
53
TFTP
69
Simple file transfer
advantage
Available for UDP
When programs or files need to be downloaded to many machines at the same time
Occupies small memory
shortcoming
Interaction is not supported
no command set
User authentication is not supported
No directory function
DHCP
C
68
S
67
Dynamic Host Configuration Protocol
SNMP
161
Server
162
client
SNMP(trap)
Simple Network Management Protocol
simple network management protocol
Designed to be as simple as possible
Function
Network performance monitoring and statistics
error detection
recovery function
Configure network devices
basic skills
read
Write
composition
Ontology
Defines the packet format exchanged between the management station and the agent
Complete network management actions
SMI
Structure of Management Information Structure of Management Information
Defines general rules for naming objects
General rules for defining object data types
Defines rules for encoding objects and object values
Establish rules
Naming of managed objects
Object naming tree
object naming tree
The data type of the managed object
Abstract Syntax ASN.1
simple type
structured type
sequence
Similar to struct
sequence of
similar to array
MIB
management information base
Creates a named object in the managed entity and specifies its type
Describe the variables
TCP
SMTP
25
FTP
20 (transmission port)
21 (control port)
Work steps
1. Open port 21 (well-known) so that customers can connect
2. Wait for the client process to issue a connection request
3. Hand the request to the slave process, and the slave process can be started immediately.
continue waiting
Telnet
twenty three
simple remote terminal protocol
HTTP
80
hypertext transfer protocol
connectionless, stateless
HTTP/1.1
persistent connection
Pipeline approach
The client can then send a new request before receiving the HTTP response message.
advantage
Only one RTT is spent, which reduces the idle time of the TCP connection and improves the efficiency of downloading documents.
non-pipeline approach
The client cannot make the next request until it receives the previous response.
advantage
Saves an RTT required by TCP to establish a connection
shortcoming
After sending an object, TCP is in an idle state, which wastes server resources.
text-oriented
HTTP/2
Features
Responses sent back by the server can be sent back in parallel (using the same TCP connection)
Greatly shortened response time
Allow clients to reuse TCP connections for multiple requests
Saves the time it takes for TCP to establish and release multiple times in a row
Divide all messages into many smaller binary-coded frames, use new compression algorithms, and do not send repeated header fields
Greatly reduces the overhead of the header and improves transmission efficiency
proxy server
a network entity
World Wide Web Cache
Serve
Temporarily store the URL visited by the customer, and return local data when making repeated requests.
advantage
This greatly reduces the traffic of dedicated lines and reduces the delay in accessing the Internet.
Constitute a content distribution network CDN
Content Distribution Network
Akamai USA
Communication traffic up to 40TB per second
Message structure
request message
response message
meaning
start line
CR
Enter
LF
newline
Used to distinguish whether it is a request message or a response message
First line
Describes information about the browser, server, and message body
Can have multiple lines or no lines
CRLF is required at the end of each line
Use a blank line at the end to separate it from the entity body.
entity body
Status code (return code)
1xx
Notification information
100
continue
The client continues to request
101
Switch protocol based on client's request (up only)
2xx
200
success
201
Resource created successfully
202
Request received, but processing not completed
3xx
Redirect
301
Permanently transfer new URL
4xx
client error
400
Bad Request (bad request)
404
Not Found
5xx
Server side error
500
Internal Server Error
502
A server working as a gateway or proxy received an invalid response from the remote server while trying to perform a request.
HTTPS
443
CGI
Common Gateway Interface
Domain Name System DNS
effect
Convert hostname to IP address
Features
hierarchical tree structure
distributed
Efficient
Jurisdiction based on "district"
Size cannot be larger than 'domain'
local domain name server
Inquire
recursive query
Iterative query
domain name
Top level domain
National level
General grade
com
Company
net
Network service organization
org
non-profit organization
int
International organizations
edu
educational institution
gov
government departments
Mil
united states military department
infrastructure level
arpa
reverse domain name
Make all hosts connected to the Internet have unique names
SMTP
Simple Mail Transfer Protocol
pop3
post office agreement
Very simple, limited functionality mail reading protocol
Illustration
IMAP
Internet Message Access Protocol
Forgot the insulation access agreement
MIME
Common Internet Mail Extensions Protocol
p2p
P2P with centralized directory server
File transfer is decentralized
File positioning is centralized (CS)
Fully distributed structure of P2P
Limited scope flooding queries
torrent
A collection of all peers participating in file distribution
tracking device
infrastructure node
Responsible for registration of new users
Popular applications
BT
Rareest technology first
transport layer
PDU = segment
protocol port
16-bit binary
belong
software port
Differentiate local application processes
summary
Classification
Server
Well-known port numbers
Also known as system port number, default port number
0~1023
Register port number
1024~49151
Also known as registration port number
Registration purpose to avoid duplication
client
Also known as ephemeral port, temporary port
49152~65535
summary
protocol
UDP
message
20 bytes
Features
connectionless
try your best
Low initial cost
No congestion control
Supports one-to-one, one-to-many, many-to-one and many-to-many
Message-oriented
reason
sender
Square UDP neither merges nor splits the packets provided by the application. After adding the header, it is handed over to the IP layer and one packet is sent at a time.
receiver
After removing the header, deliver the complete message to the upper layer at once
TCP
message
Fixed 20 bytes, maximum 60
Features
connection oriented
Need to maintain connection status
reliable delivery
One to one
full duplex
byte stream oriented
connect
three handshakes
establish connection
wave four times
Release connection
socket
socket=(IP: port number)
【Calculation】Checksum
1.Initialized to 0
2. Treat the header as a group of 16 digits, and then calculate the sum in reverse order.
3. Store the obtained sum in the checksum field
Reliable ARQ protocol
Essentially related to the window size
Stop and Wait Protocol ARQ
Send one, stop and wait for confirmation
Wt=Wr=1
Continuous ARQ
Roll back N
Resend from the timeout data
Wt>1,Wr=1
Select retransmit
Only transmit timeout data
?
Wr>=Wt>1
window
size
Defined by the maximum number of PDUs that can be saved
effect
Save data temporarily
Classification
Send window
Save data that has been sent but not confirmed
receive window
Save data that has been received but not submitted yet
congestion window
congestion control
congestion
definition
At a certain period of time, the demand for a certain resource on a certain network exceeds the supply capacity, and the performance of the network deteriorates drastically.
Generate conditions
Demand for resources is greater than available resources
judge
Retransmission timer expired
Multiple duplicate ACKs received (frame dropped)
The transmission quality of modern networks is generally very good, the probability of transmission errors is very small, and the cause of timeout is most likely due to congestion.
control algorithm
slow start
congestion avoidance
Multiplicative decrease
Fast retransmission
Quick recovery
step
subtopic
subtopic
General principles
Increase investment in available resources
Reduce demand on available resources
method
open loop control
Take relevant factors into consideration when designing the network and strive to avoid congestion when the network operates.
Closed-loop control
Based on feedback loop
Test network system
So that we can detect when and where congestion occurs in time
Set information return location
Deliver congestion information in a timely manner to where action can be taken
Adjust network system
Solve the problem
measure
Set congestion window
Real sending window value = MIN (announcement window value, congestion window value)
Features
global control
Involves all factors of the entire network
flow control
concept
Control the sending rate of the sender not to exceed the data processing rate of the receiver
rwnd field
Features
Point-to-point control
local control
effect
Provide logical communication for application processes
Reuse
sender
Divide
receiver
Provide a port for the application process
shield
The lower layers are shielded from the higher layers to obtain specific implementation details.
network layer protocol
PDU=packet
IP protocol
IP address
traditional classification
A:1
B:128
C:192
D:224
E:240
composition
4-byte 32-bit dotted decimal
Network number
IP and mask operation results
host number
IP-network number income
special IP address
Network number
Host bits are all zeros
host number
The network number is all zero
private address
10.*
172.16.*~172.31.*
A total of 16 third-digit network segments
192.168.*
reserved address
169.254.*
DHCP
Scope of use
Subnetting
Ideas
The division of subnets is an internal matter, and there is no division for external performance.
method
Allocate some host bits to network bits, original host number = subnet number host number
mask
principle
IP&mask = network address (network number)
CIDR Classless Addressing
express
IP/n
/n represents the network prefix, which is the binary code of the mask
address block
special address block
32
Host-specific routing
31
Direct route, representing a point-to-point link
0
Default (default) route
calculate
Number of available hosts in the subnet
Calculation of the number of subnets that can be divided
most
least
standard
Divided by number of subnets
Divided by number of hosts
IP aggregation (supernet)
definition
A CIDR address can represent many network addresses. This aggregation is called route aggregation.
effect
Reduce routing table entries, thereby reducing the exchange of routing information between routers and improving the performance of the entire Internet
The last bit of the two address blocks is called the aggregation bit
condition
Address block size is the same
The aggregation bits are different, one is 0 and the other is 1
Aggregation bits are all the same before
IP message
head
Field meaning
Version 4
version
Distinguish between IPv6 and IPv4
Head length 4
Header length
Convert to decimal number and multiply by 4 to represent the head length.
Differentiated Services 8
Traffic class
The priority level of datagrams in the network
Total length 16
Total Length
The length of the entire datagram
When all are 1, the decimal number is 65535, which is the maximum value of IP packets.
Logo 16
ID
Counter used to generate the ID of the IP datagram
Determine whether the message is duplicated
Flag 3
Flags
MF1
Are there any shards later?
DF1
Whether sharding is allowed
Reserve 1
Chip offset 13
Fragment Offset
The relative position of the fragment in the original group after fragmentation
8 bytes are the offset unit
The field sequence number where the data starts/8
Survival time 8
TTL
Maximum number of hops along the route
Protocol 8
Protocol
Header checksum 16
Header Checksum
Do not use CRC but simply calculate the method and only check the header
Source address 32
Source Address
Destination address 32
Destination Address
Optional fields 0~40
IP Option
filling
The total number of bytes is a multiple of 4
ICMP
Internet control messages
effect
Allows hosts or routers to report error conditions and provide reports on exceptions, increasing the chance of successful IP datagram delivery
capital
12 bytes
type
error message
3
Key points are unreachable
11
time out
12
Parameter error
5
change route
Inquiry message
8 or 0
Will send request (echo) and corresponding response
13 or 14
(Timestammp) timestamp request and answer
RIP
principle
distributed
based on distance vector
The distance from a router to the directly connected network is set to 1
The distance from a router to an indirectly connected network is defined as the number of routers passed plus 1
A path can have a maximum of 15 routers, and 16 means it is unreachable.
internal routing protocol
Features
Only exchange information with neighboring routers
After receiving the message, first change the distance in the table to 1
Then compare and update it·
different next hop
shorter distance, newer
Longer distance, no update
same next hop
All updated
What is exchanged is the routing table, which is all the information
Fixed time interval exchange
advantage
Simple to implement and low overhead
shortcoming
RIP limits network size
The routing information exchanged between routers is the complete routing table in the router, so as the network scale expands, the overhead increases.
Bad news travels slowly
Based on distance vector
definition
The route distance submitted directly is 1, and the distance increases by one for each router passed through.
message
Field
Address family identifier (category)
The address protocol used by the flag
route tag
Autonomous system number ASN
Considering the possibility of receiving routing information from outside the AS
Routing table contents
OSPF
Open Shortest Path First
Adopts distributed link state routing protocol
Currently the most widespread
OSPF v2
IPv4
OSPF v3
IPv6
principle
Based on link status
message
structure
capital
Group
type
1.hello grouping
2.Database Description grouping
3.Link State Request grouping
4.Link State Update grouping
Use flooding
Link State Acknowledgment grouping
Features
openness
Shortest path limited
distributed
link status
IP address, mask, network type and metrics
flood method
condition
When the link status changes
principle
Convergence is fast
Hierarchical partition management
Has identification function
Support variable length subnetting and CIDR
Link status has a 32-bit sequence number
build database
Essentially a topological structure diagram of the entire network
Network-wide consistency - database synchronization
Can be updated quickly so that each router can update the routing table in a timely manner
Refresh regularly
No limit on scale
Specify router
Each router can represent the area
area
unit of scope secondary to the autonomous system
Identification using a 32-bit identifier
Have a hierarchical structure
The backbone area is represented by 0.0.0.0
Used to connect other areas
Size does not exceed 200 routers
Basic operations
Two greetings 4 descriptions n synchronization (request, update, confirm)
BGP
concept
External Gateway Protocol
For routing information exchange between different autonomous systems
"Accessibility" information
Find the better route instead of the best route
path vector
BGP spokesperson
An autonomous system has at least one
Typically a border router
message
masthead
type
Open (OPEN) message to establish a relationship with another BGP speaker
Routing information sent or revoked by update message (UPDATE)
The keep-alive message (KEEPALIVE) confirms the OPEN message and periodically confirms the neighbor station relationship.
Notification message (NOTIFICATION) to send detected errors
Features
The number of speakers and ASs is basically the same order of magnitude
The number of nodes and the amount of information exchanged by the protocol are much smaller than that of AS.
Support CIDR
When BGP starts, the entire routing table is exchanged, and then only updated
principle
Routing and switching
TCP connection
The two speakers thus become neighboring stations or peer stations.
ARP
effect
Resolve the physical address based on the IP address
principle
When host A sends a datagram to B
Check the ARP cache to see if there is B’s IP
The saved correspondence table of the latest host IP address and hardware address in this local area network can reduce network communication volume and delay.
If so
Find out hardware address and write to Mac frame
If not
The ARP process broadcasts ARP request packets on the LAN
Write to cache after receiving response packet
Forward
router
forwarding table
Construct using network address
<destination network, next hop>
Data forwarding process
1. Extract the source and destination IP addresses D and N from the received packet header.
#2. Determine whether it can be delivered directly
If possible, deliver it
else->3.
3. Determine whether there is a specific host route
If so, forward it to the next hop of the table
else->4.
4. Determine whether there is a matching common entry (longest match)
If so, forward it
else->5.
5. Determine whether there is a default route
If so, forward it
else->6.
6. Discard and report grouping error
longest match principle
Select the longest match of the prefix as the best match
Forwarding table sorting
The longer the prefix, the higher it ranks.
Search principle
binary clue
principle
The depth from top to bottom from the root node of the binary clue is up to 32 levels, and each level corresponds to one bit of the IP address.
optimization
unique prefix
compression technology
routing table
ideal route
algorithm
Features
correct, complete
Simple
adaptive
Have stability
fairness
The best
Classification
Whether to automatically select
Adaptive
non-adaptive
Internet management levels
Select within domain
Inter-domain selection
Internal routing vs. external routing
Distinguished by whether it is in an autonomous system
best route
The absolute best routing algorithm does not exist
The so-called best is only the relative best
data link layer
PDU=frame
basic concept
framed
method
Add delimiter
Frame header
SOH
end of frame
EOT
Mac layer
Mac address
Classification
Number of dissemination sites
unicast address
Multicast (multicast) address
The lowest bit of the first byte is 1
Only used for destination address
broadcast address
48 bits are all 1
Only used for destination address
Management scope
global address
The lowest two bits of the first byte are 0
local address
The lowest bit of the first byte is 0
No registration required
express
Gong points hexadecimal
Allows 47 bits to be allocated for use
2^47 available physical addresses
6 bytes
Top 24
Organization unique identifier
Registration required
Last 24 digits
extended unique identifier
Free to use
Mac frames
Max=Frame header Frame tail 1500=1518 bytes
IEEE规定的最大数据帧长度
capital
18 bytes
Field meaning
Source and destination IP addresses
type
FCS
Determine invalid frame
Field length and length field are inconsistent
The length of the frame is not an integer number of bytes
FCS verification failed
Data length is between 46~1500 bytes
The total length is not between 64~1518
Ethernet adapter (network card)
Transparent transmission
filling
Add special character escapes
Synchronize
【0】Bit stuffing method
asynchronous
Character filling method?
error detection
Bit error rate (EBR)
The ratio of bits with transmission errors to the total number of bits transmitted within a period of time
Error rate
Same reason
Group error rate>=bit error rate
In a group, if one bit is wrong, it is considered that all bits in the entire group are wrong.
FCS
CRC redundant cyclic code
Use a fixed generator polynomial to calculate the data and obtain a check code
After receiving the data, the receiver uses the same generator polynomial again to calculate the check code.
Compare the calculation result with the received check code
calculation steps
1. Obtain the divisor C[i] according to the polynomial
2. Zero padding at the end of the data block
3. Process all data with bitwise XOR
1) Left align the divisor
2) Bitwise XOR operation
3) The result is merged with the remaining number and returned to 1)
End when the divisor is right aligned
Get crc checksum
protocol
point-to-point channel
ppp agreement
Max=5 3 1500=1508
frame
Head 5B
Tail 3B
data
broadcast channel
CSMA/CD
concept
Carrier sense multiple access with collision detection
Carrier monitoring
Each station on the network continuously checks whether there is data transmission on the bus before sending data.
conflict detection
Continuously detect whether conflicts occur during the process of sending data
Conflict: Two or more stations on the same network send data at the same time, resulting in a mixture of signals on the bus, making it impossible for the receiving station to distinguish the real data, which is a data conflict.
Listen before speaking, speak while listening, wait for conflicts
When a collision is detected, the colliding stations simultaneously send 32 or 48 bits of data.
artificial interference signal
Notify all sites
condition
Multipoint access (multiple access)
All stations use the same bus
Send data as broadcast
Minimum 64 bytes per frame
advantage
The principle is simple
Technically easy to implement
All stations have equal status
shortcoming
Only half duplex
Efficiency drops dramatically when the network load is heavy
Transmission process
1. Detect the channel before sending
2. When detecting the channel
If the channel is busy, it will continue to detect until the channel is free.
If it is idle and the channel is still idle within 96 bits, send
Guaranteed minimum interval between frames
3. Detect collision when sending
If successful
Back to 1.
fail
Perform truncated binary exponential backoff algorithm
After detecting a collision, it immediately stops sending, delays (dynamic backoff) for a random time, and sends artificial interference signals, waiting for a basic backoff time (512 bits) and then returns to 2.
Retransmission delay
Continue to detect the channel. If it still fails after 16 times, stop retransmitting and report an error upward.
shared channel method
static
dynamic
random
All users can send random messages (current technology)
controlled
Users cannot send random messages. Such as multi-point line exploration (rarely used)
local area network
Mainly uses Ethernet
Traditional Ethernet
Standard commonly used when discussing Ethernet theory: 10M
standard
IEEE802.3
DIX Ethernet V2
Features
Two-way bandwidth communication available
Can be flexibly upgraded according to user needs
Improve transmission efficiency and reduce costs
Enables end-to-end transmission without converting frame formats
shortcoming
User authentication is not supported
Features
The network is owned by one organization and has a limited geographical scope and number of sites
advantage
Has broadcast function
Easy to expand and evolve
Improved the three natures
reliability
Availability
survivability
shortcoming?
Distance is limited
Main extension
star shape
Bus type
ring
tree shape
mesh shape
VLAN
significance
Limits the number of workstations that receive broadcast messages so that network performance does not deteriorate due to spreading too many messages (broadcast storms)
Relevant equipment and resources can be conveniently combined as needed, allowing users to access resources as needed.
switch
Features
Multiple interfaces
full duplex
Parallel transfer
Exclusive media bandwidth
Has a dedicated hardware structure
Has storage function
plug and play
Filter forwarding frames
Self-learning function
advantage
Each port has exclusive bandwidth, increasing total capacity
Convert shared Ethernet to switched Ethernet without changing hardware or software
Interfaces with multiple speeds available
shortcoming
Unable to automatically quarantine broadcast storms
Easy to cause loops
Viruses spread easily
There is a switching capacity issue (number of MAC addresses limited)
Generally wire speed forwarding
No measures such as congestion avoidance
exchange method
store and forward
After buffering the obtained frames, perform error checking, filtering and forwarding
cut-through exchange
Received frames (including invalid ones) are directly filtered and forwarded
step
Study by yourself first
Check the exchange table and compare whether there is an item in the table that matches the original address of the received frame.
have
Update effective time
none
add an item
original address
Enter interface
Effective time
Forward later
Check the exchange table to see if there is an item in the table that matches the destination address of the received frame.
have
If the source destination comes from the unified interface
throw away
Otherwise, the interface given in the security table will be filtered and forwarded.
none
Broadcast to all interfaces except ingress
physical layer
Signal
Digital signal
Discrete
analog signal
continuous
code element
A waveform that represents a discrete value of a digital signal
channel
concept
media used to transmit information in a certain direction
Classification
One-way communication
two-way alternating communication
Two-way simultaneous communication
ultimate capacity
Ney's formula
ideal conditions
Shannon's theorem
Reuse
Wavelength division WDM
time division TDM
Statistical time and minute SRDM
code division CDM
Frequency division FDM
PDU=bit stream bit
physical link
transmission media
Guidance
twisted pair
coaxial cable
Optical cable
optical fiber
multimode
concept
There can be multiple light rays entering at different angles and transmitted in one optical fiber.
shortcoming
prone to distortion
Only suitable for short distance transmission
single mode
concept
Reduce the diameter of the fiber to only one wavelength of light, allowing the light to travel all the way forward
shortcoming
higher cost
advantage
Smaller attenuation
Suitable for long distance transmission
Features
Small transmission loss, long relay distance, low cost for long-distance transmission
Good anti-lightning and electromagnetic interference performance
No crosstalk interference, good confidentiality
Small size and light weight
empty topstitch
terminated
non-guidance
equipment
hub
Features
1. Practical electronic devices simulate the operation of actual cables so that the entire system still operates like a traditional Ethernet
2. After connection, the Ethernet is still a bus network, using CSMA/CD to share the logical bus
3. Much like a multi-interface forwarder, it belongs to the physical layer
4. Using a dedicated chip, it can adaptively cancel crosstalk echoes and reduce near-end crosstalk.
network
Star Ethernet with shared bus
802.3i
10BASE-T
BASE
baseband transmission
T
twisted pair
10
bandwidth
cyber security
Overview
security threats
Passive attack (interception)
Analyze PDUs
Traffic Analysis
Active attack
tamper
Malicious program
computer virus
contagious program
Replicate itself by modifying other programs
computer worm
Send itself from one node to another through network communication functions and automatically start running programs
Trojan horse
The function performed is not the purported function but a malicious function
logic bomb
A program that performs malicious functions when the running program meets certain conditions.
backdoor intrusion
Exploit vulnerabilities in system implementation to invade the system through the network
Malicious software
Install software on the user's computer and harm the user without the user's permission Example 1
Denial of ServiceDoS
The attacker continuously sends a large number of packets to a server on the Internet, making it unable to provide normal services.
. . .
Prevention and control goals
Prevent the analysis of packet content and traffic analysis
Protect against malicious programs
Detect change packet flows and denial of service
secure computer network
Confidentiality
endpoint authentication
Integrity of information
operational security
Data encryption model
DES
Two types of cryptosystems
Symmetric key system
public key system
identify
Message identification
digital signature
cryptographic hash function
Message authentication code
Entity authentication
key distribution
symmetric key
public key
Security protocols used on the Internet
IPsec protocol suite
security association
Security datagram format
Other components
transport layer security protocol
Key points of TLS
Measures that TLS must include
Application layer security protocol
system security
firewall
Group filter routing
application gateway
Intrusion Detection System IDS
Future direction
Elliptic curve cryptography ECC
mobile security
Quantum cryptography
Shangmi No.9 Algorithm