I detta exempel analyseras hur EIGRP fungerar. Routrarna är modellen 1941 därför följande:
- Loopback interface för varje router konfigureras som LAN och deras IP-adress blir routrarnas RID
- Ingen konfiguration gällande auto-summary
- Kommandot network <destinations nätverk> <wildcard mask> används
- Vi kommer att analysera funktionen route summarization
- En statisk default route ska konfigureras på router R2
- Från ISP till R2 en supernet route ska konfigureras
- Metric ska räknas ut på länken mellan R1 och R2. Observera att först används default värden för BW och DLY. Därefter ändras BW till anpassade värden ( 64, 1024, och 1544 kbps) och metric räknas ut igen.
Det uppstår skillnader i IOS kommando och därmed konfigurationer beroende på IOS versioner och router modeller. IOS 12 och äldre routrar exempelvis 1841 har annorlunda beteende än routrar 1941 som kör IOS 15.
Det är känd att EIGRP är ett distansvektor routing protokoll som stödjer classful och classless routing. Normalt är inaktiverat classful funktionen som aggregerar vägar (route summary) därmed behöver man inte exekvera kommandot no auto-summary. Detta gäller för routrar 1941 och uppåt eller för routrar som kör IOS version 15.
Verifieringar
- Router# show ip route eigrp
- Router# show ip eigrp interfaces
- Router# show ip protocols
- Router# show ip eigrp neighbors
- Router# show ip eigrp topology
- Router# show ip eigrp traffic
Nätverkstopologi
Konfigurationer – Standard BW
- Router>enable
- Router#configure terminal
- Router(config)#hostname R1
- R1(config)#no ip domain-lookup
- R1(config)#enable secret ensecPa55#
- R1(config)#service password-encryption
- R1(config)#banner motd "This is a secure system. Autorized Access Only!"
- R1(config)#line console 0
- R1(config-line)#password conPa55#
- R1(config-line)#login
- R1(config-line)#logging synchronous
- R1(config-line)#exit
- R1(config)#line vty 0 4
- R1(config-line)#password vtyPa55#
- R1(config-line)#login
- R1(config-line)#logging synchronous
- R1(config-line)#exit
- R1(config)#int s0/0/0
- R1(config-if)#description To R2
- R1(config-if)#ip address 172.16.3.1 255.255.255.252
- R1(config-if)#no shut
- R1(config-if)#exit
- R1(config)#int s0/0/1
- R1(config-if)#description To R3
- R1(config-if)#ip address 192.168.10.5 255.255.255.252
- R1(config-if)#no shut
- R1(config-if)#exit
- R1(config)#int lo1
- R1(config-if)#ip address 172.16.1.1 255.255.255.0
- R1(config-if)#no shut
- R1(config-if)#end
- R1#show ip int br
- R1#show version
- R1#copy running-config startup-config
- Router>enable
- Router#configure table
- Router(config)#hostname R2
- R2(config)#no ip domain-lookup
- R2(config)#enable secret ensecPa55#
- R2(config)#service password-encryption
- R2(config)#banner motd "This is a secure system. Autorized Access Only!"
- R2(config)#line console 0
- R2(config-line)#password conPa55#
- R2(config-line)#login
- R2(config-line)#logging synchronous
- R2(config-line)#exit
- R2(config)#line vty 0 4
- R2(config-line)#password vtyPa55#
- R2(config-line)#login
- R2(config-line)#logging synchronous
- R2(config-line)#exit
- R2(config)#int s0/0/0
- R2(config-if)#description To R1
- R2(config-if)#clock rate 2000000
- R2(config-if)#ip address 172.16.3.2 255.255.255.252
- R2(config-if)#no shut
- R2(config-if)#exit
- R2(config)#int lo1
- R2(config-if)#ip address 172.16.2.1 255.255.255.0
- R2(config-if)#no shut
- R2(config-if)#exit
- R2(config)#int s0/0/1
- R2(config-if)#description To R3
- R2(config-if)#clock rate 2000000
- R2(config-if)#ip address 192.168.10.9 255.255.255.252
- R2(config-if)#no shut
- R2(config-if)#exit
- R2(config)#int s0/1/0
- R2(config-if)#description To ISP
- R2(config-if)#ip address 209.165.200.224 255.255.255.224
- R2(config-if)#no shut
- R2(config-if)#end
- R2#copy running-config startup-config
- R2#show ip int br
- R2#show version
- Router>enable
- Router#configure table
- Router(config)#hostname R3
- R3(config)#no ip domain-lookup
- R3(config)#enable secret ensecPa55#
- R3(config)#service password-encryption
- R3(config)#banner motd "This is a secure system. Autorized Access Only!"
- R3(config)#line console 0
- R3(config-line)#password conPa55#
- R3(config-line)#login
- R3(config-line)#logging synchronous
- R3(config-line)#exit
- R3(config)#line vty 0 4
- R3(config-line)#password vtyPa55#
- R3(config-line)#login
- R3(config-line)#logging synchronous
- R3(config-line)#exit
- R3(config)#int s0/0/1
- R3(config-if)#description To R2
- R3(config-if)#ip address 192.168.10.10 255.255.255.252
- R3(config-if)#no shut
- R3(config-if)#exit
- R3(config)#int lo1
- R3(config-if)#ip address 192.168.1.1 255.255.255.0
- R3(config-if)#no shut
- R3(config-if)#exit
- R3(config)#int s0/0/0
- R3(config-if)#description To R1
- R3(config-if)#clock rate 2000000
- R3(config-if)#ip address 192.168.10.6 255.255.255.252
- R3(config-if)#no shut
- R3(config-if)#end
- R3#copy running-config startup-config
- R3#show ip int br
- R3#show version
- Router>enable
- Router#conf t
- Enter configuration commands, one per line. End with CNTL/Z.
- Router(config)#hostname ISP
- ISP(config-if)#int s0/0/0
- ISP(config-if)#clock rate 128000
- ISP(config-if)#ip address 209.165.200.254 255.255.255.224
- ISP(config-if)#no shut
- ISP(config-if)#exit
- ISP(config)#int g0/1
- ISP(config-if)#ip address 8.8.8.1 255.255.255.240
- ISP(config-if)#no shut
- ISP(config-if)#end
- ISP#copy running-config startup-config
- ISP#show ip int br
- ISP#show version
- R1(config)#router eigrp 10
- R1(configrouter)#network 172.16.1.0 0.0.0.255
- R1(configrouter)#network 172.16.3.0 0.0.0.3
- R1(configrouter)#network 192.168.10.4 0.0.0.3
- R1(configrouter)#end
- R1#
- R2(config)#router eigrp 10
- R2(configrouter)#network 172.16.2.0 0.0.0.255
- R2(configrouter)#network 172.16.3.0 0.0.0.3
- R2(configrouter)#network 192.168.10.8 0.0.0.3
- R2(configrouter)#end
- R2#
- R3(config)#router eigrp 10
- R3(configrouter)#network 192.168.1.0 0.0.0.255
- R3(configrouter)#network 192.168.10.4 0.0.0.3
- R3(configrouter)#network 192.168.10.8 0.0.0.3
- R3(configrouter)#end
- R3
Metric-beräkning från router R1 till destination (172.16.2.0 /24)
- R1#show interface s0/0/0
- BW 1544 kbps
- DLY 20000 (10)mikrosek.
- R2#show interface Loopback 1
- BW 8000000
- DLY 5000
- BW beräkning:
- BW = 10 000 000/1544 = 6476,683938
- BW = 6476 * 256 = 1657856
- DLY = ((20000/10) + (5000/10)) * 256=
- DLY = (2000 + 500) * 256 = 2500 * 256 = 640000
- METRIC = 1657856 + 640000
- METRIC = 2297856
- R2(config)#ip route 0.0.0.0 0.0.0.0 209.165.200.254
R2(config)#router eigrp 10
R2(config-router)#redistribute static
R2(config-router)#end
R2#
Först behöver vi aggregera destinationsnätverk:
Destination | Prefix | Tredje oktett | Fjärde oktett |
172.16.1.0 | 24 | 0000 0001 | |
172.16.2.0 | 24 | 0000 0010 | |
172.16.3.0 | 30 | 0000 0011 | |
172.16.0.0 | 22 | ||
192.168.10.4 | 30 | 0000 0100 | |
192.168.10.8 | 30 | 0000 1000 | |
192.168.10.0 | 28 | ||
Nu konfigurerar vi routing:
- ISP(config)#ip route 172.16.0.0 255.255.252.0 209.165.200.225
- ISP(config)#ip route 192.168.10.0 255.255.255.240 209.165.200.225
- ISP(config)#ip route 192.168.1.0 255.255.255.0 209.165.200.225
Konfigurationer – Anpassade BW
Här ändras default bandwidth för seriella länkar (1544 kbps) till 64 kbps. Det medför ändringar i metric-värde och routing-tabellen. Med default bandwidth anges den bästa vägen från R1 till 172.16.2.0 /24 nätverk via R2 S0/0/0 med ett metric på 2297856. Efter att ha ändrat från 1544 till 64 kbps kommer inte längre att bli den bästa vägen via R2 och metric ändrar sig till 2809856, det vill säga högre kostnad.
- R1(config)#interface s0/0/0
- R1(config-if)#bandwidth 64
- R1(config-if)#end
- R1#show ip route eigrp
- R2(config)#interface s0/0/0
- R2(config-if)#bandwidth 64
- R2(config-if)#end
- R2#show ip route eigrp
Metric-beräkning från router R1 till destination (172.16.2.0 /24) via R2 s0/0/0
- R1#show interface s0/0/0
- BW 64 kbps
- DLY 20000 (10) mikrosek.
- R2#show interface Loopback 1
- BW 8000000
- DLY 5000
- BW beräkning:
- BW = 10 000 000/64 = 156250
- BW = 156250 * 256 = 40000000
- DLY = ((20000/10) + (5000/10)) * 256=
- DLY = (2000 + 500) * 256 = 2500 * 256 = 640000
- METRIC = 40000000 + 640000
- METRIC = 40640000
- Alldeles för högt värde och därför inte längre aktuellt.
- Kommandot show ip route eigrp visar att nu den bästa vägen går via R3 s0/0/0 med en metric på 2809856!
- R1#show interface s0/0/1
- BW 1544 kbps
- DLY 20000 (10) mikrosek.
- R3#show interface s0/0/1
- BW 1544 kbps
- DLY 20000 (10) mikrosek.
- R2#show interface Loopback 1
- BW 8000000
- DLY 5000
- BW beräkning:
- BW = 10 000 000/1544 = 6476,683938
- BW = 6476 * 256 = 1657856
- DLY = ((20000/10) + (20000/10) + (5000/10)) * 256=
- DLY = (2000 + 2000 + 500) * 256 = 4500 * 256 = 1152000
- METRIC = 1657856 + 1152000
- METRIC = 2809856