The concept of computer network layer (1)

Source: Internet
Author: User

The concept of computer network layer (1)

The concept of the Computer Network Layer mainly includes:

1. GateWay)

Also known as the inter-network connector and Protocol converter. The gateway can interconnect networks at or above the network layer.

Just like a room can have multiple doors, a host can have multiple gateways. The default gateway means that if a host cannot find an available gateway, it sends data packets to the default gateway, which processes data packets. The default gateway is 192.168.x.1.

2. broadcast address

The broadcast address is only an identifier. In a packet, If the destination address is a broadcast address, a broadcast packet is sent to the host of the same network segment.

In a network using the TCP/IP protocol, the IP address of host ID 1 in the host identification segment is the broadcast address, and the broadcast group is sent to all computers involved in the host ID segment. For example, for the 10.1.1.0 (255.255.255.0) network segment, the broadcast address is 10.1.1.255 (255 is a binary 11111111). When a packet whose destination address is 10.1.1.255 is sent, it will be distributed to all computers on the CIDR block.

3. subnet mask netmask

Suppose your name is Tom. You live in a big courtyard. Your neighbors have many friends. At the door, there is another Uncle Li who looks at the door. Uncle Li is your gateway. When you want to play with a friend in the yard, as long as you shout out his name in the yard, he will respond to you when he hears it and runs out to play with you.

Tom --- Uncle Li ...... Uncle Wang --- friends

(GATEWAY)

However, you are not allowed to go out of the door. If you want to contact the outside world, You must contact Mr. Li (GATEWAY) at the door by phone. If you want to chat with your classmate James, James lives in another yard far away, and he also has an Uncle Wang (James's gateway) in his yard ). But you don't know the phone number of James's house, but your teacher in charge has a list of all the students in your class and a comparison table with the telephone number. Your teacher is your DNS server. So you called Uncle Li at home and had the following conversation:

DNS (abbreviated Domain Name System or Domain Name Service)

Tom: Mr. Li, can I check James's phone number with the class teacher?

Uncle Li: Well, you are waiting. (Then Uncle Li hangs up a phone number for your class teacher and asks

James's phone number) asked, his phone number is 211.99.99.99.

Small: Great! Uncle Li, I want to contact James. Could you help me contact James.

Uncle Li: No problem. (Then, Uncle Li sent a request to the telephone Bureau to connect Mr. Smith's phone. The last pass was, of course, transferred to Mr. Wang from the courtyard of Mr. Smith's house, then grandpa Wang transferred the phone number to Xiaoming's house)

In this way, you have contacted James.

As for the DHCP server, it can be compared as follows:

DHCP [1] (Dynamic Host Configuration protocol, Dynamic Host Configuration protocol)

There are more and more residents in your yard. The telephone switch in the transfer room, Uncle Li, cannot meet the needs of so many residents, so we have to adopt a new technology called DHCP, the residents get a random phone number when starting the system, and each phone number may be different.

Uncle Li at your door: Your gateway

Your class teacher: your DNS server

Communication room telephone switch: Your DHCP server

Similarly, the conversation between Uncle Li and Mr. Wang is called routing.

In addition, if there is another child called Tom, he lives in the courtyard to visit Uncle sun, because he has just built a dark courtyard, and Uncle sun has just arrived, he does not have the phone number from Uncle Li and Uncle Wang's office (Ye Li and Mr. Wang certainly do not have his phone number). There are two situations:

1. Zhao Dama of the neighborhood committee told Sun's phone number about Uncle Li and Wang (Zhao Dama also told Li and Wang about Sun ), this is called static route settings (others tell themselves)

2. Zhao Dama is ill. Grandpa sun calls everywhere and says, "I am from the dark, and the phone number is in charge of the Yard." Li and Wang heard the result, I recorded it in their address book, and then Li and Wang sent a call to Uncle sun and said, "I'm James (not a little) and they called the yard ", this is called dynamic route setting (tell others by yourself)

Then, one day, I am not looking for a dark image. The result is naturally that I am not calling Uncle Li and saying, "Grandpa, I am looking for Tom. "(here I omit the process of Mr. Li going to check the phone number. If he knows the phone number of Mr. Li, he will look for the address book:" Oh, the phone number of the yard is managed by Uncle sun. if you want to contact Mr. Sun, you must first notify him. I can notify Mr. Wang to ask him to contact Mr. Sun, you can also look for sun directly. Of course, it is convenient to look for sun directly. "So Uncle Li called Uncle sun and then he transferred the phone to Mr. Sun's home.

Here, Uncle Li's address book is called a route table.

Uncle Li chose whether to directly find Uncle sun or ask Uncle Wang to help transfer the route.

The reason why Uncle Li chooses to contact uncle sun directly is that he can find Uncle sun in one step. If Uncle Wang needs to transfer the information, two steps are required, the "Step" here is called "Number of hops". Uncle Li's choice follows the minimum step (number of hops) Principle (if he does not follow this principle, it may take some time to find the hidden state. The final result may lead to Uncle Li being fired for poor work. This is called "the delay is too long and the routing principle is unreasonable, changed to a vro ")

Of course, things are always changing. Tom and James are quarreling. These days, Tom always calls Tom and thinks, "Fuck, is he talking bad about me ?" So James decided to eavesdrop on a conversation with Tom, but he was not allowed to leave the hospital. What should he do? James made the following decision:

First, he told Ye Wang, the phone number manager in his courtyard, "you have called Ye Li to say that Mr. Smith has moved to our yard. I will pick up the phone number he has called ", uncle Wang did not reflect it (after all, he is older !) He called Ye Li and said, "Now I have managed Mr. Sun's phone number." As a result, Mr. Li changed his address book, this is called route spoofing.

In the future, if you try again, Uncle Li will transfer it to Uncle Wang (in fact, it should be transferred to Uncle Sun ), when Mr. Wang received the call, he transferred it to James (because he had already spoken to James). When James received the call, he pretended to communicate with Tom. James was a thief and was afraid to ask him in person when he met Tom tomorrow. after the communication was broken, in the name of Tom, he gave Tom a phone call to repeat what he had just said. This is called data eavesdropping.


Related Article

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.