Nixu Ltd.
The Transport Layer
Part 2
TCP Congestion Control
• RFC 2581
• The basic features are the TCP slow start and congestion control algorithms
• These features are described in the standards
— Note that the TCP protocol format is fixed
— However these features depend on the TCP implementation, which has more liberty in implementing different strategies for managing win- dow and packet sizes
Nixu Ltd. 3/26 The Transport Layer
TCP Slow-Start
• TCP escalates the amount of traffic it sends rapidly, to achieve a reasonable data transmission rate
• The TCP header window size field is used to manage the advertised window
— Initially set to maximum size segment
— Each received ACK increases the window size by one element (expo- nential growth)
— Window growth stops at the congestion treshold or when a packet is lost
— Packet loss is detected using a round trip timer
— At packet loss the size of the window is halved
— Actually max (data in transit / 2, 2*MSS)
TCP Timeout
• How to know when a packet is lost?
• An average round trip time (RTT) can be estimated from session initiation and revised with new samples
— RTT = (A * RTT_old) + ((1 - A) * RTT_sample), 0 < A < 1
— A typical value for A is 0.875
• Then the timeout can be set to be B * RTT, where B is for example 2
— Or timeout = RTT + 4 * Deviation
• Setting the values for A and B has been a subjet of research and several methods exist, where the values are dynamic
Nixu Ltd. 5/26 The Transport Layer
The Basic TCP Congestion Control Algorithm
• Congestion is overload in a switching point (router) that delays packets or causes them to be dropped
• At packet loss TCP halves the sending window (congestion window) and doubles the retransmission timer
• After congestion is detected TCP enters the congestion avoidance phase and the sending window is increased linearily, not exponentially
• There are several versions of this algorithm
TCP Congestion Control Algorithms
• TCP Tahoe, the original algorithm
• TCP Reno
— Faster window increase in congestion avoidance
— Fast recovery algorithm optimized for single packet loss
• TCP Vegas
— More complex analysis of the network condition
— The sending window size is continously adjusted based on the meas- ured RTT
• Reno and Vegas are compared much in literature
— Vegas is more efficient in ideal conditions, but suffers when it co- exists with Reno
— Vegas can be hurt by the Random Early Detection (RED) in routers, which drops packets
Nixu Ltd. 7/26 The Transport Layer
Some problems with TCP
• Silly window syndrome
— When the sending window is full and the first packet has been one byte, the sending buffer will be emptied one byte at a time
— Now corrected with heuristics
• Sending window size oscillation
• TCP and UDP checksums are calculated using a pseudo header
— Source and destination IP addresses are added to the header
— Makes life difficult for Network Address Translation
Alternatives to TCP
• TCP is far from perfect
— Slow start and slow restart assume that packets are dropped because of congestion
— Only service is a reliable byte stream
• Other alternatives exist
— Mowgli
— XTP
— WAP
Nixu Ltd. 9/26 The Transport Layer
Mowgli
• Mobile Office Workstations using GSM Links
• Developed at Helsinki University
• Attempts to optimize the capacity of radio links
• A research project
Mowgli Architecture
• The Mowgli Agent provides the BSD socket interface to the wireless device
— TCP/IP services available
— Additional Mowgli services
Nixu Ltd. 11/26 The Transport Layer
The Mowgli Proxy
• Delivers the data sent by the agent and transferred by the Mowgli Data Transfer Service to the actual TCP/IP layer in a Mobile Connection Host connected to the Internet
• Can perform operations to the application data (like image compression)
• The IP address that is used to send and recieve traffic in the network is shared by the proxy and the wireless workstation
XTP, Express Transport Protocol
• A large and complex protocol, that attempts to provide
— Reliable and unreliable streams and datagrams
— Transactions
— Reliable multicast
— Error control, flow control, rate control
— And other features
• XTP has not gained wide suport outside the research community
• It has many interesting features and ideas
Nixu Ltd. 13/26 The Transport Layer
XTP Implicit Connection Open with Acceptance
• The connection is set up and transmission started by the sender
• Acceptance is delivered at leisure
Client Packets in transit Server
FIRST
DATA active open
DATA passive open
CNTL
XTP Connection Refusal
• The reciever (server) refuses the connection with the DIAG packet
• All data sent by the sender is lost
Client Packets in transit Server
FIRST
DATA active open
DATA passive open
DIAG
Nixu Ltd. 15/26 The Transport Layer
Wireless Application Protocol
• An industry-wide standard to develop applications for wireless environments
• Ericsson, Motorola, Nokia...
• Based on WWW technologies and philosophies
• See http://www.wapforum.org/
• Several parts (version 1.0):
— WAE - Wireless application environment
— WAP - Wireless application protocol
— WSP - Wireless session protocol
— WTP - Wireless transport protocol
— WTA* - Wireless telephony application...
Goals
• To design a protocol family suitable for building interactive applications for devices with
— limited capabilities:
— battery power
— memory
— screen size
— limited bandwidth
— possibly long latencies
— different user interfaces
• Global and international usability
• Security and access control
Nixu Ltd. 17/26 The Transport Layer
The WAP 1.0 Protocol Stack
WML
Common services Session Layer (WSP) Security Layer
Transport Layer (WTP)
Bearer systems (GSM data, SMS, GPRS etc)
Other Services and applications
The Transport Protocol (WAP 1.0)
• Connection oriented WTP/C
— Optimized for low bandwidth wireless bearers
— Efficient for request-reply interaction
— Realiability
• Datagram oriented WTP/D
— Datagrams are moved transparently on the bearer network
• Port based abstract interface to upper layers.
• Low memory and CPU speed requirements.
Nixu Ltd. 19/26 The Transport Layer
The Session Protocols
• Mechanisms for exchanging typed data between WAP applications in a secure manner
• In WAP Architecture specification coupled with the Security Layer
Application layer Session Layer Security Layer Transport Layer Bearers
The Session Protocols (cont.)
• Optimized for asymmetric client–server functionality.
Includes the server initiated “push” model.
• Several possible session protocols
Nixu Ltd. 21/26 The Transport Layer
Multicast
• Unicast - one sender, one receiver
• Broadcast - one sender, delivery to all entities in a certain area
• Multicast - one sender, many receivers
— Many, not all
• Not necessarily interactive
— one way broadcast only
• May cause bandwidth problems if in full effect
MBONE basics
• MBONE - Multicast Backbone
• First tests in 1994
• A virtual network
— layered on top of portions of the physical Internet to support routing of IP multicast packets
— commercial routers don’t always implement multicast routing
• Consists of multicast capable networks joined with a multicast tunnel
• Multicast UDP packets tunneled in normal unicast IP packets
• Usually special event broadcasts (IETF etc)
Nixu Ltd. 23/26 The Transport Layer
Multicast technology
• Groups
— hosts tell their routers, which multicast groups they are interested in
— routers tell their up-stream routers they want to receive that traffic
— IGMP – Internet Group Management Protocol, based on ICMP
— v1 in RFC 1112 most widely used, v2 RFC 2236 emerging
• Reliable protocols
— no single multicast transport protocol is general and good enough for all types of applications
— RTP - Real Time Transport Protocol, MFTP - Multicast FTP etc
MBONE requirements
• Anyone can join MBONE
• ISP’s must provide at least one IP multicast router to tunnel traffic
— a real router (MOSFP - Multicast OSPF routing protocol) or
— a Unix host running the free mrouted software (DVMRP)
• Regional (USA, EU etc) tunnel coordinating done to ensure best connections
• Client software
— several audio or videoconferencing programs for Unixes
— liveGate for Windows, can do multicast over non-multicast dial-in con- nections
Nixu Ltd. 25/26 The Transport Layer
Group Addresses
• IPv4: class D
— addresses 224.0.0.0 - 239.255.255.255
— addresses 244.0.0.0 - 244.255.255.255 are reserved for routing etc.
• IPv6:
— flags: fourth bit tells whether the route is permanent
— scope: tells how wide the group is
The Future of the Transport Layer
• TCP and UDP are good enough and will continue to be used for a long time
• WAP WTP is likely to make a comeback with GPRS
— Or maybe not?
• The ruling factor for technology adaptation is not the quality or performance of a particular technology but the choice of technology by commercial actors
• Next years’ focus is on wireless
• Then maybe satellite and multicast