Reading notes Two how Does the Internet work?

Source: Internet
Author: User
Tags rfc domain name server

Original link: https://web.stanford.edu/class/msande91si/www-spr04/readings/week1/InternetWhitepaper.htm
Write my experience First: Re-help me review the next TCP/IP layer four protocol, this time I understand the application layer, TCP layer-port number correlation, IP layer-ip address correlation, hardware layer-binary into the electronic signal. At the same time, TCP is responsible for the functionality of the Shard. Of course the article also describes the routing, DNS service. The architecture level of the network as a whole. But I think the fourth and fifth chapters are a bit repetitive, and I guess I don't understand the relationship between the two chapters. Think, the network is mainly protocol stack, packet, router, DNS, and a lot of many local area network together. Contents: 1. Introduction 2. Start with the Internet address 3. Protocol stacks and Packages 4. Network Infrastructure 5.Internet Infrastructure 6.Internet Routing level 7. Domain name and Address resolution 8.Internet protocol review again 9. Application protocol: HTTP and World Wide Web WWW10. Application protocol: SMTP and e-mail 11. Transmission Control Protocol 12.Internet protocols 13. Package 14. Resources 15. Reference 1. Introduction: This article introduces the infrastructure and technology of the Internet's underlying infrastructure, But it protects enough knowledge to understand the concepts involved. 2. Starting from an Internet address because the Internet is a global network, you must have a unique address. The form of IP is: nnn.nnn.nnn.nnnand nnnThe range is 0-255.

As you can see in figure one, the Internet part will continue to change as explained later. If you are linking to the Internet via an ISP (Internet service Provider), you may get a temporary IP address for a short period of time during your dialing. If you are linking to a network via a LAN LAN (local area network), you may have a fixed IP address, or you will have an IP that is dynamically dispatched through the DHCP (dynamic Host Configuration Protocol) server. The ping command is to send an ICMP request to the specified machine, and the ping machine will return a reply. This program calculates the time of the response. If you enter a domain name instead of an IP address such as: www.baidu.com Ping will resolve the domain name and show the computer's IP address. 3. Protocol stacks and packages such as your IP is 1.2.3.4 need to give you the target machine 5.6.7.8来 sends messages that need to be converted from text messages to electronic signals and then transmitted over the Internet, and then converted from electronic signals to text messages. This process is done by the protocol stack. The protocol stack is usually built into the operating system, and the protocol stack that is often used on the network is called TCP/IP because these two protocols are often used.
Protocol Layer Comments
Application Protocols Layer
Application protocol Layer
Protocols specific to applications such as WWW, e-mail, FTP, etc.
protocols for specific applications such as: Www,e-mail,ftp
Transmission Control Protocol Layer
Transmission Control Protocol Layer
TCP directs packets to a specific application on a computer using a port number.
TCP sends packets to specific applications based on specific ports on the computer.
Internet Protocol Layer
Network protocol Layer
IP directs packets to a specific computer using a IP address.
IP sends a specific package to a specific computer based on an IP address.
Hardware Layer
Hardware layer
Converts binary packet data to network signals and back.
(e.g. Ethernet network card, modem for phone lines, etc.)
Converts a binary packet to a network signal and passes it back.
If we're based on a message "Hello computer 5.6.7.8! "From our computer to another computer, to the flow such as:

1. The message starts at the top-level protocol stack of your computer and then down. 2. If the message is very long, the stack layer that the message passes through May slice the message into smaller chunks. This is because data is sent over the Internet in a controllable block. These data blocks are called packages. -Dice 3. This packet is from the application layer to the TCP layer. Each packet is tagged with a port number. The port will be explained later. What we need to know. The target program needs to listen to a specific port to get the message. -Tag Destination port number 4. After passing through the TCP layer, these packets know that their destination IP address 5.6.7.8-obtains the IP address 5. Now that your packets have port numbers and IP addresses, they are ready to be sent over the Internet. The hardware layer transforms our text message into an electronic signal transmitted over a telephone line. 6. The other end of your network provider is connected directly to the Internet. The ISPs route explains the destination address in each package and decides how to send it. Usually the next station of the packet is another route. 7 eventually these packets reached the 5.6.7.8. The data begins to be processed from the computer's TCP/IP stack. 8. As the package layer goes up, all routing information added by the sending computer stack is stripped out of the packet. 9. When the data arrives at the top of the protocol stack, the package has been reassembled into its original form. "Hello computer 5.6.7.8!  ”。 4. Network Infrastructure
What makes up the Internet, let's see:

Now we can see that the picture has been re-added a lot of details. The ISP maintains a modem pool for the users they dial in. This is managed by some form of computer, typically controlling the flow of data from a modem pool to a backbone or a dedicated line router. This step may be called a port server because it serves to link to the network. Billing and usage information is usually collected here. After your packets have passed through the telephone network and your ISP's local device, they are routed to the backbone of the ISP or to the backbone of the ISP buying the bandwidth. Through this, the packet passes through the backbone of some routers and ISPs, and the dedicated line has other networks until they reach their destination. There's a way to see what our packets have gone through on the network: Traceroute programtraceroute www.baidu.com

is just a simple network structure, the network is more complex. It may take a look at what these distinctions represent. 5.Internet Infrastructure
The backbone of the internet is made up of many large networks connecting to each other. These large networks are known as Network service providers ( Network Service ProvidersOr NSPs). Each NSP requires a connection of three network access points or called NAPS ( Network Access Points)。 In NAPs, the packet is transmitted to the trunk of another NSP in the trunk of one NSP. The NSPs is also exchanged through the metropolitan area ( Metropolitan Area ExchangesOr MAEs). Maes and naps by the same purpose but are private. NAPs is the most primitive exchange point. Both Maes and naps are known as Internet exchange points or IXs (Internet Exchange Points). NSPs also buys bandwidth to small networks such as ISPs and small bandwidth providers.

I would like to check our country's NSP and ISP and Mae respectively, which is the purchase of bandwidth? Just an abstract concept, there is no actual backbone architecture, we can go to the NSP's website to find their network architecture. 6.Internet routing Hierarchy no computer knows where the other computers are, and the packets are not sent to each computer. The destinations to which the packets arrive are obtained through the routing tables stored in each router. Routers are packet-switched. A route is usually routed between the network packets. Each router knows their own network and the IP addresses that are used by those subnets. This router usually does not know the IP address above it. For example, the black box that connects the backbone network is the router. The large NSP is directly connected using the NSP. Then there is a layer of layers.

When a packet is on a router, the router checks the IP address it is placed on by the IP layer. This router checks his routing table, if the network containing this IP address is found, then the packet is sent to the network, if not found, then the router sends the packet to the default route, usually the next route at this backbone level, hopefully it can be found. If not found, then the packet continues to be routed until a NSP trunk is found. The trunk road connected to the NSP is made up of the largest routing table in which the packet will be routed to the correct trunk and then it will start to transfer to a smaller network layer. 7. Domain name and address resolution
But what if you don't know the IP address of the computer you want to connect to? How did you get to the right computer through www.baidu.com? This is because there is a domain name resolver (DNS Domain Name ServiceDNS is a distributed database that keeps a record of the computer's name and his corresponding IP address on the Internet many computers connect to the Internet host portion of the DNS database while this software runs other people to access it. These computers are considered to be DNS servers. No DNS servers have all the databases, and they only have a subset of them. If a DNS server does not contain the requested domain name, DNS will redirect the request to another DNS server.

The Domain Name service has some of the same architecture and IP routing levels. Some common, long domain names are close to the top. What is not shown in the picture is the multitude of DNS in the world to compose other hierarchies. When a network connection is established, a primary and multiple secondary DNS servers are also launched at the time of installation. Any application that requires a domain name resolution service can work well.  For example, when you enter a network address in a browser, the browser will first connect to your primary DNS to obtain an IP address, and then the browser will request the Web page you want. The 8.Internet protocol again recalls the information on the protocol stack as hinted at earlier, with many protocols used on the router. protocols with very good communication are required by the Internet to complete the function. These include TCP, IP, routing protocols, media access control protocols, application-level protocols, and so on. The following sections describe some of the most important protocols that are widely used. High-level protocols are discussed first, followed by low-level protocols. 9. Application protocol: HTTP and world Wide Web www
One of the most commonly used services is the World Wide Web (www. Wide). The protocol that is the web work is the HTTP protocol ( Hypertext Transfer Protocol)。 HTML (hypertext Markup Language) is a Hypertext markup language that has nothing to do with her and is used to write Web pages. HTTP is the protocol that Web browsers and servers use to communicate. It is an application layer protocol because it is above the TCP layer and is used by some specific applications to communicate with other machines. In this example, the Web browser and the Web server. HTTP is a text-based protocol connection. The client sends a request to the server to request some page elements, such as Web pages or images. After the request is serviced by the server, the connection between the client and the server is broken. Each request starts a new connection again. Many protocols are connection-oriented. This means that two of computers need to be connected when they communicate. HTTP does not. Once a client begins an HTTP request, a new connection is re-made to the server.When you enter a URL into a Web browser, the following things happen:1. If the URL contains a domain name, the browser first connects to a domain name server and then obtains the corresponding IP address of the network service.2. The Web browser connects to the Web server and sends an HTTP request (via the protocol stack) to get the desired page. 3. The Web server obtains the request and examines the desired page, if the page exists, the server sends it, and if the requested page cannot be found, it sends an HTTP 404 error message. (404 means the page does not exist.) ) 4. The Web browser is affected by the page and the connection is interrupted. 5. The browser then parses the page and looks for other page elements it needs to complete the entire page. This includes pictures, small applications, and so on. 6. For each required element, the browser establishes an additional connection as well as an HTTP request.7. When the browser is finished loading pictures, small programs, etc., the page will be fully loaded in the browser.  Use the Telnet client to get a page through Httptelnet www.cnblogs.com 80
then enter get/http/1.0
Of course, it is generally not going to return the page with the things, because the other elements are not sent.but do not know why Baidu can not do so, do not know is not the relationship between HTTPS. Most Internet protocols are made up of Internet file RFCs ( Request for Comments) is specified. HTTP 1.0 is specified by RFC1945. 10. Application protocol: SMTP and E-mail
Another commonly used Web service is the e-mail service. E-Mail uses the SMTP protocol of the application layer. SMTP is also a text-based protocol, but unlike HTTP,SMTP, it is connection-oriented. SMTP is also more complex than HTTP. SMTP has more commands and considerations than HTTP. When you open your email client to read your mail, here's what happens: 1. The mailbox client opens a connection to its default mailbox server, and the domain name or IP address of the mailbox server is usually installed when the client is installed. 2. The mailbox server often transmits the first piece of information to authenticate itself. 3. The client sends an SMTP HELO command and the server responds with an OK message. 4. Depending on whether the client is checking the mailbox, sending the message, and so on, the corresponding SMTP command will be sent to the server and will receive a corresponding response. 5. This request/response thing will continue to know that the client sends a command for SMTP quit. This server will then say goodbye and the connection will be closed. A simple SMTP client and server dialog is as follows: R indicates that the information sent by the server represents the information sent by the client.

The above things are obtained from RFC821, which defines SMTP. 11. Transmission Control Protocol
Under the application layer is the TCP layer. When an application opens a connection with another computer, the information they send (using a specific application layer protocol) is transferred to the next layer of TCP layer in the protocol stack. TCP is the correct application that is responsible for routing application protocols to the destination computer. For this purpose, the port number is used. The port can be considered as a separate channel on each computer. This is because different applications use different port numbers. When a package is made to a computer, at the same time through the protocol stack, this TCP layer determines which application accepts the packet through the port number. TCP works like this: When the TCP layer receives data from the application layer, it shards the data and decomposes it to a controllable size, and adds specific TCP information to each block. The TCP header contains information that includes the port number that the data needs to be routed to the corresponding application. When the TCP layer receives a packet that comes up from the IP layer, TCP strips off the TCP header, and if it needs to do some refactoring of the data, then sends the data to the correct application using the port number in the TCP header. TCP is not a text protocol. TCP is a connection-oriented, reliable byte-stream service. Connection-oriented means that two applications that use the TCP protocol must first establish a connection before exchanging data. TCP is reliable because when each packet is received, a given message is sent to the sender to confirm the delivery. TCP also has a checksum to check whether the transmitted data is correct. The TCP header data structure is as follows:

Notice that there is no IP address information, because TCP does not know any information about the IP address. TCP is designed to reliably get data from the application layer to another application. 12.Internet Protocol IP Protocol
Unlike Tcp,ip is an unreliable, non-connected protocol. IP does not care whether a packet arrives at the destination. The same IP also does not know the connection and the port number. the task of IP is to send and route packets to other computers. IP packets are separate entities and may not arrive in sequence. This is the work of TCP to ensure that the data arrives in the correct order. It is identical to TCP where it also adds an IP header to the message.

Above we see the IP address in the IP header. The data is then transferred to the network.

13. Parcel
Now you know how the Internet works. But how long will this form hold? Currently, IPV4 only allows 2 of the 32-time addresses. There is already a IPV6,----say from I know there is a beginning to now feel not popular, who knows how will happen. Well this article is 2002, 15 years, TCP or something. 14. Resources do not translate, keep my own want to see the time to see:

Http://www.ietf.org/is the home page of the Internet Engineering Task force. This body was greatly responsible for the development of the Internet protocols and the like.

Http://www.internic.org/is the organization responsible for administering domain names.

Http://www.nexor.com/public/rfc/index/rfc.html is a excellent RFC search engine useful for finding any RFC.

Http://www.internetweather.com/shows animated maps of the Internet latency.

Http://routes.clubnet.net/iw/is Internet Weather from Clubnet. This page shows packet loss for various carriers.

Http://navigators.com/isp.html is Russ haynal ' s ISP Page. This is a great the site with links to the most NSPs and their backbone infrastructure maps.

15. References
Related books for TCP and networking:
    • TCP/IP Illustrated, Volume 1, the protocols.
      W. Richard Stevens.
      Addison-wesley, Reading, Massachusetts. 1994.
    • Encyclopedia of Networking.
      Tom Sheldon.
      Osbourne Mcgraw-hill, New York. 1998
 Other better books:
    • Firewalls and Internet Security; Repelling the Wiley Hacker.
      William R. Cheswick, Steven M. Bellovin.
      Addison-wesley, Reading, Massachusetts. 1994.
    • Data Communications, Computer Networks and Open Systems. Fourth Edition.
      Fred Halsall.
      Addison-wesley, Harlow, England. 1996.
    • Telecommunications:protocols and Design.
      John D. Spragins with Joseph L. Hammond and Krzysztof Pawlikowski.
      Addison-wesley, Reading, Massachusetts. 1992.
   Aside , this article is too long, but now it seems to be a very full introduction. Reference materials can find the latest version of the look.

Reading notes Two how Does the Internet work?

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.