Tcp / ip

Source: Internet
Author: User

1, the total line:CSMA/CD: carrier interception, multi-access, conflict detection. Core symbol of Ethernet

2, will be more than one host, ring link up "Token Ring network IBM Patent"

3, the electron in the transmission process will decay, so the middle need to add a relay device.

Problem 1, in the electronic transmission effective distance, access to the computer too much, coupled with the use of CSMA/CD transmission mechanism, resulting in effective transmission of the signal time is very short.

Solution 1, a large network to cut into two small networks "internal use CMACD";


Question 2, how to communicate between two small networks?

Solution 2, add a bridge in the middle, if the internal devices are connected with each other, it will not send the signal out;


Question 3, if you want to contact with external equipment, but there is the same name as the device, so the information can not reach the destination;


Question 4, intermediate bridge How to know which equipment in the external network, which device in the intranet.

Answer 4, the bridge internal maintenance of a booklet; The data in this table can be used in the bridge to enter a in which interface, B on which interface to achieve the integrity of the data, or let the bridge to learn automatically,


Question 5, a certain time A to B signal, B can not signal to a "half duplex model (walkie-talkie)"; How to achieve full duplex

Solution 5, through the twisted pair connecting 4 groups of 8 wires, but actually only two is useful, green orange blue brown, white green .... One by one correspond, and twist together; so the bridge here is the switch ;

"The switch does not isolate the broadcast; it can only isolate conflicts; any one of the hosts will shout a voice before the signal is sent;


Question 6, China 1.3 billion people, who all communication, to shout a voice, not to be confused

Answer 6, broadcast storm; let's buy another switch. Then the question came again, the two switches directly how to communicate;


Question 7, how to communicate between two switches

Solution 7, the first two switches must be connected, 1 switch to send information to the 2 switch, 2 switch will not only respond, it will only shout a voice, the purpose of the computer received, and then reply;;


Question 8: How are the two switches connected to each other?

Answer 8, it is clear that a device is needed in the middle, but this device to the switch sent over the broadcast is ignored, "if anything to listen to what is the difference between the switch" and then we introduced a new logical address IP address of the host, the previous MAC address is a physical address; { We now understand that the devices connected between the two switches, which recognize IP, do not recognize the broadcast}


Knowledge Point: "The interface of the switch connection intermediary device is called the Gateway interface, once a host sends the message, the destination is not inside the network, the message will be sent automatically to the gateway, aka Default gateway"

"The intermediary device also has a MAC address because it wants to propagate the MAC message, but the switch is not needed because the switch only needs to propagate the information and does not need to process the information"

A:1 Network Host

R1: Intermediate device connected to 1 network switch port

B:2 Network Host

R2: Intermediate device connected to 2 network switch port

M: Destination

A to R1:mac address becomes A_R1

R1 to R2:mac address changed to R2_m

Then R2 does not know who the M is, but it knows the destination IP address, thus achieving information dissemination


9. How is the local communication completed?

Answer 9, broadcast first, then use ARP to resolve IP to MAC address or use RARP to resolve the MAC address to IP

"The function of the mask is to calculate how much your IP address is, 1.1 with your own mask with the following get 1.0 2.1 with their own mask with the following get 2.0 explanation she's not in a network segment ."

Question 10, if there are many processes on the same host QQ music through the FireWire how to access it

Answer 10, through the port number


IP is tied to a port called socket: socket


OSI Seven layer model:

Physical layer: The preamble used to encapsulate the data message, which encapsulates Mac's original Mac Target Mac

Data Link layer: Encapsulates IP original IP destination IP

Network layer: Original port Destination port

Transport Layer

Session Layer

Presentation Layer

Application Layer

The OSI is too heavyweight, and many functions are implemented in two layers, respectively.


But the TCP/IP model is what we use.

Physical Layer:

Data Link Layer:

Internet layer:

Transport Layer:

Application layer:

Class A: 255.0.0.0 8-bit

10 00 0000-0) 111 1111

1-126 Network

How many hosts can be accommodated 2^24-2

Host bit all 0: network address

Host bit full 1: Broadcast address


Class B: 255.255.0.0 16-bit

10 00 0000-10) 11 1111

128-191

Can accommodate 2^16-2


Class C: 255.255.255.0 24-bit

192-223 Networks

Can accommodate 2^8-2


Private Address:

Class A: 10.0.0.0/8

Class B: 172.16.0.0/16-172.31.0.0/16

Class C: 192.168.0.0/24-192.168.255.0/24



TCP and UDP differences:

Tcp:tom to the destination host to knock at the door (1 times) Destination host reply said I was in (2 times) Tom said you wait for me to send you a message (3 times)

UDP: Just put the information on the network, can not go to it regardless; decide on the network, and the destination host is online (high efficiency QQ is UDP but unreliable AH)

TCP End session: Tom said to break up Jerry agreed with Jerry to say goodbye Tom agreed to be the real disconnect


TCP Header: Network firewall to use

1, the original port and the target port

2. Serial number

3. Confirmation Number

4, the First Minister of the degree is true length; reserved6bit reserved bit; Urg emergency bit;ack confirmation bit; PSH push, send buffer, because there is only one NIC. And PSH is the priority to send, can not stay;RST: RESET, network reconnect; SYN: The process of chasing a girl;FIN: The process of breaking up; windowsize: Window Size "The number of packets that can be left in the receiver cache, It means sending 100 of your acceptance speed can only be 10 cache 90 "window size determines how many of the cache

5, the TCP check box; Emergency pointers

6, can be excerpt


1. One host to communicate with another host, first to the original host's SYN bit into 1

2. In order to ensure the security of information, the system will automatically generate a serial number if it's sn=100.

3. If another host agrees to contact, it will also change its SYN to 1, and let the confirmation number ack=1 and let an=100+1 indicate that you can send a 101th message; let sn=300

4. The original host with the destination host confirmation, and then send the message is ack=1;sn=101;an=301

"1-4 is a three-time handshake; 5 represents four disconnection and system"

A say we break up, B said break up, B said your things are thrown at the door, a said I'm going to pick up

5. When you want to disconnect the fin=1 appears this means to break up


TCP UDP upper layer is the application layer protocol: including HTTP DNS DHCP and so on


In Linux you can bind two network cards, similar to raid can increase the speed of the bonus one times! Load Balancing

Tcp / ip

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.