{"id":1036,"date":"2019-06-25T18:30:30","date_gmt":"2019-06-25T08:30:30","guid":{"rendered":"https:\/\/nickvsnetworking.com\/?p=1036"},"modified":"2021-07-14T13:46:31","modified_gmt":"2021-07-14T03:46:31","slug":"diameter-basics","status":"publish","type":"post","link":"https:\/\/nickvsnetworking.com\/diameter-basics\/","title":{"rendered":"Diameter Basics"},"content":{"rendered":"\n<p>3GPP selected Diameter protocol to take care of Authentication, Authorization, and Accounting (AAA). <\/p>\n\n\n\n<p>It&#8217;s typically used to <em>authenticate <\/em>users on a network, <em>authorize <\/em>them to use services they&#8217;re allowed to use and <em>account <\/em>for how much of the services they used.<\/p>\n\n\n\n<p>In a EPC scenario the <strong>Authentication <\/strong>function takes the form verifying the subscriber is valid and knows the K &amp; OP\/OPc keys for their specific IMSI.<\/p>\n\n\n\n<p>The <strong>Authorization<\/strong> function checks to find out which features, APNs, QCI values and services the subscriber is allowed to use.<\/p>\n\n\n\n<p>The <strong>Accounting<\/strong> function records session usage of a subscriber, for example how many sessional units of talk time, Mb of data transferred, etc.<\/p>\n\n\n\n<p>Diameter Packets are pretty simple in structure, there&#8217;s the packet itself, containing the basic information in the headers you&#8217;d expect, and then a series of one or more Attribute Value Pairs or &#8220;AVPs&#8221;.<\/p>\n\n\n\n<p>These AVPs are exactly as they sound, there&#8217;s an attribute name, for example username, and a value, for example, &#8220;Nick&#8221;.<\/p>\n\n\n\n<p>This could just as easily be for ordering food; we could send a Diameter packet with an imaginary command code for<em> Food Order Request<\/em>, containing a series of AVPs containing what we want. The AVPs could belike Food: Hawian Pizza, Food: Garlic Bread, Drink: Milkshake, Address: MyHouse. <br>The Diameter server could then verify we&#8217;re allowed to order this food (<strong>Authorization<\/strong>) and charge us for the food (<strong>Accounting<\/strong>), and send back a <em>Food Order Response<\/em> containing a series of AVPs such as Delivery Time: 30 minutes, Price: $30.00, etc.<\/p>\n\n\n\n<p>Diameter packets generally take the form of a request &#8211; response, for example a <em>Capabilities Exchange Request<\/em> contains a series of AVPs denoting the features supported by the requester, which is sent to a Diameter peer. The Diameter peer then sends back a Capabilities Exchange Response, containing a series of AVPs denoting the features that it supports.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"381\" src=\"https:\/\/nickvsnetworking.com\/wp-content\/uploads\/2019\/06\/2019-06-30-01_32_08-S6aConnect.pcap_.png\" alt=\"\" class=\"wp-image-1037\" srcset=\"https:\/\/nickvsnetworking.com\/wp-content\/uploads\/2019\/06\/2019-06-30-01_32_08-S6aConnect.pcap_.png 570w, https:\/\/nickvsnetworking.com\/wp-content\/uploads\/2019\/06\/2019-06-30-01_32_08-S6aConnect.pcap_-300x201.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/figure>\n\n\n\n<p>Diameter is designed to be extensible, allowing vendors to define their own type of AVP and Diameter requests\/responses and 3GPP have defined their own types of messages (Diameter Command Codes) and types of data to be transferred (AVP Codes).<\/p>\n\n\n\n<p>LTE\/EPC relies on Diameter and the 3GPP\/ETSI defined AVP \/ Diameter Packet requests\/responses to form the<strong> S6a Interface <\/strong>between an <em>MME and a HSS<\/em>, the<strong> Gx Interface <\/strong>between the <em>PCEF and the PCRF<\/em>,  <strong>Cx&nbsp;Interface<\/strong> between the <em>HSS and the CSCF<\/em>, and many more interfaces used for Authentication in 3GPP networks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A primer to the Diameter protocol and it&#8217;s usage.<\/p>\n","protected":false},"author":1,"featured_media":1037,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[134,160,133,349,37,22,528,2],"tags":[223,224],"class_list":["post-1036","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-epc","category-eutran","category-lte","category-plmn","category-rf","category-standards","category-sdm","category-voip","tag-diameter","tag-rfc6733"],"_links":{"self":[{"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/posts\/1036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/comments?post=1036"}],"version-history":[{"count":1,"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/posts\/1036\/revisions"}],"predecessor-version":[{"id":1038,"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/posts\/1036\/revisions\/1038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/media\/1037"}],"wp:attachment":[{"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/media?parent=1036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/categories?post=1036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nickvsnetworking.com\/wp-json\/wp\/v2\/tags?post=1036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}