---- application layer routing protocol the RIP (in the transport network layer)

Routing algorithm

  • Earlier I talked about many times its routing table to confirm that the next hop information, and now we are speaking about the query algorithm routing table.
    Related concepts
  1. 代价(Metric): routing in the study, each link needs to specify a price. The cost here is worth is a measure of a combination of factors of a link. The link length, data rate, link capacity, whether confidential, propagation delay and the like.
  2. 最佳:Under certain relative requirements of a particular derived reasonable choice. When routing nodes in the network co-coordinating all the results of the work, routing environment will also change, the change can not know in advance. So routing is very complicated.

First, hierarchical routing protocol

Different levels of the following reasons :

  1. Internet is very large scale, if all routers know how to reach all the networks should, then this will be very large routing tables.
  2. Many organizations do not want the outside world to understand their own units network routing protocol details of the layout and the department used (which belongs to the internal matter of the department), but also want to connect to the Internet.

Second, the autonomous system AS

Definitions: In the same administration 一组路由器, these routers use the same AS内部routing protocol and common metrics to route packets within the determination of the AS.

Third, the two types of routing protocols

Interior Gateway Protocol IGP (autonomous system AS internal):

  • In an autonomous system routing protocol used inside
  • At present this type of routing protocol used most often, such as RIPand OSPFprotocol
  • Routing internal self-government system called域内路由选择

Exterior Gateway Protocol EGP

  • If the source station and the destination station is in a different autonomous system AS, the AS when the data passed 边界time, when it is necessary to use cross-transmission protocol EGP
  • Exterior Gateway Protocol (EGP) currently used most is BGP-4
  • Routing between autonomous systems is called域间路由选择

Fourth, the interior gateway protocol RIP

  • Routing Information Protocol RIP is an Interior Gateway Protocol (IGP) was first widely used protocol
  • RIP is based on a distributed 距离向量routing protocol (selected distance (hop count) is shorter, the distance does not refer to the distance, but rather refers to the number of hops)
  • RIP protocol requires each router in the network must maintain its own records from every other destination network 距离记录.
    distance
  • Each through a router plus a number of hops
  • RIP think it is a good route through 路由器的数目少, which is a short distance (without considering other factors, such as delay)
  • RIP allows a path can contain up to 15 routers. RIP visible only for small Internet. When the distance is 16 when it means RIP can not reach (the bad router or other reasons will be marked as 16). ( 疑问: Up to 15 routers, distance is not it ????? 16)
Three points of RIP
  • RIP actual realization is to achieve the exchange of routing information, three main points:
    1. And only with 邻路由器the exchange of information. Each router has a neighbor, and ultimately all of the information will be shared. ( 向谁发)
    2. Information exchange is currently known to this router 全部信息, which is its own routing table. ( 发什What)
      1. Exchange of content information (destination network, from a routing table)
    3. Fixed time interval for exchanging routing information, e.g. every 30s ( 何时发)
      1. A RIP router before you create your own RIP routing table only includes the direct routes of the router automatically discovered. In a RIP network, each router will RIP routing information every 30s to publish all its latest RIP routing table China to all its neighbor routers, and will continue to receive its neighbor routers, the routing information, and according to information received route these to update its RIP routing table. This process is repeated cycles of.

Fifth, establish a routing table

  1. When the routing tables started to work, only that the direct routes, a distance of 1.
  2. Only neighbors and exchange of information (up to fifteen router, so soon enough)

Sixth, the distance vector algorithm

Here Insert Picture Description

Here Insert Picture Description

if "目的网络不在路由表中"
	添加项目
else    //下面的目的网络相同
	if "下一跳字段相同"                  //忽视距离
		替换更新
	else     //下一跳字段不同
		if "收到的项目距离更小" //这时候说明目的网络相同 ,下一跳不同,距离不同
			替换更新	

If the 下一跳字段router address given is the same, the routing table to replace the original project will be received. (There is no need long distance pipe RIP project or your own original table, there are projects long distance, data can directly update)

Here Insert Picture Description

Seven, RIP protocol position

  • RIP protocol using 运输层the User Datagram UDP be transmitted (using UDP port 520).
  • So that the position should be in the RIP 应用层. But the IP datagram forwarding process is done at the network layer
  • Further, a router is also a smart host, but also the application layer, but the packet forwarding process only reaches the network layer (in forwarding the datagram to the network layer only removed, re-encapsulation). Then add this: there are a host routing table.

Eight, the advantages and disadvantages of RIP

advantage:

  1. Simple, less overhead
    shortcomings
  2. RIP limits the size of the network, the maximum distance is 15.
  3. When the network fails, the messaging is slow (long time delay, an error message is repeatedly transmitted until the distance is added to 16.)
  4. When the network size increases, the routing information exchange capacity.
Published 22 original articles · won praise 0 · Views 139

Guess you like

Origin blog.csdn.net/weixin_42649617/article/details/104950300