Static routing, RIP, OSPF, BGP

 

The main content includes the following four points: (1) static route (2) dynamic routing (3) MST (4) VLAN

  1. 1.  What is static routing?

A: A static route is manually manage staffing and management of routing

  1. 2.  static route consists of those advantages?

A: The configuration is simple

  1. 3.  Disadvantages: when network topology changes naturally can not make timely change and the need to re-configure so seriously affected the efficiency of the current static route is mainly used in communication between the small network server and enterprise architecture model
  2. 4.  static dynamic automatic manual  
  1. The  dynamic routing is defined: Dynamic Routing routing protocol router itself is calculated by a corresponding dynamic routing algorithm routes it must be an advantage to adapt to changes in network topology and can make timely adjustments

The RIP ( Routing Information Protocol) the OSPF (link state information) the BGP (Exterior Gateway Protocol)

                   RIP protocol ( Routing Information Protocol)

RIP Definition: Routing Information Protocol depending on the distance vector algorithm hops as a metric to calculate the optimal route

 Work process: After the first router starts when the routing table only direct routes when routers run RIP time, it sends request packets news neighbor router based on the own routing table reply reponse packets to complete the route to add a network stable router every 30 seconds will send request packet is considered more than 120 seconds 180 seconds after the failed router routes the aging timer is cleared

 

Routing table is updated?

If you already have a route entry in the routing table when the next hop is the route of entry of his neighbor, whether the measure increases or decreases will update the routing entries; when the next hop is not his neighbor the route entry only measure value is updated to reduce the route; metric for the route entry in the routing table does not exist less than 16 updates the routing

RIP advantages and disadvantages:

  1. 1.  Advantages: simple to configure, easy to maintain
  2. 2.  drawbacks: slow convergence (distance vector algorithm, periodic updates) the lack of knowledge of the global topology (the routing information is transmitted, distributed route calculation), there is a loop (need to split horizon, poison reverse, trigger an update ), to expand the selection is poor and sub-optimal routing (number of hops as a measure of the way, jumping more than 15 is considered unreachable destination), RIP routing loops may occur
  3. 3.  Why would a loop?  Under normal circumstances

A)   RTA will learn RTC route metric value by 1 when the RTB RTB considers RTB RTC unreachable destination address routing updates will not be updated to the RTA and RTA message is sent to the routing RTB RTB after reaching the RTC RTC failure updates the routing that can be reached by RTC RTA, so the loop 16 is repeated until the routing metric is formed

b)   reference solutions: split level (an interface is not emitted from the routes learned from that interface to), poison reverse (routes learned from an interface, and the routing hops set as 16.) , triggered updates (will be sent immediately to the neighbor router when routing information changes triggered updates do not have to wait until the timer times out, accelerating the convergence time) so RIP routing due to the limited number of hops general application in a simple structure in small networks

                     OSPF protocol ( link state information) 

--- define the advantages and disadvantages of working process --- --- --- Anti-ring applications

OSPF is the Open Shortest Path First, i.e., link state protocol, each router maintains a respective link state database, to calculate the optimal route based on the bandwidth of the SPF algorithm as metrics

OSPF working process: First, the router first establish neighbor relations, and then synchronize the link state database, and finally calculate the optimal route. Found neighbor relationship is established by sending hello packet (content packet route ID neb), the state machine changes to Down, int, 2-way; send link state database synchronization requires adjacency is established, the establishment of adjacency DD packet acknowledgment of sequence number and master-slave relationship, DD packets interactive link state database summary information again, DD packet transmission link state database details, after sending the request-specific packet LSR link state information, the router sends LSU message, update a particular link state information, and finally sent to LSU LSACK to confirm the change of the state machine by Exstart, Exchange, Loading, Full, adjacency relationship has been established at this time, the link state database synchronization is complete, according to the last SPF algorithm to calculate the optimal route

 

OSPF protocol Advantages Disadvantages

Advantages: 1 fast convergence (SPF algorithm is superior and trigger an update) 2. have knowledge of global topology (link status information is transmitted, stand-alone route calculation) 3 expansion is good (as a measure of bandwidth mode);. 4. the loop-free (SPF algorithm is loop-free real routing protocol); plaintext and ciphertext support authentication.

Disadvantages: 1 equivalent supports load balancing, load balancing is not supported nonequivalent 2-communication area by the virtual link between the backbone

OSPF various mechanisms between anti-domain connected through a non-cyclic backbone area and the backbone area; for anti-LSA outside ring 3 stars be very excellent in the current OSPF routing protocol is converted to the 5 LSA, a wide range of applications, sizes network can use, easy maintenance and management

RIP protocol and OSPF is an interior gateway protocol   

Introducing the BGP (protocol)

BGP Exterior Gateway Protocol

--- --- working definition of anti-ring ==== application process

IGP用于计算和发现路由 BGP则用来控制和选择最优路由 用于多个自治系统间的通信

BGP工作过程:首先路由器之间建立TCP连接(向对端的179端口发起TCP连接)然后发送OPEN消息建立BGP对等体关系(分部为IBGP和EBGP);最后定时每个10秒发送Keepalive消息维护路由的稳定性

BGP如何防环+BGP通过原则:

  1. 1.  将自己的最优路由发送给邻居
  2. 2.  通过EBGP获得的路由会发送给所有BGP邻居
  3. 3.  通告IBGP获得的路由不会发送给其他IBGP邻居
  4. 4.  IGP与BGP同步

BGP在自治系统外通过携带AS-PATH信息,当路由器收到外部路由包含自己的AS-PATH信息则丢弃该路由 AS内部 由IBGP获得的路由不会发送给其他IBGP邻居 实现AS内部的防环

BGP一般应用于多个AS之间或者多个运营商之间等需要使用BGP协议 对于AS和AS之间单一连接或者CPU,带宽较低时不需要使用BGP协议

 

                          STP

STP是交换机内的协议 生成树协议 用于环路消除和链路备份

为什么要使用STP?在交换机网络中多用来冗余链路维护网络的稳定性,这样一来在发送ARP Request消息时每个交换机都会收到 并回复ARP Reply消息,可能会造成环路形成广播风暴和MAC地址表动荡 交换机CPU负载过大容易造成损坏引起不必要的损失

所以在交换机网络中用STP来解决问题 交换机之间会选举一个根桥作为主逻辑中心,其他的为非根桥。

默认情况下都认为自己是根桥,所以当交换机启动时,会发送BPDU报文用来选举根据。根桥的选举由BID(16位桥优先级和48位MAC地址组成)决定,越小越优先。既然有根桥,交换机网络中也定义了端口角色有根端口,指定端口,预备端口,根端口和指定端口的选举由根路径开销值,对端BID,对端PID,本端PID决定,也是越小越优先,收敛时间代表着交换机发生故障后处理和恢复的时间,一般直连链路故障后收敛时间约30S,非直连链路故障后收敛时间约50S

STP模式下交换机的端口状态有5种,分部为Disabled,Blocking,Listening,Learning,Forwarding,交换机启动后根端口和指定端口不断变化为Fowarding状态;预备端口为Blocking状态,用于阻塞端口,链路发生故障后恢复使用在变为Fording状态

STP模式:STP==RSTP==MSTP

MSTP兼容RSTP和STP,RSTP比STP收敛速度快,主要快在端口状态的变化,RSTP为Dicarding,Listening,Forwarding,收敛速度快约30秒,STP的最大生存期为20S,RSTP的最大生存期为3倍Hello时间

应用场景:STP和RSTP为单生成树 主要用于二层交换机 只有一个VLAN的情况下,MSTP为多生成树 用于多个VLAN之间的通信

单生成树缺点:1.部分VLAN不通 2.无法实现复杂均衡 3.容易选择次优路由

 

交换机特性:交换机工作在数据链路层,根据帧头信息进行转发,交换机的每一个端口都是一个冲突域,交换机自身是一个广播域,理论上交换机是不隔离广播域的 所以当多个交换机之间进行通信,容易造成广播泛滥安全性无法保障,此时VLAN技术可以将单个局域网逻辑是分成多个虚拟局域网及VLAN 可以大大隔离了广播域,维持网络的稳定性

 

                       VLAN

VLAN定义:通过将单个局域网逻辑上分为多个虚拟局域网,隔离了广播域,解决了广播泛滥,提升了网络的安全性

VLAN的链路类型有干道链路和接入链路,干道链路为连接交换机之间,接入链路为交换机连接主机

常见的端口类型有Trunk端口,Access端口,Hybrid端口

Trunk端口允许多个VLAN通信 Access收到的数据帧是不带Tag的,Trunk收到的数据帧是带Tag的,只有特定的情况下是不带Tag的

VLAN可以使用GVRP来传递和注册VLAN信息

相同VLAN之间可以通过二层交换机实现通信,不同VLAN之间可以使用三层交换机和单臂路由来实现

Guess you like

Origin www.cnblogs.com/dfQi/p/11870019.html