控制層面的幾種參數:
AD的作用:
1、用來比較路由的優劣,小的放進路由表
METRIC的作用
1、用來比較路由條目的優劣,小的放進路由表
數據層面:
1、DIP與路由條目的掩碼做與操作
如果結果與路由前綴相同的
2、最長匹配原則
EIGRP:
1、IGP
2、設計原理,高級DV協議
3、無類協議 classless
4、封裝,直接封裝在IP協議中,協議字段號88,組播地址爲:224.0.0.10
5、收斂很快
6、支持VLSM,CIDR,不連續子網
7、增量更新partial updates
8、支持多種網絡層協議
9、組播和單播替代了廣播協議
10、支持手動彙總
11、百分百無環
12、支持非等價負載均衡
鄰居表:
下一跳路由 接口
拓撲表:
網絡前綴 FD/AD
路由表:
網絡前綴 最好的路徑
FD:可行性距離
到達目的網絡的metric
AD:通告距離
鄰居到達目標網絡的metric
FD小的放進路由表
EIGRP報文
1、hello 用來建立鄰居
2、update 更新報文 需要ACK確認
3、query 查詢報文 需要ACK確認
4、reply 回覆查詢報文 需要ACK確認
5、ack 確認可靠報文報文
EIGRP的metric
1、帶寬 K1 路徑中帶寬最小的
2、負載 K2 路徑中最大的
3、延遲 K3 路徑的總和
4、可靠性 K4 路徑中的最小的
5、MTU K5 路徑中最小的
默認,帶寬和延遲有關
metric=bandwidth+delay
256*(10^7/bw+dly/10)帶寬的單位是kbps,延遲us微妙
通過show interface 來查看
實驗部分:
1、預配
R1:
interface s1/0
ip address 12.1.1.1 255.255.255.0
no shut
interface lo0
ip address 1.1.1.1 255.255.255.0
no shut
R2:
interface s1/1
clock rate 14400
ip address 12.1.1.2 255.255.255.0
no shut
interface s1/0
clock rate 14400
ip address 23.1.1.2 255.255.255.0
no shut
interface lo0
ip address 2.2.2.2 255.255.255.0
no shut
R3:
interface s1/1
ip address 23.1.1.3 255.255.255.0
no shut
interface lo0
ip address 3.3.3.3 255.255.255.0
no shut
2、配置路由協議
R1:
router eigrp 90 90就是AS號
network 12.1.1.0 0.0.0.255
network 1.1.1.0 0.0.0.255
eigrp router-id 1.1.1.1
R2:
router eigrp 90 這個AS號必須是相同的
network 12.1.1.2 0.0.0.0
network 23.1.1.2 0.0.0.0
network 2.2.2.2 0.0.0.0
eigrp router-id 2.2.2.2
R3:
router eigrp 90
network 23.1.1.0 0.0.0.255
network 3.3.3.0 0.0.0.255
eigrp router-id 3.3.3.3
3、驗證配置結果
show ip eigrp interfaces查看哪些接口運行了EIGRP
R3#show ip eigrp interfaces
IP-EIGRP interfaces for process 90
Xmit Queue Mean Pacing Time Multicast Pending
Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
Se1/1 1 0/0 32 0/15 127 0
Lo0 0 0/0 0 0/1 0 0
show ip eigrp neighbors
R3#show ip eigrp neighbors
IP-EIGRP neighbors for process 90
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 23.1.1.2 Se1/1 11 00:25:29 32 200 0 37
H就是說明建立鄰居的順序,如果前面還有一個1的話,說明是剛在0之後建立的一個鄰居
address,就是對端鄰居的IP地址
interface,是本地對鄰居的接口
holdtime,默認是hello時間的3倍
查看hello時間命令:show ip eigrp interface detail s1/0
R1#show ip eigrp interfaces detail s1/0
IP-EIGRP interfaces for process 90
Xmit Queue Mean Pacing Time Multicast Pending
Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
Se1/0 1 0/0 44 0/24 208 0
Hello interval is 5 sec
Next xmit serial <none>
Un/reliable mcasts: 0/0 Un/reliable ucasts: 35/43
Mcast exceptions: 0 CR packets: 0 ACKs suppressed: 29
Retransmissions sent: 0 Out-of-sequence rcvd: 8
Authentication mode is not set
Use unicast
SRTT,smooth round-trip timer 平滑往返時間,發送報文到收到ack報文的時間,單位毫秒ms
RTO,重傳超時計時器,2-16次重傳的計時器,經過16次重傳後,重置鄰居關係,單位毫秒ms
Multicast flow timer:第一次重傳是用多播,第一次重傳的計時器
建立EIGRP鄰居的三個條件:
1、相同的AS號,router eigrp as號
2、相同的K值
3、相同的驗證密碼
4、不同的RID
EIGRP默認auto-summary,會把本地接口彙總,並指向null0
R3#show ip route eigrp (前提是R1和R2關閉了auto-summary)
1.0.0.0/24 is subnetted, 1 subnets
D 1.1.1.0 [90/2809856] via 23.1.1.2, 00:00:47, Serial1/1
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 23.1.1.2, 00:00:47, Serial1/1
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D 3.0.0.0/8 is a summary, 00:00:47, Null0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D 23.0.0.0/8 is a summary, 00:00:47, Null0
12.0.0.0/24 is subnetted, 1 subnets
D 12.1.1.0 [90/2681856] via 23.1.1.2, 00:00:47, Serial1/1
從上面的結果來看,設備只能自動彙總本地直連接口路由,而不能彙總學習到的路由
學習到的路由是對端設備彙總後發送過來的
FD的計算:計算的是路由流向的入接口的帶寬和延遲
舉例
R1#show ip route eigrp
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 12.1.1.2, 00:23:27, Serial1/0
D 3.0.0.0/8 [90/2809856] via 12.1.1.2, 00:23:27, Serial1/0
23.0.0.0/24 is subnetted, 1 subnets
D 23.1.1.0 [90/2681856] via 12.1.1.2, 00:23:27, Serial1/0
計算紅色的路由條目的FD
1、show interface 路由流向的所有入接口
這裏是R1的s1/0,R2的s1/0,R3的lo0
R1#show interfaces s1/0
Serial1/0 is up, line protocol is up
Hardware is M4T
Internet address is 12.1.1.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
R2#show interfaces s1/0
Serial1/0 is up, line protocol is up
Hardware is M4T
Internet address is 23.1.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
R3#show interfaces lo0
Loopback0 is up, line protocol is up
Hardware is Loopback
Internet address is 3.3.3.3/24
MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,
路徑帶寬最小值是1544kbps
路徑延時總和=20000+20000+5000
metric=256*(10^7/1544+45000/10)=2809856,是一樣的吧!
10^7/1544=6476.68不能四捨五入=6476
bandwidth 管理帶寬和物理接口帶寬無關係
修改帶寬,改變FD值
改變R1的s1/0的帶寬爲1000kbps
R1:
interface s1/0
bandwidth 1000
看看結果
clear ip eigrp neighbor 清除EIGRP鄰居關係
R1#show ip route eigrp
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/3200000] via 12.1.1.2, 00:00:22, Serial1/0
D 3.0.0.0/8 [90/3712000] via 12.1.1.2, 00:00:22, Serial1/0
23.0.0.0/24 is subnetted, 1 subnets
D 23.1.1.0 [90/3584000] via 12.1.1.2, 00:00:22, Serial1/0
通過計算我們還是可以得到上面的值的
metric weights 0 1 1 1 0 0 修改K值,在路由進程下
ip hello-interval eigrp 90 時間 ,在接口模式下修改hello時間,holdtime不會自動修改
ip hold-time eigrp 90 時間 ,修改holdtime
metric={(k1*BW)+((k2*BW)/(256-load))+k3*delay}
if k5!=0
metric=metric*[k5/(reliability+k4)]
然後metric=256*metric