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.

Wfq

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

  • Wfq



    Mô tả:
    Bài thực hành này hướng dẫn quá trình kích hoạt WFQ trên cổng và hiểu được hoạt động của WFQ, WFQ là công cụ hàng đợi rất dễ trong việc cấu hình bởi vi hành vi mặc định khi xem xét lưu lượng dựa vào khái niệm flow (kết hợp các thông tin bao gồm địa chỉ IP nguồn, đích, cổng nguồn, đích, giá trị trong byte ToS) và đối xử tất cả lưu lượng một cách công bằng trong việc dành băng thông.
    Do đó để hiểu hoạt động của WFQ cần nắm rõ những thông số được cung cấp trong những lệnh show.

    Thực hiện:
    Cấu hình ban đầu:

    Cấu hình trên R1:

    R1#sh run
    Building configuration...

    Current configuration:
    !
    version 12.0
    !
    hostname R1
    !
    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 trên R3:
    R3#sh run
    Building configuration...

    Current configuration : 932 bytes
    !
    version 12.2
    !
    hostname R3
    !
    ip subnet-zero
    !
    !
    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

    Cấu hình trên R2:
    R2#show run

    Building configuration...

    Current configuration : 920 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 R3 192.168.2.2
    ip host R1 192.168.1.1
    !
    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
    no fair-queue
    !
    interface Serial0/1
    ip address 192.168.2.1 255.255.255.0
    !
    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 cơ chế hàng đợi WFQ và kiểm tra kết quả

    Bật cơ chế hàng đợi WFQ trên cổng s0/1 của R2

    R2#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    R2(config)#interface s0/1
    R2(config-if)#fair-queue // Dùng hàng đợi WFQ trên cống s0/1

    Kiểm tra cấu hình

    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 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:01, output 00:00:02, 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/1/256 (active/max active/max total)
    Reserved Conversations 0/0 (allocated/max allocated)
    Available Bandwidth 1158 kilobits/sec
    5 minute input rate 0 bits/sec, 0 packets/sec
    5 minute output rate 0 bits/sec, 0 packets/sec
    8500 packets input, 1347403 bytes, 0 no buffer
    Received 957 broadcasts, 0 runts, 0 giants, 0 throttles
    2 input errors, 0 CRC, 2 frame, 0 overrun, 0 ignored, 0 abort
    7528 packets output, 602047 bytes, 0 underruns
    0 output errors, 0 collisions, 21 interface resets
    0 output buffer failures, 0 output buffers swapped out
    8 carrier transitions
    DCD=up DSR=up DTR=up RTS=up CTS=up

    R2#sh queueing fair
    Current fair queue configuration:

    Interface Discard Dynamic Reserved Link Priority
    threshold queues queues queues queues
    Serial0/0 64 256 0 8 1
    Serial0/1 64 256 0 8 1

    R2#
    R2#sh queueing fair interface s0/1
    Current fair queue configuration:

    Interface Discard Dynamic Reserved Link Priority
    threshold queues queues queues queues
    Serial0/0 64 256 0 8 1
    Serial0/1 64 256 0 8 1

    Tạo lượng lớn Traffic trên host A và quan sát kết quả

    R2#sh queue s0/1
    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
    Queueing strategy: weighted fair
    Output queue: 19/1000/64/0 (size/max total/threshold/drops)
    Conversations 6/6/256 (active/max active/max total)
    Reserved Conversations 0/0 (allocated/max allocated)
    Available Bandwidth 1158 kilobits/sec
    (depth/weight/total drops/no-buffer drops/interleaves) 1/32384/0/0/0
    Conversation 25, linktype: ip, length: 52
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x12BB, ttl: 126,
    TOS: 0 prot: 6, source port 1257, destination port 80
    (depth/weight/total drops/no-buffer drops/interleaves) 1/32384/0/0/0
    Conversation 24, linktype: ip, length: 52
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x12B9, ttl: 126,
    TOS: 0 prot: 6, source port 1256, destination port 80
    (depth/weight/total drops/no-buffer drops/interleaves) 1/32384/0/0/0
    Conversation 22, linktype: ip, length: 44
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x12BD, ttl: 126,
    TOS: 0 prot: 6, source port 1254, destination port 80
    (depth/weight/total drops/no-buffer drops/interleaves) 1/32384/0/0/0
    Conversation 23, linktype: ip, length: 44
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x12BC, ttl: 126,
    TOS: 0 prot: 6, source port 1255, destination port 80
    (depth/weight/total drops/no-buffer drops/interleaves) 5/32384/0/0/0
    Conversation 215, linktype: ip, length: 1152
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x12AE, ttl: 126, prot: 1
    (depth/weight/total drops/no-buffer drops/interleaves) 10/32384/0/0/0
    Conversation 210, linktype: ip, length: 1504
    source: 192.168.0.2, destination: 100.1.1.1, id: 0x12B7, ttl: 126, prot: 1

    R2(config)#interface s0/1
    R2(config-if)#fair-queue 100 64 10 // Thay đổi các tham số mặc định của WFQ (cdt = 100, dynamic queues = 64, RSVP queues=10)
    R2(config-if)#hold-queue 500 out // kích cỡ hàng đợi lớn nhất 500

    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 1544 Kbit, DLY 20000 usec,
    reliability 255/255, txload 9/255, rxload 9/255
    Encapsulation HDLC, loopback not set
    Keepalive set (10 sec)
    Last input 00:00:07, 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: 0
    Queueing strategy: weighted fair
    Output queue: 9/500/100/0 (size/max total/threshold/drops)
    Conversations 2/3/64 (active/max active/max total)
    Reserved Conversations 0/0 (allocated/max allocated)
    Available Bandwidth 1158 kilobits/sec
    5 minute input rate 55000 bits/sec, 5 packets/sec
    5 minute output rate 56000 bits/sec, 5 packets/sec
    11960 packets input, 4463874 bytes, 0 no buffer
    Received 1129 broadcasts, 0 runts, 0 giants, 0 throttles
    2 input errors, 0 CRC, 2 frame, 0 overrun, 0 ignored, 0 abort
    10878 packets output, 3728865 bytes, 0 underruns
    0 output errors, 0 collisions, 23 interface resets
    0 output buffer failures, 0 output buffers swapped out
    10 carrier transitions
    DCD=up DSR=up DTR=up RTS=up CTS=up

    R2#sh queueing fair
    Current fair queue configuration:

    Interface Discard Dynamic Reserved Link Priority
    threshold queues queues queues queues
    Serial0/0 64 256 0 8 1
    Serial0/1 100 64 10 8 1

    R2#sh queue s0/1
    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
    Queueing strategy: weighted fair
    Output queue: 9/500/100/0 (size/max total/threshold/drops)
    Conversations 4/7/64 (active/max active/max total)
    Reserved Conversations 0/0 (allocated/max allocated)
    Available Bandwidth 1158 kilobits/sec

    (depth/weight/total drops/no-buffer drops/interleaves) 3/32384/0/0/0
    Conversation 26, linktype: ip, length: 44
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x173A, ttl: 126,
    TOS: 0 prot: 6, source port 1321, destination port 80

    (depth/weight/total drops/no-buffer drops/interleaves) 1/32384/0/0/0
    Conversation 27, linktype: ip, length: 52
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x173E, ttl: 126,
    TOS: 0 prot: 6, source port 1322, destination port 80

    (depth/weight/total drops/no-buffer drops/interleaves) 2/32384/0/0/0
    Conversation 18, linktype: ip, length: 1504
    source: 192.168.0.2, destination: 100.1.1.1, id: 0x172E, ttl: 126, prot: 1

    (depth/weight/total drops/no-buffer drops/interleaves) 3/32384/0/0/0
    Conversation 23, linktype: ip, length: 1504
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x1736, ttl: 126, prot: 1
    //
    Tạo lượng lớn Traffic thông qua lệnh Ping để tạo ra nghẽn Traffic trên cống và quan sát kết quả

    R2#sh queueing fair
    Current fair queue configuration:

    Interface Discard Dynamic Reserved Link Priority
    threshold queues queues queues queues
    Serial0/0 64 256 0 8 1
    Serial0/1 10 64 10 8 1

    R2#

    R2#sh queue s0/1
    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 311
    Queueing strategy: weighted fair
    Output queue: 6/500/10/311 (size/max total/threshold/drops)
    Conversations 2/29/64 (active/max active/max total)
    Reserved Conversations 0/0 (allocated/max allocated)
    Available Bandwidth 1158 kilobits/sec

    (depth/weight/total drops/no-buffer drops/interleaves) 2/32384/112/0/0
    Conversation 23, linktype: ip, length: 44
    source: 192.168.0.2, destination: 192.168.2.2, id: 0x2556, ttl: 126,
    TOS: 0 prot: 6, source port 1701, destination port 80

    (depth/weight/total drops/no-buffer drops/interleaves) 4/32384/199/0/0
    Conversation 18, linktype: ip, length: 1504
    source: 192.168.0.2, destination: 100.1.1.1, id: 0x255B, ttl: 126, prot: 1

    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 1544 Kbit, DLY 20000 usec,
    reliability 255/255, txload 9/255, rxload 6/255
    Encapsulation HDLC, loopback not set
    Keepalive set (10 sec)
    Last input 00:00:07, 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: 633
    Queueing strategy: weighted fair
    Output queue: 9/500/10/633 (size/max total/threshold/drops)
    Conversations 2/29/64 (active/max active/max total)
    Reserved Conversations 0/0 (allocated/max allocated)
    Available Bandwidth 1158 kilobits/sec
    30 second input rate 39000 bits/sec, 4 packets/sec
    30 second output rate 55000 bits/sec, 5 packets/sec
    22970 packets input, 17154038 bytes, 0 no buffer
    Received 1367 broadcasts, 0 runts, 0 giants, 0 throttles
    2 input errors, 0 CRC, 2 frame, 0 overrun, 0 ignored, 0 abort
    22865 packets output, 17103407 bytes, 0 underruns
    0 output errors, 0 collisions, 25 interface resets
    0 output buffer failures, 0 output buffers swapped out
    10 carrier transitions
    DCD=up DSR=up DTR=up RTS=up CTS=up
    Last edited by phamminhtuan; 17-05-2013, 06: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
    thầy cho em xin lại cái hình với ạ

    Comment


    • #3
      Originally posted by kingkarus View Post
      thầy cho em xin lại cái hình với ạ
      Hình được cập nhật hình lại rồi nha em
      Chúc vui vẻ
      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


      • #4
        em làm như hướng dẫn, tạo 1 lượng lớn traffic từ host A, em dùng http traffic gen tạo request đến R3, kèm theo lệnh ping, nhưng mà R2 vẫn không hiển thị các thông tin bắt được khi show queueing

        Comment

        Working...
        X