当前位置:网站首页>IP datagram sending and forwarding process
IP datagram sending and forwarding process
2022-06-28 04:59:00 【Swarford】
Hosts in the same network can communicate directly ----- Direct delivery
Routers of different networks need routers to transit ---- Indirect delivery
Sending process :

host C To his own ip The address matches its own subnet mask , Be the host C Network address of ;
host C Then set the host F The network address of and its own subnet mask match Get the destination network address ;
Discover the host F Destination network address and C The same as your own will be delivered directly ; If it is not the same , The router is not required to forward packets for indirect delivery in the same network ;
host C Transmit the datagram to the router of the network , The router forwards the datagram to the host F
Forwarding process :
(1) First, you need to extract the destination address from the header of the datagram , Check Head check sum Is it wrong , If there is an error, discard the datagram and notify the host .
(2) Match the subnet mask of this router , See if it can be delivered directly . That is, whether the network where the destination address is located is directly connected to the router , If connected, it can be delivered directly , There is no need to forward through other routers . otherwise , execute 3.
(3) Check whether the routing table has a corresponding Specific host routing ( Host specific routes are used to control 、 Test network ), If yes, it will be forwarded to the next hop address specified by the specific host routing , Otherwise execution 4.
(4) Check to see if you have arrived The router of the destination network , If there is , Then forward according to the next hop address specified by the general route that meets the rules , Otherwise execution 5.
(5) If the routing table in the router is set to Default route , Then the packet is forwarded to the address indicated by the default route , Otherwise execution 6
(6) Discard the packet , And report forwarding failure
Be careful :
- Each router selects the next hop required by the target network according to the routing table ( The physical port number of the router or the next network address ), and ip After the packet arrives at the target network through multiple routes , Change to target LAN Through the link layer MAC Address is addressed by broadcast !(IP Address conversion to MAC Address , Stored in MAC In the head of the frame ) This can improve the efficiency of routing
- although ip Datagrams have complete sources ip Address and purpose ip Address , But the router only depends on The network number of the destination address Routing !
- Link layer in LAN , You can only see MAC Address . And forward by route ip In groups ,ip Packets are unpacked and repackaged by routers in each network ( Framing ), therefore MAC The address is constantly changing ! This also determines that it cannot be passed MAC Address cross network communication !
- Because routers interconnect multiple networks , So not only are there multiple ip Address , There are multiple hardware addresses
- No matter what protocol the network layer uses , When data frames are transmitted over the actual network , In the end, the hardware address must be used , So we need a way to accomplish ip Address to MAC Address mapping ----- Address resolution protocol ARP
ARP Used to solve a problem LAN Host in / The router ip Address and MAC Address mapping problem , If the host you are looking for is not on the same network as the source host , Through ARP Found at this LAN The hardware address of a router of , Then forward the packet to the router
Broadcast storm :
If the host A Send a broadcast datagram to each device in the network (ip All the host numbers are 1), namely ip The destination address of the datagram is the broadcast address ,
The router receives the ip The datagram is not forwarded after the datagram !
That is, the router isolates the broadcast domain
If the router forwards the broadcast datagram after receiving it , Will cause a huge broadcast storm , Serious waste of resources
Repeaters and hubs are at the physical layer , Neither conflict domain nor broadcast domain is isolated
Bridges and switches ( Multi port on bridge ) Working at the data link layer , You can isolate conflict domains , Can't isolate broadcast domain
Routers work on the network layer , Isolate the conflict domain , Also isolate the broadcast domain
Routers do not provide reliable transmission !
边栏推荐
- Find an SQL that can judge the data in the table and only fill in the SQL that is not overwritten
- Code understanding: implementing volume models for hangwriten text recognition
- Redis 的 最新windows 版本 5.0.14
- 无线传感器网络学习笔记(一)
- !‘ Cat 'is not an internal or external command, nor is it a runnable program or batch file.
- 109. 简易聊天室12:实现客户端一对一聊天
- 2022年安全员-A证考试题库及模拟考试
- 2022电力电缆判断题模拟考试平台操作
- [early knowledge of activities] list of recent activities of livevideostack
- 知识点滴 - 关于汉语学习的网络资源
猜你喜欢

学习太极创客 — MQTT 第二章(六)MQTT 遗嘱

代码理解:IMPROVING CONVOLUTIONAL MODELS FOR HANDWRITTEN TEXT RECOGNITION

2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案

二级造价工程师考试还没完?还有资格审核规定!

机器人学DH参数及利用matlab符号运算推导

OracleData安装问题

控制器的功能和工作原理

CPG 固体支持物研究:Lumiprobe通用 CPG II 型

Excel将一行的内容进行复制时,列与列之间是用制表符“\t”进行分隔的

Huawei's 9-year experience as a software testing director
随机推荐
2022年安全员-A证考试题库及模拟考试
如何从零设计一款牛逼的高并发架构(建议收藏)
公司为什么选择云数据库?它的魅力到底是什么!
Google Earth engine (GEE) - global flood database V1 (2000-2018)
Severe tire damage: the first rock band in the world to broadcast live on the Internet
多线程实现 重写run(),怎么注入使用mapper文件操作数据库
Learning Tai Chi Maker - mqtt Chapter II (VI) mqtt wills
!‘ Cat 'is not an internal or external command, nor is it a runnable program or batch file.
判断对象中是否存在某一个属性
[csp-j2020] excellent splitting
Light collector, Yunnan Baiyao!
并发之wait/notify说明
短视频本地生活版块成为热门,如何把握新的风口机遇?
Mise en place d'un cadre d'essai d'automatisation de l'interface utilisateur - - rédaction d'une application d'automatisation
现代交换原理MOOC部分题目整理
Feign implements path escape through custom annotations
2022年最新辽宁建筑八大员(标准员)考试试题及答案
BioVendor sRAGE Elisa试剂盒化学性质和技术研究
Performance optimization and implementation of video codec
控制器的功能和工作原理