• 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.

Prefixt-list???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Prefixt-list???

    chào các anh!

    Các anh cho em hỏi Prefixt-list còn được apply cho Routing Protocol nào nữa ngoài BGP. Nếu có, các anh post cho em cú pháp apply Prefixt-list cho các Routing Protocol này.

    chân thành cảm ơn! :lol:

  • #2
    hey telecom,

    Prefix-list cho phép anh match một địa chỉ network nào đó dựa trên địa chỉ network và cả subnet mask.

    ví dụ:

    ip prefix-list 1 deny 192.168.10.0/24.

    Nếu từ khoá le hay gt không được dùng thì match trên là cho đúng địa chỉ network đó.
    ví dụ:

    ip prefix-list 1 deny 192.168.10.0/24 ge 25
    là toàn bộ các subnet của net 192.168.10.0/25

    IP Prefix-list có thể áp dụng cho các routing protocol sau:

    1. BGP
    2. RIP
    3. EIGRP
    4. IGRP

    Cú pháp để áp dụng

    # distribute-list prefix <prefix-list> in
    # distribute-list prefix <prefix-list> in int
    # distribute-list prefix <prefix-list> out
    # distribute-list prefix <prefix-list> out int
    # distribute-list prefix <prefix-list> out &lt;routing process>

    Linh nghĩ là chủ đề này hoàn toàn xứng đáng với một chương trong một cuốn sach nào đó.

    Hy vọng đã giúp được anh. Nếu anh muốn tiếp tục chủ đề này, mời anh đặt câu hỏi.

    Cám ơn Anh,
    Mỹ Linh

    Comment


    • #3
      Cảm ơn SVN rất nhiều! :lol:

      IP Prefix-list có thể áp dụng cho các routing protocol sau:

      1. BGP
      2. RIP
      3. EIGRP
      4. IGRP
      Vậy là Prefixt-list chỉ áp dụng cho Distance Vector Routing Protocol?

      # distribute-list prefix in
      # distribute-list prefix in int
      # distribute-list prefix out
      # distribute-list prefix out int
      # distribute-list prefix out &lt;routing process>
      Ở các lệnh trên prefix-list = tên của prefix-list?

      Nhưng SVN có thể cho biết thông tin này SVN đọc từ Book nào được không? Tớ đọc trong cuốn S5 + BSCN chỉ thấy Prefixt-list apply cho BGP.

      chúc thành công!

      Comment


      • #4
        telecom,

        Trong cú pháp trên, sau option prefix-list là tên của prefix-list.

        Đối với cấp độ ccnp, anh chỉ dùng prefix-list cho BGP. Tuy nhiên, prefix-list có thể apply cho các routing protocol khác như em đã nêu ở trên. Cái này thì có thể gặp ở các bài lab ccie.

        Chúc anh thành công,

        Comment


        • #5
          anh telecom,

          đây là một số bài tập phần prefix-list cho anh.

          Exercises:

          1. Construct a prefix list that permits only the 192.168.1.0/24 network.

          2. Construct a prefix list that denies network 119.0.0.0, and permits all other prefixes (including all subnets of 119.0.0.0).

          3. Construct a prefix list that permits only the default route.

          4. Construct a prefix list the permits everything except the default route.

          5. Construct a prefix list that permits network 172.16.0.0 and any of its subnets, and denies all other prefixes.

          6. Construct a prefix list that permits only the following prefixes:

          10.2.8.32/27
          10.2.8.32/28
          10.2.8.32/29
          10.2.8.32/30

          7. Construct a prefix list that:

          Permits 197.25.94.128/25
          Denies 197.25.94.192/26
          Permits 197.25.94.224/27
          Denies 197.25.94.240/28
          Permits 197.25.94.248/29
          Denies 197.25.94.252/30
          Permits all other prefixes, except for 198.82.0.0/16

          8. Construct a prefix list that permits any prefix matching the first 20 bits of 175.29.64.0 which has a mask of at least /26 but not exceeding /29, and denies all other prefixes.

          9. Construct a prefix list that denies any prefix matching the first 19 bits of 15.26.96.0 with any mask up to and including /32, and permits any other prefix.

          10. Construct a prefix list that denies the RFC 1918 private networks and any of their subnets, and permits everything else.

          11. Construct a prefix list that permits any subnet of network 15.0.0.0 (but not the network), and denies everything else. Your router lies within AS 65011. Place the prefix list in service in the inbound direction with BGP neighbor 1.2.3.4.

          12. Construct a prefix list that denies 162.56.0.0/16 and all of its subnets (with the exception of 162.56.209.208/29, which is permitted), and permits all other prefixes. Your router lies within AS 65012. Place the prefix list in service in the outbound direction with its BGP neighbor having address 5.6.7.8.

          13. Construct a prefix list that permits the CIDR block containing the thirty-two class C networks beginning with 200.202.160.0/24, and denies everything else. Your router is within AS 65013. Place the prefix list in service in the inbound direction with BGP peer-group "Lucky_13".

          14. Construct a prefix list that denies any prefix for which the most-significant four bits are "0110", and permits everything else.

          15. Construct a prefix list that permits the host address of "CatSpace", and denies everything else.


          --------------------------------------------------------------------------------

          EXTRA CREDIT:
          16. Construct a prefix list that permits only classful networks, and denies everything else.

          17. Construct a prefix list that denies only supernets, and permits everything else.

          18. Construct a prefix list that permits only subnets, and denies everything else.

          19. Construct a prefix list that permits only CIDR blocks encompassing at least 32 class-C equivalents.

          20. Construct a prefix list that permits only the RFC 1918 private networks and their subnets, and configure RIP to use this prefix list for outbound routing advertisements.


          --------------------------------------------------------------------------------


          ANSWERS:

          1. The prefix list is:

          ip prefix-list test1 seq 5 permit 192.168.1.0/24


          2. The prefix list is:

          ip prefix-list test2 seq 5 deny 119.0.0.0/8
          ip prefix-list test2 seq 10 permit 0.0.0.0/0 le 32


          3. The prefix list is:

          ip prefix-list test3 seq 5 permit 0.0.0.0/0


          4. The prefix list is:

          ip prefix-list test4 seq 5 deny 0.0.0.0/0
          ip prefix-list test4 seq 10 permit 0.0.0.0/0 le 32


          5. The prefix list is:

          ip prefix-list test5 seq 5 permit 172.16.0.0/16 le 32


          6. The prefix list is:

          ip prefix-list test6 seq 5 permit 10.2.8.32/27 le 30


          7. The prefix list is:

          ip prefix-list test7 seq 5 deny 197.25.94.192/26
          ip prefix-list test7 seq 10 deny 197.25.94.240/28
          ip prefix-list test7 seq 15 deny 197.25.94.252/30
          ip prefix-list test7 seq 20 deny 198.82.0.0/16
          ip prefix-list test7 seq 25 permit 0.0.0.0/0 le 32


          8. The prefix list is:

          ip prefix-list test8 seq 5 permit 175.29.64.0/20 ge 26 le 29


          9. The prefix list is:

          ip prefix-list test9 seq 5 deny 15.26.96.0/19 le 32
          ip prefix-list test9 seq 10 permit 0.0.0.0/0 le 32


          10. The prefix list is:

          ip prefix-list test10 seq 5 deny 10.0.0.0/8 le 32
          ip prefix-list test10 seq 10 deny 172.16.0.0/12 le 32
          ip prefix-list test10 seq 15 deny 192.168.0.0/16 le 32
          ip prefix-list test10 seq 20 permit 0.0.0.0/0 le 32


          11. The prefix list is:

          ip prefix-list test11 seq 5 permit 15.0.0.0/8 ge 9

          To place it in service:
          router bgp 65011
          neighbor 1.2.3.4 prefix-list test11 in


          12. The prefix list is:

          ip prefix-list test12 seq 5 permit 162.56.209.208/29
          ip prefix-list test12 seq 10 deny 162.56.0.0/16 le 32
          ip prefix-list test12 seq 15 permit 0.0.0.0/0 le 32

          To place it in service:
          router bgp 65012
          neighbor 5.6.7.8 prefix-list test12 out


          13. The prefix list is:

          ip prefix-list test13 seq 5 permit 200.202.160.0/19

          To place it in service:
          router bgp 65013
          neighbor Lucky_13 prefix-list test13 in


          14. The prefix list is:

          ip prefix-list test14 seq 5 deny 96.0.0.0/4 le 32
          ip prefix-list test14 seq 10 permit 0.0.0.0/0 le 32


          15. The "hardest" part of this problem (and it isn't very hard!) is determining the IP address of "CatSpace". The easiest way to do that is to either "ping" or "trace" to "www.catspace.com" from any Internet-connected host, and let DNS resolve the address (which turns out to be 64.82.100.67). The prefix list is therefore:

          ip prefix-list test15 seq 5 permit 64.82.100.67/32


          16. The prefix list is:

          ip prefix-list test16 seq 5 permit 0.0.0.0/1 ge 8 le 8
          ip prefix-list test16 seq 10 permit 128.0.0.0/2 ge 16 le 16
          ip prefix-list test16 seq 15 permit 192.0.0.0/3 ge 24 le 24


          17. A "supernet" is any block that contains more than one classful network. The prefix list is:

          ip prefix-list test17 seq 5 deny 0.0.0.0/1 le 7
          ip prefix-list test17 seq 10 deny 128.0.0.0/2 le 15
          ip prefix-list test17 seq 15 deny 192.0.0.0/3 le 23
          ip prefix-list test17 seq 20 permit 0.0.0.0/0 le 32


          18. The prefix list is:

          ip prefix-list test18 seq 5 permit 0.0.0.0/1 ge 9
          ip prefix-list test18 seq 10 permit 128.0.0.0/2 ge 17
          ip prefix-list test18 seq 15 permit 192.0.0.0/3 ge 25


          19. Since a "class-C equivalent" prefix has a "/24" mask, a block of thirty-two of them would have a "/19" mask (moved five bits to the left). The default route is not considered a "CIDR block". The prefix list is:

          ip prefix-list test19 seq 5 deny 0.0.0.0/0
          ip prefix-list test19 seq 10 permit 0.0.0.0/0 le 19


          20. The prefix list is:

          ip prefix-list test20 seq 5 permit 10.0.0.0/8 le 32
          ip prefix-list test20 seq 10 permit 172.16.0.0/12 le 32
          ip prefix-list test20 seq 15 permit 192.168.0.0/16 le 32

          To place it in effect for outbound RIP updates:
          router rip
          distribute-list prefix test20 out

          chúc anh thành công,
          Linh
          Anh có thể tham khảo thêm ở đây:

          Comment


          • #6
            RE: Prefixt-list???

            How Prefix Lists Work

            Prefix-list chỉ tìm kiếm trên phần prefix của một địa chỉ nên quá trình tìm kiếm là rất nhanh. Điều này đặc biệt quan trọng trong khi tìm kiếm những bảng định tuyến kích thước lớn trong BGP. Một thuận lợi khác của prefix-list là khả năng soạn thảo. Mặc dùng trong ACL truyền thống vẫn cho phép soạn thảo động (dùng named access list). Prefix-list có thể tạo và sử dụng dễ dàng. Điều này không chỉ đúng với tính năng soạn thảo mà còn với giao diện đã cải tiến. Trước khi áp dụng một prefix-list vào một quá trình hay một cổng giao tiếp, anh phảI định nghĩa các tiêu chí cho access-list. Mỗi dòng trong prefix-list được kết hợp với một chỉ số, tương tự như các dòng trong một chương trình máy tính. Nếu ta không nhập vào chỉ số thứ tự (sequence-number), chỉ số này sẽ được tự động tạo ra, với mỗi lần tăng là 5. Các số không được dùng, chẳng hạn như từ 1 đến 4 cho phép các dòng thêm vào về sau. Ta có thể soạn thảo prefix-list bằng cách chỉ ra chỉ số dòng hoặc sequence-number. Khả năng này là không có trong Access-list.

            Prefix-list hoạt động bằng cách tìm các prefix trong danh sách match vớI các prefix đang kiểm tra. Nếu có một match xảy ra, route sẽ được dùng hay bị loạI bỏ. Cụ thể, khi có một prefix bị deny hoặc được permit, các luật sau sẽ được dùng

            - Nếu một route là permit, route sẽ được dùng
            - Nếu một route là deny, route sẽ không được dùng
            - Cuối của mọi prefix-list là một phát biểu ngầm định deny. Như vậy, nếu cho trước một prefix mà prefix này không match với một entry trong prefix-list, prefix sẽ bị deny theo luật mặc định.
            - Nếu có nhiều entry trong một prefix list match với một prefix, entry có chỉ số sequence number nhỏ nhất sẽ được dùng.
            - Router bắt đầu tìm kiếm ở đỉnh của prefix-list, vớI chỉ số sequence-number bằng 1. Khi một match là tìm thấy, quá trình tìm kiếm kết thúc. Thời gian xử lý sẽ được giảm nếu các điều kiện match/deny được đặt ở đầu của danh sách. Điều này ngăn ngừa việc phải xử lý các điều kiện hiếm khi gặp mỗi khi một route được kiểm tra.
            - Các chỉ số sequence number tự động gia tăng theo mặc định. Để cấu hình sequence-number, dùng thông số seq seq-value trong lệnh ip prefix-list.
            - Chỉ số sequence number không cần thiết chỉ ra khi xóa một dòng trong cấu hình.
            Long Nguyen

            Comment

            Working...
            X