Fifth Week Work

 

1. Brief description of osi seven-layer model and TCP/IP five-layer model

 

OSI Seven Layers

 

1. Physical Layer: Transfer data frames over a local area network, responsible for managing communication between computer communication devices and network media. Devices are: network card, network cable, hub, repeater, modem, etc.

 

2. Data Link Layer: Responsible for network addressing, error detection and correction, while converting the original bit stream into a logical transmission line. The devices are: Ethernet, LAN, GPRS, etc.

 

3. Network layer: Control the operation of subnets, such as logical addressing, packet transmission, routing. The devices are: routers.

 

 

 

4. Transport Layer: Provides the ability to establish, maintain and dismantle transport connections; Choose the network layer to provide the most appropriate services; Provides reliable and transparent data transfer between systems, and provides end-to-end error recovery and flow control.

 

5. Session layer: Establish and manage sessions between users on different machines.

 

6. Representation layer: Negotiate data representation on behalf of the application process; Complete data conversion, formatting, and text compression.

 

7. Application layer: Provides OSI user services such as transaction handlers, file transfer protocols, network management, etc.

 

TCP/IP Five Layers

 

1. Application layer: Equivalent to a collection of application layer, presentation layer and session layer in the OSI seven-layer model.
2. Transport layer: equivalent to the transport layer in the OSI seven-layer model.
3. Network layer: The network layer equivalent to the OSI seven-layer model.
4. Data Link Layer: A data link layer equivalent to the OSI seven-layer model.
5. Physical Layer: The physical layer equivalent to the OSI seven-layer model.

 

The difference is that the transport layer in the TCP/IP protocol does not guarantee that packets will always be transmitted securely and reliably in that layer, whereas the Open System Interconnection Model (OSI) does.

 

2. Summary Describes TCP Three Handshakes Four Waves

Three handshakes:

 

 

 

 

 

1. Client sends SYN to server and enters SYN_SENT phase.

2. When the server receives the connection request, it sends the SYN ACK to the client and enters SYN_RCVD phase.

3. When the client receives the ACK, it sends it to the server and enters the ESTABLISHED phase.

4. The server enters the ESTABLISHED phase after receiving the ACK.

The purpose of the three-time handshake is to eliminate the interference of the SYN message of the old connection request with the new connection, synchronize the serial and confirmation numbers of both sides of the connection, and exchange the TCP window size information.

Four waves:

 

 

 

 

 

 

 

1. Client sends FIN to server and enters FIN_WAIT1 phase.

2. Server sends ACK to client after receiving it and enters CLOSE_WAIT phase.

3. Client enters FIN_upon receipt WAIT2 phase. At this point, the link enters a half-duplex phase, and the server can still send data to the client.

4. When the server is ready to close the connection, send FIN to the client and enter LASR_ACK phase.

5. When the client receives it, send ACK to the server and enter TIME_WAIT phase, closing connection after waiting for 2MSL.

6. The server enters the CLOSED phase after receiving the ACK.

The purpose of the four waves is to ensure that both the server and the client can fully accept the data sent by the other party

 

 

3. Describe the differences between TCP and UDP

 

1.TCP provides connection-oriented, reliable data stream transmission; UDP provides non-connection-oriented, unreliable data stream transmission.

 

2.TCP provides reliable services for data transmitted over TCP connections, arriving in sequence without error, loss, duplication; UDP does its best to deliver, that is, it does not guarantee reliable delivery.

 

3.TCP is oriented to byte streams; UDP is message oriented.

 

4.TCP connections can only be point-to-point; UDP supports one-to-one, one-to-many, many-to-one, and many-to-many interactive communication.

 

5. The TCP header overhead is 20 bytes; UDP has a small overhead of only 8 bytes.

 

6. The logical communication channel of TCP is a full duplex reliable channel; The logical communication channel of UDP is unreliable.

 

 

4. Implementation of Network Card Binding Bon0

 

  Add bonding interface

[root@centos7 network-scripts]# nmcli connection add con-name mybond0 ifname bond0 type bond mode active-backup ipv4.method manual ipv4.addresses 10.0.0.100/24
Connection 'mybond0' (c50626bd-8ef9-4fef-a7a8-b86c677f7e27) successfully added.
[hc@centos7 ~]$ 

 

Add Dependent Interface

[root@centos7 network-scripts]# nmcli con add type bond-slave ifname ens37 master bond0 
Connection 'bond-slave-ens37' (89ca491d-1499-41fc-8fd3-bcab6d52ecc5) successfully added.
[root@centos7 network-scripts]# nmcli con add type bond-slave ifname ens38 master bond0 
Connection 'bond-slave-ens38' (c4906cbc-0820-4f39-8c18-6203c2d73437) successfully added.
[root@centos7 network-scripts]#

 

Start Dependent Interface

[root@centos7 network-scripts]# nmcli connection up bond-slave-ens37
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
[root@centos7 network-scripts]# nmcli connection up bond-slave-ens38
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)
[root@centos7 network-scripts]# 

 

Start Binding

[root@centos7 network-scripts]# nmcli connection up mybond0 
Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8)
[root@centos7 network-scripts]# 

 

Posted by rwcurry on Sun, 21 Nov 2021 11:09:39 -0800