Xin chào ! Nếu đây là lần đầu tiên bạn đến với diễn đàn, xin vui lòng danh ra một phút bấm vào đây để đăng kí và tham gia thảo luận cùng VnPro.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lab EIGRP 1

    LAB 1.1: Cấu hình EIGRP cơ bản

    1. Yêu cầu
    • Cấu hình EIGRP trên các cổng (interface).
    • Sử dụng câu lệnh “bandwidth” để giới hạn băng thông EIGRP.
    • Xác nhận láng giềng kề cận EIGRP.
    • Xác nhận trao đổi các thông tin định tuyến EIGRP.
    • Sử dụng lệnh debug để kiểm tra hoạt động của EIGRP.
    • Kiểm tra sự hội tụ khi có thay đổi trong mạng.
    2. Mô hình

    Click image for larger version

Name:	dataurl533563.gif
Views:	13
Size:	15.5 KB
ID:	430171
    Hình 1.1 3. Mô tả lab

    Các thiết bị đã được lắp đặt và được nối bằng cáp Ethernet và cáp Serial. Định tuyến EIGRP, đảm bảo các địa chỉ thấy nhau từng đôi một. Bước 1: Gán địa chỉ

    Sử dụng địa chỉ theo như mô hình, gán địa chỉ IP cho các cổng Fast Ethernet của R1, R2 và R3. Sau đó, tạo thêm Loopback1 trên R1, Loopback2 trên R2, Loopback3 trên R3, và đặt địa chỉ như trên sơ đồ hình 1.1.

    R1#configure terminal
    R1(config)# interface Loopback1
    R1(config-if)# description Engineering Department
    R1(config-if)# ip address 10.1.1.1 255.255.255.0
    R1(config-if)# exit
    R1(config)# interface FastEthernet0/0
    R1(config-if)# ip address 10.1.100.1 255.255.255.0

    R2#configure terminal
    R2(config)# interface Loopback2
    R2(config-if)# description Marketing Department
    R2(config-if)# ip address 10.1.2.1 255.255.255.0
    R2(config-if)# exit
    R2(config)# interface FastEthernet0/0
    R2(config-if)# ip address 10.1.100.2 255.255.255.0

    R3#configure terminal
    R3(config)# interface Loopback3
    R3(config-if)# description Accounting Department
    R3(config-if)# ip address 10.1.3.1 255.255.255.0
    R3(config-if)# exit
    R3(config)# interface FastEthernet0/0
    R3(config-if)# ip address 10.1.100.3 255.255.255.0


    Switch để ở cấu hình mặc định, vì mặc định tất cả các port của switch thuộc VLAN1 và các cổng đã được bật, không cần lệnh “no shutdown”. Lúc này, tạm thời không cấu hình cho cổng Serial của R1 và R2. Bước 2: Cấu hình định tuyến EIGRP

    Sau khi gán xong địa chỉ IP, chạy định tuyến EIGRP trên R1:

    R1(config)# router eigrp 1
    R1(config-router)# network 10.0.0.0


    Sau khi bật EIGRP, router gửi gói tin Hello ra các cổng Fast Ethernet và Loopback. Để kiểm tra quá trình này, ta dùng lệnh “debug eigrp packets”:

    R1#debug eigrp packets
    *Sep 25 21:27:09.547: EIGRP: Sending HELLO on Loopback1
    *Sep 25 21:27:09.547: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
    *Sep 25 21:27:09.547: EIGRP: Received HELLO on Loopback1 nbr 10.1.1.1
    *Sep 25 21:27:09.547: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
    *Sep 25 21:27:09.547: EIGRP: Packet from ourselves ignored
    *Sep 25 21:27:10.203: EIGRP: Sending HELLO on FastEthernet0/0
    *Sep 25 21:27:10.203: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0

    Và tắt debug:

    R1#undebug all

    Nhưng các gói tin Hello sẽ không được trả lời vì EIGRP chưa được chạy trên R2 và R3. R1 bỏ qua gói tin Hello trên cổng Loopback của nó.
    Để biết những cổng nào đã được tham gia vào tiến trình định tuyến EIGRP trên router này, ta sử dụng lệnh “show ip eigrp interfaces” để xem cổng nào tham gia vào định tuyến EIGRP:

    R1#show ip eigrp interfaces
    IP-EIGRP interfaces for process 1
    Xmit Queue Mean Pacing Time Multicast Pending
    Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
    Fa0/0 0 0/0 0 0/1 0 0
    Lo1 0 0/0 0 0/1 0 0

    Để thấy quá trình thiết lập láng giềng giữa R1 và R2, sử dụng lệnh “debug eigrp packets”. Trên R2, ta cấu hình tương tự như R1: chạy EIGRP AS 1, và quảng bá mạng 10.0.0.0/8. Khi debug trên R2, kết quả xuất ra như sau:

    R2#debug eigrp packets
    EIGRP Packets debugging is on
    (UPDATE, REQUEST, QUERY, REPLY, HELLO, IPXSAP, PROBE, ACK, STUB, SIAQUERY, SIAREPLY)

    R2#configure terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    R2(config)#router eigrp 1
    R2(config-router)#network 10.0.0.0
    R2(config-router)#
    *Sep 25 20:32:28.427: EIGRP: Sending HELLO on FastEthernet0/0
    *Sep 25 20:32:28.427: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
    *Sep 25 20:32:28.431: EIGRP: Received HELLO on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.431: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
    *Sep 25 20:32:28.431: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.1.100.1

    (FastEthernet0/0) is up: new adjacency
    *Sep 25 20:32:28.431: EIGRP: Enqueueing UPDATE on FastEthernet0/0 nbr
    10.1.100.1 iidbQ un/rely 0/1 peerQ un/rely 0/0
    *Sep 25 20:32:28.435: EIGRP: Received UPDATE on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.435: AS 1, Flags 0x1, Seq 1/0 idbQ 0/0 iidbQ un/rely 0/1 peerQ un/rely 0/0
    *Sep 25 20:32:28.435: EIGRP: Requeued unicast on FastEthernet0/0
    *Sep 25 20:32:28.435: EIGRP: Sending HELLO on FastEthernet0/0
    *Sep 25 20:32:28.435: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
    *Sep 25 20:32:28.439: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.439: AS 1, Flags 0x1, Seq 1/1 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1
    *Sep 25 20:32:28.443: EIGRP: Received UPDATE on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.443: AS 1, Flags 0x8, Seq 2/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1
    *Sep 25 20:32:28.447: EIGRP: Received ACK on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.447: AS 1, Flags 0x0, Seq 0/1 idbQ 0/0 iidbQ un/rely 0/0 un/rely 0/1
    *Sep 25 20:32:28.447: EIGRP: Enqueueing UPDATE on FastEthernet0/0 nbr 10.1.100.1 iidbQ un/rely 0/1 peerQ un/rely 0/0 serno 1-2
    *Sep 25 20:32:28.451: EIGRP: Requeued unicast on FastEthernet0/0
    *Sep 25 20:32:28.455: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.455: AS 1, Flags 0x8, Seq 2/2 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 1-2
    *Sep 25 20:32:28.455: EIGRP: Enqueueing UPDATE on FastEthernet0/0 iidbQ un/rely 0/1 serno 3-3
    *Sep 25 20:32:28.455: EIGRP: Received UPDATE on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.455: AS 1, Flags 0x8, Seq 3/1 idbQ 0/0 iidbQ un/rely 0/1 peerQ un/rely 0/1
    *Sep 25 20:32:28.455: EIGRP: Enqueueing ACK on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.455: Ack seq 3 iidbQ un/rely 0/1 peerQ un/rely 1/1
    *Sep 25 20:32:28.459: EIGRP: Received ACK on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.459: AS 1, Flags 0x0, Seq 0/2 idbQ 0/0 iidbQ un/rely 0/1 peerQ un/rely 1/1
    *Sep 25 20:32:28.467: EIGRP: Forcing multicast xmit on FastEthernet0/0
    *Sep 25 20:32:28.467: EIGRP: Sending UPDATE on FastEthernet0/0

    *Sep 25 20:32:28.467: AS 1, Flags 0x0, Seq 3/0 idbQ 0/0 iidbQ un/rely 0/0 serno 3-3
    *Sep 25 20:32:28.471: EIGRP: Received ACK on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.471: AS 1, Flags 0x0, Seq 0/3 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 1/1
    *Sep 25 20:32:28.471: EIGRP: FastEthernet0/0 multicast flow blocking cleared
    *Sep 25 20:32:28.479: EIGRP: Sending ACK on FastEthernet0/0 nbr 10.1.100.1
    *Sep 25 20:32:28.479: AS 1, Flags 0x0, Seq 0/3 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 1/0


    Trong kết quả xuất, xuất hiện các gói tin EIGRP: Hello, Update và ACK. Vì EIGRP sử dụng RTP (Reliable Transport Protocol), những gói tin Update sẽ được hồi đáp bằng những gói tin ACK.
    Cấu hình định tuyến trên R3 tương tự như trên R1 và R2:

    R3(config)# router eigrp 1
    R3(config-router)# network 10.0.0.0

    Bước 3: Kiểm tra cấu hình EIGRP

    Khi R3 đã cấu hình xong, dùng lệnh “show ip eigrp neighbors” trên mỗi router, nếu cấu hình đúng, ta sẽ thấy có 2 láng giềng trên mỗi router.

    R1#show ip eigrp neighbors
    IP-EIGRP neighbors for process 1
    H Address Interface Hold Uptime SRTT RTO Q Seq
    (sec) (ms) Cnt Num
    1 10.1.100.3 Fa0/0 10 00:00:17 1 200 0 7
    0 10.1.100.2 Fa0/0 11 00:02:01 5 200 0 6
    R2#sh ip eigrp neighbors
    IP-EIGRP neighbors for process 1
    H Address Interface Hold Uptime SRTT RTO Q Seq
    (sec) (ms) Cnt Num
    1 10.1.100.3 Fa0/0 13 00:00:56 1 200 0 7
    0 10.1.100.1 Fa0/0 12 00:02:40 1 200 0 47
    R3#sh ip eigrp neighbors
    IP-EIGRP neighbors for process 1
    H Address Interface Hold Uptime SRTT RTO Q Seq
    (sec) (ms) Cnt Num
    1 10.1.100.2 Fa0/0 11 00:01:21 819 4914 0 6
    0 10.1.100.1 Fa0/0 11 00:01:21 2 200 0 47

    Ta kiểm tra các route EIGRP đã được quảng bá cho nhau bởi các router bằng lệnh “show ip eigrp topology”:

    R1#show ip eigrp topology
    IP-EIGRP Topology Table for AS(1)/ID(10.1.1.1)
    Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
    r - reply Status, s - sia Status
    P 10.1.3.0/24, 1 successors, FD is 156160
    via 10.1.100.3 (156160/128256), FastEthernet0/0
    P 10.1.2.0/24, 1 successors, FD is 156160
    via 10.1.100.2 (156160/128256), FastEthernet0/0
    P 10.1.1.0/24, 1 successors, FD is 128256
    via Connected, Loopback1
    P 10.1.100.0/24, 1 successors, FD is 28160
    via Connected, FastEthernet0/0

    Để xem những đường đi tốt nhất đi đến mạng đích, dùng lệnh “show ip route eigrp”:

    R1#show ip route eigrp
    10.0.0.0/24 is subnetted, 4 subnets
    D 10.1.3.0 [90/156160] via 10.1.100.3, 00:00:53, FastEthernet0/0
    D 10.1.2.0 [90/156160] via 10.1.100.2, 00:00:53, FastEthernet0/0

    Để chắc chắn đã cấu hình đúng, các địa chỉ loopback phải ping được lẫn nhau. Bước 4: Cấu hình EIGRP trên cổng Serial

    Đặt địa chỉ IP cho các cổng serial theo như sơ đồ trên. R1 là DCE nên cấp xung clock cho R2:

    R1(config)# interface serial 0/0/0
    R1(config-if)# ip address 10.1.200.1 255.255.255.0
    R1(config-if)# clock rate 64000
    R1(config-if)# no shut
    R2(config)# interface serial 0/0/0
    R2(config-if)# ip address 10.1.200.2 255.255.255.0
    R2(config-if)# no shut

    Chú ý: mặc dù đã cấp xung clock 64 kbps, nhưng khi “show ip interface serial 0/0/0”, cổng vẫn có băng thông là 1544 kbps.

    R1#show interfaces serial 0/0/0
    Serial0/0/0 is up, line protocol is up
    Hardware is GT96K Serial
    Internet address is 10.1.200.1/24
    MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
    reliability 255/255, txload 1/255, rxload 1/255 ...

    Mặc định, với Cisco IOS, EIGRP sử dụng tới 50% băng thông được khai báo trên cổng. Như vậy, với giá trị băng thông được khai báo hiện giờ là 1544 kbps mà EIGRP lại sử dụng tới 50% giá trị băng thông này cho các lưu lượng của nó, toàn bộ đường truyền 64 kbps sẽ bị tiêu tốn hoàn toàn cho tiến trình EIGRP trong trường hợp lưu lượng EIGRP đạt đến cực đại.
    Vì vậy, để tính metric cho đúng đắn, ta phải chỉnh giá trị băng thông lại cho phù hợp bằng câu lệnh “bandwidth”.

    R1(config)#interface Serial0/0/0
    R1(config-if)#bandwidth 64
    R2(config)#interface Serial0/0/0
    R2(config-if)#bandwidth 64

    Kiểm tra lại việc hiệu chỉnh băng thông danh định bằng câu lệnh “show interface serial 0/0/0”:

    R1#show interfaces serial 0/0/0
    Serial0/0/0 is up, line protocol is up
    Hardware is GT96K Serial
    Internet address is 10.1.200.1/24
    MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec,
    reliability 255/255, txload 1/255, rxload 1/255
    (đã bỏ qua một số dòng)
    R2#show interfaces serial 0/0/0
    Serial0/0/0 is up, line protocol is up
    Hardware is GT96K Serial
    Internet address is 10.1.200.2/24
    MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec,
    reliability 255/255, txload 1/255, rxload 1/255
    (đã bỏ qua một số dòng)

    Dùng lệnh “show ip eigrp neighbors” để xem mối quan hệ láng giềng giữa R1 và R2:

    R1#show ip eigrp neighbors
    IP-EIGRP neighbors for process 1
    H Address Interface Hold Uptime SRTT RTO Q Seq
    (sec) (ms) Cnt Num
    2 10.1.200.2 Se0/0/0 10 00:03:03 24 200 0 53
    1 10.1.100.2 Fa0/0 14 09:22:42 269 1614 0 54
    0 10.1.100.3 Fa0/0 11 09:22:42 212 1272 0 59


    Bước 5: Sử dụng lệnh "network" cùng với wildcard-mask

    Trên R3, tạo Loopback11 với địa chỉ IP 192.168.100.1/30 và Loopback15 với địa chỉ IP 192.168.100.5/30.

    R3(config)#interface Loopback11
    R3(config-if)#ip address 192.168.100.1 255.255.255.252
    R3(config-if)#exit
    R3(config)#interface Loopback15
    R3(config-if)#ip address 192.168.100.5 255.255.255.252
    R3(config-if)#exit

    Làm cách nào để chỉ quảng bá mạng 192.168.100.0/30 mà không quảng bá mạng 192.168.4.0/30? Ta sử dụng thêm wildcard–mask thích hợp trong câu lệnh “network”:

    R3(config)#router eigrp 1
    R3(config-router)#network 192.168.100.0 0.0.0.3

    Kiểm tra lại các cổng tham gia EIGRP. Lưu ý rằng Loopback11 đã tham gia vào EIGRP còn Loopback15 thì không:

    R3#show ip eigrp interfaces
    IP-EIGRP interfaces for process 1
    Xmit Queue Mean Pacing Time Multicast Pending
    Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
    Fa0/0 2 0/0 5 0/1 50 0
    Lo3 0 0/0 0 0/1 0 0
    Lo11 0 0/0 0 0/1 0 0

    Xem lại bảng định tuyến sau khi mạng hội tụ:

    R1#show ip route eigrp
    10.0.0.0/24 is subnetted, 5 subnets
    D 10.1.3.0 [90/156160] via 10.1.100.3, 00:05:59, FastEthernet0/0
    D 10.1.2.0 [90/156160] via 10.1.100.2, 00:12:16, FastEthernet0/0
    D 192.168.100.0/24 [90/156160] via 10.1.100.3, 00:03:05, FastEthernet0/0

    Để ý rằng số prefix dành cho mạng 192.168.100.0 được quảng bá bởi R3 là /24. Đó là do các router tự động tóm tắt về mạng chính. Vấn đề này sẽ được đề cập tới trong các bài lab sau. 4. Cấu hình đầy đủ của các router

    R1#sh run
    Building configuration...
    !
    hostname R1
    !
    interface Loopback1
    description Engineering Department
    ip address 10.1.1.1 255.255.255.0
    !
    interface FastEthernet0/0
    ip address 10.1.100.1 255.255.255.0
    no shutdown
    !
    !
    interface Serial0/0/0
    bandwidth 64
    ip address 10.1.200.1 255.255.255.0
    clockrate 64000
    no shutdown
    !
    router eigrp 1
    network 10.0.0.0
    auto-summary
    !
    End
    R2#sh run
    Building configuration...
    !
    hostname R2
    !
    interface Loopback2
    description Marketing Department
    ip address 10.1.2.1 255.255.255.0
    !
    interface FastEthernet0/0
    ip address 10.1.100.2 255.255.255.0
    no shutdown
    !
    interface Serial0/0/0
    bandwidth 64
    ip address 10.1.200.2 255.255.255.0
    no shutdown
    !
    router eigrp 1
    network 10.0.0.0
    auto-summary
    !
    end
    R3#sh run
    Building configuration...
    !
    hostname R3
    !
    interface Loopback3
    description Accounting Department
    ip address 10.1.3.1 255.255.255.0
    !
    interface Loopback11
    ip address 192.168.100.1 255.255.255.252
    !
    interface Loopback15
    ip address 192.168.100.5 255.255.255.252
    !
    interface FastEthernet0/0
    ip address 10.1.100.3 255.255.255.0
    no shutdown
    !
    !
    router eigrp 1
    network 10.0.0.0
    network 192.168.100.0 0.0.0.3
    auto-summary
    !
    End
    Đặng Quang Minh, CCIEx2#11897 (Enterprise Infrastructure, Wireless), DEVNET, CCSI#31417

    Email : dangquangminh@vnpro.org
    https://www.facebook.com/groups/vietprofessional/

  • #2
    File Lab EIGRP cơ bản. Bản PDF.
    Attached Files
    Đặng Quang Minh, CCIEx2#11897 (Enterprise Infrastructure, Wireless), DEVNET, CCSI#31417

    Email : dangquangminh@vnpro.org
    https://www.facebook.com/groups/vietprofessional/

    Comment

    Working...
    X