• 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 gatekeeper với một Zone

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

  • Cấu hình gatekeeper với một Zone

    Cấu hình gatekeeper với một Zone

    Tóm tắt chức năng Gatekeeper

    Gatekeeper là thiết bị đóng vai trò như thiết bị hỗ trợ thông tin định tuyến cuộc gọi trong công nghệ VoIP, bản thân các gateway có thể chứa các thông tin giúp định tuyến các cuộc gọi trực tiếp lẫn nhau, tuy nhiên khi số lượng VoIP gateway tăng dần thì việc cấu hình các thông tin định tuyến này trở nên quá lớn và phân tán. Do đó, các thông tin định tuyến cuộc gọi được cấu hình tập trung trên gatekeeper, khi các gateway sẽ liên lạc với gatekeeper khi có nhu cầu tìm kiếm thông tin này. Gatekeeper ngoài chức năng lưu trữ thông tin định tuyến, phân giải cuộc gọi còn thực hiện các chức năng nâng cao như điều khiển khả năng chấp nhận cuộc gọi mới (admission control), điều khiển băng thông (bandwidth control) và quản lý vùng (zone management).

    Yêu cầu cấu hình

    • Cấu hình router 7200 như là gatekeeper
    • Cấu hình hai router Saigon1, Saigon2 thực hiện cuộc gọi thông qua gatekeeper.
    • Yêu cầu 2 gateway Saigon1 và Saigon2 thuộc cùng vùng (zone) Saigon trên gatekeeper


    Sơ đồ mạng




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

    Gatekeeper#sh run
    Code:
    Building configuration...
       
      Current configuration : 787 bytes
      !
      version 12.4
      service timestamps debug datetime msec
      service timestamps log datetime msec
      no service password-encryption
      !
      hostname Gatekeeper
      !
      ip cef
      !
      !
      interface FastEthernet0/0
       ip address 172.16.1.10 255.255.255.0
       duplex auto
       speed auto
      !
      !
      control-plane
      !
      line con 0
       exec-timeout 0 0
       logging synchronous
       stopbits 1
      line aux 0
       stopbits 1
      line vty 0 4
      !
      end
    Saigon1#sh run
    Code:
    Building configuration...
       
      Current configuration : 982 bytes
      !
      version 12.3
      !
      hostname Saigon1
      !
      ip subnet-zero
      ip cef
      !
      interface Ethernet0/0
       ip address 172.16.1.1 255.255.255.0
       half-duplex
      !
      !
      ip http server
      no ip http secure-server
      ip classless
      !
      voice-port 1/0/0
      !
      voice-port 1/0/1
      !
      line con 0
      line aux 0
      line vty 0 4
       privilege level 15
       no login
      !
      end
    Saigon2#sh run
    Code:
    Building configuration...
       
      Current configuration : 958 bytes
      !
      version 12.3
      hostname Saigon2
      !
      ip subnet-zero
      ip cef
      !
      !
      interface Ethernet0/0
       ip address 172.16.1.2 255.255.255.0
       half-duplex
       !
      !
      ip http server
      no ip http secure-server
      ip classless
      !
      voice-port 1/0/0
      !
      voice-port 1/0/1
      !
      line con 0
      line aux 0
      line vty 0 4
       login
      !
      !
      end
    B. Các bước thực hiện

    Bước 1: Cấu hình gatekeeper

    Vào mode cấu hình configuration
    Gatekeeper#configure terminal
    Gatekeeper(config)#gatekeeper <-- vào kiểu cấu hình gatekeeper
    Gatekeeper (config−gk)#
    Gatekeeper(config-gk)#zone local Saigon vnpro.org enable-intrazone
    Định nghĩa vùng (zone) do gatekeeper quản lý
    Cú pháp câu lệnh trên có dạng:
    Gatekeeper (config−gk)#zone local gatekeeper−name domain−name [ras−IP−address]
    Gatekeeper-name: đặt tên cho vùng (zone) trên gatekeeper
    Domain-name: tên domain đại diện
    Trong câu lệnh trên, địa chỉ RAS là tùy chọn. Nếu bạn dùng tùy chọn này, khi gatekeeper trả lời cho thông điệp tìm gatekeeper từ voice gateway, nó sẽ chỉ cho các thiết bị đầu cuối dùng luôn địa chỉ này trong các truyền thông tương lai.
    Trong trường hợp này dùng thêm từ khóa enable-intrazone cho phép định tuyến các cuộc gọi giữa các gateway trong cùng một zone

    Gatekeeper(config-gk)#zone prefix Saigon 1...
    Khai báo số prefix của zone, trong trường hợp này vùng đại diện Saigon là vùng có đầu số 1 và 3 số tiếp theo bất kỳ

    Gatekeeper (config−gk)#no shutdown
    Bật chức năng gatekeeper.

    Bước 2: Cấu hình voice gateway

    Saigon1#configure terminal
    Saigon1(config)#gateway

    Cấu hình cổng giao tiếp dùng H323 trên thiết bị gateway.

    Saigon1(config)#interface ethernet 0/0
    Saigon1(config−if)#h323−gateway voip interface
    bật tính năng H323 voip trên cổng này

    Saigon1(config−if)#h323−gateway voip h323−id Saigon1
    Cú pháp câu lệnh có dạng:
    Saigon1(config−if)#h323−gateway voip h323−id gateway−id
    Gateway id trong trường hợp này là tên mà gateway chọn liên lạc với gatekeeper (Saigon1)

    Saigon1(config−if)#h323−gateway voip id Saigon ipaddr 172.16.1.10
    Saigon1(config−if)#h323−gateway voip id gatekeeper−id {ipaddr ip−address [port−number] | multicast}
    Gatekeeper-id chính là tên của zone mà gatekeeper cấu hình thiết bị này thuộc về
    Ip-address chính là địa chỉ IP của gatekeeper

    Saigon1(config−if)#h323−gateway voip tech−prefix prefix
    Cấu hình gateway để đăng ký gatekeeper với giá trị technology prefix, nếu dùng technology prefix, technology prefix thể hiện loại dịch vụ sử dụng là voice hay video.


    Thực hiện cấu hình voice port, dial peers dạng pots, các VoIP dialer peer. Cấu hình session target liên hệ đến gatekeeper dùng H.225 RAS.

    Cấu hình các port FXS và số thoại tương ứng cho các port:

    Saigon2(config)#dial-peer voice 1 pots
    Saigon2(config-dial-peer)#
    dial-peer voice 1 pots
    destination-pattern 1121
    port 1/0/0
    !
    dial-peer voice 2 pots
    destination-pattern 1122
    port 1/0/1
    !
    Cấu hình tham chiếu các số gọi có 4 ký số với 3 ký số đầu là 111 thì liên lạc với gatekeeper

    dial-peer voice 100 voip
    destination-pattern 111.
    session target ras
    !

    Cấu hình tương tự cho Saigon1 trở thành gateway (liên lạc thông qua cổng e0/0 trên thiết bị) với số thoại liên hệ với cổng FXS là 1111 và 1112 đồng thời các tham chiếu đến số gọi có 4 ký số với 3 ký số đầu là 112 thì liên lạc với gatekeeper.

    Tiến hành quay số giữa 2 điện thoại 1111 và 1121 và kiểm tra thông tin

    C. Kiểm tra cấu hình

    Thực hiện cuộc gọi sẽ thành công,

    Quan sát cấu hình dial-peer thực hiện trên các thiết bị gateway


    Saigon2#sh dial-peer voice summary
    dial-peer hunt 0
    AD PRE PASS OUT
    TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT
    1 pots up up 1121 0 up 1/0/0
    2 pots up up 1122 0 up 1/0/1
    100 voip up up 111. 0 syst ras
    Saigon2#

    Saigon1#sh dial-peer voice summary
    dial-peer hunt 0

    AD PRE PASS OUT
    TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT
    1 pots up up 1111 0 up 1/0/0
    2 pots up up 1112 0 up 1/0/1
    100 voip up up 112. 0 syst ras

    Saigon1#

    Kiểm tra thông tin trên gatekeeper
    Gatekeeper#sh gatekeeper status
    Gatekeeper State: UP
    Load Balancing: DISABLED
    Flow Control: DISABLED
    Zone Name: Saigon
    Accounting: DISABLED
    Endpoint Throttling: DISABLED
    Security: DISABLED
    Maximum Remote Bandwidth: unlimited
    Current Remote Bandwidth: 0 kbps
    Current Remote Bandwidth (w/ Alt GKs): 0 kbps
    Hunt Scheme: Random

    Gatekeeper#


    Xem các thông tin đăng ký giữa gateway đến gatekeeper, có thể thấy các thông tin số cấu hình trên các gateway được thông báo đến gatekeeper.

    Gatekeeper#sh gatekeeper endpoints
    GATEKEEPER ENDPOINT REGISTRATION
    ================================
    CallSignalAddr Port RASSignalAddr Port Zone Name Type Flags
    --------------- ----- ------------- ----- --------- ---- -----
    172.16.1.1 1720 172.16.1.1 54713 Saigon VOIP-GW
    E164-ID: 1111
    E164-ID: 1112
    H323-ID: Saigon1
    Voice Capacity Max.= Avail.= Current.= 1
    172.16.1.2 1720 172.16.1.2 49153 Saigon VOIP-GW
    H323-ID: Saigon2
    E164-ID: 1121
    E164-ID: 1122
    Voice Capacity Max.= Avail.= Current.= 1
    Total number of active registrations = 2

    Gatekeeper#

    Xem các thông tin cuộc gọi hiện thời

    Gatekeeper#sh gatekeeper calls
    Total number of active calls = 1.
    GATEKEEPER CALL INFO
    ====================
    LocalCallID Age(secs) BW
    1-32559 1222 16(Kbps)
    Endpt(s): Alias E.164Addr
    src EP: Saigon2 1121
    CallSignalAddr Port RASSignalAddr Port
    172.16.1.2 1720 172.16.1.2 49153
    Endpt(s): Alias E.164Addr
    dst EP: Saigon1 1111
    CallSignalAddr Port RASSignalAddr Port
    172.16.1.1 1720 172.16.1.1 54713

    Gatekeeper#

    Xem thông tin cấu hình zone trên gatekeeper

    Gatekeeper#sh gatekeeper zone prefix
    ZONE PREFIX TABLE
    =================
    GK-NAME E164-PREFIX
    ------- -----------
    Saigon 1...

    Gatekeeper#


    D. Cấu hình đầy đủ
    Saigon1#sh run
    Code:
    Building configuration...
       
      Current configuration : 982 bytes
      !
      version 12.3
      !
      hostname Saigon1
      !
      ip subnet-zero
      ip cef
      !
      !
      interface Ethernet0/0
       ip address 172.16.1.1 255.255.255.0
       half-duplex
       h323-gateway voip interface
       h323-gateway voip id Saigon ipaddr 172.16.1.10 1719
       h323-gateway voip h323-id Saigon1
       h323-gateway voip bind srcaddr 172.16.1.1
      !
      ip http server
      no ip http secure-server
      ip classless
      !
      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 pots
       destination-pattern 1112
       port 1/0/1
      !
      dial-peer voice 100 voip
       destination-pattern 112.
       session target ras
      !
      gateway 
      !
      line con 0
      line aux 0
      line vty 0 4
       privilege level 15
       no login
      !
      end
    Saigon2#sh run
    Code:
    Building configuration...
       
      Current configuration : 958 bytes
      !
      version 12.3
      !
      hostname Saigon2
      ip subnet-zero
      ip cef
      !
      interface Ethernet0/0
       ip address 172.16.1.2 255.255.255.0
       half-duplex
       h323-gateway voip interface
       h323-gateway voip id Saigon ipaddr 172.16.1.10 1719
       h323-gateway voip h323-id Saigon2
       h323-gateway voip bind srcaddr 172.16.1.2
      !
      ip http server
      no ip http secure-server
      ip classless
      !
      voice-port 1/0/0
      !
      voice-port 1/0/1
      !
      dial-peer voice 1 pots
       destination-pattern 1121
       port 1/0/0
      !         
      dial-peer voice 2 pots
       destination-pattern 1122
       port 1/0/1
      !
      dial-peer voice 100 voip
       destination-pattern 111.
       session target ras
      !
      gateway 
      !
      line con 0
      line aux 0
      line vty 0 4
       login
      !
      !
      end
    Gatekeeper#sh run
    Code:
    Building configuration...
       
      Current configuration : 787 bytes
      !
      version 12.4
      !
      hostname Gatekeeper
      !
      ip cef
      !
      !
      interface FastEthernet0/0
       ip address 172.16.1.10 255.255.255.0
       duplex auto
       speed auto
      !
      !
      no ip http server
      no ip http secure-server
      !
      !
      control-plane
      !
      gatekeeper
       zone local Saigon vnpro.org enable-intrazone
       zone prefix Saigon 1...
       no shutdown
      !
      line con 0
       exec-timeout 0 0
       logging synchronous
       stopbits 1
      line aux 0
       stopbits 1
      line vty 0 4
      !
      end
    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