Neatly Wrapped Packets

By eweek  |  Posted 2001-06-18

When a piece of e-mail whizzes across the internet, it doesnt travel in one piece; it is broken into a bunch of chunks called packets that navigate alone to the receiving computer and are reconstituted into a coherent message.

This process is often delayed, however, because some of the packets get dropped along the way. When this happens, the receiving computer waits for the truant packets for a while, then asks for them to be resent. All in all, a single missing packet can really slow things down.

Its tough to eliminate packet loss completely, but an enhancement to the basic language of the Internet known as Explicit Congestion Notification will reduce it somewhat, hopefully giving a significant boost to certain types of transactions.

By adding a bit of information to the header, ECN will reduce the number of packets lost during transmission, but its not clear how dramatic the effect will be.

For now, ECN applies only to conventional Web traffic such as e-mail and Web pages. But researchers hope to incorporate ECN into streaming media transmissions, where packet loss poses the biggest problem.

The Internet Engineering Task Force, a standards body, is on the verge of making ECN a proposed official standard. Once a concept reaches proposed-standard status, vendors of Internet equipment start to implement it in their latest products. Cisco Systems is already testing ECN, and expects to make the technology available in its routers by early next year.

"The ECN idea is potentially very good, especially for emerging applications such as streaming applications," says Mike Luby, chief technical officer at Digital Fountain, a start-up with technology for speeding up streaming media transmissions. "However, it is not clear that wide-scale ECN deployment would dramatically improve the overall quality of the Internet, and it is hard to determine this without a significant deployment."

"Its felt that it makes a difference since you, the receiver, dont have to wait around for a packet that never shows up," says Scott Bradner, a leader of the IETFs Transport Area working group, the group working on ECN. "Whether that means a 2 percent difference or a 20 percent difference depends on the circumstances. The real world is a very unpredictable thing."

ECN could have a more dramatic effect when combined with Internet Protocol Multicast. Multicast is a way of efficiently sending the same stream of data to many users at once. So, with multicast, the effects of ECN are magnified with each router hop. However, numerous technical problems have kept multicast from being widely deployed. For now, says Sally Floyd, a researcher at the AT&T Center for Internet Research in Berkeley, Calif., ECN is "just an improvement. It will be more useful later, for multicast and streaming media."

Traffic Rules on the Internet

Ordinary internet traffic follows a basic set of traffic laws known as the Transmission Control Protocol (TCP).

Since the late 1980s, when rising Net traffic led to severe congestion problems, TCP has included a congestion-control mechanism that instructs a transmitting computer to slow the flow of data by half while the network is congested.

So, in effect, congestion, in the form of dropped packets, is the error signal that gives the sender the feedback to speed up or slow down its transmission rate.

Congestion occurs at routers, the traffic cops at the intersections of the Internet. When a router is deluged with packets, they start to pile up in its buffer, which will eventually overflow. "Buffer overflow means a lot of packets get dropped at once, and you didnt need to drop that many to tell people to slow down," Floyd says.

Since its inefficient for routers to suddenly boil over and start dropping all packets, many routers use whats known as active queue management.

With active queue management, as a routers buffer gets close to capacity, it will start dropping some packets at random, with the number of packets being dropped increasing as the buffer limit approaches. The transmitting computer learns of the congestion when it fails to receive acknowledgments from the receiving computer within a certain time frame and this becomes the signal to slow its sending rate.

This system is inefficient, however, since the packet drops are necessary only as a signal for the transmitting computer to slow down. This is where ECN comes in.

ECN came about because of two, superfluous bits in the packet header left over from the implementation of quality of service for packets, where companies can pay extra to make their traffic high priority. Eight bits were set aside for QOS, but only six were actually used. The remaining two bits came up for grabs and ended up being used for ECN.

How ECN Works

ECN allows the transmitting computer to detect congestion and slow the data flow without packets being dropped.

Once a transmitting computer establishes that the intended recipient is ECN-enabled, it sends all its packets with one of the two ECN-bits flipped to "1". When one of these marked packets reaches a congested router, the router flips the other ECN bit to "1" and sends the packet on rather than dropping it.

When the recipient receives a packet marked with two ones, it knows that congestion was experienced and indicates this in its acknowledgement to the sender. The sender then slows its transmission rate as if the packet had been dropped.

When ECN was first developed, there was some concern that end users could use the protocol to "cheat," enabling their packets to get priority over everyone elses. For instance, a receiver wishing to download data faster, could indicate to the sender to enable ECN so packets dont get dropped, but then as it receives packets marked with two ones, it fails to notify the sender to slow down its sending rate. So, on the congested pipeline all the other transmissions jostling for space would be slowing their sending rates while the cheaters data continues to zip along at the same speed as before.

To prevent the cheating, the ECN working group introduced a clever tweak. In an ECN-enabled transaction, the sending computer marks packets with either 10 or 01 chosen at random. When the receiver acknowledges receipt of ECN packets, it tells the sender how the packet was marked. Since a packet that has experienced congestion is 11; the receiver doesnt know whether it started as 10 or 01. So a cheating receiver cannot consistently send a correct acknowledgment to those packets and the sender will know that congestion was experienced.

To use ECN in a given Internet transaction, the operating systems of both the sender and receiver must have it implemented in their kernels. Any routers at points of congestion between the machines must also have ECN instructions built into their operating systems. It will likely be several years before the majority of clients and routers recognize ECN, though the technology is now included in Nortel Networks routers and in some versions of the Linux OS. Microsoft wont include ECN in its products before 2003, a spokeswoman says.

Once ECN has been implemented on the routers at the most heavily congested parts of the Internet, "anyone who uses Linux and talks to a Linux server will already benefit," the IETFs Bradner, says. "You dont have to have thousands of routers supporting it."

Precisely how much of a boost ECN will provide is tough to measure, since it depends on the size and nature of the transaction, the network conditions at the time of transmission and whether various router features have been enabled.

AT&Ts Floyd says the effects of ECN will be most apparent with very small data transmissions, where the loss of a single packet makes a big difference in transmission time. "The real people who care is when youre getting a little short Web file with only three packets of data," she says. "If the router dropped that packet, the TCP has to do a time-out and wait for a new transmission."

Vijay Krishnamoorthy, Ciscos QOS product manager for the IOS Technologies Division, says he expects ECN will provide the most significant improvement for interactive transmissions, such as buying a book from or entering data into a Web-based application.

The Next Challenge

The next challenge for researchers will be an implementation of ECN for streaming media applications.

Since streaming media must flow smoothly and continuously to the receivers computer, packets cannot be acknowledged or resent, and streaming media protocols dont have built-in congestion controls. Also, streaming media transmissions necessarily come at a set data rate.

ECN for media is "harder to do . . . because you dont have the same concept of a session, and flow control is not part of it," Bradner says.

Currently, when streaming media hits pockets of congestion, it begins to jiggle and sputter as more and more packets get lost. If enough packets are lost, streaming video often switches to stills, which uses far less bandwidth.

So before streaming media can use ECN, researchers must develop new versions of streaming protocols with built-in congestion controls. A proposal for such a protocol is being considered by the IETF.

"Streaming media and figuring out what to do in that case is very important," Bradner says. "Its still an area of research. There are no easy answers."

Rocket Fuel