Three computer network engineering and technical summary (4)

Basics

The basic concept of packet forwarding:

The main router is router to every data frame to find a best path, and effectively transfer the data to the destination site.

Packet forwarding can be divided into:

	直接转发(直接到目的站点)

	间接转发(通过路由器的中转简洁的到达目的站点)

Here Insert Picture Description

The basic concept of the router

  1. Hops: i.e. a number of packet router from the source host to the destination host to go through, is obvious, the fewer the number of passes of the router, i.e., the smaller the number of hops, the better the path (optimal path selected based on a ).
  2. Bandwidth: refers to a transmission rate of the link, typically expressed as Mb / s
  3. Delay: delay is the packet from a source host to a destination host time to be experienced. Of course, the shorter the time, i.e. the delay is smaller, the better this path also.
  4. Load: load is the amount of traffic through a router or line per unit time.
  5. Reliability: packet error rate is the measure of the reliability of the transmission process, data transmission error rate is an indicator of accuracy. BER = bit error in the transmission / total transmitted code number * 100%, of course the smaller the error rate, indicating that the higher the reliability
  6. Cost: generally refers to the transfer process consuming, cost usually associated with the link bandwidth used

Evaluation based router

① algorithm must be correct, stable and equitable
② algorithm should be as simple
③ algorithm must be able to adapt to the network topology and traffic changes
④ algorithm should be the best

Classification routing table

静态路由表

Set in advance a fixed routing table by the system administrator, the administrator will be the path of each destination are entered into the routing table, the network structure changes, can not automatically update the routing table, routing table updates the work must be performed by an administrator manual changes. Therefore, static routing tables are normally only used in a small structure does not change often local area network system, or troubleshooting of network experiments.

动态路由表

Large Internet usually dynamic routing table. In the network system is running, the system will automatically run a dynamic routing protocol, routing table build. When Internet structural changes, such as when a router failure or a link interruption dynamic routing protocol will automatically update all the routers in the routing table. Networks of all sizes need to choose a different dynamic routing protocols.

The basic concepts of IP routing with route summarization

IP routing requires a routing table, how to establish the routing table?
Follow two principles:

	最长前缀匹配

Classless Inter-domain routing, the IP address of a predetermined <network prefix> <host number>, the same subnet that more network prefix, the less the host number, the easier to find the destination host.

	路由表条目尽可能少

Here Insert Picture Description

RG router's routing table
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description

RG router's routing table

Here Insert Picture Description

Here Insert Picture Description

After aggregation router's routing table RG

Here Insert Picture Description

With the routing table after, if the destination address of the packet received RG 156.26.2.37, the router will need to find a best match routing. It packet destination address in the routing table routes comparison, the same network prefix and a network prefix length longer as the best route
156.26. 00,111,111.11110000 routing
156.26. 00,111,111.11110100 routing
156.26. 00,111,111.00000000 routing
156.26. 00111111 . routing 00010000

156.26. 00000000. 00000000 路由	√

156.26. 00,111,000.00000000 routing
156.26. 00,000,010.00100101 destination IP address

Route of the Internet protocol

The basic concept of autonomous systems:

Internet using hierarchical routing protocol, and the whole Internet is divided into many smaller autonomous system (AS).

All networks within an autonomous system belongs to a unit, such as a university, a company, a government department and so on.

Here Insert Picture Description

一个自治系统最重要的的特点是什么呢?

The right to decide which route should be used within the system protocols.

  1. Inside the autonomous system routing protocol: intra-domain routing protocols (Interior Gateway Protocol IGP)
     Routing Information Protocol RIP
     Open Shortest Path First OSPF
  2. External autonomous system routing protocol to: Inter-Domain Routing Protocol (Exterior Gateway Protocol EGP)
     Border Gateway Protocol (BGP)

Here Insert Picture Description

Interior Gateway Protocol (IGP)

Routing Information Protocol (RIP)

路由信息协议RIP,要求路由器周期性地向外发送路由刷新报文,
路由刷新报文主要内容是由若干(V,D)组成的表。(V,D)表中的V代表”矢量”(即方向),标识该路由器可达到的目的网络或目的主机;D
代表距离(即跳数),其他路由器在收到某路由器的(V,D)报文后,据此按照最短路径原则对各自的路由表进行刷新。

路由信息协议RIP工作过程是怎样的?

 路由器1起始路由表

目的网络 距离 路由
10.0.0.0 0 直接
20.0.0.0 8 Router2
30.0.0.0 3 Router2

120.0.0.0 11 Router4
125.0.0.0 4 Router5
212.0.0.0 10 Router6
220.0.0.0 9 Router6

 路由器2发送的(V,D报文)	

目的网络 距离
10.0.0.0 3
20.0.0.0 4
30.0.0.0 2
40.0.0.0 7
120.0.0.0 5

			路由器1更新的路由表

目的网络 距离 路由
10.0.0.0 0 直接
20.0.0.0 5 Router2
30.0.0.0 3 Router2
40.0.0.0 8 Router2
120.0.0.0 6 Router2
125.0.0.0 4 Router5
212.0.0.0 10 Router6
220.0.0.0 9 Router6

①报文中路由器2到达目的网络距离加1比路由器1到达目的网络要大,不必刷新修改,否则要修改,路由相应改为路由器2。
②报文中路由器2到达目的网络,路由器1的路由表没有,路由器1需要刷新增加。
③报文中没有的目的网络路由器1的路由表保留不变。

开放路径最短优先协议OSPF

概念理解:
“开放”表明OSPF协议是所有路由器厂商都支持的协议。
“最短路径优先”就是最短路径算法SPF。
和RIP比较,OSPF的主要特点:
① OSPF是使用分布式链路状态 (RIP距离向量路由协议) 协议;
②链路状态度量主要是指费用、距离、延时、带宽等;
③链路状态发生变化时用洪泛法向所有路由器发送此信息 (RIP仅向自己相邻的几个路由器交换路由信息)。
④执行OSPF协议的路由器之间频繁地交换链路状态信息,因此所有的路由器最终都能建立一个链路状态数据库,这个数据库实际上全网的拓扑结构图。而RIP的每个路由器虽然都知道所有的网络的距离以及下一跳路由器,但是不知道全网的拓扑结构。
Here Insert Picture Description

为了适应规模更大的网络,并使更新过程更快,OSPF协议将一个自治系统分成若
干个更小的范围,叫做区域。每个区域有一个32位的区域标识符,路由器数不超过200个。

每一个自治系统都有一个主干区域,该区域的路由器称为主干路由器,所有区域都必须链接到主干区域。从自治系统当中的任何区域出发,经过骨干区域,总是有可能到达该自治系统的任何一个地方。主干区域的内部拓扑结构对外不可见。

每个连接到两个或多个区域的路由器为区域边界路由器
内部路由器
自治系统边界路由器

Here Insert Picture Description

划分区域的好处是什么?

将利用洪泛法交换链路状态信息的范围局限在每一个区域内而不是整个自治系统。因此此每一个区域内部的路由器只知道该区域内的完整拓扑结构而不知道其他区域的网络拓扑结构。

Here Insert Picture Description

外部网关协议

边界网关协议BGP

边界网关协议是使用在自治系统之间的一种路由选择协议,由于Internet 的规模太大,使得域间路由选择起来非常困难。

① 只考虑最短距离找出路由,需要好的算法,费用和安全性不太理想。
② 只用一般的路由选择算法,那么每个路由器必须维持一个很大的路由状态数据库,计算出最短路由将花费很长时间。同时一条路由经过几个不同自治系统,他们内部路由选择协议不同,这种选择路由方式是没有任何意义的。

那么自治系统的域间路由选择协议标准是什么呢?

应当允许使用多种路由选择策略,要考虑安全和经济方面因素。
找出较好的路由,而不是最佳路由。
那我们来了解域间路由选择的一种协议BGP-4

BGP-4采用了路由向量( path vector
)路由协议。在配置BGP时,每一个自治系统的管理员要选择至少一个路由器(一般是BGP边界路由器)作为该自治
系统的“BGP发言人”。一个BGP发言人与其他自治系统中的BGP发言人 要交换路由信息,
就要先建立TCP连接,然后在此连接上交换BGP报文以建立BGP会话。利用BGP会话交换路由信息,如增加了新的路由,或撤销过时的路由,以及报告出差错的情况等。

Here Insert Picture Description

BGP路由选择协议的工作过程

BGP边界路由器初始化过程在BGP刚刚运行时,BGP边界路由器与相邻的边界路器交换整个的BGP路由表。但以后只需要在发生变化时更新有变化的部分,而不像RIP或OSPF那样周期性地进行更新,这样做节省网络带宽和减少路由器的处理开销 。

BGP路由选择协议的四种分组
打开(open)分组
打开分组用来与相邻的另一个BGP发言人建立关系。
更新( update )分组
更新分组用来发送某一路由的信息,以及列出要撤销的多条路由。
保活( keepalive )分组
保活分组用来确认打开报文,以及周期性地证实相邻边界路由器的存在
通知( notification )分组
通知分组用来发送检测到的差错

当两个边界路由器属于两个不同的自治系统,而其中一个边界路由器希望和另一个边界路由器定期地交换路由信息时,就应该有一个协商的过程。因此,一开始向相邻边界路由器进行协商时就要发送“打开分组”。如果相邻边界路由器接受,就响应一个“保活分组”。这样,两个BGP发言人的相邻关系就建立了。一旦相邻关系建立了,就要设法 维持这种关系。双方中的每方都需要确信对方是存在的,且一直保持这种相邻关系。为此,这两个BGP发言人彼此要周期性地(一般是每隔30秒)交换“保活分组”。 “更新分组”是BGP协议的核心。BGP发言人可用“更新分组”撤销它以前曾经通知过的路由,也可以宣布增加新的路由。撤销路由可以一次撤销许多条,而增加新路由时,每个更新报文只能增加一条。当使用某个路由器或链路出现故障时,可以使用通知分组。

课后真题(5)

1、BGP协议的分组中,需要周期性交换的是©。
A) open
B) update
C) keepalive
D) Notification
2、R1、R2是一个自治系统中采用RIP路由协议的两个相邻路由器,R1的路由表如下图(a)所示,当R1收到R2 发送的如下图(b)的〔V, D〕报文后,R1更新的4个路由表项中距离值从上到下依次为0、3、3、4
那么,①②③④可能的取值依次为( D)。
Here Insert Picture Description
A) 0、4、4、3
B) 1、3、3、3
C) 2、2、3、2
D) 3、2、2、3

3、OSPF协议中,一般不作为链路状态度量值(metric)的是( C )。
A) 距离
B) 延时
C) 路径
D) 带宽
4、下列关于OSPF协议的描述中,正确的是(D )。
A) 在一个区域内的路由器数一般不超过50个 200个
B) 每一个区域OSPF拥有一个30位 32位的区域标识符
C) 在一个OSPF区域内部的路由器可以 不可以知道其他区域的网络拓扑
D) 对于规模很大的网络,OSPF通过划分区域可以提高路由更新收敛速度
5、下列关于BGP协议的描述中,错误的是( A)。
A) 两个BGP发言人需要不定期 定期地交换keepalive分组来确认双方的相邻关系
B) 一个BGP发言人与其他自治系统中BGP发言人交换路由信息使用TCP连接
C) open分组用来与相邻的另一个BGP发言人建立关系
D) 使用update分组更新路由时,一个报文只能增加一条路由
6、R1、R2是一个自治系统中采用RIP路由协议的两个 相邻路由器,R1的路由表如下图(a)所示,当R1收到R2发送的如下图(b)的〔V, D〕报文后,R1更新的五个路由表项中距离值从上到下依次为0、4、4、2、2
那么,①②③④⑤可能的取值依次为©。
Here Insert Picture Description
A) 0、5、4、3、2
B) 1、3、4、3、1
C) 0、4、4、2、2
D) 3、4、3、3、1

7、下列关于OSPF协议的描述中,错误的是( D )。
A) 一个OSPF区域内的路由器数一般不超过200个
B) OSPF区域内每个路由器的链路状态数据库只包含本区域的拓扑结构信息
C) OSPF协议要求当链路状态发生变化时用洪泛法发送此信息
D) 每一个OSPF区域拥有一个64位 32位的区域标识符
8、下列关于路由信息协议RIP的描述中,正确的是( A)。
A) 路由刷新报文主要内容是由若干(V、D)组成的表
B) 矢量V标识该路由器可以到达的目的网络或目的主机的跳数
C) RIP是一种外部 内部网关协议
D) 路由器周期性地向网内 所有路由器发送路由刷新报文
9、下列关于OSPF协议的描述中,正确的是(A )。
A) OSPF使用分布式链路状态协议
B) 链路状态数据库 保持所有下一跳路由器的数据
C) 每一个区域OSPF拥有一个30位 32位的区域标识符
D) 当链路状态发生变化时用洪泛法向相邻 所有的路由器发送信息
10, R1, R2 is an autonomous system routing protocol RIP uses two adjacent routers, R1 routing table below (a), when R1 is received below (b) is sent by R2 [V, D ) packet, the value of five from the routing table entry updates the R1 is from top to bottom (B).
Here Insert Picture Description
A) 0,3,4,3,1
B) 0,4,4,2,2
C) 0,5,4,2,1
D) 0,5,4,3,2

11, the following description of a routing protocol in the related art, is correct (B).
A) When the link state is changed, using the Open Shortest Path First protocol flooding method neighboring 所有 transmitting a message router
B) Routing Information Protocol is based on distance vector routing protocol
C) the link state metrics including bandwidth from , convergence time 向量 , etc.
D) autonomous system border gateway protocol for internal 外部 delivery route selection information
12, the following description of the OSPF protocol, is correct ©.
A) stored in a link state database of the complete routing table ——BGP协议
B) the link state protocol "metric" mainly refers to the number of hops, bandwidth, etc. 费用、距离、延时、带宽等
C) each have a 32-bit area OSPF area identifier
D) when the link state when changes to the process by flooding the neighboring 所有 transmitting information routers

Zhenti part of the red font change text on a black font for the original title text. If insufficient, correct me please leave a message.

Guess you like

Origin blog.csdn.net/ghan110/article/details/94358332