Új hozzászólás Aktív témák

  • FecoGee

    Topikgazda

    válasz FecoGee #333 üzenetére

    A megoldás - ne olvass tovább, csak ha végeztél!

    Alap EIGRP konfig, tartalmazza:

    - EIGRP 100 AS minden routeren
    - ne legyen auto-summary

    mivel R2 a "központi" router, ezért ott mutatom meg a konfigot.

    R2#sh run | begin router eigrp 100
    router eigrp 100
    network 10.0.0.0 0.0.0.3
    network 10.0.0.4 0.0.0.3
    network 10.0.0.8 0.0.0.3
    no auto-summary

    - md5 authentikáció a routerek között, jelszó: cisco

    key chain fecogeer2
    key 1
    key-string cisco


    interface Serial0/0
    bandwidth 64
    ip address 10.0.0.6 255.255.255.252
    ip authentication mode eigrp 100 md5
    ip authentication key-chain eigrp 100 fecogeer2

    Fontos, hogy a routerek között a key-chain névnek NEM kell egyeznie, csak a kex-stringnek. R3-n pl. fecogee-t konfigoltam key-chain névnek.

    - R2 és R3 között a hello time 10s, a hold-time 50s legyen

    interface Serial0/1
    bandwidth 64
    ip address 10.0.0.9 255.255.255.252
    ip hello-interval eigrp 100 10
    ip hold-time eigrp 100 50

    A két routernek (eltérően az OSPF-től) nem kell azonos hello-hold timereket használnia, a neighborship eltérő értékekkel is összeáll.

    Ha megvan az alap konfig, jöhetnek a finomítások:

    - 10.0.0.17/30 legyen a default network az EIGRP-ben
    - R4 a két loopback címét summarize-ként küldje
    R2-n:
    - R1 felé ne hirdesse a 172.16.30.1/24-es route-t (megoldás: ACL-lel)
    - R5 felé ne hirdesse a 192.168.254.1/24-es route-t (megoldás: route map-pel)
    - R3-tól érkező 172.16.30.1/24-es route ne kerüljön be a routing táblába (megoldás prefix-listával)
    - R5 felé küldött update-ekben adjon minden costhoz 10-et (megoldás: offset-listával)

    - 10.0.0.17/30 legyen a default network az EIGRP-ben

    1.) Két lehetőség van: ip route 0.0.0.0 0.0.0.0 Lo1, majd network 0.0.0.0 eigrp parancs
    2.) ip default-network parancs, azonban itt CLASSFULL networköt kell hirdetni.

    Az elsőt használom:

    R2(config)#ip route 0.0.0.0 0.0.0.0 Lo1
    R2(config)#router eigrp 100
    R2(config-router)#network 0.0.0.0

    R4-en ott is a default route:

    R4#sh ip route
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route

    Gateway of last resort is 10.0.0.13 to network 0.0.0.0

    D 172.16.0.0/16 [90/40640000] via 10.0.0.13, 00:17:32, Serial0/0
    172.18.0.0/24 is subnetted, 2 subnets
    C 172.18.5.0 is directly connected, Loopback2
    C 172.18.1.0 is directly connected, Loopback1
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024000] via 10.0.0.13, 00:17:32, Serial0/0
    C 10.0.0.12 is directly connected, Serial0/0
    D 10.0.0.0 [90/41536000] via 10.0.0.13, 00:17:32, Serial0/0
    D 10.0.0.4 [90/41536000] via 10.0.0.13, 00:17:34, Serial0/0
    D 10.0.0.16 [90/41152000] via 10.0.0.13, 00:01:00, Serial0/0
    D 192.168.254.0/24 [90/41664000] via 10.0.0.13, 00:17:34, Serial0/0
    D 192.168.1.0/24 [90/41664000] via 10.0.0.13, 00:17:34, Serial0/0
    D* 0.0.0.0/0 [90/41152000] via 10.0.0.13, 00:01:00, Serial0/0

    - R4 a két loopback címét summarize-ként küldje

    Itt bizony számolni kell, milyen subnet maskkal tudom summarization route-ként hirdetni az alábbi címeket:

    172.18.1.1/24, 172.18.5.1/24, tehát olyan mask kell, amely (minimum) tartalmazza a 172.18.1.0-172.18.5.255 címeket. Ez CCENT/CCNA anyag, ezért nem írom le a matekot, de a megoldás a 172.18.1.0/21 (255.255.248.0), ezt kell hirdetnünk az S0/0 interface-n:

    R4(config)#int s0/
    R4(config)#int s0/0
    R4(config-if)#ip sum
    R4(config-if)#ip summary-address ei
    R4(config-if)#ip summary-address eigrp 100 172.18.1.0 255.255.248.0
    R4(config-if)#^Z

    R2 routing táblájában már frissült is:

    Előtte:
    R2#sh ip route
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route

    Gateway of last resort is 0.0.0.0 to network 0.0.0.0

    D 172.16.0.0/16 [90/40640000] via 10.0.0.10, 00:21:38, Serial0/1
    172.18.0.0/24 is subnetted, 2 subnets
    D 172.18.5.0 [90/41152000] via 10.0.0.10, 00:16:43, Serial0/1
    D 172.18.1.0 [90/41152000] via 10.0.0.10, 00:16:43, Serial0/1

    10.0.0.0/30 is subnetted, 5 subnets
    C 10.0.0.8 is directly connected, Serial0/1
    D 10.0.0.12 [90/41024000] via 10.0.0.10, 00:18:33, Serial0/1
    C 10.0.0.0 is directly connected, Serial0/2
    C 10.0.0.4 is directly connected, Serial0/0
    C 10.0.0.16 is directly connected, Loopback1
    D 192.168.254.0/24 [90/40640000] via 10.0.0.5, 00:30:09, Serial0/0
    D 192.168.1.0/24 [90/40640000] via 10.0.0.2, 00:19:18, Serial0/2
    S* 0.0.0.0/0 is directly connected, Loopback1

    Utána:

    R2#sh ip route
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route

    Gateway of last resort is 0.0.0.0 to network 0.0.0.0

    D 172.16.0.0/16 [90/40640000] via 10.0.0.10, 00:28:36, Serial0/1
    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41152000] via 10.0.0.10, 00:00:08, Serial0/1

    10.0.0.0/30 is subnetted, 5 subnets
    C 10.0.0.8 is directly connected, Serial0/1
    D 10.0.0.12 [90/41024000] via 10.0.0.10, 00:25:32, Serial0/1
    C 10.0.0.0 is directly connected, Serial0/2
    C 10.0.0.4 is directly connected, Serial0/0
    C 10.0.0.16 is directly connected, Loopback1
    D 192.168.254.0/24 [90/40640000] via 10.0.0.5, 00:37:08, Serial0/0
    D 192.168.1.0/24 [90/40640000] via 10.0.0.2, 00:26:17, Serial0/2
    S* 0.0.0.0/0 is directly connected, Loopback1

    Na és a kedvencem, route filtering.

    - R1 felé ne hirdesse a 172.16.30.1/24-es route-t (megoldás: ACL-lel)

    ACL-nél ugye deny kell a 172.16.30.0 0.0.0.255-re, mert tiltunk egy route-t, minden más permit any-vel megy ki:

    R2#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    R2(config)#access-l
    R2(config)#access-list 1 deny 172.16.30.0 0.0.0.255
    R2(config)#access-list 1 permit any
    R2(config)#router eigrp 100
    R2(config-router)#distri
    R2(config-router)#distribute-list 1 out s0/0
    R2(config-router)#^Z
    R2#
    *Mar 1 00:56:01.071: %SYS-5-CONFIG_I: Configured from console by console
    R2#
    *Mar 1 00:56:09.943: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 10.0.0.5 (Serial0/0) is resync: route configuration changed

    Resync történik R1-gyel, nézzük a route táblát

    előtte:

    D 172.16.0.0/16 [90/41152000] via 10.0.0.6, 00:32:21, Serial0/0
    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41664000] via 10.0.0.6, 00:03:53, Serial0/0
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024000] via 10.0.0.6, 00:38:41, Serial0/0
    D 10.0.0.12 [90/41536000] via 10.0.0.6, 00:29:17, Serial0/0
    D 10.0.0.0 [90/41024000] via 10.0.0.6, 00:31:27, Serial0/0
    C 10.0.0.4 is directly connected, Serial0/0
    D 10.0.0.16 [90/40640000] via 10.0.0.6, 00:10:55, Serial0/0
    C 192.168.254.0/24 is directly connected, Loopback1
    D 192.168.1.0/24 [90/41152000] via 10.0.0.6, 00:30:01, Serial0/0
    D* 0.0.0.0/0 [90/40640000] via 10.0.0.6, 00:10:55, Serial0/0

    utána:

    D 172.16.0.0/16 [90/41152000] via 10.0.0.6, 00:32:21, Serial0/0
    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41664000] via 10.0.0.6, 00:03:53, Serial0/0
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024000] via 10.0.0.6, 00:38:41, Serial0/0
    D 10.0.0.12 [90/41536000] via 10.0.0.6, 00:29:17, Serial0/0
    D 10.0.0.0 [90/41024000] via 10.0.0.6, 00:31:27, Serial0/0
    C 10.0.0.4 is directly connected, Serial0/0
    D 10.0.0.16 [90/40640000] via 10.0.0.6, 00:10:55, Serial0/0
    C 192.168.254.0/24 is directly connected, Loopback1
    D 192.168.1.0/24 [90/41152000] via 10.0.0.6, 00:30:01, Serial0/0
    D* 0.0.0.0/0 [90/40640000] via 10.0.0.6, 00:10:55, Serial0/0

    Nem fogja meg! Ott a route! de miért? Nézzétek csak:

    D 172.16.0.0/16 [90/41152000] via 10.0.0.6, 00:32:21, Serial0/0

    Ez summary route! Egy B osztályú cím, nem C osztályúvá subnetelt cím! Tehát R3-on elfelejtettem bekapcsolni a (C)no auto-summary-t!(/C). Nézzük:

    R3#sh run | begin router eigrp 100
    router eigrp 100
    network 10.0.0.8 0.0.0.3
    network 10.0.0.12 0.0.0.3
    network 172.16.30.0 0.0.0.255
    auto-summary

    Bingó! Bekonfiguráltam, nézzük, ott van-e még a 172.16.x.x route R1-en:

    R1#sh ip route
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route

    Gateway of last resort is 10.0.0.6 to network 0.0.0.0

    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41664000] via 10.0.0.6, 00:10:41, Serial0/0
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024000] via 10.0.0.6, 00:45:29, Serial0/0
    D 10.0.0.12 [90/41536000] via 10.0.0.6, 00:36:05, Serial0/0
    D 10.0.0.0 [90/41024000] via 10.0.0.6, 00:38:15, Serial0/0
    C 10.0.0.4 is directly connected, Serial0/0
    D 10.0.0.16 [90/40640000] via 10.0.0.6, 00:17:41, Serial0/0
    C 192.168.254.0/24 is directly connected, Loopback1
    D 192.168.1.0/24 [90/41152000] via 10.0.0.6, 00:36:50, Serial0/0
    D* 0.0.0.0/0 [90/40640000] via 10.0.0.6, 00:17:44, Serial0/0
    R1#sh ip route 172.16.30.0
    % Network not in table
    R1#sh ip route 172.16.0.0
    % Network not in table

    Nincs! Tehát működik a filtering. Egy kis tshoot is kellett hozzá :)

    - R5 felé ne hirdesse a 192.168.254.1/24-es route-t (megoldás: route map-pel)

    Oké, route map. Hivatkozik egy ip prefix-listára, amelyben permit amit szűrünk, és a route map-nél tiltjuk.

    R2(config)#ip prefix-list R5 seq 5 permit 192.168.254.0/24
    R2(config)#route-map R5fele deny 5
    R2(config-route-map)#match ip add prefix R5
    R2(config-route-map)#route-map R5fele permit 10
    R2(config-route-map)#exit
    R2(config)#router eigrp 100
    R2(config-router)#distribute-list route-map R5fele out s0/2

    R5 route táblája előtte:

    Gateway of last resort is 10.0.0.1 to network 0.0.0.0

    172.16.0.0/24 is subnetted, 1 subnets
    D 172.16.30.0 [90/41152000] via 10.0.0.1, 00:06:56, Serial0/0
    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41664000] via 10.0.0.1, 00:15:22, Serial0/0
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024000] via 10.0.0.1, 00:41:28, Serial0/0
    D 10.0.0.12 [90/41536000] via 10.0.0.1, 00:40:46, Serial0/0
    C 10.0.0.0 is directly connected, Serial0/0
    D 10.0.0.4 [90/41024000] via 10.0.0.1, 00:41:28, Serial0/0
    D 10.0.0.16 [90/40640000] via 10.0.0.1, 00:22:25, Serial0/0
    D 192.168.254.0/24 [90/41152000] via 10.0.0.1, 00:41:31, Serial0/0
    C 192.168.1.0/24 is directly connected, Loopback1
    D* 0.0.0.0/0 [90/40640000] via 10.0.0.1, 00:22:25, Serial0/0
    R5#sh ip route 192.168.254.0
    Routing entry for 192.168.254.0/24
    Known via "eigrp 100", distance 90, metric 41152000, type internal
    Redistributing via eigrp 100
    Last update from 10.0.0.1 on Serial0/0, 00:41:38 ago
    Routing Descriptor Blocks:
    * 10.0.0.1, from 10.0.0.1, 00:41:38 ago, via Serial0/0
    Route metric is 41152000, traffic share count is 1
    Total delay is 45000 microseconds, minimum bandwidth is 64 Kbit
    Reliability 255/255, minimum MTU 1500 bytes
    Loading 1/255, Hops 2

    Utána:

    R5#sh ip route
    Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route

    Gateway of last resort is 10.0.0.1 to network 0.0.0.0

    172.16.0.0/24 is subnetted, 1 subnets
    D 172.16.30.0 [90/41152000] via 10.0.0.1, 00:00:08, Serial0/0
    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41664000] via 10.0.0.1, 00:00:08, Serial0/0
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024000] via 10.0.0.1, 00:00:08, Serial0/0
    D 10.0.0.12 [90/41536000] via 10.0.0.1, 00:00:08, Serial0/0
    C 10.0.0.0 is directly connected, Serial0/0
    D 10.0.0.4 [90/41024000] via 10.0.0.1, 00:00:08, Serial0/0
    D 10.0.0.16 [90/40640000] via 10.0.0.1, 00:00:12, Serial0/0
    C 192.168.1.0/24 is directly connected, Loopback1
    D* 0.0.0.0/0 [90/40640000] via 10.0.0.1, 00:00:12, Serial0/0
    R5#sh ip route 192.168.254.0
    % Network not in table

    Ez is működik!

    - R3-tól érkező 172.16.30.1/24-es route ne kerüljön be a routing táblába (megoldás prefix-listával)

    Oké, prefix-listánál deny, amit szűrünk, minden más (0.0.0.0/0 le 32) permit.

    A konfig:

    R2(config)#ip prefix-list R3felol seq 5 deny 172.16.30.0/24
    R2(config)#ip prefiy
    R2(config)#ip prefix
    R2(config)#ip prefix-list R3felol seq 10 permit 0.0.0.0/0 le 32
    R2(config)#router eigrp 100
    R2(config-router)#distr
    R2(config-router)#distribute-list p
    R2(config-router)#distribute-list prefix R3felol i
    R2(config-router)#distribute-list prefix R3felol in s0/1
    R2(config-router)#^Z

    Nézzük R2 route tábláját:

    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41152000] via 10.0.0.10, 00:25:32, Serial0/1
    10.0.0.0/30 is subnetted, 5 subnets
    C 10.0.0.8 is directly connected, Serial0/1
    D 10.0.0.12 [90/41024000] via 10.0.0.10, 00:50:55, Serial0/1
    C 10.0.0.0 is directly connected, Serial0/2
    C 10.0.0.4 is directly connected, Serial0/0
    C 10.0.0.16 is directly connected, Loopback1
    D 192.168.254.0/24 [90/40640000] via 10.0.0.5, 01:02:28, Serial0/0
    D 192.168.1.0/24 [90/40640000] via 10.0.0.2, 00:51:40, Serial0/2
    S* 0.0.0.0/0 is directly connected, Loopback1
    R2#sh ip route 172.16.30.0
    % Network not in table

    Nyilván R1 és R5 sem kapja meg a route-ot, mivel R2 hirdette nekik. Ebben a topológiában nem megoldható, hogy ők kapjanak route-t (marad a statikus route).

    - R5 felé küldött update-ekben adjon minden costhoz 10-et (megoldás: offset-listával)

    Offset lista: egy ACL-re hivatkozik.

    A konfig:

    R2(config)#access-list 2 permit any
    R2(config-if)#exit
    R2(config)#router eigrp 100
    R2(config-router)#offset-list 2 out 10 s0/2
    R2(config-router)#^Z

    R5 routing táblája előtte:

    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41664000] via 10.0.0.1, 00:06:15, Serial0/0
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024000] via 10.0.0.1, 00:06:15, Serial0/0
    D 10.0.0.12 [90/41536000] via 10.0.0.1, 00:06:15, Serial0/0
    C 10.0.0.0 is directly connected, Serial0/0
    D 10.0.0.4 [90/41024000] via 10.0.0.1, 00:06:15, Serial0/0
    D 10.0.0.16 [90/40640000] via 10.0.0.1, 00:06:15, Serial0/0
    C 192.168.1.0/24 is directly connected, Loopback1
    D* 0.0.0.0/0 [90/40640000] via 10.0.0.1, 00:06:19, Serial0/0

    Utána:

    172.18.0.0/21 is subnetted, 1 subnets
    D 172.18.0.0 [90/41664010] via 10.0.0.1, 00:01:08, Serial0/0
    10.0.0.0/30 is subnetted, 5 subnets
    D 10.0.0.8 [90/41024010] via 10.0.0.1, 00:01:08, Serial0/0
    D 10.0.0.12 [90/41536010] via 10.0.0.1, 00:01:08, Serial0/0
    C 10.0.0.0 is directly connected, Serial0/0
    D 10.0.0.4 [90/41024010] via 10.0.0.1, 00:01:08, Serial0/0
    D 10.0.0.16 [90/40640010] via 10.0.0.1, 00:01:08, Serial0/0
    C 192.168.1.0/24 is directly connected, Loopback1
    D* 0.0.0.0/0 [90/40640010] via 10.0.0.1, 00:01:12, Serial0/0

    Látható, hogy minden érték 10-zel nőtt.

    A megoldott feladat letölthető innen:

    [link]

    Nem mentem bele ACL, prefix-lsita, route-map, offset list szabályaiba mélyen, de ha van kérdés, bátran tegyétek fel, beszéljük meg!

    (megjegyzés: kommentekkel egy a feladat 1 óra 20 percet vett igénybe).

Új hozzászólás Aktív témák

Hirdetés