11 February 2017

Must read computer networking research papers


A lot of Quora users ask this question: What are most influential research papers that contributed to the development and improvements in Internet and networking technologies? Based on my academic study (material provided by Prof. Minlan Yu and Prof. Wyatt Lloyd), work experience and research on computer networks, I created a list that would help my readers to read/know/understand the most significant research contributions. I will keep this list updated based on recent conferences. 

Instead of providing a direct link, I prefer to provide the citations as I consider it the correct way to provide reference to other's works. You can search for the paper using the title in either Google or Google Scholar.


Before I start to mention networking related papers, I would like to introduce my audience to a must read paper that will help you to understand and absorb the contents of research paper effectively. Trust me, you want to read this paper if you want to improve your reading skills.

How to read a paper

How to read a paper


1.  Keshav, S. "How to read a paper.ACM SIGCOMM Computer Communication Review 37.3 (2007): 83-84.

Let's start with the inception of Internet. DARPA researchers had put together the design of the first network called ARPANET. I suggest you to read the next paper to understand the design decisions for developing a generic network to be used across multiple communities.


2. Clark, David. "The design philosophy of the DARPA Internet protocols.ACM SIGCOMM Computer Communication Review 18.4 (1988): 106-114.
history of internet

History of Internet

After reading 2. you would understand the fundamental thoughts that were put together to design Internet. With this knowledge, you can design your own Internet without fearing about the complex details of it. A very important detail that you must consider while designing any networking technology is whether you are aiming an end-end feature or hop-hop. A good start is the next paper which talks about End-to-End argument in detail.


3. Saltzer, Jerome H., David P. Reed, and David D. Clark. "End-to-end arguments in system design.ACM Transactions on Computer Systems (TOCS) 2.4 (1984): 277-288.

These papers give you a great insight into the design principles for any large scale network. Now lets focus on the concrete design requirements of a reliable packet delivery network. There are various things that one would try to address while designing a reliable packet communication like packet identification, acknowledgements, redelivery of failed packets. The authors of the next paper addressed a lot more in their paper. This paper was published later in SIGCOMM in 2005.



4. V. Cerf and R. Kahn, "A Protocol for Packet Network Intercommunication," in IEEE Transactions on Communications, vol. 22, no. 5, pp. 637-648, May 1974


-------
Next, we will look at IP routing protocols that allow packets to be routed from source to destination via routers. There are mainly two types of routing protocol used within an AS (autonomous system) - Distance Vector and Link State routing. To understand these protocols, I recommend you to read the CISCO white papers.



Note that understanding Routing is a major achievement. IGP routing (Interior Gateway Protocol) is implemented within an AS. On the other hand, EGP routing (Exterior Gateway Protocol) is implemented across different ASes. An AS is a single administrative unit that controls a set of IP prefixes and has their independent routing policy. BGP (Border Gateway Protocol) is the most commonly used protocol for routing across ASes. Note that managing different ASes is the most difficult task at hand. The next paper underlines the issues associated with BGP routing and proposes a solution to achieve convergence within permissible time.

IGP vs BGP across ASes

IGP vs BGP

6. Gao, Lixin, and Jennifer Rexford. "Stable internet routing without global coordination.ACM SIGMETRICS Performance Evaluation Review. Vol. 28. No. 1. ACM, 2000.

Due to the autonomous nature of BGP, ASes can act maliciously to advertise routing paths which don't exist. Additionally, there are other security concerns associated with BGP due to local policy selection which can't be monitored. I recommend you to read the next paper which describes the security loopholes in BGP and solutions to fix them.



7. Goldberg, Sharon. "Why is it taking so long to secure internet routing?.Communications of the ACM 57.10 (2014): 56-63.

Another important perspective towards routing is to look at the safety and liveness property of routing algorithms. Most routing algorithms favor responsiveness over consistency which has negative effects like routing loops. The next paper is the first one to introduce "consensus routing" which deals with the side effects of current routing protocols.


8. John, John P., et al. "Consensus routing: The Internet as a distributed system." Proceedings of the 5th USENIX Symposium on Networked Systems Design and Implementation. 2008.


------
Now, I am going to talk about the my favorite topic - TCP - which is the most crucial component for end-end reliable communication, flow control and congestion control mechanism. The idea of TCP took birth with the research paper #4 where Vint Cerf and Bob Kahn discussed a single  internetworking protocol that handles both TCP and IP features. The most complex of all TCP features is the congestion control mechanism due to no or limited knowledge from the network at the end hosts. I would definitely recommend the next paper for a moderate understanding of congestion control.


9. Jacobson, Van. "Congestion avoidance and control.ACM SIGCOMM computer communication review. Vol. 18. No. 4. ACM, 1988.


TCP congestion window in Tahoe and Reno

TCP congestion window in Tahoe and Reno 

The next set of papers are only intended for readers who want to research on better/improvised TCP versions. These are advanced research papers targeted to improve TCP performance. I have personally read them and used this knowledge to flaunt in my technical interviews.


XCP (eXplicit Control Protocol)
10. Katabi, Dina, Mark Handley, and Charlie Rohrs. "Congestion control for high bandwidth-delay product networks.ACM SIGCOMM computer communication review 32.4 (2002): 89-102.


DCTCP 
11. Alizadeh, Mohammad, et al. "Data center tcp (dctcp).ACM SIGCOMM computer communication review. Vol. 40. No. 4. ACM, 2010.


MPTCP
12. Wischik, Damon, et al. "Design, Implementation and Evaluation of Congestion Control for Multipath TCP.NSDI. Vol. 11. 2011. 

TCP has been long dominating the systems that require reliable communication until recently when Google introduced QUIC - a UDP based reliable and secure transport protocol. It has improved congestion control mechanisms and uses forward error correction for better performance - much higher than TCP. I highly recommend you to read QUIC design.



------
Next, I would like to talk about the accessories of computer networking which act as an add-on to greatly improve the network performance. Load balancer is one of them which sits between the router and the organization's network to balance the incoming traffic. With the increase in traffic (billions of requests/sec), providers host the service on multiple end points and use load balancers to distribute traffic to end points evenly for best performance. Maglev, introduced by Google, is a software load balancer that replaces expensive inflexible hardware load balancers with the help of distributed software.


14. Eisenbud, Daniel E., et al. "Maglev: A fast and reliable software network load balancer." 13th USENIX Symposium on Networked Systems Design and Implementation (NSDI 16). USENIX Association, 2016.

Network virtualization has become increasingly common in data center networks to provide centralized control over the network services and underlying network resources with the help of network functions. Besides providing routing and switching capabilities, it also provides L4-L7 services for access control and load balancing. The decoupling of control and forwarding plane (SDN idea) has greatly aided in the advancement of network virtualization. The next paper on Open vSwitch provides comprehensive details about one of the major breakthrough in this area.


15. Pfaff, Ben, et al. "The Design and Implementation of Open vSwitch.NSDI. 2015.

I think the above material is a good way to start thinking like the designer of Internet-like network. You can put yourself in a situation where you are asked to design an alternate Internet model from scratch. Networking has been the biggest field of research from the time of its inception and it will always be due to the its inherent challenges. 



13 January 2017

Sharding in Distributed Systems


I have mostly written about Networking protocols which is not fair as my blog's title is Inter-networking and Distributed Systems. With this logic Distributed Systems should get the 50% fair share on the blog content. So, today, I am going to write about one of the most important concepts used most commonly in Distributed Systems - Sharding.

Sharding in distributed databases

Sharding in distributed databases



What is Sharding?

Sharding in the simplest of terms, is a way of distributing data across sets of multiple machines. By distributing the dataset into multiple shards, it is possible to store larger datasets by increasing the number of machines. This dataset could be anything - a key/value store, a SQL database, BigTable, in-memory cache or anything that could represent data in any form.
Shards in distributed databases

Shards in distributed databases



Sharding is most commonly referred to as horizontal partitioning where homogenous rows are split across multiple database storage over different machines. By storing different rows on different groups of machines, performance is improved via parallel processing of independent rows. For example, in the above figure, users Kim and Lee are stored on Group 1 while users Park and Nam are stored on Group 2. When I say Group, it refers to all the SMR (State Machine Replica) that maintain the same data set to handle fault-tolerance. Note that the table is split by rows, which means all Groups store all the columns for some set of rows.

You can also do vertical partitioning to store some of the heavy columns (like BLOBs) elsewhere. But that is not sharding, so we won't go into the details of Vertical Partitioning.

What is not Sharding?

One of the most popular themes in Distributed Systems is Fault Tolerance. A very crucial reason why we need distributed systems is that machine failure is evident. Thus, we need to replicate the data and computations across multiple machines to make sure we don't lose anything in the events of failure. People accustomed to Distributed Systems literature on fault tolerance read about various consensus algorithms that help ensure data agreement and validity replicated across multiple nodes. 

2 Phase Commit is one of the protocols that ensure consensus among all participating nodes via a Coordinator. It is used in transactional systems which should guarantee ACID properties, for example, an online banking system. I would not go into the details of 2PC in this blog. Another most common protocol that people talk about is Paxos which ensures consensus among the majority of participants.  Paxos is a very interesting protocol as it provides an abstraction of a single machine that can never fail by replicating data store on multiple nodes and run Paxos protocol among them to achieve majority consensus.

PAXOS in Distributed Systems

PAXOS in Distributed Systems


An interesting thing to note here is that protocols like 2PC, Paxos, PBFT and other SMR protocols only provide Fault-Tolerance via Replication. All the machines in a consensus group or in short quorum store the same database which means they are doing exactly similar computations on same dataset. Adding more machines in any of these protocols doesn't increase throughput, or in other words, SMR protocols are NOT SCALABLE. 

As SMR only provides fault tolerance at the cost of more machines, this is definitely not enough for scalable distributed systems that need to store/compute billions of user records.


How Distributed Systems implement Sharding?

As I already said that Sharding is distributing data/computations across machines, what is the most easiest way of carrying out this distribution? Lets say you have a data store of 100 key/value pairs and a total of 5 nodes. By simple division, you could store 20 keys/node for equal load distribution. But you can't do it manually as your client program would need that information every time it accesses the data store.

The simplest algorithm that could be used is taking hash of the key and doing a modulus N over it where N is the number of nodes. This way your client application can simply apply this formula every time it needs to access the key. If you are wondering how Nodes identify which keys they should store, then I think a simple assignment of Nodes with natural numbers will solve the problem. But this simple approach wouldn't scale at all if you want to maintain even load balancing. For that, please refer to Chord paper. A quick idea about what Chord protocol does is depicted in the below picture:

Chord Peer to Peer protocol

Chord Peer to Peer protocol


In Chord, nodes are assumed to be placed in a hash space represented by a ring. Each Node IP is hashed and the result is applied to Mod N to find its position on the ring. The keys are also hashed and Mod N to determine their position on the ring. Each key is either stored at the same hashed Node or its successor if no node is present at that position. In the above picture, there are 3 nodes 0, 1 and 3 and 3 keys 1, 2 and 6. Key 1 is stored on Node 1, Key 2 on Node 3 (its successor) and Key 6 on Node 0 (its successor).


Is Sharding enough?

I still remember the time when I took Distributed Systems class in my Master's program at USC where we elaborately studied about its various theories like State Machine Replication, Sharding, MapReduce, Leases, Distributed Locks, In-memory caches and many more. It was during one of the office hours that I clearly understood the need for both Replication and Sharding together in Distributed Systems.

A simple analogy:

You are in your high school and you have asked to complete a set of hard mathematical problems. Your teacher is a kind one so she allows a team of 4 members to submit one solution.  Note that these questions are tricky and a single miscalculation might screw everything up. So, you decide within your team that each of you would solve all the problems individually and then compare the results in order to make sure that at least 2 of them matches. This is exactly what "Replication" does in distributed computing. But there is a catch here - you were also told that the team that finishes the first will receive 10% extra credit. This is huge and you don't want to miss that.

What do you do? Think, think, think. You decide to use one more theory here -- Sharding -- you make two groups of two members each such that each group solves a different set of problems. This will eliminate single person errors and along with it increase the efficiency of your team substantially - by 100%. This is exactly how Distributed Systems work - distribute different works to different sets of machines in order to achieve both Fault-tolerance and Scalability.
Distributed Storage

Distributed Storage



I know this article might have incited a lot of questions in your mind and this is good. I also had the same feeling when I started to learn Distributed Systems and eventually I found answers. Feel free to ask questions and I will try my best to answer them. Till then, I will start preparing for my next post.



19 December 2016

IP Address and its Significance


Every time we talk about network connection, whether WiFi or Ethernet or Mobile Data, there is one thing we always encounter if any of the above is not working.  We end up calling customer care and they would ask this question - Does your device has a valid IP Address?

What do they mean by a valid IP Address or an IP Address?



IP address


An IP address is a unique logical identifier of every device connected to the internet. EVERY single device, whether it is your laptop, phone, watch, smart home device, Amazon echo, smart router and anything which is interconnected. Strange right, because if every device has a unique IP address, why are we not running out. Well, the answer to that is we are actually running out of IP Addresses. Another answer to that is people involved in the formation of TCP/IP networking protocols had foreseen this and they came up with a workaround for that (Private addresses). A third answer is IPv6 - a newer generation of IP protocol.

Lets talk about why and how our devices get these IP addresses?

When you boot up your device, it is not connected to any network until the Wifi, mobile data or Ethernet module kicks in. So basically you would have a default IP address which is 0.0.0.0 and all the network interfaces will be inactive. (except loopback and local). Checkout what my Mac says when I hit "ifconfig" command (after disabling all network connections) :
------------------------------------------------------------------------------------------------------------
en0: flags=8823<UP,BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
ether ac:bc:32:c1:71:79
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (<unknown type>)
status: inactive
------------------------------------------------------------------------------------------------------------

When one of your network interfaces - WiFi or RF modem or Ethernet connectivity module starts, it will perform DHCP (dynamic host control protocol) which sends a broadcast to an available router and thus acquire a valid IP address (through leases). Your newly acquired IP address will look like this:
------------------------------------------------------------------------------------------------------------
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:bc:32:c1:71:79 
inet6 fe80::18b7:29d9:8bce:ecdb%en0 prefixlen 64 secured scopeid 0x4 
inet 192.168.0.13 netmask 0xffffff00 broadcast 192.168.0.255
...
media: autoselect

status: active
------------------------------------------------------------------------------------------------------------
DHCP mechanism

DHCP mechanism


If you want to learn more about DHCP mechanism, please leave a comment.


Classification of IP address

An IPv4 address is made up of 32 bits or 4 bytes so only 2^32 unique IP addresses are possible. As I said earlier, this is a very hard limitation as the number of devices are growing substantially everyday. I will talk about the workaround for this later in this section.

The total range of IP addresses is from 0.0.0.0 to 255.255.255.255 where each individual number is of 8 bits (8*4 = 32 total) also known as the octet. Originally the IP addresses were divided into classes based on the number of Hosts each class can support.

IP Address Classes can be classified as class A, B, C, D and E where A can support most number of hosts and C can support the least. Class D addresses were reserved for multicast purposes and class E for experimental use. The position of network ID and host ID was fixed at 8,16 or 24 for class A, B and C respectively.
Classful IP addressing

Classful IP addressing



However, due to address space wastage in classful addressing scheme (as the unused addresses within a class can't be redistributed), most organizations turned to Classless Addressing.


Classless Inter-Domain Routing 

With the increased usage of Internet, organizations realized the limitations of IP classes and started to move towards classless addressing where the network ID and host ID bits can be flexible (anything from 1 to 31). An address is represented as a.b.c.d/xx where xx denotes the number of network address bits, so for an address 124.128.xx.xx/9, 9 bits are reserved for network address and the rest 23 bits are for host address. This allows us to assign smaller/dynamic address ranges and also supports redistribution of addresses to other domains, if necessary.  Again, if you have questions regarding how this mechanism achieves scalability, please leave a comment.


So, is it possible to connect to a network without IP address?

When I was studying about IP protocol, I always used to wonder that if the TCP/IP layers are logical, then we probably don't need them if we want to just connect to a network in a raw manner. For network connectivity and data transfer, all we need is a medium (WiFi, radio), a device driver and raw data. On further study, this thought became stronger and it was proved correct during one of my academic project where I created my own data and sent this raw data via a medium (LAN).

One important thing that you must take care is of MAC address. As we all know that MAC address is the actual physical address that is used to identify a physical network device, it is necessary if we want to route a packet to a specific destination. Please leave a comment if you would like to learn more about MAC address and Layer 2 headers.

Example of a MAC address:
01-23-45-67-89-ab

MAC address

MAC address


Why don't we just use MAC address?

One simple answer to this is that there are different types of Layer 2 protocols and not thus Ethernet or WiFi. Protocols like ATM don't have MAC addresses.
Another very intriguing answer is that IP addressing has hierarchy which allows for distribution to domains (networks and sub-networks) and it is closely associated to DNS system. One can argue that we could build a DNS system for MAC addresses but that will be painful as MAC addresses inside a network don't follow any hierarchy and it is impossible to build a DNS lookup table for individual MAC.
Remember, when I said that IP addresses are limited, one of the most critical solution for that was Private Addressing within an organization. This eliminates the need of allocating a unique global IP to each member of that organization. If you check your IP address in your HOME network, it is a private IP, which means that all your devices connected to your router have private IP and only one global IP is used to identify your network. This kind of distribution is only possible through IP addresses and it is not feasible with MAC addresses.

There are a lot of questions that came to my mind while studying networking protocols and the reasons why this exist. You can keep me posted if you have any interesting question,  I will be glad to answer.

Any MX-5 fans, enjoy this video on the cute looks of Miata.


03 April 2013

TCP/IP Buffer Sizes in Linux


TCP along with managing the basic data transfer process, also ensures that data is sent reliably. It manage the flow of data between devices to ensure that data is transferred efficiently without either device sending data faster than the other can receive it.

Managing Retransmission for reliability


To ensure the delivery of data packets, TCP has its own mechanism of retransmission.
The TCP system works according to the following specific sequence:

Placement On Retransmission Queue: As soon as a segment containing data is transmitted, a copy of the segment is placed in a data structure called the retransmission queue. A retransmission timer is started for the segment when it is placed on the queue. The queue is kept sorted by the time remaining in the retransmission timer, so the TCP software can keep track of which timers have the least time remaining before they expire.

Acknowledgment Processing
: If an acknowledgment is received for a segment before its timer expires, the segment is removed from the retransmission queue.

Retransmission Timeout
: If an acknowledgment is not received before the timer for a segment expires, a retransmission timeout occurs, and the segment is automatically retransmitted.


What does TCP Window mean?

Client's Receive window: In a client server connection, the client tells the server the number of bytes it can receive at a time from the server. This is client's receive limit at a time and this becomes server's send window.

Server's Receive Window: Similarly, he server tells the client how many bytes of data it can take from the client at one time; this is the server's receive window and the client's send window.

TCP Window Size

TCP Window Size



TCP/IP related parameters in Linux


All TCP/IP tunning parameters are located under /proc/sys/net/...  Here is a list of the most important tunning parameters, along with short description of their meaning:


/proc/sys/net/core/rmem_max - Maximum read buffer size for all protocols
/proc/sys/net/core/wmem_max - Maximum write buffer size for all protocols

/proc/sys/net/ipv4/tcp_rmem - TCP read buffer size
/proc/sys/net/ipv4/tcp_wmem - TCP write buffer size

/proc/sys/net/ipv4/tcp_timestamps - timestamps add 12 bytes to the TCP header
/proc/sys/net/ipv4/tcp_sack - tcp selective acknowledgements.
/proc/sys/net/ipv4/tcp_window_scaling - support for large TCP Windows. Needs to be set to 1 if the Max TCP Window is over 65535.


Keep in mind everything under /proc is volatile, so any changes you make are lost after reboot.

Linux Tune Network Buffers for improved performance

The Linux network stack is not configured for high speed network transfers. This is done to preserve the kernel memory resources. The developers can easily tune these network stack parameters to meet their needs at server/client side.

You can easily find the actual values of network buffer parameters using the cat command as below:

$ cat /proc/sys/net/ipv4/tcp_rmem                 // read the tcp buffer size

To tune the parameters, make the changes to /etc/sysctl.conf

1. Tune the core buffer sizes
echo 'net.core.wmem_max = 12582912'  >>  /etc/sysctl.conf
echo 'net.core.rmem_max = 12582912' >> /etc/sysctl.conf

2. Tune the TCP receive and send buffers

echo 'net.ipv4.tcp_rmem = 10240 87380 12582912'  >>  /etc/sysctl.conf
echo 'net.ipv4.tcp_wmem = 10240 87380 12582912'  >>  /etc/sysctl.conf


3. Turn on window scaling to enlarge the transfer window:
echo 'net.ipv4.tcp_window_scaling = 1'  >>  /etc/sysctl.conf

4. Enable timestamps and selective acknowledgements:
echo 'net.ipv4.tcp_timestamps = 1'  >>  /etc/sysctl.conf
echo 'net.ipv4.tcp_sack = 1'  >>  /etc/sysctl.conf

5. Now reload the changes:
sysctl -p

Use Wireshark to monitor TCP Window

There are a few ways to monitor the tcp window with Wireshark. By default, the TCP window of the packet sender is displayed in the info summary view for each ACK packet.

Another way to show this is by using the I/O Graphs looking for the TCP Window Size to drop. To do this, use the tcp.analysis.window_update filter. Try it with the sample trace file using these settings. 

TCP Window on Wireshark

TCP Window on Wireshark


This graph shows the full size TCP Window dropping to nothing several times. While the window is down near zero, data is halted while the sender waits for the receive buffer to clear. Watch for these dips during large data transfers. The I/O graph makes them easier to see than combing through packet by packet!

If there are any questions about the sample trace file, or more about the function of the TCP Window, feel free to email or comment.

07 February 2013

General Packet Radio Service (GPRS)


Introduction

GPRS, as it reads General Packet Radio Service, was initialized by ETSI/SMG in 1994, to provide end-to-end packet-switched services to mobile users. GPRS was important as a migration step toward third-generation (3G) networks and allows network operators to implement an IP-based core architecture for data applications, which will continue to be used and expanded for 3G services for integrated voice and data applications.

Many Problems Solved 

GPRS enabled a variety of new and unique services to the mobile wireless subscriber. These features include the following:

Mobility: The ability to maintain constant voice and data communications while on the move.

Immediacy: Allowed subscribers to obtain connectivity when needed, regardless of location and without a lengthy login session.

Localization: Allowed subscribers to obtain information relevant to their current location.



GPRS Architecture

GPRS is a data network that overlays a second-generation GSM network. This data overlay network provides packet data transport at rates from 9.6 to 171 kbps. Additionally, multiple users can share the same air-interface resources simultaneously.

Following is the GPRS Architecture diagram:

GPRS Architecture

GPRS Architecture




Following two new components, called GPRS support nodes (GSNs), are added into existing GSM architecture with a few modifications in BSS and BSC:

Gateway GPRS support node (GGSN):
The Gateway GPRS Support Node acts as an interface and a router to external networks. The GGSN contains routing information for GPRS mobiles, which is used to tunnel packets through the IP based internal backbone to the correct Serving GPRS Support Node. The GGSN also collects charging information connected to the use of the external data networks and can act as a packet filter for incoming traffic.

Serving GPRS support node (SGSN):
The Serving GPRS Support Node is responsible for authentication of GPRS mobiles, registration of mobiles in the network, mobility management, and collecting information for charging for the use of the air interface.


GPRS MS Classses

The handset is probably the most well-known piece of equipment, because this is the part we use to make phone calls and to access data services. When we talk about advanced services, the handset is commonly called an MS, which consists of terminal equipment (TE) and a mobile terminal (MT). TE is the device that hosts the applications and the user interaction, while the MT is the part that connects to the network.

In order to take advantage of the new GPRS services, we need new GPRS enabled handsets. There are three different classes of GPRS terminal equipments:

Class A:
Class A terminals can handle packet data and voice at the same time. In other words, we need two transceivers because the handset has to send and/or receive data and voice at the same time. This situation makes class A terminals significantly more expensive to manufacture than class B and C terminals.

Class B:
Class B terminals can handle both packet data and voice, but not at the same time. In other words, you can use the same transceiver for both, keeping the cost of the terminals down.

Class C:
Class C terminals can only handle either voice or data. Examples of class C terminals are GPRS PCM/CIA cards, embedded modules in vending machines, and so on.


Network Processes

This gives a brief description of the basic processes used in GPRS networks:
  • Attach process: Process by which the MS attaches (i.e, connects) to the SGSN in a GPRS network
  • Authentication process: Process by which the SGSN authenticates the mobile subscriber
  • PDP activation process: Process by which a user session is established between the MS and the destination network
  • Detach process: Process by which the MS detaches (i.e., disconnects) from the SGSN in the GPRS network
  • Network-initiated PDP request for static IP address: Process by which a call from the packet data network reaches the MS using a static IP address
  • Network-initiated PDP request for dynamic IP address: Process by which a call from the packet data network reaches the MS using a dynamic IP address 
All the latest GSM phones available in the market are enabled to use GPRS services. So if you are planning to buy a GPRS enabled mobile phone then most probably you have to choose one GSM Mobile Phone unless you are using CDMA technology.

GPRS is a crucial step in the mobile evolution, and it opens endless possibilities for application developers and users. In the next article I will talk about UMTS and other 3G technologies.


23 January 2013

GPRS signalling in Dual Transfer Mode


A MS in Dual Transfer Mode (DTM) has resources for an RR (Radio Resource) connection and is simultaneously allocated resources for one or more TBFs (Temporary Block Flow in GPRS network), provided that the BSS co-ordinates its allocation of radio resources. DTM is optional
both for the MS and the network. A DTM mobile is a class A mobile.

Introduction

The definition of GPRS class A mode of operation in Release 97 assumes a total independence between the CS and PS domains. Thus the direct implementation would result in MS that are required to operate in two different frequencies either in the same time slot or different time slots.

Also, operators have expressed their needs to offer services that allow the simultaneous existence of a CS connection and a PS session in GSM/GPRS coverage area due to unavailability of UMTS in all areas.

The DTM solution overcomes the restrictions mentioned above and makes possible to have simultaneous CS and PS active connections. This is achieved by sending PS data (signaling and user data) on the time slot used by the CS connection or other time slot(s) that in both directions are contiguous with the time slot used by the CS connection.

PS data established over DTM

PS data established over DTM


GPRS signalling over DCCH

In DTM, the MS has resources allocated for an RR connection and for one or more TBFs. So the current GPRS resources are used for the transfer of GPRS signalling instead of the main DCCH (Dedicated Control Channel).
The use of the main DCCH  is only allowed when the MS is in dedicated mode.

GPRS signaling over DCCH

GPRS signaling over DCCH


MS-SGSN tunnelling

If GPRS signaling needs to be sent during a voice call (i.e. in dedicated mode), then LLC (Logical Link Connection) frames are sent on the main DCCH with Layer 2 SAPI 0. This uses a new Protocol Discriminator in Signaling Layer 3 message structure for LLC: GTTP (GPRS Transparent Transport Protocol).

The GPRS information from upper layers (i.e. GMM or SM) is always sent inside an LLC frame. This LLC frame can now be passed down:
  • to RLC (Radio Link Control) and transmitted on a TBF; or
  • to RR, if the MS is in dedicated mode, and transmitted on the main DCCH.
The new tunneling mechanism for the transmission of the LLC frame is shown graphically.

LLC PDU over DCCH

LLC PDU over DCCH


The LLC PDU is inserted in a new Layer 3 message, with a new Protocol Discriminator (GTTP) so that the BSC identifies the tunneling mechanism without the need to analyze the Message Type. This Layer 3 message is sent to the BSC on the main DCCH, with the existing Layer 2 mechanisms. The BTS re-assemblies the Layer 3 message and sends it to the BSC.

Single slot operation


If the MS in DTM has one TimeSlot allocated for the CS services, it is possible to reuse the same TS for the transmission of GPRS signaling and user data. In such case the CS information and RLC/MAC blocks are multiplexed in the same TS of the TDMA frame.

The configuration of logical channels used in that case is called ‘TCH/H+ PDCH/H’, which means that on one physical channel network configures one CS half rate connection and PS connection uses the remaining half of the physical channel.

This configuration is very useful when it is impossible for the network to allocate a TBF in some circumstances on separate TS (e.g. congested cell, multi slot capabilities not supported in the serving cell). 

On the 'TCH/H' part, the support of AMR as the speech codec is mandatory.
The PDCH/H is a resource dedicated (allocated exclusively) to the MS in both directions and can not be shared with other GPRS MS. For instance, if an uplink TBF is established, the network may send a control message in any of the downlink blocks. No downlink data, however, are sent without a previous downlink assignment.
In the uplink, the MS transmits in any of the blocks of the PDCH/H, irrespective of the USF in the previous blocks.

Multi slot operation


In multi slot operation, the GPRS data is sent on a PDCH. The number of time slots comprising the PDCH is decided by the network after taking into account the multi slot capabilities supported by the MS. The PDCH/F may be shared with other GPRS MS.

This article explains the basic GPRS signaling in DTM. More would be coming up to explain the signaling procedures during MO and MT call. Furthermore, I will discuss the need of DTM in today's scenario where UMTS and HSPA are taking lead.

About Me

My photo
Passionate about technology and humans