
CÔNG TY CỔ PHẦN DỊCH VỤ CÔNG NGHỆ DATECH
Danh sách nội dung [Ẩn]
Cấu hình nhóm chuyển giao GTP trên JunOS
Một nhóm chuyển giao GTP (GPRS Tunneling Protocol) là một tập hợp các SGSN hoặc cổng phục vụ (SGW) có chung một thư viện sổ địa chỉ.
Quản trị viên có thể cấu hình một hồ sơ GTP và liên kết nhóm chuyển giao GTP với hồ sơ GTP đó. Khi một hồ sơ GTP tham chiếu đến tên của nhóm chuyển giao GTP, thiết bị sẽ kiểm tra xem địa chỉ SGSN/SGW hiện tại và địa chỉ SGSN/SGW đề xuất có nằm trong cùng một nhóm chuyển giao GTP hay không. Nếu cả hai địa chỉ SGSN/SGW đều thuộc cùng một nhóm chuyển giao GTP, quá trình chuyển giao sẽ được cho phép. Nếu địa chỉ SGSN/SGW hiện tại và địa chỉ đề xuất không thuộc cùng một nhóm chuyển giao GTP, thì hồ sơ của nhóm chuyển giao mặc định sẽ được sử dụng. Giới Hạn Chuyển Giao GTP.
Chuyển giao GTP giữa các nhóm chuyển giao GTP khác nhau không được phép.
Bạn có thể cấu hình nhóm chuyển giao bằng lệnh: set security gprs gtp profile <tên-hồ-sơ> handover-group. Nếu không có nhóm chuyển giao nào được xác định trong hồ sơ GTP, và nếu lưu lượng truy cập tuân theo chính sách được cấu hình với hồ sơ này, thì mặc định quá trình chuyển giao giữa tất cả các GTP phù hợp với chính sách này sẽ được cho phép. Quá trình chuyển giao sẽ bị từ chối nếu lệnh sau được cấu hình: set security gprs gtp handover-default deny
Hình 1: Nhóm Chuyển Giao GTP
Ví dụ, thiết bị người dùng truy cập Internet thông qua các đường hầm GTP được thiết lập trên SGSN và nút cổng hỗ trợ GPRS (GGSN). SGSN tạo các đường hầm GTP đến GGSN để truyền dữ liệu của thiết bị người dùng khi thiết bị này kết nối với SGSN. Trong kiến trúc chuyển vùng định tuyến về nhà (home-routed roaming), một thiết bị người dùng đang chuyển vùng sẽ kết nối trở lại với GGSN của mạng PLMN tại nhà (HPLMN) thông qua SGSN thăm viếng (VSGSN) thuộc mạng PLMN thăm viếng (VPLMN). Nếu SGSN ban đầu và SGSN mục tiêu 1 (như trong Hình 1) thuộc cùng một nhóm chuyển giao (HG-1), thì quá trình chuyển giao sẽ diễn ra. Nếu SGSN ban đầu muốn chuyển giao sang SGSN mục tiêu 2, nhưng SGSN mục tiêu 2 thuộc một nhóm chuyển giao khác (HG-2), thì quá trình chuyển giao sẽ bị từ chối.
Bắt đầu từ phiên bản Junos OS 15.1X49-D40 và Junos OS 17.3R1, hệ thống hỗ trợ các thông điệp chuyển giao GTP. Trong quá trình chuyển giao, các thông điệp về ngữ cảnh của Serving GPRS Support Node (SGSN) (yêu cầu, phản hồi và xác nhận) hoặc các thông điệp chuyển tiếp vị trí được gửi giữa thực thể quản lý di động (MME) mới và cũ cũng như giữa các SGSN. Đối với GTP phiên bản 2, các thông điệp phải là thông điệp ngữ cảnh hoặc thông điệp chuyển tiếp vị trí. Để đơn giản hóa, những loại thông điệp này được gọi chung là thông điệp chuyển giao. Thông tin ngữ cảnh PDP (Packet Data Protocol) được lấy từ các thông điệp này. Ngữ cảnh PDP sẽ được thiết lập trên tường lửa dòng SRX Series khi các thông điệp này được nhận, sau đó các thông điệp GTP tiếp theo có thể được kiểm tra dựa trên ngữ cảnh PDP mới.
Sử dụng lệnh sau để bật thiết lập ngữ cảnh PDP thông qua thông điệp chuyển giao: set security gprs gtp profile <tên-hồ-sơ> handover-on-roaming-intf. Sử dụng lệnh sau để tắt tính năng này: delete security gprs gtp profile <tên-hồ-sơ> handover-on-roaming-intf
Địa chỉ và mã định danh điểm cuối đường hầm (TEID) để chuyển tiếp lưu lượng dữ liệu cũng được lấy từ các thông điệp chuyển giao. Ngoài ra, một đường hầm chuyển tiếp có thể được thiết lập trên tường lửa SRX Series để kiểm tra trạng thái của giao thức GTP-U (GPRS Tunneling Protocol - User Plane).
Chuyển giao giữa các phiên bản GTP khác nhau được hỗ trợ.
Các tính năng chính của chuyển giao GTP:
Bắt đầu từ Junos OS 15.1X49-D70 và Junos OS 17.3R1, các nút SGSN và GGSN của GTPv1 hoặc GTPv2 không thể giao tiếp với nút GTPv0. Nếu một thiết bị gửi thông điệp GTPv1 hoặc GTPv2 để cập nhật đường hầm được tạo bởi GTPv0, các thông điệp này sẽ bị loại bỏ và đường hầm GTPv0 sẽ không được cập nhật.
Ví dụ này hướng dẫn cách cấu hình nhóm chuyển giao GTP trên các hồ sơ GTP.
Yêu cầu
Trước khi bắt đầu, bạn cần có một trong các thiết bị sau: SRX1500, SRX4100, SRX4200, SRX5400, SRX5600, SRX5800 hoặc vSRX Virtual Firewall. Ngoài ra, bạn cần có: Thiết bị người dùng (User Equipment - UE) cần kết nối Internet. Mạng lõi di động 3G hoặc 4G. Mạng tại nhà (Home PLMN - HPLMN) và mạng chuyển vùng (Visited PLMN - VPLMN).
Tổng quan
Thiết bị người dùng truy cập Internet thông qua SGSN hoặc Serving Gateway (SGW) và GGSN hoặc Packet Data Network Gateway (PGW) trong mạng lõi 3G hoặc 4G. SGSN/SGW thiết lập các đường hầm GTP (GTP tunnels) tới GGSN/PGW để truyền dữ liệu của thiết bị người dùng, khi thiết bị này kết nối với SGSN/SGW. Trong kiến trúc chuyển vùng định tuyến về nhà (home-routed roaming), thiết bị người dùng khi chuyển vùng sẽ kết nối trở lại với GGSN của mạng tại nhà (HPLMN) thông qua SGSN thăm viếng (VSGSN) của mạng thăm viếng (VPLMN). Nếu thiết bị người dùng di chuyển ra khỏi vùng phủ sóng của SGSN/SGW thăm viếng, nó sẽ được chuyển giao sang một SGSN/SGW thăm viếng khác.
Trong ví dụ này (Hình 2): X-mobile là mạng tại nhà (HPLMN). Y-mobile và Z-mobile là mạng thăm viếng (VPLMN).
Bạn có thể cấu hình nhóm chuyển giao GTP cho X-mobile và thực hiện chuyển giao trong cùng một nhóm chuyển giao.
Hình 2: Cấu hình nhóm chuyển giao
Cấu hình
Cấu hình nhanh bằng CLI
Để nhanh chóng cấu hình phần này của ví dụ, thực hiện các bước sau: Sao chép các lệnh sau và dán vào một tệp văn bản. Xóa bất kỳ dấu ngắt dòng nào trong nội dung. Chỉnh sửa thông tin cần thiết để phù hợp với cấu hình mạng của bạn. Sao chép và dán các lệnh vào CLI ở cấp độ [edit]. Nhập lệnh commit trong chế độ cấu hình để áp dụng thay đổi.
set security address-book global address X-mobile-hMME 10.10.10.1/32 set security address-book global address X-mobile-hPGW 10.10.10.2/32 set security address-book global address-set X-mobile address X-mobile-hMME set security address-book global address-set X-mobile address X-mobile-hPGW set security address-book global address-set X-mobile description hPLMN set security address-book global address Y-mobile-vMME-2a 20.20.20.1/32 set security address-book global address Y-mobile-vMME-2b 20.20.20.2/32 set security address-book global address Y-mobile-vSGW-2a 20.20.20.10/32 set security address-book global address Y-mobile-vSGW-2b 20.20.20.11/32 set security address-book global address-set Y-mobile address Y-mobile-vMME-2a set security address-book global address-set Y-mobile address Y-mobile-vMME-2b set security address-book global address-set Y-mobile address Y-mobile-vSGW-2a set security address-book global address-set Y-mobile address Y-mobile-vSGW-2b set security address-book global address-set Y-mobile description vPLMN2 set security address-book global address Z-mobile-vMME-3a 30.30.30.1/32 set security address-book global address Z-mobile-vMME-3b 30.30.30.2/32 set security address-book global address Z-mobile-vSGW-3a 30.30.30.10/32 set security address-book global address Z-mobile-vSGW-3b 30.30.30.11/32 set security address-book global address-set Z-mobile address Z-mobile-vMME-3a set security address-book global address-set Z-mobile address Z-mobile-vMME-3b set security address-book global address-set Z-mobile address Z-mobile-vSGW-3a set security address-book global address-set Z-mobile address Z-mobile-vSGW-3b set security address-book global address-set Z-mobile description vPLMN3 set security address-book global address-set as-AT address-set Z-mobile set security address-book global address-set as-AT address-set Y-mobile set security address-book global address-set as-AT address-set X-mobile set security gprs gtp handover-group hg-AT address-book global address-set as-AT set security gprs gtp profile Scenario-1 handover-on-roaming-intf set security gprs gtp profile Scenario-1 handover-group hg-AT set security zones security-zone vplmn set security zones security-zone hplmn set security policies from-zone vplmn to-zone hplmn policy ply-vh1 match source-address Y-mobile set security policies from-zone vplmn to-zone hplmn policy ply-vh2 match source-address Z-mobile set security policies from-zone vplmn to-zone hplmn policy ply-vh match destination-address X-mobile set security policies from-zone vplmn to-zone hplmn policy ply-vh match application junos-gprs-gtp set security policies from-zone vplmn to-zone hplmn policy ply-vh then permit application-services gprs-gtp-profile Scenario-1 set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match source-address X-mobile set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match destination-address Y-mobile set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match destination-address Z-mobile set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match application junos-gprs-gtp set security policies from-zone hplmn to-zone vplmn policy ply-vh-r then permit application-services gprs-gtp-profile Scenario-1 |
Quy Trình Từng Bước
Ví dụ sau yêu cầu bạn điều hướng qua nhiều cấp độ trong cấu trúc phân cấp cấu hình. Để biết cách thực hiện, hãy tham khảo hướng dẫn sử dụng trình chỉnh sửa CLI trong chế độ cấu hình trong tài liệu Junos OS CLI User Guide.
Để cấu hình nhóm chuyển giao GTP trong GTP profile:
- Xác định các địa chỉ trong sổ địa chỉ.
[edit] user@host# set security address-book global address X-mobile-hMME 10.10.10.1/32 user@host# set security address-book global address X-mobile-hPGW 10.10.10.2/32 user@host# set security address-book global address-set X-mobile address X-mobile-hMME user@host# set security address-book global address-set X-mobile address X-mobile-hPGW user@host# set security address-book global address-set X-mobile description hPLMN user@host# set security address-book global address Y-mobile-vMME-2a 20.20.20.1/32 user@host# set security address-book global address Y-mobile-vMME-2b 20.20.20.2/32 user@host# set security address-book global address Y-mobile-vSGW-2a 20.20.20.10/32 user@host# set security address-book global address Y-mobile-vSGW-2b 20.20.20.11/32 user@host# set security address-book global address-set Y-mobile address Y-mobile-vMME-2a user@host# set security address-book global address-set Y-mobile address Y-mobile-vMME-2b user@host# set security address-book global address-set Y-mobile address Y-mobile-vSGW-2a user@host# set security address-book global address-set Y-mobile address Y-mobile-vSGW-2b user@host# set security address-book global address-set Y-mobile description vPLMN2 user@host# set security address-book global address Z-mobile-vMME-3a 30.30.30.1/32 user@host# set security address-book global address Z-mobile-vMME-3b 30.30.30.2/32 user@host# set security address-book global address Z-mobile-vSGW-3a 30.30.30.10/32 user@host# set security address-book global address Z-mobile-vSGW-3b 30.30.30.11/32 user@host# set security address-book global address-set Z-mobile address Z-mobile-vMME-3a user@host# set security address-book global address-set Z-mobile address Z-mobile-vMME-3b user@host# set security address-book global address-set Z-mobile address Z-mobile-vSGW-3a user@host# set security address-book global address-set Z-mobile address Z-mobile-vSGW-3b user@host# set security address-book global address-set Z-mobile description vPLMN3 user@host# set security address-book global address-set as-AT address-set X-mobile user@host# set security address-book global address-set as-AT address-set Y-mobile user@host# set security address-book global address-set as-AT address-set Z-mobile |
- Xác định nhóm chuyển giao.
user@host# set security gprs gtp handover-group hg-AT address-book global address-set as-AT |
- Cấu hình các nhóm chuyển giao trên GTP profile.
user@host# set security gprs gtp profile Scenario-1 handover-on-roaming-intf user@host# set security gprs gtp profile Scenario-1 handover-group hg-AT |
- Cấu hình các vùng bảo mật cho GTP profile.
user@host# set security zones security-zone vplmn user@host# set security zones security-zone hplmn |
- Xác định các chính sách bảo mật cho GTP profile.
set security policies from-zone vplmn to-zone hplmn policy ply-vh1 match source-address Y-mobile set security policies from-zone vplmn to-zone hplmn policy ply-vh2 match source-address Z-mobile user@host# set security policies from-zone vplmn to-zone hplmn policy ply-vh match destination-address X-mobile user@host# set security policies from-zone vplmn to-zone hplmn policy ply-vh then permit application-services gprs-gtp-profile Scenario-1 user@host# set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match source-address X-mobile set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match destination-address Y-mobile set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match destination-address Z-mobile user@host# set security policies from-zone hplmn to-zone vplmn policy ply-vh-r match application junos-gprs-gtp user@host# set security policies from-zone hplmn to-zone vplmn policy ply-vh-r then permit application-services gprs-gtp-profile Scenario-1 |
Kết Quả
Từ chế độ cấu hình, xác nhận cấu hình của bạn bằng cách nhập các lệnh sau: show security gprs gtp profile,
show security address-book,
show security policies.
Nếu đầu ra không hiển thị đúng cấu hình mong muốn, hãy lặp lại các bước cấu hình trong ví dụ này để điều chỉnh.
[edit] user@host# show security gprs gtp profile Scenario-1 { handover-on-roaming-intf; handover-group { hg-AT;}} handover-group hg-AT { address-book global { address-set { as-AT;}}} |
[edit] user@host# show security address-book global { address X-mobile-hMME 10.10.10.1/32; address X-mobile-hPGW 10.10.10.2/32; address Y-mobile-vMME-2a 20.20.20.1/32; address Y-mobile-vMME-2b 20.20.20.2/32; address Y-mobile-vSGW-2a 20.20.20.10/32; address Y-mobile-vSGW-2b 20.20.20.11/32; address Z-mobile-vMME-3a 30.30.30.1/32; address Z-mobile-vMME-3b 30.30.30.2/32; address Z-mobile-vSGW-3a 30.30.30.10/32; address Z-mobile-vSGW-3b 30.30.30.11/32; address-set X-mobile { description hPLMN; address X-mobile-hMME; address X-mobile-hPGW;} address-set Y-mobile { description vPLMN2; address Y-mobile-vMME-2a; address Y-mobile-vMME-2b; address Y-mobile-vSGW-2a; address Y-mobile-vSGW-2b;} address-set Z-mobile { description vPLMN3; address Z-mobile-vMME-3a; address Z-mobile-vMME-3b; address Z-mobile-vSGW-3a; address Z-mobile-vSGW-3b;} address-set as-AT { address-set Z-mobile; address-set Y-mobile; address-set X-mobile;}} |
[edit] user@host# show security policies from-zone vplmn to-zone hplmn { policy ply-vh { match { source-address [ Y-mobile Z-mobile ]; destination-address X-mobile; application junos-gprs-gtp;} then { permit { application-services { gprs-gtp-profile Scenario-1;}}}}} from-zone hplmn to-zone vplmn { policy ply-vh-r { match { source-address X-mobile; destination-address [ Y-mobile Z-mobile ]; application junos-gprs-gtp;} then { permit { application-services { gprs-gtp-profile Scenario-1;}}}}} |
Nếu bạn đã hoàn tất cấu hình thiết bị, hãy nhập lệnh commit từ chế độ cấu hình.
Xác minh cấu hình
Xác nhận rằng cấu hình đang hoạt động đúng bằng cách sử dụng lệnh: show security gprs gtp, lệnh này sẽ hiển thị tất cả các nhóm chuyển giao đã được cấu hình cho hồ sơ GTP Scenario-1.
Chúc các bạn thực hiện thành công. Hi vọng bài viết này sẽ giúp ích cho các bạn trong công việc. Nếu bạn có vấn đề gì thắc mắc đừng ngần ngại liên hệ với chúng tôi theo thông tin dưới đây để được hỗ trợ thêm.
Hẹn gặp lại các bạn trong các bài viết tiếp theo !
CÔNG TY CỔ PHẦN DỊCH VỤ CÔNG NGHỆ DATECH
• Địa chỉ: Số 23E4 KĐT Cầu Diễn, Tổ 7, Phú Diễn, Bắc Từ Liêm, Hà Nội
• Điện thoại: 02432012368
• Hotline: 098 115 6699
• Email: info@datech.vn
• Website: https://datech.vn