How the default gateway is set, what is the default gateway

Source: Internet
Author: User

  gateways (Gateway) are also called Network Connectors, protocol converters. Gateway on the transport layer to achieve network interconnection, is the most complex network interconnection equipment, only for two high-level protocols different network interconnection. Gateways can be used both for WAN interconnection and for LAN interconnection. A gateway is a computer system or device that acts as a transformational task. A gateway is a translator between two systems that use different communication protocols, data formats or languages, and even a completely different architecture. Unlike the Network Bridge, which simply conveys the message, the gateway is repackaging the information it receives to suit the needs of the target system. At the same time, gateways can also provide filtering and security features. Most gateways run at the top level of the OSI 7 layer protocol-Application layer!

As we all know, walking from one room to another is bound to go through a door. Similarly, sending a message from one network to another must pass through a "gateway", which is gateways. The gateway, as its name suggests, is a "gateway" to a network connected to another network.

  a gateway is essentially a network IP address that leads to other networks. For example, network A and network B, network A's IP address range is "192.168.1.1~192." 168.1.254 ", the subnet mask is 255.255.255.0, the IP address range of network B is" 192.168.2.1~192.168.2.254 "and the subnet mask is 255.255.255.0. In the absence of a router, TCP/IP traffic is not possible between two networks, even if the two networks are connected to the same switch (or hub), and the TCP/IP protocol determines that the hosts in the two networks are in different networks based on the subnet mask (255.255.255.0). To achieve communication between the two networks, you must pass through the gateway. If the host in Network a discovers that the destination host of the packet is not on the local network, the packet is forwarded to its own gateway, and then the gateway is forwarded to Network B's gateway, and Network B's gateway is forwarded to a host of network B (as shown in the attached figure). The same is true for Network B's forwarding of packets to network A. Therefore, only if the IP address of the gateway is set up, TCP/IP protocol can realize the communication between different networks. So what is the IP address of the machine? The IP address of the gateway is the IP address of the device with the routing function, and the device with the routing capability has a router, a server with a routing protocol enabled (essentially a router), a proxy server (also equivalent to a router)!

  What is the default gateway

If you know what a gateway is, the default gateway is understandable. As if a room could have multiple doors, a single host can have more than one gateway. The default gateway means that if a host cannot find an available gateway, it sends the packet to the default specified gateway, which handles the packet. Now the gateway used by the host, generally refers to the default gateway.

  How to set a default gateway

The default gateway for a computer is not specified casually, it must be specified correctly, otherwise a computer will send packets to a computer that is not a gateway and thus cannot communicate with other network computers. The default gateway setting is set up manually and automatically set two ways.

  1. Manually Set

Manual settings apply to a relatively small number of computers, TCP/IP parameters are basically the same situation, such as only a few to more than 10 computers. Because this method needs to be in the network of each computer set "default gateway", very laborious, once because of migration and other reasons that must modify the default gateway IP address, network management will bring great trouble, so do not recommend use.

In Windows 9x, the way to set a default gateway is to right-click on my Network Places click "Properties" in the pop-up menu, select "TCP/IP protocol" in the Network Properties dialog, click "Properties" and fill in the new default gateway IP address on the "Default Gateway" tab.

It is important to note that the default gateway must be the IP address in the network segment where the computer resides, not the IP address in the other network segment.

  2. Automatic setting

Automatic setting is the use of a DHCP server to automatically assign IP addresses, subnet masks, and default gateways to computers in your network. The advantage of this is that once the default gateway for the network changes, as long as the default gateway settings are changed on the DHCP server, all computers in the network are given the IP address of the new default gateway. This method is suitable for networks with large network size and possible changes in TCP/IP parameters.

Another way to automatically get a gateway is by installing Proxy Server software (such as MS Proxy) client programs to automatically obtain, the principle and method and DHCP has a similar place!

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.