当前位置:网站首页>What is the difference between gateway address and IP address in tcp/ip protocol?
What is the difference between gateway address and IP address in tcp/ip protocol?
2022-07-06 03:59:00 【yanwu_ nuc】
Reference article
Reference article
difference :IP Address means Internet protocol address , yes IP A uniform address format provided by the protocol , It assigns a logical address to every network and host on the Internet ; The gateway is a network connected to another network “ Gateway ”, In essence, it is a network that leads to other networks IP Address , This is it ip Internet access exit of address .
If you don't understand, please see below
gateway IP Address and IP The difference in address
gateway , Everybody knows , From one room to another , It must pass through a door . Again , Send messages from one network to another , You have to go through one “ Gateway ”, This gateway is the gateway . seeing the name of a thing one thinks of its function , gateway (Gateway) It's when one network connects to another “ Gateway ”.
According to different classification standards , There are also many kinds of gateways .TCP/IP The gateway in the protocol is the most commonly used , What we're talking about here is “ gateway ” Mean TCP/IP Gateway under the protocol . So what is a gateway ?
Gateway is essentially a network to other networks IP Address .
Like the Internet A And the Internet B,
The Internet A Of IP Address range is “192.168.1.1~192. 168.1.254”, The subnet mask is 255.255.255.0;
The Internet B Of IP Address range is “192.168.2.1~192.168.2.254”, The subnet mask is 255.255.255.0.
Without a router , There's no way between two networks TCP/IP communication , Even if two networks are connected to the same switch ( Or hubs ) On ,TCP/IP The protocol will also be based on the subnet mask (255.255.255.0) Determine that the hosts in two networks are in different networks . and To achieve communication between the two networks , You have to go through the gateway . If the Internet A The host in found that the destination host of the packet is not in the local network , Just forward the packet to its own gateway , And then the gateway forwards it to the network B Gateway for , The Internet B And then forward it to the network B Some host of . The Internet B To the Internet A The process of forwarding packets . So , Only with the gateway set up IP Address ,TCP/IP Protocol can realize the communication between different networks . So this IP What machine's address is IP The address? ?
The relationship between gateway and router : The gateway IP Address is a device with routing function IP Address , Devices with routing capabilities have routers 、 Server with routing protocol enabled ( It's essentially a router )、 proxy server ( It's also like a router ).
Router (Router): Used to connect multiple logically separate networks , It's a network device responsible for pathfinding , Provide the best communication path for users
Router function : Use the routing table to select the path for data transmission , The routing table contains a list of network addresses and the distances between them , Router Use the routing table to find the correct path of the packet from the current location to the destination address .

ip The relationship between address and gateway : Gateway generally refers to the address of the router ,IP The address is the address of the computer on the network .ip The relationship between address and gateway is : The gateway address is automatically divided into multiple through the router IP Address ; The gateway address is always the same as that of your computer IP The address is of the same network segment .
The default gateway , The exit selected by default for the packet ! Usually your router address .

What is? IP Address ? So-called IP The address is given to each connection at Internet One assigned by the host on 32bit Address . according to TCP/IP(Transport Control Protocol/Internet Protocol, Transmission control protocol /Internet agreement ) Provisions of the agreement ,IP The address is expressed in binary , Every IP Long address 32bit, Bits are converted into bytes , Namely 4 Bytes . For example, a binary form IP The address is “00001010000000000000000000000001”, Such a long address , It's hard for people to deal with it . For the convenience of people ,IP Addresses are often written in decimal form , Use the symbol in the middle “.” Separate different bytes . therefore , above IP The address can be expressed as “10.0.0.1”.IP This representation of address is called “ Dotted decimal notation ”, It's obviously better than 1 and 0 It's much easier to remember . Some people would think that , A computer can only have one IP Address , This view is wrong . We can specify that a computer has multiple IP Address , So when accessing the Internet , Don't think of one IP An address is a computer ; in addition , Through specific technology , Multiple servers can also share one IP Address , These servers look like a host to users .
stay win Operating system ,win+r open “ function ” window , Input “cmd”, open cmd Command window ; stay cmd Window input command :" ipconfigl" enter , You can see the settings of your computer IP And gateway
边栏推荐
- 记一次excel XXE漏洞
- C#(二十九)之C#listBox checkedlistbox imagelist
- 判断当天是当月的第几周
- Hashcode and equals
- RT thread -- FTP of LwIP (2)
- How can programmers resist the "three poisons" of "greed, anger and ignorance"?
- C (thirty) C combobox listview TreeView
- Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
- UDP reliable transport protocol (quic)
- Python book learning notes - Chapter 09 section 01 create and use classes
猜你喜欢

Exchange bottles (graph theory + thinking)

MySQL master-slave replication

【可调延时网络】基于FPGA的可调延时网络系统verilog开发
![[FPGA tutorial case 11] design and implementation of divider based on vivado core](/img/39/f337510c2647d365603a8485583a20.png)
[FPGA tutorial case 11] design and implementation of divider based on vivado core

《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动

An article will give you a comprehensive understanding of the internal and external components of "computer"

RT thread -- FTP of LwIP (2)

如何修改表中的字段约束条件(类型,default, null等)

mysql关于自增长增长问题

在字节做测试5年,7月无情被辞,想给划水的兄弟提个醒
随机推荐
Python book learning notes - Chapter 09 section 01 create and use classes
Mapping between QoE and KQI
Align items and align content in flex layout
In Net 6 CS more concise method
Exchange bottles (graph theory + thinking)
20、 EEPROM memory (AT24C02) (similar to AD)
/usr/bin/gzip: 1: ELF: not found/usr/bin/gzip: 3: : not found/usr/bin/gzip: 4: Syntax error:
Security xxE vulnerability recurrence (XXe Lab)
On Data Mining
《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
Take you to wechat applet development in 3 minutes
ESP32(基于Arduino)连接EMQX的Mqtt服务器上传信息与命令控制
How can programmers resist the "three poisons" of "greed, anger and ignorance"?
[introduction to Django] 11 web page associated MySQL single field table (add, modify, delete)
Prime protocol announces cross chain interconnection applications on moonbeam
DM8 archive log file manual switching
Cf464e the classic problem [shortest path, chairman tree]
Redis (replicate dictionary server) cache
3分钟带你了解微信小程序开发
Flask learning and project practice 9: WTF form verification