首页 > 代码库 > 直连网(directly-connected networks)个数的计算

直连网(directly-connected networks)个数的计算

直连网分为两种,point-to-point link和multiple access link, 如图:

对一个网络数直连网个数时,以上两种link都要计算。例子如下:

1. How many directly-connected networks are there on the route from host A to host B in the following figure?

我们将AB间的point-to-point link和 multiple access link都标出来:

其中,红色方框框住的是multiple access link, 蓝色框框住的是point-to-point link。

所以,答案自然是2+1=3啦。(其中2为AB间multiple access link数, 1为AB间point-to-point link数)

直连网(directly-connected networks)个数的计算