Data Communication Computer Network 简明教程

Network Addressing

第 3 层网络寻址是网络层的主要任务之一。网络地址始终是逻辑的,即这些是可以通过适当配置进行更改的基于软件的地址。

Layer 3 network addressing is one of the major tasks of Network Layer. Network Addresses are always logical i.e. these are software based addresses which can be changed by appropriate configurations.

网络地址始终指向主机/节点/服务器,或者它可以代表整个网络。网络地址始终配置在网络接口卡上,通常由系统通过机器的 MAC 地址(硬件地址或第 2 层地址)进行映射,以用于第 2 层通信。

A network address always points to host / node / server or it can represent a whole network. Network address is always configured on network interface card and is generally mapped by system with the MAC address (hardware address or layer-2 address) of the machine for Layer-2 communication.

现有的网络地址类型多种多样:

There are different kinds of network addresses in existence:

  1. IP

  2. IPX

  3. AppleTalk

我们在这里讨论 IP,因为这是我们如今唯一在实践中使用的地址。

We are discussing IP here as it is the only one we use in practice these days.

network addressing

IP 寻址提供了一种机制来区分主机和网络。由于 IP 地址以分层方式分配,因此主机始终驻留在特定网络之下。需要在其子网外部进行通信的主机需要知道目标网络地址,在那里将发送数据包/数据。

IP addressing provides mechanism to differentiate between hosts and network. Because IP addresses are assigned in hierarchical manner, a host always resides under a specific network.The host which needs to communicate outside its subnet, needs to know destination network address, where the packet/data is to be sent.

不同子网中的主机需要一种机制来互相定位。DNS 可以完成此任务。DNS 是一个提供远程主机第 3 层地址与其域名或 FQDN 映射的服务器。当主机获取远程主机的第 3 层地址(IP 地址)时,它会将其所有数据包转发到其网关。网关是一个配备了所有通向目标主机数据包路由信息的路信息由的路由器。

Hosts in different subnet need a mechanism to locate each other. This task can be done by DNS. DNS is a server which provides Layer-3 address of remote host mapped with its domain name or FQDN. When a host acquires the Layer-3 Address (IP Address) of the remote host, it forwards all its packet to its gateway. A gateway is a router equipped with all the information which leads to route packets to the destination host.

路由器借助路由表,其中包含以下信息:

Routers take help of routing tables, which has the following information:

  1. Method to reach the network

路由器在收到转发请求后,将数据包转发到其向目标的下一跳(相邻路由器)。

Routers upon receiving a forwarding request, forwards packet to its next hop (adjacent router) towards the destination.

路径上的下一个路由器遵循同样的操作,最终数据包到达其目的地。

The next router on the path follows the same thing and eventually the data packet reaches its destination.

网络地址可以是以下几种之一:

Network address can be of one of the following:

  1. Unicast (destined to one host)

  2. Multicast (destined to group)

  3. Broadcast (destined to all)

  4. Anycast (destined to nearest one)

默认情况下路由器从不转发广播流量。多播流量使用特殊处理,因为它是优先级最高的视频流或音频流。任意播与单播类似,但当有多个可用目的地时,数据包会被传递给最近的目的地。

A router never forwards broadcast traffic by default. Multicast traffic uses special treatment as it is most a video stream or audio with highest priority. Anycast is just similar to unicast, except that the packets are delivered to the nearest destination when multiple destinations are available.