Wednesday, February 10, 2010

GTPv1 7200 router config and detailed logs!

Ok Lets start where we left the topic.
Lets walk through the DUT configuration on Cisco 7200 router as a GGSN.
My interaction here is with Gn and Gi interface only.

We will see the other interfaces later on.

Enabled the GPRS services on the Router

service gprs ggsn
 
Created a Loop Back interface which is nothing but our GGSN.
Assign an IP address to this loopback interface, which would be the IP address of the GGSN.

interface Loopback7
 ip address x1.y1.z1.w1

Make a virtual template which will dynamically creates virtual access interface with the loopbacked interface.

interface Virtual-Template7
 ip unnumbered Loopback7
 encapsulation gtp
 gprs access-point-list gprs
!

Then created a GPRS access point list (APN list) which would guide through the IP address pool to be choosen for the UE. This actually links between the virtual access interface.

gprs access-point-list gprs
  access-point 1
   access-point-name a.b.com
   aaa-group authentication radgroup
   ip-address-pool local mypool
   network-request-activation

Create the IP pool, this will be the range of the ip addresses which will be provided to the UE using GTP.

ip local pool mypool

specify a gateway address for the SGSN, thats actually the gateway for the SGSN.

interface GigabitEthernet0/2
 description Gn interface to SGSN
 ip address x.y.z.w
 no ip route-cache cef
 no ip route-cache
 duplex auto
 speed auto
 media-type rj45
 no negotiation auto
 no cdp enable
!





















Now here comes the detailed gtp session setup logs from cisco 7200. This is really very interesting to see step by step gprs gtp events.

This can be get from the router using following commands.

debug gprs gtp events
debug gprs gtp messages



*Nov  8 15:22:25.956: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
*Nov  8 15:22:25.964: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to up
*Nov  8 15:23:20.396: GPRS:proc_udp_input: signalling packet from 10.10.1.2(2123)
*Nov  8 15:23:20.396: GPRS:sequence num 0x2
*Nov  8 15:23:20.396: GPRS:PDP not found
*Nov  8 15:23:20.396: GPRS:apn_lookup:apn a.b.com
*Nov  8 15:23:20.396: GPRS: found apn a.b.com
*Nov  8 15:23:20.396: GPRS:pdpmcb_create_by_teid:teid 0x0000057D, pdpmcb 65323A34
*Nov  8 15:23:20.396: GPRS:pdp_create_by_tid:tid 2216110010000051, pdp 653102C4
*Nov  8 15:23:20.396: GPRS:sequence num 0x2
*Nov  8 15:23:20.396: GPRS:apn_lookup:apn a.b.com
*Nov  8 15:23:20.396: GPRS: found apn a.b.com
*Nov  8 15:23:20.396: GPRS:2216110010000051:roamership 0, use RAI 0
*Nov  8 15:23:20.396: GPRS:2216110010000051:gprs_mcc_mnc_match_pdp_tid: PLMN Ids not configured
*Nov  8 15:23:20.396: GPRS:path_lookup: path to (dst:port) (10.10.1.2:2123)
*Nov  8 15:23:20.396: GPRS:path_create: create path (192.1.1.1:2123) --> (10.10.1.2:2123)
*Nov  8 15:23:20.396: GPRS:insert_sock_to_socklis:insert gtpsock 6641BDB0, id 0
*Nov  8 15:23:20.396: GPRS:start_echotimer:path 6603ED94, len 60000, timer 6603EDA4
*Nov  8 15:23:20.396: GPRS:Recovery_IE_timer START: path 6603ED94, duration 60000, timer 6603EE04
*Nov  8 15:23:20.396: GPRS:2216110010000051:old_path_entry=0, sig_path=0, data_path=0
*Nov  8 15:23:20.396: GPRS:2216110010000051:insert_pdp_to_path: add new PDP 653102C4 into path 6603ED94 list
*Nov  8 15:23:20.400: GPRS:path_lookup: path to (dst:port) (10.10.1.2:2152)
*Nov  8 15:23:20.400: GPRS:path_create: create path (192.1.1.1:2152) --> (10.10.1.2:2152)
*Nov  8 15:23:20.400: GPRS:insert_sock_to_socklis:insert gtpsock 655DA974, id 0
*Nov  8 15:23:20.400: GPRS:start_echotimer:path 65AD921C, len 60000, timer 65AD922C
*Nov  8 15:23:20.400: GPRS:2216110010000051:old_path_entry=0, sig_path=6603ED94, data_path=0
*Nov  8 15:23:20.400: GPRS:2216110010000051:insert_pdp_to_path: add new PDP 653102C4 into path 65AD921C list
*Nov  8 15:23:20.400: GPRS:2216110010000051:insert_pdpmcb_to_apn: add new PDPMCB 65323A34 into apn 65E25430 list
*Nov  8 15:23:20.400: GPRS:2216110010000051:CHECK DHCP RADIUS configuration
*Nov  8 15:23:20.400: GPRS:2216110010000051:GTP: APN is in TRANSPARENT MODE
*Nov  8 15:23:20.400: GPRS:2216110010000051:setup user addr: pdpmcb 65323A34, addr AA039
*Nov  8 15:23:20.400: GPRS:GTP: Insert PDPMCB into GTP's IP list
 using index AA 0 3 9 0 0 0 0
*Nov  8 15:23:20.400: GPRS:insert_rtentry: ipaddr 170.0.3.9/32 (0)
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_is_ok_to_open_cdr: charging_roamer_cdr_only=0
*Nov  8 15:23:20.400: GPRS:sequence num 0x2
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_msg_send_res: pdp_entry 0x653102C4, replymsg 0x11, cause 0x80
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_is_ok_to_open_cdr: charging_roamer_cdr_only=0
*Nov  8 15:23:20.400: GPRS:2216110010000051:increase_per_qos_pdp_number: invalid QOS type 0
*Nov  8 15:23:20.400: GPRS:2216110010000051:start idle timer with 259200 sec
*Nov  8 15:23:20.400: GPRS:sequence num 0x2
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 1
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_CAUSE_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 8
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_REORDER_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 14
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_RECOVERY_IE added now: (16)
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 16
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_TEID_DATA1_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 17
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_TEID_CNTL_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 127
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_CHARGING_ID_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 128
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_END_USER_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 132
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_PROTO_CONFIG_IE adding now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 133
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_GSN_ADDR_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 133
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_GSN_ADDR_IE added now
*Nov  8 15:23:20.400: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 135
*Nov  8 15:23:20.400: GPRS:2216110010000051:- GTP_GTPv1_QOS_IE adding now
*Nov  8 15:23:20.400: GPRS:GTP enqueues pak of size 72 (refcount 1)
*Nov  8 15:23:20.400: GPRS:gprs_output:idb 0x6622D790, pkt 0x652DCE9C, path 0x6603ED94, pdp 0x0
*Nov  8 15:23:20.400: GPRS::src 192.1.1.1,dst 10.10.1.2,srcport 2123,dstport 2123
*Nov  8 15:23:20.400: GPRS:: Calling ip_udp_send()
*Nov  8 15:23:20.400: GPRS:gtp_mgmt_process_qinput: msg(17) processed
*Nov  8 15:23:23.396: GPRS:proc_udp_input: signalling packet from 10.10.1.2(2123)
*Nov  8 15:23:23.396: GPRS:sequence num 0x2
*Nov  8 15:23:23.396: GPRS:2216110010000051:pdp_lookup_by_tid: Modify last_access_time and update idle timer
*Nov  8 15:23:23.396: GPRS:2216110010000051:Duplicate Pri Create Req seq num 0x2
*Nov  8 15:23:23.396: GPRS:apn_lookup:apn a.b.com
*Nov  8 15:23:23.396: GPRS: found apn a.b.com
*Nov  8 15:23:23.396: GPRS:2216110010000051:GTP: Duplicate create PDP req received, seq num 0x2
*Nov  8 15:23:23.396: GPRS:sequence num 0x2
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_msg_send_res: pdp_entry 0x653102C4, replymsg 0x11, cause 0x80
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_is_ok_to_open_cdr: charging_roamer_cdr_only=0
*Nov  8 15:23:23.396: GPRS:sequence num 0x2
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 1
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_CAUSE_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 8
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_REORDER_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 14
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_RECOVERY_IE added now: (16)
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 16
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_TEID_DATA1_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 17
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_TEID_CNTL_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 127
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_CHARGING_ID_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 128
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_END_USER_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 132
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_PROTO_CONFIG_IE adding now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 133
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_GSN_ADDR_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 133
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_GSN_ADDR_IE added now
*Nov  8 15:23:23.396: GPRS:2216110010000051:gtp_pdp_build_ie: ie_type_want : 135
*Nov  8 15:23:23.396: GPRS:2216110010000051:- GTP_GTPv1_QOS_IE adding now
*Nov  8 15:23:23.396: GPRS:GTP enqueues pak of size 72 (refcount 1)
*Nov  8 15:23:23.396: GPRS:gprs_output:idb 0x6622D790, pkt 0x652DCAF0, path 0x6603ED94, pdp 0x0
*Nov  8 15:23:23.396: GPRS::src 192.1.1.1,dst 10.10.1.2,srcport 2123,dstport 2123
*Nov  8 15:23:23.396: GPRS:: Calling ip_udp_send()
*Nov  8 15:23:23.396: GPRS:gtp_mgmt_process_qinput: msg(17) processed
*Nov  8 15:24:20.376: GPRS:proc_udp_input: signalling packet from 10.10.1.2(2123)
*Nov  8 15:24:20.376: GPRS:path_lookup: path to (dst:port) (10.10.1.2:2123)
*Nov  8 15:24:20.376: GPRS:path_lookup: found path 6603ED94
*Nov  8 15:24:20.376: GPRS:sequence num 0x0
*Nov  8 15:24:20.376: GPRS:sequence num 0x0
*Nov  8 15:24:20.376: GPRS:path_lookup: path to (dst:port) (10.10.1.2:2123)
*Nov  8 15:24:20.376: GPRS:path_lookup: found path 6603ED94
*Nov  8 15:24:20.376: GPRS:sequence num 0x0
*Nov  8 15:24:20.376: GPRS:GTP enqueues pak of size 14 (refcount 1)
*Nov  8 15:24:20.376: GPRS:gprs_output:idb 0x6622D790, pkt 0x64B200BC, path 0x0, pdp 0x0
*Nov  8 15:24:20.376: GPRS::src 192.1.1.1,dst 10.10.1.2,srcport 2123,dstport 2123
*Nov  8 15:24:20.376: GPRS:: Calling ip_udp_send()
*Nov  8 15:24:20.376: GPRS:gtp_mgmt_process_qinput: msg(2) processed

3 comments:

  1. Hi Rakesh,

    Nice step by step description. I had a question regarding the APN. Is it possible to allow only selective URLs/ servers corresponding to a particular APN. i.e. the user should only be allowed to use these selected URLs only.

    Thanks
    Prinks

    ReplyDelete
    Replies
    1. I think you can bind the APN with the server. But that is the server side implementation. GGSN doesnt have details about the specific server. Any way i will look into details what best serves regarding your query!

      Thanks
      Rakesh_

      Delete
    2. Hi Rakesh, Thanks for the reply. I am not sure but i think ACLs can be defined for a particular APN. Hence it can help in defining multiple APNs at GGSN with each APN restricting/ allowing a set a http servers. Do you think it will work.

      Thanks
      Prinks

      Delete

Search Engine Spider Simulator

Enter URL to Spider