Yan Xue: how to use your computer as a router

Source: Internet
Author: User

When you see the title, you don't think it's about routing simulation software?

No, it is a common terminal and a single Nic machine.

Maybe you will say that it is not surprising that a single Nic machine is using a router, such as cisco single-arm routing ......

But here we are talking about a general machine, or even the just-installed win95.

......

In fact, it is about the basic operation of the IP protocol in a single machine. This article is one-sided because it does not have a deep understanding of the operating mechanism of the IP protocol in the terminal.

After the IP protocol is installed on the computer, it becomes the cornerstone for you to access the Internet. The IP protocol group is responsible for connecting and Exploring each step.

The installation of the IP protocol must be bound to a network interface, that is, it must be installed with a NETWORK adapter, for example: MODEM Nic, virtual network adapter, VPN network adapter, dial-up network adapter, etc.

After the IP protocol is installed, a stack is created for the network connection, and a local loop of 127.0.0.x is created for the user. The local loop is automatically obtained or waiting for the user to manually set an IP address, publish yourself to the network and explore adjacent protocol carriers, listen for packets from the network, and communicate with each other according to network rules such as DHCP, DNS, and GATEWAY.

Different CIDR blocks in the INTERNET cannot access each other directly. You need to use the router packet forwarding function. The rule is based on an automatic or manual route information table.

In fact, the packet forwarding process exists in a single machine. The ROUTE command shows us a ROUTE information table:

C: \ WINNT \ system32> ROUTE PRINT

       
        =============================================================== Interface List 0x1 ........................... MS TCP Loopback interface 0x4000003 ...00 XX XX a8 XX c7 ...... Intel(R) PRO Adapter =============================================================== ===============================================================Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.111 1 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.0.0 255.255.255.0 192.168.0.111 192.168.0.111 1 192.168.0.111 255.255.255.255 127.0.0.1 127.0.0.1 1 192.168.0.255 255.255.255.255 192.168.0.111 192.168.0.111 1 224.0.0.0 224.0.0.0 192.168.0.111 192.168.0.111 1 255.255.255.255 255.255.255.255 192.168.0.111 192.168.0.111 1 Default Gateway: 192.168.0.1 =============================================================== Persistent Routes: None
       

This table shows how the single-host internal IP protocol maintains packet forwarding for different network segments. You may think that the computer PC should only exist in one network segment, here, we will look at the Protocol from a micro-perspective.


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.