• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
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.

Announcement

Collapse
No announcement yet.

Lab 3-4: Giao thức định tuyến RIP

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lab 3-4: Giao thức định tuyến RIP

    Lab 3-4: Giao thức định tuyến RIP




    Mô tả & yêu cầu

    –Lab này cấu hình định tuyến IP dùng địa chỉ mạng lớp B (131.108.0.0/16), với subnet mask lớp C (255.255.255.0 hay /24).
    –Cấu hình giao thức định tuyến RIP trên R1 và R2 để từ router ping được tất cả địa chỉ trên mạng.

    Cấu hình
    R1
    !
    hostname R1
    !
    interface loopback0
    ip address 131.108.4.1 255.255.255.0
    exit
    !
    interface loopback1
    ip address 131.108.5.1 255.255.255.0
    exit
    !
    interface loopback2
    ip address 131.108.6.1 255.255.255.0
    exit
    !
    interface Ethernet0
    ip address 131.108.1.1 255.255.255.0
    no shutdown
    no keepalive
    exit
    !
    interface Serial0
    ip address 131.108.3.1 255.255.255.0
    clock rate 64000
    no shut
    exit
    !
    router rip
    network 131.108.0.0
    !
    end

    R2
    !
    hostname R2
    !
    interface loopback0
    ip address 131.108.7.1 255.255.255.0
    exit
    !
    interface loopback1
    ip address 131.108.8.1 255.255.255.0
    exit
    !
    interface loopback2
    ip address 131.108.9.1 255.255.255.0
    exit
    !
    interface Ethernet0
    ip address 131.108.2.1 255.255.255.0
    no shutdown
    no keepalive
    exit
    !
    interface Serial0
    ip address 131.108.3.2 255.255.255.0
    no shut
    exit
    !
    router rip
    network 131.108.0.0
    !
    end


    Các bước thực hiện như sau

    1. Đặt hostname, cấu hình cho các cổng loopback, Ethernet và Serial trên R1 và R2.

    Đặt hostname

    Router(config)#hostname R1
    R1(config)# _

    Router(config)#hostname R2
    R2(config)# _


    Xác định thiết bị nào là DCE và DTE:

    R1#show controllers S0
    Interface Serial0
    Hardware is PowerQuiCC MPC860
    DCE V.35, no clock
    ...

    R2#show controllers S1
    HD unit 0, idb = 0xFBDB0, driver structure at 0x1020C8
    buffer size 1524 HD unit 0, V.35 DTE cable
    cpb = 0x1, eda = 0x483C, cda = 0x4850
    ...

    Cấu hình địa chỉ IP cho các cổng của R1

    R1(config)#interface loopback0
    R1(conig–if)# ip address 131.108.4.1 255.255.255.0

    R1(config–if)#interface loopback1
    R1(conig–if)# ip address 131.108.5.1 255.255.255.0

    R1(config–if)#interface loopback2
    R1(conig–if)# ip address 131.108.6.1 255.255.255.0
    R1(conig–if)# exit

    R1(config)#interface Ethernet0
    R1(conig–if)#ip address 131.108.1.1 255.255.255.0
    R1(conig–if)#no shutdown
    %LINK-3-UPDOWN: Interface Ethernet0, changed state to up
    %LINK-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up
    R1(conig–if)#no keepalive
    R1(conig–if)# exit

    R1(config)#interface Serial0
    R1(conig–if)#ip address 131.108.3.1 255.255.255.0
    R1(conig–if)#clock rate 128000
    R1(conig–if)#no shut

    Tương tự đối với R2

    R2(config)#interface loopback0
    R2(conig–if)# ip address 131.108.7.1 255.255.255.0

    R2(config)#interface loopback1
    R2(conig–if)# ip address 131.108.8.1 255.255.255.0

    R2(config)#interface loopback2
    R2(conig–if)# ip address 131.108.9.1 255.255.255.0

    R2(config)#interface Ethernet0
    R2(conig–if)#ip address 131.108.2.1 255.255.255.0
    R2(conig–if)#no shutdown
    R2(conig–if)#no keepalive
    R2(conig–if)# exit

    R2(config)#interface Serial1
    R2(conig–if)#ip address 131.108.3.2 255.255.255.0
    R2(conig–if)#no shut


    2. Kiểm tra bảng định tuyến IP trên các router

    R1# show ip route
    ...
    Gateway of last resort is not set

    131.108.0.0/24 is subnetted, 5 subnets
    C 131.108.6.0 is directly connected, Loopback2
    C 131.108.5.0 is directly connected, Loopback1
    C 131.108.4.0 is directly connected, Loopback0
    C 131.108.3.0 is directly connected, Serial0
    C 131.108.1.0 is directly connected, Ethernet0

    R2# show ip route
    ...
    Gateway of last resort is not set

    131.108.0.0/24 is subnetted, 5 subnets
    C 131.108.9.0 is directly connected, Loopback2
    C 131.108.8.0 is directly connected, Loopback1
    C 131.108.7.0 is directly connected, Loopback0
    C 131.108.3.0 is directly connected, Serial1
    C 131.108.2.0 is directly connected, Ethernet0


    3. Chạy giao thức định tuyến RIP trên cả hai router

    R1(config)#router rip
    R1(config–router)#network 131.108.0.0
    R1(config–router)#end
    R1#copy run start ← lưu cấu hình vào NVRAM

    R2(config)#router rip
    R2(config–router)network 131.108.0.0
    R2(config–router)#end
    R2#copy run start

    Xem quá trình cập nhật định tuyến trên router

    R1#debug ip rip
    RIP protocol debugging is on

    R1#debug ip rip events
    RIP event debugging is on


    4. Xem lại bảng định tuyến trên R1 và R2

    R1# show ip route
    ...
    Gateway of last resort is not set

    131.108.0.0/24 is subnetted, 5 subnets
    R 131.108.9.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
    R 131.108.8.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
    R 131.108.7.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
    C 131.108.6.0 is directly connected, Loopback2
    C 131.108.5.0 is directly connected, Loopback1
    C 131.108.4.0 is directly connected, Loopback0
    C 131.108.3.0 is directly connected, Serial0
    R 131.108.2.0/24 [120/1] via 131.108.3.2, 00:00:00, Serial0
    C 131.108.1.0 is directly connected, Ethernet0

    R2# show ip route
    ...
    Gateway of last resort is not set
    131.108.0.0/24 is subnetted, 5 subnets
    C 131.108.9.0 is directly connected, Loopback2
    C 131.108.8.0 is directly connected, Loopback1
    C 131.108.7.0 is directly connected, Loopback0
    R 131.108.6.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1
    R 131.108.5.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1
    R 131.108.4.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1
    C 131.108.3.0 is directly connected, Serial1
    C 131.108.2.0 is directly connected, Ethernet0
    R 131.108.1.0/24 [120/1] via 131.108.3.1, 00:00:00, Serial1


    5. Kiểm tra hoạt động bằng ping các mạng ở̀ xa (tất cả các lệnh ping phải thành công)


    R1#ping 131.108.9.1
    R1#ping 131.108.8.1
    R1#ping 131.108.7.1
    R1#ping 131.108.2.1

    R2#ping 131.108.4.1
    R2#ping 131.108.5.1
    R2#ping 131.108.6.1
    R2#ping 131.108.1.1

    Ví dụ ping thành công

    R1#ping 131.108.9.1
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 131.108.9.1, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 32/32/32 ms
    Email : vnpro@vnpro.org
    ---------------------------------------------------------------------------------------------------------------
Trung Tâm Tin Học VnPro
149/1D Ung Văn Khiêm P25 Q.Bình thạnh TPHCM
Tel : (08) 35124257 (5 lines)
Fax: (08) 35124314

Home page: http://www.vnpro.vn
Support Forum: http://www.vnpro.org
- Chuyên đào tạo quản trị mạng và hạ tầng Internet
- Phát hành sách chuyên môn
- Tư vấn và tuyển dụng nhân sự IT
- Tư vấn thiết kế và hỗ trợ kỹ thuật hệ thống mạng

Network channel: http://www.dancisco.com
Blog: http://www.vnpro.org/blog

  • #2
    e gõ y chang như trên, nhưng Pc1 vẫn không ping được Pc2 là sao vậy a?
    R1(config)#router rip
    R1(config-router)#network 192.168.0.0
    tương tự trên R2...

    E dùng soft Packet Tracer để làm lab

    Sau 1 hồi e bỏ network 192.168.0.0 trên cả 2 router, và nhập net 192.168.1.0 và 192.168.3.0 cho R1, bên R2 thì 192.168.2.0 và 192.168.3.0 thì ping được...Vậy ta không thể dùng net work 192.168.0.0 cho cả 2 router R1 và R2 đúng không ạ?
    Last edited by shinichi245; 31-12-2010, 12:34 PM.

    Comment


    • #3
      R1(config-router)#network 192.168.0.0
      dòng này sai thì phải , 192 là địa chỉ lớp C nên nó ko sumary được như vậy trong rip1
      còn ở trên bác admin dùng 131 địa chỉ lớp B , bác đánh gì thì cũng là 131.108.0.0

      Comment

      • Working...
        X