Unit 4: Networking 1 4.1 Networking 1 The Routing of a Packet

mac2022-06-30  22

ABOUT THIS VIDEO

Traffic to another network must find and pass through several routers to reach its destination.

到另一个网络的流量必须找到并通过几个路由器才能到达它的目的地。

After watching the video, review these topics:
EthernetPPPHDLC

看完视频后,回顾一下这些话题:以太网PPPHDLC

 

Now, host A's default gateway has the actual traffic meant for the destination.

现在,主机A的默认网关具有目的地的实际流量。

 

Routers maintain tables called, get this, routing tables that contain destination networksand directions for the router, who to send the traffic to next.

路由器维护被调用的表,获取这个,路由表包含路由器的目标网络和方向,路由器将流量发送给下一个。

 

If the routers routing table doesn't have knowledge of the destination network,it can have a default route which means a specific router interfaceon a different router to send traffic to.

如果路由器路由表不知道目标网络,它可以有一个默认路由,这意味着要将流量发送到另一个路由器上的特定路由器接口。

 

That other router interface will have a better idea of how to get to the destination.

另一个路由器接口将更好地知道如何到达目的地。

 

Without knowledge of the destination network or a default route, a router will drop a packetand send an error message back to the source through a protocol known as ICMP,Internet control message protocol.

在不知道目标网络或默认路由的情况下,路由器将丢弃一个包,并通过一种称为ICMP的协议(Internet control message protocol)将错误消息发送回源。

 

In this story, host A's default gateway looks in its routing table and seesthat the next router interface the packet should go to is the left interface of R2.

在本例中,主机A的默认网关在其路由表中查找,并查看数据包应该到达的下一个路由器接口是R2的左接口。

 

If the routers are connected by the Ethernet infrastructure,the same ARP process takes place.

如果路由器通过以太网基础设施连接,则会发生相同的ARP进程。

 

If the interconnection between routers doesn't use Ethernet, a different frame type is used.

如果路由器之间的互连不使用以太网,则使用不同的帧类型。

 

For example, wireless NICs use 802.11 frames instead of Ethernet frames.

例如,无线网络使用802.11帧而不是以太网帧。

 

The same IP packet just has a different encapsulating frame.

相同的IP包有不同的封装结构。

 

Point-to-point directly connected serial interfaces using protocols like PPPor HDLC don't even need to deal with MAC addresses and their framesthat encapsulate IP packets since their connection is just like a tunnel.

点对点直接连接的串行接口使用像PPP或HDLC这样的协议,甚至不需要处理MAC地址和它们封装IP数据包的帧,因为它们的连接就像一个隧道。

 

There's only one way in and only one way out.

只有一条路可以进去,也只有一条路可以出去。

 

For this story, we'll just say all interfaces are Ethernet.

在本例中,我们只说所有接口都是以太网。

 

There may be switches and PCs between these two router interfaces but with or without the storyin communication between routers, in this case, it is exactly the same.

在这两个路由器接口之间可能有交换机和pc机,但是在路由器之间通信的情况下,无论是否有,都是完全相同的。

 

R1 sends an ARP request, a broadcast heard and read by every device on the network,saying if your IP address is 10.10.2.99, I need your MAC address.

R1发送一个ARP请求,一个网络上每个设备都能听到和读取的广播,说如果你的IP地址是10.10.2.99,我需要你的MAC地址。

 

The left interface of R2 sends a unicast ARP reply back to R1 with its MAC address.

R2的左侧接口用MAC地址将单播ARP应答发送回R1。

 

R1 re-encapsulates the original packet sent from A to X with a new frame.

R1用一个新帧重新封装从A发送到X的原始数据包。

 

The new source MAC address represents the right interface of R1,and the new destination MAC address represents the left interface of R2.

新的源MAC地址表示R1的右接口,新的目标MAC地址表示R2的左接口。

 

R2 accepts the frame on its left interface, sees that the MAC address is its MAC address,then R2 inspects the destination IP address and it isn't its IP address.

R2接受它左边接口上的帧,看到MAC地址是它的MAC地址,然后R2检查目标IP地址,它不是它的IP地址。

 

R2s right interface then ARPs looking for the MAC address of R3s left interface.

R2s右接口然后ARPs查找R3s左接口的MAC地址。

 

After the ARP reply comes back, the new source MAC of the frame is the right interface of R2.

ARP回复回来后,帧的新源MAC就是R2的正确接口。

 

And the new destination MAC is the left interface of R3.

新的目标MAC是R3的左接口。

 

Then R3s right interface finishes it off by actually ARPing for the destinationsince the right interface of R3 is actually on the destination's network.

然后R3s右接口完成它实际上ARPing的目标,因为R3的右接口实际上是在目标的网络。

 

The final frame has a source MAC address of the right interface of R3and a destination MAC address of the actual destination,host X.

最后一帧包含R3正确接口的源MAC地址和实际目标主机X的目标MAC地址。

The destination gets the frame, sees its MAC address, opens it up, and for the first timein the story a device says yes, that's my IP address too.

目的地获得帧,看到它的MAC地址,打开它,在故事中第一次设备说yes,这也是我的IP地址。

 

The IP header is now stripped off and the higher layer data is sent up the networking stackon the destination for processing.

IP报头现在被剥离,较高层的数据被发送到目标上的网络堆栈进行处理。

转载于:https://www.cnblogs.com/sec875/articles/10344648.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)