What is the difference between gateway address and ip address?
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.
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
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Notepad++7.3.1
Easy-to-use and free code editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool