Home > Common Problem > body text

What is the difference between gateway address and ip address?

青灯夜游
Release: 2020-10-19 15:08:23
Original
48889 people have browsed it

Difference: IP address refers to the Internet Protocol address, which is a unified address format provided by the IP protocol. It assigns a logical address to every network and every host on the Internet; while the gateway is a The "gateway" that connects a network to another network is essentially the IP address from one network to other networks, and is the exit for this IP address to access the Internet.

What is the difference between gateway address and ip address?

The difference between gateway IP address and IP address

Gateway, Everyone knows that when walking from one room to another, you must pass through a door. Similarly, sending information from one network to another must pass through a "gateway", which is the gateway. As the name suggests, a gateway is a "gateway" that connects one network to another.

There are many types of gateways according to different classification standards. The gateway in the TCP/IP protocol is the most commonly used. The "gateway" we talk about here refers to the gateway under the TCP/IP protocol. So what exactly is a gateway?

A gateway is essentially the IP address from one network to other networks. For example, there are network A and network B. The IP address range of network A is "192.168.1.1~192. 168.1.254" and the subnet mask is 255.255.255.0; the IP address range of network B is "192.168.2.1~192.168. 2.254", the subnet mask is 255.255.255.0. In the absence of a router, TCP/IP communication is not possible between the two networks. Even if the two networks are connected to the same switch (or hub), the TCP/IP protocol will use the subnet mask (255.255 .255.0) determines that the hosts in the two networks are in different networks. To achieve communication between these two networks, it must pass through a gateway. If the host in network A finds that the destination host of the data packet is not in the local network, it forwards the data packet to its own gateway, which then forwards it to the gateway of network B, and the gateway of network B forwards it to someone in network B. Host (as shown in the attached picture). The process of network B forwarding data packets to network A. Therefore, only by setting the IP address of the gateway, the TCP/IP protocol can realize mutual communication between different networks. So which machine's IP address is this IP address? The IP address of the gateway is the IP address of a device with routing functions. Devices with routing functions include routers, servers with routing protocols enabled (essentially equivalent to a router), and proxy servers (also equivalent to a router).

What is an IP address? The so-called IP address is a 32-bit address assigned to each host connected to the Internet. According to the TCP/IP (Transport Control Protocol/Internet Protocol) protocol, IP addresses are represented in binary. Each IP address is 32 bits long. When bits are converted into bytes, they are 4 bytes. For example, an IP address in binary form is "00001010000000000000000000000001". It is too laborious for people to process such a long address. In order to facilitate people's use, IP addresses are often written in decimal form, with the symbol "." in the middle to separate different bytes. Therefore, the above IP address can be expressed as "10.0.0.1". This representation of IP addresses is called "dotted decimal notation", which is obviously much easier to remember than 1 and 0. Some people may think that a computer can only have one IP address. This view is wrong. We can specify a computer to have multiple IP addresses, so when accessing the Internet, do not think that one IP address is one computer; in addition, through specific technology, multiple servers can share one IP address, and these servers can be used by users. It looks like a host computer.

In the win operating system, win r opens the "Run" window, enter "cmd" to open the cmd command window; enter the command in the cmd window: "cmd /k ipconfig /all" and press Enter. You can see the IP and gateway set by your computer

What is the difference between gateway address and ip address?

The above is the detailed content of What is the difference between gateway address and ip address?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template