munotes®

A Web Request Over a Cellular Network

Get access to whole semester resourcesSemester Pass

Chapter One Hundred One

Syllabus topic Module 2, the paired practical, "Cellular Network Simulation with Client-Server Communication: Simulate a mobile network consisting of a cell tower, central office server, web server, and web browser, and analyze packet flow during a data request-response cycle"

Pages 770 to 777 of 862

In one line

A web page fetched on a phone crosses two different worlds: from the browser to the gateway it is a mobile network's problem, with bearers, contexts, ciphering and tunnels that keep the user's address fixed while the user moves, and from the gateway onward it is an ordinary TCP connection to a server that knows nothing about any of it.

In the wording a student can write in an examination: the practical's web browser is an application on the handset over TCP/IP; the cell tower is the Node B (or BTS) with its RNC (or BSC) behind it; the central office server is the operator's core network, whose packet side is the SGSN and the GGSN; and the web server is an ordinary host on the Internet.

The request travels: browser to the handset's IP stack (an HTTP GET inside TCP inside IP); over the radio bearer to the cell tower; over Iub or Abis to the controller; over Iu-PS or Gb to the SGSN, ciphered all the way from the handset; through a GTP tunnel to the GGSN; and out to the Internet with the address the GGSN gave the handset. The response returns to the GGSN, is tunnelled to whichever SGSN now serves the handset, and is delivered through the controller and the cell the handset is in.

Two ideas carry the whole chapter. First, the PDP context and its tunnel mean the handset keeps one IP address wherever it goes, so mobility is invisible above the GGSN. Second, the time a page takes is bytes divided by rate plus round trips times latency, and as bearers got faster the second term came to dominate, which is why later generations were designed for latency as much as for rate.

The four parties, and what they really are

The practical's names are the textbook ones; each stands for something specific.

  • The web browser is a TCP/IP application. Nothing about it is mobile: it opens connections, sends requests and renders replies.
  • The cell tower is the Node B or BTS, and behind it the RNC or BSC that controls it. Everything that makes the radio work, the power control, the scheduling, the handovers, lives here.
  • The central office server is the core network. For packets that is the SGSN, which serves the mobile, and the GGSN, which is the door to the outside; for calls it would be the MSC ([The GSM System Architecture]).
  • The web server is a host on the Internet, reached by ordinary routing.

The packet flow

The program lists the twelve steps. Three of them deserve attention.

Ciphering runs from the handset to the core. In GPRS and UMTS the packet is ciphered between the handset and the SGSN (in UMTS, the RNC), not merely over the air, which is one of the improvements over [GSM Security].

munotes.in770

A Web Request Over a Cellular Network

The tunnel between SGSN and GGSN is the mechanism that makes mobility invisible. The handset's IP address belongs to the GGSN; packets for it always arrive there, and the GGSN forwards them through a tunnel to whichever SGSN currently serves the handset. When the handset moves to another SGSN, the tunnel is re-pointed and nothing outside notices. This is the same idea as Mobile IP's home agent, built into the operator's network.

The web server sees an ordinary client. Every mobile-specific thing, the context, the bearer, the ciphering, the tunnel, stops at the GGSN. That is what makes the mobile Internet the Internet and not a separate network.

Where the time goes

A page is not one object. It is an HTML file and then dozens of images, scripts and stylesheets, fetched over a few parallel connections. The time is therefore:

total = (bytes / rate) + (round trips x latency) + setup

and which term dominates changes completely as bearers improve. The program computes it for four generations, and the answer is the most useful thing in this chapter: on GPRS the bytes take 200 seconds and the round trips 10; on HSPA the bytes take 2.2 seconds and the round trips 1.2. As the rate rises by ninety times, the balance shifts from almost all bytes to nearly half latency.

That is why the later generations pursued latency: LTE's 1 ms target and 5G's, and before them HSPA's shorter transmission time interval, are worth more to a page load than another doubling of rate. And it is why TCP's behaviour matters: a slow start ([Traditional Transport Control Protocols: TCP and UDP]) costs round trips at exactly the moment they are most expensive.

What each party remembers

A running session is a chain of state, and the practical's instruction to analyse the packet flow is best answered by naming it:

  • The handset holds a PDP context, an IP address and a radio bearer.
  • The RNC or BSC holds the radio bearer and knows which cells serve it.
  • The SGSN holds the mobile's location, its context and its ciphering state.
  • The GGSN holds the tunnel and the address it gave out.
  • The web server holds an ordinary TCP connection and knows none of the rest.

If the user moves

The practical's scenario is static; a real one is not, and the chapter's last table is the interesting case.

  • A cell change within one RNC moves the radio bearer; nothing above the RNC notices.
  • A change of RNC, with Iur available, is absorbed by the drift arrangement of [The UMTS System Architecture: UTRAN and the Core Network]; the core sees nothing.
  • A change of SGSN makes the GGSN re-point its tunnel; the IP address does not change, so TCP survives.
  • A change of GGSN would change the address and break every connection, which is why it does not happen during a session.
munotes.in771

A Web Request Over a Cellular Network

The design puts the anchor at the GGSN precisely so that everything below it can move.

The request, computed

The program names the four parties, lists the twelve hops of a request and response, computes where the time goes for four bearers, lists the state each party holds, and says what happens when the user moves.

# The practical: a browser on a handset fetches a page through a cell tower,
# the operator's core and a web server. Every packet, and where the time goes.
print("The four parties the practical names, and what each is in a real network:")
for name, real in (("web browser", "an application on the handset, over TCP/IP"),
                   ("cell tower", "the Node B or BTS, and behind it the RNC or BSC"),
                   ("central office server", "the operator's core: SGSN and GGSN (or MSC for calls)"),
                   ("web server", "a host on the Internet, reached through the GGSN")):
    print("  %-22s %s" % (name, real))

# 1. The packet flow, request and response.
print("\nOne request and one response, hop by hop:")
flow = [("browser", "handset IP stack", "an HTTP GET inside TCP inside IP"),
        ("handset IP stack", "radio link", "the packet is queued for the radio bearer"),
        ("radio link", "cell tower", "sent on the uplink, spread or in a slot, power controlled"),
        ("cell tower", "controller", "over Iub or Abis to the RNC or BSC"),
        ("controller", "SGSN", "over Iu-PS or Gb, ciphered from the handset to here"),
        ("SGSN", "GGSN", "through the operator's tunnel (GTP), which hides the mobile's movement"),
        ("GGSN", "the Internet", "the packet leaves with the address the GGSN gave the handset"),
        ("the Internet", "web server", "ordinary routing, ordinary TCP"),
        ("web server", "GGSN", "the response, addressed to the handset's address"),
        ("GGSN", "SGSN", "tunnelled to whichever SGSN now serves the handset"),
        ("SGSN", "controller", "and on to the cell the handset is in"),
        ("cell tower", "browser", "the downlink, then up the handset's stack to the page")]
for i, (a, b, what) in enumerate(flow, 1):
    print("  %2d. %-18s -> %-16s %s" % (i, a, b, what))

# 2. Where the time goes. A page of 40 objects over three generations.
print("\nFetching a page of 40 objects, 25 kB each, and where the time goes:")
print("  bearer            rate     round trip   transfer   setup+RTT cost   total")
for name, kbps, rtt_ms, setup_ms in (("GPRS", 40, 600, 2500), ("EDGE", 150, 400, 2000),
                                     ("UMTS R99", 384, 150, 1000), ("HSPA", 3600, 70, 300)):
    transfer = 40 * 25 * 8 / kbps                       # seconds
    # six objects at a time, so the round trips are paid in batches
    latency = setup_ms / 1000 + (40 / 6) * 2 * rtt_ms / 1000
    print("  %-14s %7.0f kb/s %8.0f ms %9.1f s %14.1f s %8.1f s"
          % (name, kbps, rtt_ms, transfer, latency, transfer + latency))
print("  on the slow bearers the bytes dominate; on the fast ones the round trips do, which is why")
print("  latency, not rate, is what later generations chased.")

# 3. What the network must remember for the session to work.
print("\nWhat the network is holding while the page loads:")
for who, state in (("the handset", "a PDP context, an IP address, a radio bearer"),
                   ("the RNC or BSC", "the radio bearer and which cells serve it"),
                   ("the SGSN", "the mobile's location, its context, its ciphering state"),
                   ("the GGSN", "the tunnel to the SGSN and the address given to the handset"),
                   ("the web server", "an ordinary TCP connection: it knows none of the above")):
    print("  %-16s %s" % (who, state))
print("  the web server sees a normal client. Every mobile-specific thing stops at the GGSN.")

# 4. What happens if the user moves mid-page.
print("\nIf the user moves while the page loads:")
for event, effect in (("cell change inside one RNC", "the radio bearer moves; nothing above notices"),
                      ("change of RNC, Iur available", "the drift RNS serves the cells; the core sees nothing"),
                      ("change of SGSN", "the GGSN retargets its tunnel; the IP address does not change"),
                      ("change of GGSN", "the address would change, so this does not happen mid-session")):
    print("  %-30s %s" % (event, effect))
print("  the IP address belongs to the GGSN, which is why mobility is invisible to the web server.")
munotes.in772

A Web Request Over a Cellular Network

The four parties the practical names, and what each is in a real network:
  web browser            an application on the handset, over TCP/IP
  cell tower             the Node B or BTS, and behind it the RNC or BSC
  central office server  the operator's core: SGSN and GGSN (or MSC for calls)
  web server             a host on the Internet, reached through the GGSN

One request and one response, hop by hop:
   1. browser            -> handset IP stack an HTTP GET inside TCP inside IP
   2. handset IP stack   -> radio link       the packet is queued for the radio bearer
   3. radio link         -> cell tower       sent on the uplink, spread or in a slot, power controlled
   4. cell tower         -> controller       over Iub or Abis to the RNC or BSC
   5. controller         -> SGSN             over Iu-PS or Gb, ciphered from the handset to here
   6. SGSN               -> GGSN             through the operator's tunnel (GTP), which hides the mobile's movement
   7. GGSN               -> the Internet     the packet leaves with the address the GGSN gave the handset
   8. the Internet       -> web server       ordinary routing, ordinary TCP
   9. web server         -> GGSN             the response, addressed to the handset's address
  10. GGSN               -> SGSN             tunnelled to whichever SGSN now serves the handset
  11. SGSN               -> controller       and on to the cell the handset is in
  12. cell tower         -> browser          the downlink, then up the handset's stack to the page

Fetching a page of 40 objects, 25 kB each, and where the time goes:
  bearer            rate     round trip   transfer   setup+RTT cost   total
  GPRS                40 kb/s      600 ms     200.0 s           10.5 s    210.5 s
  EDGE               150 kb/s      400 ms      53.3 s            7.3 s     60.7 s
  UMTS R99           384 kb/s      150 ms      20.8 s            3.0 s     23.8 s
  HSPA              3600 kb/s       70 ms       2.2 s            1.2 s      3.5 s
  on the slow bearers the bytes dominate; on the fast ones the round trips do, which is why
  latency, not rate, is what later generations chased.

What the network is holding while the page loads:
  the handset      a PDP context, an IP address, a radio bearer
  the RNC or BSC   the radio bearer and which cells serve it
  the SGSN         the mobile's location, its context, its ciphering state
  the GGSN         the tunnel to the SGSN and the address given to the handset
  the web server   an ordinary TCP connection: it knows none of the above
  the web server sees a normal client. Every mobile-specific thing stops at the GGSN.

If the user moves while the page loads:
  cell change inside one RNC     the radio bearer moves; nothing above notices
  change of RNC, Iur available   the drift RNS serves the cells; the core sees nothing
  change of SGSN                 the GGSN retargets its tunnel; the IP address does not change
  change of GGSN                 the address would change, so this does not happen mid-session
  the IP address belongs to the GGSN, which is why mobility is invisible to the web server.
munotes.in773

A Web Request Over a Cellular Network

The hops. Twelve, of which one crosses the air, three cross the operator's own network and the rest are ordinary Internet routing. The asymmetry is the point: the difficult, expensive, carefully engineered part is the first three hops.

The time. GPRS: 200.0 s of bytes and 10.5 s of latency, total 210.5 s, and nobody browsed the web on GPRS for pleasure. EDGE: 60.7 s. UMTS Release 99: 23.8 s. HSPA: 2.2 s of bytes and 1.2 s of latency, total 3.5 s. The ratio of latency to total rises from 5 per cent to 34 per cent, and on a modern bearer it is higher still. Rate stopped being the bottleneck; round trips became it.

munotes.in774

A Web Request Over a Cellular Network

The state. Five parties, four of which hold something about this particular mobile, and one, the web server, which holds nothing. That one asymmetry is the whole architecture of the mobile Internet.

Movement. Three of the four kinds of move are invisible above the layer that handles them, and the fourth is avoided by design.

Distinctions

The practical's nameThe real entityHolds
Web browserAn application on the handsetA TCP connection and a page
Cell towerNode B or BTS, with its RNC or BSCThe radio bearer, the cells serving it
Central office serverSGSN and GGSN (packets); MSC (calls)The context, location, ciphering, tunnel, address
Web serverAn Internet hostAn ordinary TCP connection
The mobile sideThe Internet side
BoundaryThe GGSNThe GGSN
AddressingContexts, tunnels, a fixed addressOrdinary IP routing
MobilityHandled by re-pointing tunnelsNot visible
SecurityCiphered to the SGSN or RNCWhatever the application provides
BearerBytes (40 objects of 25 kB)Round trips and setupTotal
GPRS, 40 kb/s200.0 s10.5 s210.5 s
EDGE, 150 kb/s53.3 s7.3 s60.7 s
UMTS R99, 384 kb/s20.8 s3.0 s23.8 s
HSPA, 3.6 Mb/s2.2 s1.2 s3.5 s

What it does not mean

The cell tower is not the network. It is the radio end; the decisions are in the controller and the core.

The IP address does not belong to the handset. It belongs to the GGSN, which is why it survives the handset's movement.

Faster is not the same as quicker. A page is round trips as well as bytes, and past a certain rate the round trips dominate.

The web server is not aware of the mobile. It sees an ordinary TCP client behind an ordinary address.

Ciphering is not end to end. It protects the handset to the core; beyond that it is the application's business, which is why HTTPS matters.

Quick revision

  • Browser (an app over TCP/IP), cell tower (Node B or BTS + RNC or BSC), central office (SGSN and GGSN), web server (an Internet host).
  • Request: browser, IP stack, radio bearer, cell tower, Iub/Abis, controller, Iu-PS/Gb, SGSN, GTP tunnel, GGSN, Internet, server. Response returns the same way, tunnelled to whichever SGSN now serves the handset.
  • The GGSN owns the address, so mobility is invisible above it; ciphering runs handset to SGSN or RNC.
  • Time = bytes / rate + round trips x latency + setup. Program: 210.5 s (GPRS), 60.7 (EDGE), 23.8 (UMTS R99), 3.5 (HSPA), with latency's share rising from 5 to 34 per cent.
  • State: handset (context, address, bearer), controller (bearer, cells), SGSN (location, context, ciphering), GGSN (tunnel, address), server (nothing).
  • Moving: within an RNC, invisible; between RNCs, absorbed by Iur; between SGSNs, the tunnel is re-pointed; between GGSNs, avoided.
munotes.in775

A Web Request Over a Cellular Network

Test yourself

1. Identify the four parties of the practical with their real counterparts. The web browser is an ordinary TCP/IP application on the handset. The cell tower is the Node B in UMTS or the BTS in GSM, together with the radio network controller or base station controller behind it, which own the radio bearer and take the radio decisions. The central office server is the operator's core network, which for packet data means the serving GPRS support node and the gateway GPRS support node, and for calls the mobile switching centre. The web server is a host on the Internet reached by ordinary routing.

2. Trace one request and response through the network. The browser issues an HTTP GET inside TCP inside IP; the handset's stack queues it on the radio bearer; it is transmitted on the uplink to the cell tower; the cell tower passes it over Iub or Abis to the controller; the controller passes it over Iu-PS or Gb to the SGSN, ciphered all the way from the handset; the SGSN tunnels it to the GGSN; the GGSN sends it onto the Internet with the address it gave the handset; ordinary routing carries it to the web server. The response is addressed to that same address, so it arrives at the GGSN, which tunnels it to whichever SGSN now serves the handset, and it is delivered through the controller and the serving cell to the browser.

3. Why does the handset's IP address not change as it moves? Because the address belongs to the GGSN, not to the handset or to any cell. Packets for the handset are always routed to the GGSN, which holds a tunnel to the SGSN currently serving the handset and forwards them along it. When the handset moves to a cell of another controller or to another SGSN, only the lower layers or the tunnel endpoint change; the address is untouched, so TCP connections survive and the web server never learns that anything happened.

4. Where does the time go in fetching a page, and how has that changed? The total is the bytes divided by the rate, plus the number of round trips multiplied by the latency, plus setup. On slow bearers the bytes dominate: in the chapter's model a page of forty 25 kB objects takes 200 seconds of transfer and 10.5 seconds of latency over GPRS. On fast bearers the balance reverses: over HSPA the same page takes 2.2 seconds of transfer and 1.2 seconds of latency, so a third of the time is round trips. That is why later generations set targets for latency, and why TCP's slow start matters most on the fastest bearers.

munotes.in776

A Web Request Over a Cellular Network

5. What state does each party hold during the session? The handset holds a PDP context, an IP address and a radio bearer. The controller holds the radio bearer and knows which cells serve it. The SGSN holds the mobile's location, its context and its ciphering state. The GGSN holds the tunnel to the SGSN and the address it allocated. The web server holds an ordinary TCP connection and knows nothing about any of the rest, which is exactly the property that lets the mobile Internet be the Internet.

6. What happens if the user moves while the page is loading? A change of cell within one controller moves the radio bearer and nothing above notices. A change of controller, where Iur exists, is handled inside the radio access network by the serving and drift arrangement, so the core network sees nothing. A change of SGSN causes the GGSN to re-point its tunnel, and the IP address is unchanged, so the TCP connections survive. A change of GGSN would change the address and break the connections, which is why the GGSN is kept as the anchor for the life of the session.

munotes.in777

The rest of this subject

These notes are cut from the University's printed syllabus. Open the syllabus itself for the same subject.

Issue
Done!