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

Llq

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

  • Llq

    LLQ



    Mô tả:
    Bài thực hành này hướng dẫn thực hiện LLQ, trong bài thực hành trước chúng ta đã làm quen với CBWFQ và nhận thấy được ưu điểm của nó, tuy nhiên CBWFQ không thể giải quyết được vấn đề delay đối với những lưu lượng nhạy cảm với độ delay cao như VoIP, nhược điểm này được giải quyết với LLQ, việc thực hiện LLQ tương tự CBWFQ, nhưng có điểm khác là có thêm class dành cho loại traffic cần độ ưu tiên cao.
    Trong bài thực hành này cần kiểm tra khi cổng bị nghẽn bởi những traffic khác thì chất luợng của cuộc gọi vẫn được đảm bảo.

    Yêu cầu
    Cấu hình cơ chế hàng đợi LLQ trên cổng s0/1 của R2 đáp ứng các yêu cầu sau:
    • Lưu lượng Voip sẽ được ưu tiên triệt để với băng thông là 10% băng thông của cổng
    • Lưu lượng telnet sẽ được cấp băng thông 64 kbps
    • Lưu lượng web/http sẽ được cấp băng thông 128 kbps
    • Lưu lượng ftp sẽ được cấp băng thông 512 kbps



    Thực hiện
    Cấu hình ban đầu của hệ thống

    Cấu hình ban đầu trên R1:
    R1#sh run
    Building configuration...

    Current configuration:
    !
    version 12.0
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname R1
    !
    memory-size iomem 10
    ip subnet-zero
    !
    voice-port 1/1/0
    !
    voice-port 1/1/1
    !
    !
    dial-peer voice 1 pots
    destination-pattern 101
    port 1/1/0
    !
    dial-peer voice 2 voip
    destination-pattern 201
    session target ipv4:192.168.2.2
    !
    !
    interface Ethernet0/0
    ip address 192.168.0.1 255.255.255.0
    no ip directed-broadcast
    !
    interface Serial0/0
    ip address 192.168.1.1 255.255.255.0
    no ip directed-broadcast
    !
    ip classless
    ip route 0.0.0.0 0.0.0.0 192.168.1.2
    no ip http server
    !
    !
    line con 0
    transport input none
    line aux 0
    line vty 0 4
    privilege level 15
    no login
    !
    no scheduler allocate
    end

    R1#

    Cấu hình ban đầu trên R2:
    R2#sh run
    Building configuration...

    Current configuration : 1511 bytes
    !
    version 12.2
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R2
    !
    logging queue-limit 100
    !
    ip subnet-zero
    !
    !
    no ip domain lookup
    ip host R1 192.168.1.1
    ip host R3 192.168.2.2
    !
    ip cef
    mpls ldp logging neighbor-changes
    !
    !
    no voice hpi capture buffer
    no voice hpi capture destination
    !
    !
    mta receive maximum-recipients 0
    !
    !
    interface Ethernet0/0
    ip address 172.16.1.1 255.255.255.0
    half-duplex
    !
    interface Serial0/0
    ip address 192.168.1.2 255.255.255.0
    clockrate 2000000
    fair-queue
    !
    interface Serial0/1
    ip address 192.168.2.1 255.255.255.0
    load-interval 30
    !
    ip http server
    ip classless
    ip route 100.1.1.0 255.255.255.0 192.168.2.2
    ip route 192.168.0.0 255.255.255.0 192.168.1.1
    !
    call rsvp-sync
    !
    !
    mgcp profile default
    !
    dial-peer cor custom
    !
    !
    !
    !
    line con 0
    line aux 0
    line vty 0 4
    privilege level 15
    no login
    !
    !
    End

    Cấu hình ban đầu trên R3:
    R3#sh run
    Building configuration...

    Current configuration : 932 bytes
    !
    version 12.2
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    !
    hostname R3
    !
    logging queue-limit 100
    !
    ip subnet-zero
    !
    !
    mpls ldp logging neighbor-changes
    !
    !
    no voice hpi capture buffer
    no voice hpi capture destination
    !
    !
    mta receive maximum-recipients 0
    !
    !
    interface Loopback0
    ip address 100.1.1.1 255.255.255.0
    !
    interface Ethernet0/0
    no ip address
    shutdown
    half-duplex
    !
    interface Serial0/0
    ip address 192.168.2.2 255.255.255.0
    clockrate 2000000
    !
    ip http server
    ip classless
    ip route 0.0.0.0 0.0.0.0 192.168.2.1
    !
    call rsvp-sync
    !
    voice-port 1/0/0
    !
    voice-port 1/0/1
    !
    !
    mgcp profile default
    !
    dial-peer cor custom
    !
    !
    !
    dial-peer voice 1 pots
    destination-pattern 201
    port 1/0/0
    !
    dial-peer voice 2 voip
    destination-pattern 101
    session target ipv4:192.168.1.1
    !
    !
    line con 0
    line aux 0
    line vty 0 4
    privilege level 15
    no login
    !
    !
    end

    Thực hiện cấu hình trên R2:

    Cấu hình ACL chọn các lưu lượng web, ftp, telnet

    access-list 100 permit tcp any any eq telnet
    access-list 101 permit tcp any any eq www
    access-list 102 permit tcp any any range ftp-data ftp

    Cấu hình class-map chọn các lưu lượng web, ftp, telnet, rtp

    class-map match-all TELNET
    match access-group 100
    class-map match-all HTTP
    match access-group 101
    class-map match-all VoIP
    match ip rtp 16384 16383
    class-map match-all FTP
    match access-group 102

    Cấu hình policy-map TRAFFIC thực hiện xây dựng cơ chế hàng đợi LLQ:

    policy-map TRAFFIC
    class VoIP
    priority percent 10 // Định nghĩa hàng đợi Priority với 10% băng thông cổng
    class TELNET
    bandwidth 64
    class HTTP
    bandwidth 128
    class FTP
    bandwidth 512

    Áp dụng lên cổng serial s0/1
    R2(config)#int s0/1
    R2(config-if)#service-policy output TRAFFIC


    Kiểm tra:
    R2#sh policy-map interface s0/1
    Serial0/1

    Service-policy output: TRAFFIC

    Class-map: VoIP (match-all)
    0 packets, 0 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: ip rtp 16384 16383
    Queueing
    Strict Priority
    Output Queue: Conversation 264
    Bandwidth 10 (%)
    Bandwidth 154 (kbps) Burst 3850 (Bytes)
    (pkts matched/bytes matched) 0/0
    (total drops/bytes drops) 0/0

    Class-map: TELNET (match-all)
    0 packets, 0 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: access-group 100
    Queueing
    Output Queue: Conversation 265
    Bandwidth 64 (kbps) Max Threshold 64 (packets)
    (pkts matched/bytes matched) 0/0
    (depth/total drops/no-buffer drops) 0/0/0

    Class-map: HTTP (match-all)
    0 packets, 0 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: access-group 101
    Queueing
    Output Queue: Conversation 266
    Bandwidth 128 (kbps) Max Threshold 64 (packets)
    (pkts matched/bytes matched) 0/0
    (depth/total drops/no-buffer drops) 0/0/0

    Class-map: FTP (match-all)
    0 packets, 0 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: access-group 102
    Queueing
    Output Queue: Conversation 267
    Bandwidth 512 (kbps) Max Threshold 64 (packets)
    (pkts matched/bytes matched) 0/0
    (depth/total drops/no-buffer drops) 0/0/0

    Class-map: class-default (match-any)
    0 packets, 0 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: any
    R2#

    Lưu ý: Bandwidth dành cho tất cả class kế cà class-default phải nhỏ hơn giá trị bandwith trên cổng. Trong đó bandwith dành cho class-default là 25% dó đó giá trị bandwidth có thể được cấp cho các lớp còn lại <= 75% giá trị bandwidth trên cống. Để có thể sử dụng cao hơn 75% dùng command max-reserved-bandwidth để thay đổi hành vi mặc định

    R2#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    R2(config)#interface s0/1
    R2(config-if)#bandwidth 64 // Cấu hình giá trị bandwidth trên cổng
    R2(config-if)#max-reserved-bandwidth ?
    <1-100> Max. reservable bandwidth as % of interface bandwidth
    <cr>
    Lưu ý: Ngoại trừ class priority, tất cả các lớp còn lại khi dùng từ khóa bandwidth phải sử dùng cùng một loại đơn vị để cấp bandwidth cho class.

    R2#
    R2#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    R2(config)#policy-map TRAFFIC
    R2(config-pmap)#class HTTP
    R2(config-pmap-c)#bandwidth ?
    <8-2000000> Kilo Bits per second
    percent % of total Bandwidth
    remaining % of the remaining bandwidth
    R2(config-pmap-c)#bandwidth percent 20 // Dùng đơn vị %
    All classes with bandwidth should have consistent units

    Trong bài thực hành này class VoIP là class ưu tiên, tuy nhiên khi lượng traffic trên của class vượt quá bandwidth được cho phép thì traffic vẫn bị drop, do đó với LLQ traffic của lớp VoIP sẽ được ưu tiên gởi trước, nhưng chỉ được phép sự dụng tối đa giá trị bandwidth của mình trong trường hợp nghẽn.

    Ví dụ dưới giá trị bandwidth trên cổng được cấu hình là 64 Kb

    R2#sh policy-map interface s0/1
    Serial0/1

    Service-policy output: TRAFFIC

    Class-map: VoIP (match-all)
    218 packets, 13866 bytes
    30 second offered rate 1000 bps, drop rate 0 bps
    Match: ip rtp 16384 16383
    Queueing
    Strict Priority
    Output Queue: Conversation 264
    Bandwidth 5 (%)
    Bandwidth 3 (kbps) Burst 75 (Bytes)
    (pkts matched/bytes matched) 162/10282
    (total drops/bytes drops) 139/8839

    Class-map: TELNET (match-all)
    1509 packets, 66622 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: access-group 100
    Queueing
    Output Queue: Conversation 265
    Bandwidth 3 (%)
    Bandwidth 1 (kbps) Max Threshold 64 (packets)
    (pkts matched/bytes matched) 937/41406
    (depth/total drops/no-buffer drops) 0/0/0

    Class-map: HTTP (match-all)
    82 packets, 4808 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: access-group 101
    Queueing
    Output Queue: Conversation 266
    Bandwidth 30 (%)
    Bandwidth 19 (kbps) Max Threshold 64 (packets)
    (pkts matched/bytes matched) 82/4808
    (depth/total drops/no-buffer drops) 0/0/0

    Class-map: FTP (match-all)
    0 packets, 0 bytes
    30 second offered rate 0 bps, drop rate 0 bps
    Match: access-group 102
    Queueing
    Output Queue: Conversation 267
    Bandwidth 10 (%)
    Bandwidth 6 (kbps) Max Threshold 64 (packets)
    (pkts matched/bytes matched) 0/0
    (depth/total drops/no-buffer drops) 0/0/0

    Class-map: class-default (match-any)
    5292 packets, 5703571 bytes
    30 second offered rate 54000 bps, drop rate 0 bps
    Match: any
    R2#sh interfaces s0/1
    Serial0/1 is up, line protocol is up
    Hardware is PowerQUICC Serial
    Internet address is 192.168.2.1/24
    MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec,
    reliability 255/255, txload 223/255, rxload 219/255
    Encapsulation HDLC, loopback not set
    Keepalive set (10 sec)
    Last input 00:00:00, output 00:00:00, output hang never
    Last clearing of "show interface" counters never
    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 139
    Queueing strategy: weighted fair
    Output queue: 9/1000/64/139 (size/max total/threshold/drops)
    Conversations 1/4/256 (active/max active/max total)
    Reserved Conversations 3/3 (allocated/max allocated)
    Available Bandwidth 19 kilobits/sec
    30 second input rate 55000 bits/sec, 7 packets/sec
    30 second output rate 56000 bits/sec, 7 packets/sec
    14433 packets input, 10180996 bytes, 0 no buffer
    Received 986 broadcasts, 0 runts, 0 giants, 0 throttles
    17 input errors, 0 CRC, 17 frame, 0 overrun, 0 ignored, 0 abort
    11608 packets output, 8945097 bytes, 0 underruns
    0 output errors, 0 collisions, 30 interface resets
    0 output buffer failures, 0 output buffers swapped out
    5 carrier transitions
    DCD=up DSR=up DTR=up RTS=up CTS=up
    Last edited by phamminhtuan; 12-05-2011, 12:03 PM.
    Phạm Minh Tuấn

    Email : phamminhtuan@vnpro.org
    Yahoo : phamminhtuan_vnpro
    -----------------------------------------------------------------------------------------------
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
    Originally posted by minhvy2009
    Bác minhtuan up lại hộ hình giúp em cái
    Chào bạn,

    Hình đã được up lại
    Phạm Minh Tuấn

    Email : phamminhtuan@vnpro.org
    Yahoo : phamminhtuan_vnpro
    -----------------------------------------------------------------------------------------------
    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

    Comment

    • Working...
      X