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

Nén gói tin rtp dùng kỹ thuật nén rtp

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

  • Nén gói tin rtp dùng kỹ thuật nén rtp

    NÉN GÓI TIN RTP DÙNG KỸ THUẬT NÉN RTP
    Tóm tắt chức năng

    Chức năng nén rtp header có khả năng làm giảm kích cỡ các header RTP xuống nhằm làm giảm kích cỡ của gói RTP, cải thiện thời gian chuyển thông tin chuỗi bit của gói tin xuống môi trường truyền dẫn. Chức năng này phải thực hiện theo link, theo từng vùng liên kết (hop by hop). Chỉ nên dùng tính năng này trên những đường truyền có tốc độ truyền thấp (nhỏ hơn 768 kbps); khi dùng lưu ý do việc nén có liên quan đến thao tác nén và giải nén nên sẽ làm tăng thời gian xử lý trên thiết bị định tuyến. Ngữ cảnh nén (context) chứa đầy đủ thông tin của header bị nén và được cập nhật định kỳ giữa 2 bên.

    Sơ đồ

    Yêu cầu
    Cấu hình liên kết serial giữa R1 và R2 hỗ trợ nén gói tin RTP và kiểm tra.

    Các bước thực hiện

    A. Cấu hình ban đầu

    R1#sh run
    Building configuration...

    Current configuration : 1142 bytes
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R1
    !
    ip cef
    !
    !
    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

    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
    !
    ip cef
    !
    interface FastEthernet0/0
    ip address 20.20.20.1 255.255.255.0
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    !
    interface Serial0/1/0
    ip address 192.1.1.2 255.255.255.0
    ip virtual-reassembly
    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
    !
    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
    !
    ip subnet-zero
    ip cef
    !
    !
    interface Ethernet0/0
    ip address 10.10.10.2 255.255.255.0
    half-duplex
    !
    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_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
    ip subnet-zero
    ip cef
    !
    interface Ethernet0/0
    ip address 20.20.20.2 255.255.255.0
    half-duplex
    !
    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

    B. Thực hiện
    Bước 1: cấu hình nén RTP trên R1

    R1#conf t
    R1(config)#int s0/1/0
    R1(config-if)#ip rtp header-compression
    !Yêu cầu nén rtp header

    R1(config-if)#ip rtp compression-connections 32
    !Thiết lập số phiên được nén tối đa là 32, thông số này phải giống nhau ở 2 bên

    Bước 2: cấu hình tương tự trên R2
    R2#conf t
    R2(config)#int s0/1/0
    R2(config-if)#ip rtp header-compression
    R2(config-if)#ip rtp compression-connections 32

    Kiểm tra

    Kiểm tra các thông tin ban đầu khi chưa thực hiện cuộc gọi voip

    R1#sh ip rtp header-compression
    RTP/UDP/IP header compression statistics:
    Interface Serial0/1/0 (compression on, Cisco, RTP)
    Rcvd: 0 total, 0 compressed, 0 errors, 0 status msgs
    0 dropped, 0 buffer copies, 0 buffer failures
    Sent: 0 total, 0 compressed, 0 status msgs, 0 not predicted
    0 bytes saved, 0 bytes sent
    Connect: 32 rx slots, 32 tx slots,
    0 misses, 0 collisions, 0 negative cache hits, 32 free contexts

    R2#sh ip rtp header-compression
    RTP/UDP/IP header compression statistics:
    Interface Serial0/1/0 (compression on, Cisco, RTP)
    Rcvd: 0 total, 0 compressed, 0 errors, 0 status msgs
    0 dropped, 0 buffer copies, 0 buffer failures
    Sent: 0 total, 0 compressed, 0 status msgs, 0 not predicted
    0 bytes saved, 0 bytes sent
    Connect: 32 rx slots, 32 tx slots,
    0 misses, 0 collisions, 0 negative cache hits, 32 free contexts

    Sau khi thực hiện cuộc gọi từ 1111 đến 2222

    R1#sh ip rtp header-compression
    RTP/UDP/IP header compression statistics:
    Interface Serial0/1/0 (compression on, Cisco, RTP)
    Rcvd: 635 total, 633 compressed, 0 errors, 0 status msgs
    0 dropped, 0 buffer copies, 0 buffer failures
    Sent: 434 total, 433 compressed, 0 status msgs, 19 not predicted
    16301 bytes saved, 9605 bytes sent
    2.69 efficiency improvement factor
    Connect: 32 rx slots, 32 tx slots,
    1 misses, 0 collisions, 0 negative cache hits, 32 free contexts
    99% hit ratio, five minute miss rate 0 misses/sec, 0 max

    R1#sh ip rtp header-compression s0/1/0 detail
    RTP/UDP/IP header compression statistics:
    Configured:
    Max Header 168 Bytes, Max Time 5 Secs, Max Period 256 Packets, Feedback On
    Negotiated:
    Max Header 168 Bytes, Max Time 5 Secs, Max Period 256 Packets, Feedback On
    TX contexts:

    Connection 0:
    IP source: 10.10.10.2, IP destination: 20.20.20.2
    UDP source: 17834, UDP destination: 19144, RTP ssrc: 245893634
    Last packet sent is compressed-udp and last sequence sent is 12
    Resynchronisation feedback has not been received
    Predictor not ready

    RX contexts:

    Connection 0:
    IP source: 20.20.20.2, IP destination: 10.10.10.2
    UDP source: 19144, UDP destination: 17834, RTP ssrc: 273552386
    Last packet received is compressed-rtp and last sequence received is 8

    R2#sh ip rtp header-compression
    RTP/UDP/IP header compression statistics:
    Interface Serial0/1/0 (compression on, Cisco, RTP)
    Rcvd: 692 total, 686 compressed, 0 errors, 0 status msgs
    0 dropped, 0 buffer copies, 0 buffer failures
    Sent: 3170 total, 3168 compressed, 0 status msgs, 17 not predicted
    120259 bytes saved, 69816 bytes sent
    2.72 efficiency improvement factor
    Connect: 32 rx slots, 32 tx slots,
    2 misses, 0 collisions, 0 negative cache hits, 31 free contexts
    99% hit ratio, five minute miss rate 0 misses/sec, 0 max

    R2#sh ip rtp header-compression s0/1/0 detail
    RTP/UDP/IP header compression statistics:
    Configured:
    Max Header 168 Bytes, Max Time 5 Secs, Max Period 256 Packets, Feedback On
    Negotiated:
    Max Header 168 Bytes, Max Time 5 Secs, Max Period 256 Packets, Feedback On
    TX contexts:

    Connection 0:
    IP source: 20.20.20.2, IP destination: 10.10.10.2
    UDP source: 19144, UDP destination: 17834, RTP ssrc: 273552386
    Last packet sent is compressed-rtp and last sequence sent is 5
    Resynchronisation feedback has not been received
    Predictor ready

    RX contexts:

    Connection 0:
    IP source: 10.10.10.2, IP destination: 20.20.20.2
    UDP source: 17834, UDP destination: 19144, RTP ssrc: 245893634
    Last packet received is compressed-udp and last sequence received is 4

    Chú ý các thông số gửi nhận và số gói tin được nén – giải nén được liệt kê, thông tin context chứa header của gói tin RTP bao gồm IP header , UDP và RTP cũng được ghi nhận.

    Cấu hình cuối cùng của hệ thống:
    R1#sh run
    Building configuration...

    Current configuration : 1142 bytes
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname R1
    !
    ip cef
    !
    !
    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 rtp header-compression
    ip rtp compression-connections 32
    !
    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

    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
    !
    ip cef
    !
    interface FastEthernet0/0
    ip address 20.20.20.1 255.255.255.0
    ip virtual-reassembly
    duplex auto
    speed auto
    !
    !
    interface Serial0/1/0
    ip address 192.1.1.2 255.255.255.0
    ip rtp header-compression
    ip rtp compression-connections 32
    ip virtual-reassembly
    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
    !
    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#

    Cấu hình c2600_1 và c2600_2 vẫn giống như cấu hình ban đầu.
    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
Working...
X