• 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-3: Cấu hình RIP cơ bản

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

  • Lab 3-3: Cấu hình RIP cơ bản

    Lab 3-3: Cấu hình RIP cơ bản



    Mô tả & yêu cầu


    –Router A, B, C sử dụng RIP để quảng cáo thông tin định tuyến
    –Router B hoạt động như DCE cung cấp xung clock cho router A và C
    –Các router cấu hình RIP và quảng cáo tất cả các mạng nối trực tiếp.
    –Từ router A, B và C, ta ping được hết các địa chỉ trong mạng.

    Cấu hình

    Router A
    !
    hostname Router A
    no ip domain-lookup
    !
    interface Loopback0 ← Định nghĩa interface ảo để làm điểm kiểm tra
    ip address 10.1.1.1 255.255.255.0
    !
    interface Ethernet0
    ip address 148.1.1.1 255.255.255.0
    no shutdown
    no keepalive ← cho phép cổng Ethernet vẫn up khi không kết nối với bên ngoài
    !
    interface Serial0
    ip address 192.1.1.1 255.255.255.0
    no shutdown
    !
    router rip ← kích hoạt quá trình định tuyến RIP trên router
    network 10.0.0.0 ← chỉ ra mạng sẽ quảng cáo và xác định interface nào sẽ gởi và nhận thông tin định tuyến RIP
    network 148.1.0.0
    network 192.1.1.0
    !
    no ip classless
    !
    end

    Router B
    !
    hostname RouterB
    no ip domain-lookup
    !
    interface Serial0
    ip address 192.1.1.2 255.255.255.0
    clock rate 64000 ← hoạt động như DCE cung cấp xung clock
    no shutdown
    !
    interface Serial1
    ip address 193.1.1.1 255.255.255.0
    clock rate 64000 ← hoạt động như DCE cung cấp xung clock
    no shutdown
    !
    router rip
    network 192.1.1.0
    network 193.1.1.0
    !
    end


    + Để xác định router nào cung cấp xung clock tức là thiết bị DCE dùng câu lệnh: show controller [type number]

    Router C
    !
    hostname RouterC
    no ip domain-lookup
    !
    interface Ethernet0
    ip address 152.1.1.1 255.255.255.0
    no shutdown
    no keepalive ← vô hiệu hóa keepalive trên router cho phép interface ethernet0 vẫn up khi không kết nối ra bên ngoài
    !
    interface Serial0
    ip address 193.1.1.2 255.255.255.0
    no shutdown
    !
    router rip
    network 152.1.0.0
    network 193.1.1.0
    !
    no ip classless
    !
    end

    Các bước thực hiện
    Đặt hostname, đặt địa chỉ IP cho các cổng Loopback, Serial, Ethernet
    Đối với RouterA

    Router>en
    Router#config terminal
    Router(config)#hostname RouterA

    RouterA(config)#interface Loopback
    RouterA(config–if)# ip address 10.1.1.1 255.255.255.0
    RouterA(config–if)#exit

    RouterA(config)#interface Ethernet0
    RouterA(config–if)#ip address 148.1.1.1 255.255.255.0
    RouterA(config–if)#no shutdown
    RouterA(config–if)#no keepalive
    RouterA(config–if)#exit

    RouterA(config)#interface Serial0
    RouterA(config–if)#ip address 192.1.1.1 255.255.255.0
    RouterA(config–if)#no shutdown
    RouterA(config–if)#end
    RouterA#


    Cấu hình tương tự đối với RouterB và RouterC. Lưu ý tại RouterB có lệnh clock rate khi cấu hình cổng Serial.

    RouterB(config)#interface Serial0
    RouterB(config–if)#ip address 192.1.1.2 255.255.255.0
    RouterB(config–if)#clock rate 64000
    RouterB(config–if)#no shutdown

    RouterB(config–if)#interface Serial1
    RouterB(config–if)#ip address 193.1.1.1 255.255.255.0
    RouterB(config–if)#clock rate 64000
    RouterB(config–if)#no shutdown
    RouterB(config–if)#end
    RouterB#

    Kiểm tra hoạt động cổng Serial tại các router bằng lệnh show interface [Type Number]

    RouterA#show interface Serial0
    Serial0 is up, line protocol is up
    Hardware is HD64570
    Internet address is 192.1.1.1/24
    MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
    reliability 255/255, txload 1/255, rxload 1/255
    Encapsulation HDLC, loopback not set
    Keepalive set (10 sec)
    Last input 00:00:06, output 00:00:08, output hang never
    Last clearing of "show interface" counters never
    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
    Queueing strategy: weighted fair
    Output queue: 0/1000/64/0 (size/max total/threshold/drops)
    Conversations 0/3/256 (active/max active/max total)
    Reserved Conversations 0/0 (allocated/max allocated)
    5 minute input rate 0 bits/sec, 0 packets/sec
    5 minute output rate 0 bits/sec, 0 packets/sec
    489 packets input, 30563 bytes, 0 no buffer
    Received 473 broadcasts, 0 runts, 0 giants, 0 throttles
    0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
    524 packets output, 33973 bytes, 0 underruns
    0 output errors, 0 collisions, 26 interface resets
    0 output buffer failures, 0 output buffers swapped out
    15 carrier transitions
    --More—-

    RouterB#sh int s0
    Serial0 is up, line protocol is up
    Hardware is HD64570
    Internet address is 192.1.1.2/24
    MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
    reliability 255/255, txload 1/255, rxload 1/255
    Encapsulation HDLC, loopback not set
    ...
    RouterB#show interface serial1
    Serial1 is up, line protocol is up
    Hardware is HD64570
    Internet address is 193.1.1.1/24
    MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
    reliability 255/255, txload 1/255, rxload 1/255
    Encapsulation HDLC, loopback not set
    ...

    RouterC#show interface Serial0
    Serial0 is up, line protocol is up
    Hardware is HD64570
    Internet address is 193.1.1.2/24
    MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
    reliability 255/255, txload 1/255, rxload 1/255
    Encapsulation HDLC, loopback not set
    ...

    Chạy giao thức định tuyến RIP trên mỗi router

    RouterA(config)#router rip
    RouterA(config–router)#network 10.0.0.0
    RouterA(config–router)#network 148.1.0.0
    RouterA(config–router)#network 192.1.1.0

    RouterB(config)#router rip
    RouterB(config–router)#network 192.1.1.0
    RouterB(config–router)#network 193.1.1.0

    RouterC(config)#router rip
    RouterC(config–router)#network 152.1.0.0
    RouterC(config–router)#network 193.1.1.0


    Kiểm tra
    Xem bảng định tuyến bằng lệnh show ip route

    RouterA# show ip route
    ...
    Gateway of last resort is not set
    10.0.0.0 is subnetted, 1 subnets
    C 10.1.1.0 is directly connected, Loopback0
    148.1.0.0/24 is subnetted, 1 subnets
    C 148.1.1.0 is directly connected, Ethernet0
    R 152.1.0.0/16 [120/2] via 192.1.1.2, 00:00:20, Serial0
    C 192.1.1.0/24 is directly connected, Serial0
    R 193.1.1.0/24 [120/1] via 192.1.1.2, 00:00:20, Serial0

    + Dùng lệnh show ip route rip nếu chỉ muốn xem các route học từ RIP.

    RouterA# show ip route rip
    R 152.1.0.0/16 [120/2] via 192.1.1.2, 00:00:20, Serial0
    R 193.1.1.0/24 [120/1] via 192.1.1.2, 00:00:20, Serial0


    Từ router ping các địa chỉ trên mạng

    RouterC#ping 192.1.1.1
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.1.1.1 timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

    RouterC#ping 192.1.1.2
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.1.1.2 timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

    RouterA#ping 148.1.1.1
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 148.1.1.1 timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

    RouterC#ping 10.1.1.1
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.1.1.1 timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms


    Ta có thể xem quá trình cập nhật định tuyến của RIP bằng cách dùng lệnh debug ip rip. Chú ý tại cổng serial0, RouterA không quảng cáo network học từ RouterB (152.1.0.0 và 193.1.1.0) nhưng ở các router còn lại các network này được quảng cáo. Đây là hoạt động của cơ chế split horizon: khi split horizone hoạt động, router sẽ không quảng cáo route ngược trở lại nơi nó đến.

    RouterA#debug ip rip
    RIP: sending v1 update to 255.255.255.255 via Ethernet0 (148.1.1.1)
    network 10.0.0.0, metric 1
    network 152.1.0.0, metric 3
    network 192.1.1.0, metric 1
    network 193.1.1.0, metric 2
    RIP: sending v1 update to 255.255.255.255 via Loopback0 (10.1.1.1)
    network 148.1.0.0, metric 1
    network 152.1.0.0, metric 3
    network 192.1.1.0, metric 1
    network 193.1.1.0, metric 2
    RIP: sending v1 update to 255.255.255.255 via Serial0 (192.1.1.1)
    network 10.0.0.0, metric 1
    network 148.1.0.0, metric 1


    Khi debug chạy, router sẽ đưa ra thông tin định tuyến RIP, để ngừng debug dùng lệnh:

    RouterA#undebug all

    Vô hiệu hoá split horizon tại RouterA dùng lệnh tại interface mode

    RouterA(config)#int s0
    RouterA(config–if)#no ip split–horizon


    Lúc này, để kiểm tra thông tin định tuyến tại RouterA dùng lệnh debug ip rip. Thông tin xuất hiện dưới đây (chú ý tất cả các route được quảng cáo ra cổng serial , bao gồm cả các route học từ RouterB và RouterC):

    RouterA#debug ip rip
    RIP: sending v1 update to 255.255.255.255 via Ethernet0 (148.1.1.1)
    network 10.0.0.0, metric 1
    network 152.1.0.0, metric 3
    network 192.1.1.0, metric 1
    network 193.1.1.0, metric 2
    RIP: sending v1 update to 255.255.255.255 via Loopback0 (10.1.1.1)
    network 148.1.0.0, metric 1
    network 152.1.0.0, metric 3
    network 192.1.1.0, metric 1
    network 193.1.1.0, metric 2
    RIP: sending v1 update to 255.255.255.255 via Serial0 (192.1.1.1)
    network 10.0.0.0, metric 1
    network 148.1.0.0, metric 1
    network 152.1.0.0, metric 3
    network 192.1.1.0, metric 1
    network 193.1.1.0, metric 2
    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
    Code:
    RouterA(config-if)#no keepalive
                          ^
    % Invalid input detected at '^' marker.
    Em làm trên packet tracer ko có lệnh đó anh ạ!
    CCNA v5 | CCNA 5 | CCNA v5| CCNA v5 Blog

    Comment


    • #3
      bản packet tracer 4.1 thiếu 1 số lệnh, xài thử 5.0 hoặc dns đi bạn:106:

      Comment


      • #4
        Bạn dùng chương trình GNS3 xem , hỗ trợ đủ hết

        Chúc vui !!!
        Trần Mỹ Phúc
        tranmyphuc@hotmail.com
        Hãy add nick để có thông tin đề thi mới nhất :tranmyphuc (Hỗ trợ tối đa cho các bạn tự học)

        Cisco Certs : CCNP (Passed TSHOOT 1000/1000)

        Juniper Certs :
        JNCIP-ENT & JNCIP-SEC
        INSTRUCTORS (No Fee) : CISCO (Professional) , JUNIPER (Professional) , Microsoft ...

        [version 4.0] Ôn tập CCNA


        Comment


        • #5
          Anh ơi cho em hỏi : Khi em bắt đầu cấu hình từ Router A . Sau khi đặt ip cho Loopback0 , đến int Ethernet0 thì lại báo lỗi thông thường " Invalid input detected at '^' marker "

          Em đã conf trên router c7200 . Em đang rất cần...Mong các thầy và mọi người chỉ giúp
          Click image for larger version

Name:	RIP.jpg
Views:	1
Size:	20.3 KB
ID:	205678
          Last edited by nguyenanhtu229; 16-12-2011, 11:40 PM.

          Comment


          • #6
            hj bài viết rất hữu ích. Thanks anh
            Try my best !!!!!!!!

            Comment


            • #7
              Chào nguyenanhtu229

              hình nhỏ quá mình ko thấy lỗi cú pháp ở đâu, bạn up lên host để mọi người thấy rõ hơn và hỗ trợ cho bạn nhé

              Comment


              • #8
                các bác có bản gns nào mới nhất mà đã crack share lên cho e dùm đi. thanks!
                e đang dùng gns3, mà sao cái lỗi này là sao:
                Tenel localhost

                Connected to Dynamips VM "A" (ID 3, type c7200) - Console port
                chạy xong nó ra cái này mà enter hoài không có lên để enable mà config nản thât, help me!
                Last edited by liendeftrai; 30-12-2011, 09:20 AM.
                Request time out for this love

                Comment


                • #9
                  à cái router 7200 nó bị sao ấy, em dùn lại con c3600 thì đc rồi, mà sao như hình trên thì em gõ inter ethernet thì nó biểu là invalid là sao,,, hình như cái này các bác chỉ cho e cái...
                  .....A#conf
                  A#configure
                  Configuring from terminal, memory, or network [terminal]?
                  Enter configuration commands, one per line. End with CNTL/Z.
                  A(config)#
                  A(config)#
                  A(config)#hostname a
                  a(config)#inter
                  a(config)#interface loo
                  a(config)#interface loopback 0
                  a(config-if)#ip add
                  a(config-if)#ip address 10.1.1.1 255.255.255.0
                  a(config-if)#ex
                  a(config-if)#exit
                  a(config)#inter
                  a(config)#interface ethe
                  a(config)#interface ethernet 1/0
                  a(config-if)#ip add
                  a(config-if)#ip address 148.1.1.1 255.255.255.0
                  a(config-if)# no sh
                  a(config-if)# no shutdown
                  a(config-if)#no kee
                  a(config-if)#ex
                  a(config-if)#exit
                  a(config)#inter
                  a(config)#interface se
                  a(config)#interface serial 0/0
                  a(config-if)#ip add
                  a(config-if)#ip address 192.1.1.1 255.255.255.0
                  a(config-if)#no sh
                  a(config-if)#no shutdown
                  a(config-if)#ex
                  a(config-if)#exit
                  a(config)#en
                  a#
                  00:54:32: %SYS-5-CONFIG_I: Configured from console by console
                  a#conf
                  a#configure
                  Configuring from terminal, memory, or network [terminal]?
                  Enter configuration commands, one per line. End with CNTL/Z.
                  a(config)#
                  a(config)#router
                  a(config)#router rip
                  a(config-router)#net
                  a(config-router)#network 10.0.0.0
                  a(config-router)#network 192.1.1.0
                  a(config-router)#network 148.1.0.0
                  a(config-router)#ex


                  a(config)#end
                  a#sho ip route
                  Codes: C - connected, S - static, I - IGRP, 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, E - EGP
                  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
                  U - per-user static route, o - ODR
                  T - traffic engineered route


                  Gateway of last resort is not set


                  10.0.0.0/24 is subnetted, 1 subnets
                  C 10.1.1.0 is directly connected, Loopback0
                  C 192.1.1.0/24 is directly connected, Serial0/0
                  148.1.0.0/24 is subnetted, 1 subnets
                  C 148.1.1.0 is directly connected, Ethernet1/0
                  a#sho ip route rip
                  các pro cho e hỏi là sao mà chạy giao thức rip trên con touter a rồi mà show không thấy. còn hai con kia thì show đc và ping thông...
                  Last edited by liendeftrai; 30-12-2011, 10:41 AM.
                  Request time out for this love

                  Comment


                  • #10
                    Bạn chắc chắn rằng các interface đều trạng thái up up cả chứ ?

                    Và dùng câu lệnh network mạng của các interface trên router hết đầy đủ chưa ?
                    Trịnh Anh Luân
                    - Email : trinhanhluan@vnpro.org
                    - Search my site
                    - Search VNPRO.ORG

                    Trung Tâm Tin Học VnPro
                    Địa chỉ: 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
                    Network channel: http://www.dancisco.com
                    • 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

                    Blog: http://www.vnpro.org/blog
                    Wifi forum: http://www.wifipro.org

                    Comment

                    • Working...
                      X