• 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 (with file .Net)

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 (with file .Net)

    Nguồn: Sách CCNA Labpro

    LAB 3-3: CẤU HÌNH RIP CƠ BẢN


    Mô tả và yêu cầu:
    - Router A, B, C sử dụng RIP để quảng bá 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 bá 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 bá và xác định interface nào sẽ gởi và nhận thông tin định tuyết 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


    Chú ý: Để 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 Router A:
    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 Router B và Router C. Lưu ý tại Router B 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 [typenumeber]
    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

    Chú ý: 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, Router A không quảng bá network học từ Router B (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 bá. Đây là hoạt động của cơ chế split horizon: khi split horizon hoạt động router sẽ không quảng bá 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 hóa split horizon tại router A 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 router A dùng lệnh debug ip rip. Thông tin xuất hiện dưới đây (chú ý tất các Router được quảng bá ra cổng serial, bao gồm cả các route học từ
    Router B và Router C):
    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
    Hello mọi người,

    Cho mình hỏi sao mình ko thấy download file .net cho nào hết vậy? Ko thấy cho tất cả các bài lab luôn. Đã thử đổi qua firefox hay IE rồi mà vẫn vậy.

    Mọi người biết xin chỉ giúp.

    Thanks

    Comment


    • #3
      Originally posted by lkngoc2011 View Post
      Hello mọi người,

      Cho mình hỏi sao mình ko thấy download file .net cho nào hết vậy? Ko thấy cho tất cả các bài lab luôn. Đã thử đổi qua firefox hay IE rồi mà vẫn vậy.

      Mọi người biết xin chỉ giúp.

      Thanks
      Chào !!!
      Bạn có thể dùng GNS3 để tạo . Tham khảo hướng dẫn tại :


      Chúc bạn 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


      • #4
        Cấu hình RIP...Quan trọng

        Chào mọi người, tui có xem qua cách cấu hình rip ở trên. nhưng khi thực hành thì thấy không được. chính cái lệnh loopback. tui không thể cấu hình được... do đó ai biết thì chỉ dùm tui với. cảm ơn nhiều.:(

        Comment


        • #5
          Originally posted by vanthanh1990 View Post
          Chào mọi người, tui có xem qua cách cấu hình rip ở trên. nhưng khi thực hành thì thấy không được. chính cái lệnh loopback. tui không thể cấu hình được... do đó ai biết thì chỉ dùm tui với. cảm ơn nhiều.:(
          Sao lại ko cấu hình được bạn, bạn đã cấu hình đúng mode chưa, giao diện lookback chỉ là giao diện ảo thôi, tiện cho việc quảng bá mạng ấy mà, bạn có thể đưa lỗi lên cho mọi người cùng xem :)

          Comment


          • #6
            no keepalive <- cho phép cổng Ethernet vẫn up khi không kết nối với bên ngoài
            cho mình hỏi là cái ethernet vẫn up là sao?khi trển router không kết nổi với bên ngoài từ port ethernet, sao mình đánh lệnh inter ethernet mà không ra gì vậy, chỉ rõ bằng hình ảnh dùm nhé
            p/s dù sao cũng phải kéo 1 cái nào đó có port ether như vậy trên router mới xuất hiện port tương ứng ,thực hành trên gns3
            Last edited by liennv; 29-05-2013, 11:04 AM.

            Comment


            • #7
              R1

              interface Loopback0
              ip address 10.1.1.1 255.255.255.0
              !
              interface FastEthernet0/0
              ip address 148.1.1.1 255.255.255.0
              duplex auto
              speed auto
              no keepalive
              !
              interface Serial0/0
              ip address 192.1.1.1 255.255.255.0
              no keepalive
              clock rate 2000000
              !


              router rip
              network 10.0.0.0
              network 148.1.0.0
              network 192.1.1.0
              !




              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 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, FastEthernet0/0

              R2

              interface Serial0/0
              ip address 192.1.1.2 255.255.255.0
              clock rate 64000


              interface Serial0/1
              ip address 193.1.1.1 255.255.255.0
              clock rate 64000
              !
              router rip
              network 192.1.1.0
              network 193.1.1.0
              !


              R2#show 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 not set


              R 152.1.0.0/16 [120/1] via 193.1.1.2, 00:00:04, Serial0/1
              R 10.0.0.0/8 [120/1] via 192.1.1.1, 00:00:21, Serial0/0
              C 193.1.1.0/24 is directly connected, Serial0/1
              R 148.1.0.0/16 [120/1] via 192.1.1.1, 00:00:21, Serial0/0

              R3

              interface FastEthernet0/0
              ip address 152.1.1.1 255.255.255.0
              duplex auto
              speed auto
              no keepalive
              !
              interface Serial0/0
              ip address 193.1.1.2 255.255.255.0
              clock rate 2000000


              router rip
              network 152.1.0.0
              network 193.1.1.0


              R3#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 not set


              152.1.0.0/24 is subnetted, 1 subnets
              C 152.1.1.0 is directly connected, FastEthernet0/0
              R 10.0.0.0/8 [120/1] via 193.1.1.1, 00:00:02, Serial0/0
              C 193.1.1.0/24 is directly connected, Serial0/0
              R 148.1.0.0/16 [120/1] via 193.1.1.1, 00:00:02, Serial0/0
              R3#

              mình đã cấu hình như trên sao con R1 không có RIP gì vây ạ?

              Comment

              • Working...
                X