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

Cấu hình QoS dùng SDM

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

  • Cấu hình QoS dùng SDM

    Cấu hình QoS dùng SDM
    Yêu cầu :
    Cấu hình cơ chế hàng đợi LLQ dùng SDM

    Sơ đồ:


    Trong bài lab này, sẽ hướng dẫn cách cấu hình mô hình MQC dùng SDM.


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

    R1:
    R1#sh run
    Building configuration...

    Current configuration : 1167 bytes
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R1
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    dot11 syslog
    !
    !
    ip cef
    no ip dhcp use vrf connected
    ip dhcp excluded-address 10.10.10.1
    ip dhcp excluded-address 10.10.20.1
    !
    ip dhcp pool 10.10.20.0
    network 10.10.20.0 255.255.255.0
    default-router 10.10.20.1
    !
    !
    ip auth-proxy max-nodata-conns 3
    ip admission max-nodata-conns 3
    !
    multilink bundle-name authenticated
    !
    !
    voice-card 0
    no dspfarm
    !
    archive
    log config
    hidekeys
    !
    interface FastEthernet0/0
    ip address 10.10.10.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    ip address 10.10.20.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface Serial0/1/0
    ip address 192.1.1.1 255.255.255.0
    !
    ip forward-protocol nd
    ip route 0.0.0.0 0.0.0.0 192.1.1.2
    !
    !
    ip http server
    no ip http secure-server
    !
    control-plane
    !
    line con 0
    exec-timeout 0 0
    logging synchronous
    line aux 0
    line vty 0 4
    privilege level 15
    no login
    !
    scheduler allocate 20000 1000
    !
    end

    R1#


    R2#sh run
    Building configuration...

    Current configuration : 1198 bytes
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R2
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    memory-size iomem 15
    !
    !
    ip cef
    !
    voice-card 0
    no dspfarm
    !
    interface FastEthernet0/0
    ip address 20.20.20.1 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    ip address dhcp
    ip nat outside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    interface Serial0/1/0
    ip address 192.1.1.2 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    clock rate 2000000
    !
    interface Serial0/3/0
    no ip address
    shutdown
    clock rate 2000000
    !
    ip route 10.10.0.0 255.255.0.0 192.1.1.1
    !
    !
    ip http server
    no ip http secure-server
    ip nat inside source list 1 interface FastEthernet0/1 overload
    !
    access-list 1 permit 10.10.0.0 0.0.255.255
    !
    control-plane
    !
    line con 0
    exec-timeout 0 0
    privilege level 15
    logging synchronous
    line aux 0
    line vty 0 4
    privilege level 15
    logging synchronous
    no login
    !
    scheduler allocate 20000 1000
    !
    end

    R2#

    c2600_1#sh run
    Building configuration...

    Current configuration : 832 bytes
    !
    version 12.3
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname c2600_1
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    ip subnet-zero
    ip cef
    !
    ip audit po max-events 100
    !
    interface Ethernet0/0
    ip address 10.10.10.2 255.255.255.0
    half-duplex
    !
    interface BRI0/0
    no ip address
    encapsulation hdlc
    shutdown
    !
    ip http server
    no ip http secure-server
    ip classless
    ip route 0.0.0.0 0.0.0.0 10.10.10.1
    !
    voice-port 1/0/0
    !
    voice-port 1/0/1
    !
    dial-peer voice 1 pots
    destination-pattern 1111
    port 1/0/0
    !
    dial-peer voice 2 voip
    destination-pattern 2222
    session target ipv4:20.20.20.2
    !
    !
    !
    line con 0
    exec-timeout 0 0
    logging synchronous
    line aux 0
    line vty 0 4
    privilege level 15
    no login
    !
    !
    end

    c2600_1#

    c2600_2#sh run
    Building configuration...

    Current configuration : 854 bytes
    !
    version 12.3
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname c2600_2
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    ip subnet-zero
    ip cef
    !
    ip audit po max-events 100
    !
    interface Ethernet0/0
    ip address 20.20.20.2 255.255.255.0
    half-duplex
    !
    interface TokenRing0/0
    no ip address
    shutdown
    ring-speed 16
    !
    ip http server
    no ip http secure-server
    ip classless
    ip route 0.0.0.0 0.0.0.0 20.20.20.1
    !
    voice-port 1/0/0
    !
    voice-port 1/0/1
    !
    dial-peer voice 1 pots
    destination-pattern 2222
    port 1/0/0
    !
    dial-peer voice 2 voip
    destination-pattern 1111
    session target ipv4:10.10.10.2
    !
    line con 0
    exec-timeout 0 0
    logging synchronous
    line aux 0
    line vty 0 4
    privilege level 15
    logging synchronous
    no login
    !
    !
    end

    c2600_2#

    Các bước thực hiện
    Bước 1:
    Dùng một máy PC trên LAN 10.10.20.0 /24 dùng chương trình SDM kết nối với R2:



    Chương trình sẽ bắt đầu chạy:






    Vào tab configure




    Bên thanh công cụ bên trái chọn Quality of Service, Chọn Lauch QoS wizard, cũng có thể chỉnh sửa dùng tab Edit QoS Policy







    Đọc nội dung giới thiệu sau đó chọn Next



    Chọn cổng giao tiếp mà chính sách QoS sẽ được cài đặt. Trong trường hợp này sẽ để cho cơ chế NBAR tự động dò tìm lưu lượng chạy qua. Chọn Next để tiếp tục




    Do cổng kết nối đang dùng cấu hình SDM từ PC cũng là cổng sẽ áp dụng QoS nên sẽ có bảng cảnh báo thông tin có thể bị đứt kết nối. Chọn Yes để tiếp tục


    Hình 118


    Bảng cấu hình với các thông số mặc định sẽ hiện ra, có thể giữ hoặc chỉnh sửa lại cho phù hợp với hệ thống




    Trong trường hợp này ví dụ chỉnh lại lưu lượng voip chiếm 10% băng thông và transactional lên 10%, chú ý là giao diện sẽ tính toán cho phù hợp với thông số bandwidth trên cổng hiện hành (trong trường hợp này là mặc định 1.544 kbps), Chọn Next để tiếp tục





    Một bảng tóm tắt sẽ hiển thị các thông số Cisco SDM sẽ áp dụng lên router, chọn Finish để hoàn tất, back để chỉnh sửa nếu muốn và cancel để hủy bỏ.




    Do có dùng cơ chế NBAR trên cổng nên SDM truy vấn cho người đang cấu hình một lần nữa về mong muốn sử dụng NBAR trên cổng tương ứng. Chọn Yes



    SDM tiến hành cài đặt các thông số QoS tương ứng lên router, chọn OK




    Thông tin cấu hình được hiển thị dưới dạng đồ họa, người dùng vẫn có thể chỉnh sửa lại các thông số nếu muốn.




    Có thể quan sát thông tin giám sát lưu lượng bằng SDM, vào Tab Monitor




    Chọn QoS status bên thanh công cụ bên trái



    Thực hiện 1 cuộc gọi và quan sát kết quả:
    Có thể thấy thông tin thống kê tốc độ truyền của lớp lưu lượng tương ứng, trong trường hợp này là SDM-Voice với 12 kbps



    Theo thời gian, tốc độ truyền tăng lên 25 kbps






    Quan sát cấu hình sinh ra trên R2

    R2#sh run
    Building configuration...

    Current configuration : 3203 bytes
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R2
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    memory-size iomem 15
    !
    !
    ip cef
    !
    !
    !
    class-map match-any SDM-Transactional-1
    match protocol citrix
    match protocol finger
    match protocol notes
    match protocol novadigm
    match protocol pcanywhere
    match protocol secure-telnet
    match protocol sqlnet
    match protocol sqlserver
    match protocol ssh
    match protocol telnet
    match protocol xwindows
    class-map match-any SDM-Signaling-1
    match protocol h323
    match protocol rtcp
    match protocol sip
    class-map match-any SDM-Scavenger-1
    match protocol napster
    match protocol fasttrack
    match protocol gnutella
    class-map match-any SDM-Routing-1
    match protocol bgp
    match protocol egp
    match protocol eigrp
    match protocol ospf
    match protocol rip
    match protocol rsvp
    class-map match-any SDM-Voice-1
    match protocol rtp audio
    class-map match-any SDM-Streaming-Video-1
    match protocol cuseeme
    match protocol netshow
    match protocol rtsp
    match protocol streamwork
    match protocol vdolive
    class-map match-any SDM-Management-1
    match protocol dhcp
    match protocol dns
    match protocol imap
    match protocol kerberos
    match protocol ldap
    match protocol secure-imap
    match protocol secure-ldap
    match protocol snmp
    match protocol socks
    match protocol syslog
    class-map match-any SDM-Interactive-Video-1
    match protocol rtp video
    class-map match-any SDM-BulkData-1
    match protocol exchange
    match protocol ftp
    match protocol irc
    match protocol nntp
    match protocol pop3
    match protocol printer
    match protocol secure-ftp
    match protocol secure-irc
    match protocol secure-nntp
    match protocol secure-pop3
    match protocol smtp
    match protocol tftp
    !
    !
    policy-map SDM-QoS-Policy-1
    class SDM-Voice-1
    set dscp ef
    priority percent 10
    class SDM-Signaling-1
    set dscp cs3
    bandwidth percent 5
    class SDM-Routing-1
    set dscp cs6
    bandwidth percent 5
    class SDM-Management-1
    set dscp cs2
    bandwidth percent 5
    class SDM-Transactional-1
    set dscp af21
    bandwidth percent 10
    class class-default
    fair-queue
    random-detect
    !
    !
    !
    interface FastEthernet0/0
    ip address 20.20.20.1 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    interface FastEthernet0/1
    ip address dhcp
    ip nat outside
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    interface Serial0/1/0
    ip address 192.1.1.2 255.255.255.0
    ip nbar protocol-discovery
    ip nat inside
    ip virtual-reassembly
    clock rate 2000000
    service-policy output SDM-QoS-Policy-1
    !
    interface Serial0/3/0
    no ip address
    shutdown
    clock rate 2000000
    !
    ip route 10.10.0.0 255.255.0.0 192.1.1.1
    !
    !
    ip http server
    no ip http secure-server
    ip nat inside source list 1 interface FastEthernet0/1 overload
    !
    access-list 1 permit 10.10.0.0 0.0.255.255
    !
    !
    !
    control-plane
    !
    line con 0
    exec-timeout 0 0
    privilege level 15
    logging synchronous
    line aux 0
    line vty 0 4
    privilege level 15
    logging synchronous
    no login
    !
    scheduler allocate 20000 1000
    !
    end

    R2#
    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
    mình cũng đang học cái này đây, nhưng cấu hình mãi không được, không biết tại lỗi gì

    Comment

    • Working...
      X