Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference between gateway address and ip address

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the difference between gateway address and ip address. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

Difference: the IP address refers to the Internet protocol address, which is a unified address format provided by the IP protocol, which assigns a logical address to every network and every host on the Internet, while the gateway is the "gateway" through which one network connects to another network, essentially the IP address of a network to other networks, and the exit of this ip address to the Internet.

The difference between gateway IP address and IP address

The gateway, as we all know, must go through a door when you walk from one room to another. Similarly, to send information from one network to another, you have to go through a "gateway", which is the gateway. As the name implies, a Gateway is a "gateway" through which one network connects to another.

According to different classification standards, there are many kinds of gateways. The gateway in the TCP/IP protocol is the most commonly used, and the "gateway" we are talking about here refers to the gateway under the TCP/IP protocol. So what exactly is a gateway?

A gateway is essentially an IP address from one network to other networks. For example, there are network An and network B. the IP address range of network An is "192.168.1.1" 192. 168.1.254 "with a subnet mask of 255.255.255.0, and the IP address range of network B is" 192.168.2.1 "192.168.2.254" with a subnet mask of 255.255.255.0. Without a router, there is no TCP/IP communication between the two networks. Even if the two networks are connected to the same switch (or hub), the TCP/IP protocol will determine that the hosts in the two networks are in different networks according to the subnet mask (255.255.255.0). In order to realize the communication between the two networks, it must be through the gateway. If the host in network A finds that the destination host of the packet is not in the local network, it forwards the packet to its own gateway, which forwards it to the gateway of network B. the gateway of network B then forwards it to a host of network B (as shown in the attached figure). The process by which network B forwards packets to network A. Therefore, only by setting the IP address of the gateway can TCP/IP protocol realize the 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 the device with routing function. The devices with routing function include router, server with routing protocol enabled (essentially equivalent to a router), proxy server (also equivalent to a router).

What is an IP address? An IP address is a 32bit address assigned to each host connected to the Internet. According to the TCP/IP (Transport Control Protocol/Internet Protocol, Transmission Control Protocol / Internet Protocol) protocol, the IP address is expressed in binary. Each IP address is 32bit long, and the bits are converted into bytes, that is, 4 bytes. For example, an IP address in binary form is "000010100000000000000000000000000000000000000000000000000001". It is too difficult for people to deal with such a long address. To facilitate people's use, IP addresses are often written in decimal form, with a symbol in the middle. Separate different bytes. Therefore, the above IP address can be represented as "10.0.0.1". This representation of the IP address is called the dotted decimal representation, which is obviously much easier to remember than ones and zeros. Some people would think that a computer can only have one IP address, which is wrong. We can specify that a computer has multiple IP addresses, so when accessing the Internet, we should not think that an IP address is a computer; in addition, through specific technology, we can also make multiple servers share an IP address, and these servers look like a host to users.

In the win operating system, win+r opens the "run" window, type "cmd" to open the cmd command window; enter the command "cmd / k ipconfig / all" in the cmd window, and you can see the IP and gateway set by your computer.

The above is all the contents of the article "what is the difference between gateway address and ip address". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report