1. 程式人生 > >11.CCNA第十一天-配置OSPF/EIGRP(增強型內部閘道器協議)

11.CCNA第十一天-配置OSPF/EIGRP(增強型內部閘道器協議)

配置OSPF

Branch(config)#router ospf ?
  <1-65535>  Process ID

萬用字元掩碼
在IGP協議中,以連續的0和連續的1組成
有一種不科學的稱呼(反掩碼)
Branch#show running-config | section router ospf
router ospf 10
network 10.1.0.0 0.0.255.255 area 0

骨幹區域  區域ID 為 0
Branch#show ip protocols                       
*** IP Routing is NSF aware ***

Routing Protocol is "ospf 10"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    10.1.0.0 0.0.255.255 area 0
  Routing Information Sources:
    Gateway        Distance      Last Update
  Distance: (default is 110)

管理距離
直連為 0
靜態為 1
OSPF  110
eigrp  90 外部路由 170
s-s    115
BGP    內部 200  外部的 20
RIP    120

檢查OSPF鄰居
HQ#show ip ospf neighbor

Neighbor ID    Pri  State          Dead Time  Address        Interface
192.168.1.1      1  FULL/DR        00:00:37    192.168.1.1    Ethernet0/1

show ip route ospf  ---單獨的檢視通過OSPF協議學習到的路由字首

Branch# 
*Oct 28 20:43:17.678: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.1.2 on Ethernet0/1 from LOADING to FULL, Loading Done    ----OSPF鄰居成功建立了

介面宣告和程序宣告可以同時使用
當介面宣告和程序宣告同時使能了一個介面的話,那麼介面宣告生效


檢視OSPF介面
Branch#show ip ospf interface brief
Interface    PID  Area            IP Address/Mask    Cost  State Nbrs F/C
Et0/1        10    0              192.168.1.1/24    10    DR    1/1
Et0/0.200    10    0              10.1.20.254/24    10    DR    0/0
Et0/0.100    10    0              10.1.10.254/24    10    DR    0/0

====================================================

EIGRP  90  170  cisco公司私有協議
前身 叫 IGRP  內部閘道器路由協議
E enhance  增強的

高階距離向量路由協議

基本配置
自治系統號碼必須一致,才能建立鄰居關係
如果不書寫萬用字元掩碼,那麼宣告的網路範圍將以主類網路為邊界
唯一一個能夠支援非等價負載均衡的協議

R1(config)#router eigrp 90
R1(config-router)#network 192.168.1.1 0.0.0.0
R1(config-router)#end

HQ#
*Oct 28 21:09:08.863: %DUAL-5-NBRCHANGE: EIGRP-IPv4 90: Neighbor 192.168.1.1 (Ethernet0/1) is up: new adjacency

收斂速度快
支援非等價負載均衡
自治系統域內無環
支援VLSM、CIDR
支援增量更新

當到達目的地有多條路徑時,而有多條路徑的metric值一樣,這時就可以做等價
負載均衡
只有eigrp可以做非等價負載均衡,意思是,到達同一目的地有多條路徑,而它們的度量值不一樣時,可以做非等價負載均衡,可以通過設定variance值來進行不等價負載均衡
修改頻寬bandwidth和延遲delay實現

EIGRP的拓撲表  實際上就是動態路由協議的資料庫
HQ#show ip eigrp topology
EIGRP-IPv4 Topology Table for AS(90)/ID(192.168.1.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
      r - reply Status, s - sia Status

P 192.168.1.0/24, 1 successors, FD is 281600
        via Connected, Ethernet0/1
P 172.16.1.0/24, 1 successors, FD is 281600
        via Connected, Ethernet0/0
P 10.1.10.0/24, 1 successors, FD is 307200
        via 192.168.1.1 (307200/281600), Ethernet0/1
P 10.1.20.0/24, 1 successors, FD is 307200
        via 192.168.1.1 (307200/281600), Ethernet

HQ#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(90)
H  Address                Interface              Hold Uptime  SRTT  RTO  Q  Seq
                                                  (sec)        (ms)      Cnt Num
0  192.168.1.1            Et0/1                    12 00:06:14  19  114  0  3

計算度量值需要考慮的因素:
頻寬、延遲、可靠性、負載能力、MTU(最大傳輸單元)
預設情況下,僅僅考慮頻寬、延遲

Branch#sh run | s router eigrp
router eigrp 90
network 10.0.0.0
network 192.168.1.1 0.0.0.0

successors  後繼  下一跳
FD 可行距離  通過這個後繼到達目的地的距離
AD 通告距離  鄰居通告給我的,他到達該字首目的地的距離

排錯:
1、檢查直連線口是否OK
2、檢查自治系統號碼是否一致
3、檢查介面是否使能了路由協議
4、passive介面功能  檢查是否有需要建立鄰居的介面被passive掉了

auto-summary  ---自動彙總功能,將本地直連的路由字首彙總到主類邊界,並將明細路由抑制在本地不更新出去;

D        10.0.0.0/8 is a summary, 00:01:30, Null0
  ----生成一條指向本地路由黑洞的彙總路由




===============================================

廣域網
地理位置分佈相對較遠的網路集合
廣域網是區域網的集合
PPP 點到點協議
HDLC  思科私有的二層封裝協議

T1 1.544Mb/s
E1 2Mb/s

配置PPP封裝
interface Serial1/0
encapsulation ppp

作業:
在Branch和HQ之間部署動態路由協議
要求PC和Server之間能通訊
同時部署OSPF和EIGRP
觀察路由表的現象




來自為知筆記(Wiz)