5.6.6
Internet Multicasting
Normal IP communication is between
one sender and one receiver. However, for some applications it is useful for a
process to be able to send to a large number of receivers simultaneously.
Examples are updating replicated, distributed databases, transmitting stock
quotes to multiple brokers, and handling digital conference (i.e., multiparty)
telephone calls.
IP supports multicasting, using
class D addresses. Each class D address identifies a group of hosts.
Twenty-eight bits are available for identifying groups, so over 250 million
groups can exist at the same time. When a process sends a packet to a class D
address, a best-efforts attempt is made to deliver it to all the members of the
group addressed, but no guarantees are given. Some members may not get the
packet.
Two kinds of group addresses are
supported: permanent addresses and temporary ones. A permanent group is always
there and does not have to be set up. Each permanent group has a permanent
group address. Some examples of permanent group addresses are:
224.0.0.1 All systems on a LAN
224.0.0.2 All routers on a LAN
224.0.0.5 All OSPF routers on a LAN
224.0.0.6 All designated OSPF
routers on a LAN
Temporary groups must be created
before they can be used. A process can ask its host to join a specific group.
It can also ask its host to leave the group. When the last process on a host
leaves a group, that group is no longer present on the host. Each host keeps
track of which groups its processes currently belong to.
Multicasting is implemented by
special multicast routers, which may or may not be colocated with the standard
routers. About once a minute, each multicast router sends a hardware (i.e.,
data link layer) multicast to the hosts on its LAN (address 224.0.0.1) asking
them to report back on the groups their processes currently belong to. Each
host sends back responses for all the class D addresses it is interested in.
These query and response packets use
a protocol called IGMP (Internet Group Management Protocol), which is vaguely
analogous to ICMP. It has only two kinds of packets: query and response, each
with a simple, fixed format containing some control information in the first
word of the payload field and a class D address in the second word. It is
described in RFC 1112.
Multicast routing is done using
spanning trees. Each multicast router exchanges information with its neighbors,
using a modified distance vector protocol in order for each one to construct a
spanning tree per group covering all group members. Various optimizations are
used to prune the tree to eliminate routers and networks not interested in
particular groups. The protocol makes heavy use of tunneling to avoid bothering
nodes not in a spanning tree.
Many users of the Internet have
portable computers and want to stay connected to the Internet when they visit a
distant Internet site and even on the road in between. Unfortunately, the IP
addressing system makes working far from home easier said than done. In this
section we will examine the problem and the solution. A more detailed
description is given in (Perkins, 1998a).
The real villain is the addressing
scheme itself. Every IP address contains a network number and a host number.
For example, consider the machine with IP address 160.80.40.20/16. The 160.80
gives the network number (8272 in decimal); the 40.20 is the host number (10260
in decimal). Routers all over the world have routing tables telling which line
to use to get to network 160.80. Whenever a packet comes in with a destination
IP address of the form 160.80.xxx.yyy, it goes out on that line.
If all of a sudden, the machine with
that address is carted off to some distant site, the packets for it will
continue to be routed to its home LAN (or router). The owner will no longer get
e-mail, and so on. Giving the machine a new IP address corresponding to its new
location is unattractive because large numbers of people, programs, and
databases would have to be informed of the change.
Another approach is to have the
routers use complete IP addresses for routing, instead of just the network.
However, this strategy would require each router to have millions of table
entries, at astronomical cost to the Internet.
When people began demanding the
ability to connect their notebook computers to the Internet wherever they were,
IETF set up a Working Group to find a solution. The Working Group quickly
formulated a number of goals considered desirable in any solution. The major
ones were:
- Each mobile host must be able to use its home IP address anywhere.
- Software changes to the fixed hosts were not permitted.
- Changes to the router software and tables were not permitted.
- Most packets for mobile hosts should not make detours on the way.
- No overhead should be incurred when a mobile host is at home.
The solution chosen was the one
described in Sec. 5.2.8. To review it briefly, every site that
wants to allow its users to roam has to create a home agent. Every site that
wants to allow visitors has to create a foreign agent. When a mobile host shows
up at a foreign site, it contacts the foreign host there and registers. The
foreign host then contacts the user's home agent and gives it a care-of address,
normally the foreign agent's own IP address.
When a packet arrives at the user's
home LAN, it comes in at some router attached to the LAN. The router then tries
to locate the host in the usual way, by broadcasting an ARP packet asking, for
example: What is the Ethernet address of 160.80.40.20? The home agent responds
to this query by giving its own Ethernet address. The router then sends packets
for 160.80.40.20 to the home agent. It, in turn, tunnels them to the care-of
address by encapsulating them in the payload field of an IP packet addressed to
the foreign agent. The foreign agent then decapsulates and delivers them to the
data link address of the mobile host. In addition, the home agent gives the
care-of address to the sender, so future packets can be tunneled directly to
the foreign agent. This solution meets all the requirements stated above.
One small detail is probably worth
mentioning. At the time the mobile host moves, the router probably has its
(soon-to-be-invalid) Ethernet address cached. Replacing that Ethernet address
with the home agent's is done by a trick called gratuitous ARP. This is a special,
unsolicited message to the router that causes it to replace a specific cache
entry, in this case, that of the mobile host about to leave. When the mobile
host returns later, the same trick is used to update the router's cache again.
Nothing in the design prevents a
mobile host from being its own foreign agent, but that approach only works if
the mobile host (in its capacity as foreign agent) is logically connected to
the Internet at its current site. Also, the mobile host must be able to acquire
a (temporary) care-of IP address to use. That IP address must belong to the LAN
to which it is currently attached.
The IETF solution for mobile hosts
solves a number of other problems not mentioned so far. For example, how are
agents located? The solution is for each agent to periodically broadcast its
address and the type of services it is willing to provide (e.g., home, foreign,
or both). When a mobile host arrives somewhere, it can just listen for these
broadcasts, called advertisements. Alternatively, it can broadcast a packet
announcing its arrival and hope that the local foreign agent responds to it.
Another problem that had to be
solved is what to do about impolite mobile hosts that leave without saying
goodbye. The solution is to make registration valid only for a fixed time
interval. If it is not refreshed periodically, it times out, so the foreign
host can clear its tables.
Yet another issue is security. When
a home agent gets a message asking it to please forward all of Roberta's
packets to some IP address, it had better not comply unless it is convinced
that Roberta is the source of this request, and not somebody trying to
impersonate her. Cryptographic authentication protocols are used for this
purpose.
A final point addressed by the
Working Group relates to levels of mobility. Imagine an airplane with an
on-board Ethernet used by the navigation and avionics computers. On this
Ethernet is a standard router that talks to the wired Internet on the ground
over a radio link. One fine day, some clever marketing executive gets the idea
to install Ethernet connectors in all the arm rests so passengers with mobile
computers can also plug in.
Now we have two levels of mobility:
the aircraft's own computers, which are stationary with respect to the
Ethernet, and the passengers' computers, which are mobile with respect to it.
In addition, the on-board router is mobile with respect to routers on the
ground. Being mobile with respect to a system that is itself mobile can be
handled using recursive tunneling.
While CIDR and NAT may buy a few
more years' time, everyone realizes that the days of IP in its current form
(IPv4) are numbered. In addition to these technical problems, another issue
looms in the background. In its early years, the Internet was largely used by
universities, high-tech industry, and the U.S. Government (especially the Dept.
of Defense). With the explosion of interest in the Internet starting in the
mid-1990s, it began to be used by a different group of people, especially
people with different requirements. For one thing, numerous people with
wireless portables use it to keep in contact with their home bases. For
another, with the impending convergence of the computer, communication, and
entertainment industries, it may not be that long before every telephone and
television set in the world is an Internet node, producing a billion machines
being used audio and video on demand. Under these circumstances, it became
apparent that IP had to evolve and become more flexible.
Seeing these problems on the
horizon, in 1990, IETF started work on a new version of IP, one which would
never run out of addresses, would solve a variety of other problems, and be
more flexible and efficient as well. Its major goals were:
- Support billions of hosts, even with inefficient address space allocation.
- Reduce the size of the routing tables.
- Simplify the protocol, to allow routers to process packets faster.
- Provide better security (authentication and privacy) than current IP.
- Pay more attention to type of service, particularly for real-time data.
- Aid multicasting by allowing scopes to be specified.
- Make it possible for a host to roam without changing its address.
- Allow the protocol to evolve in the future.
- Permit the old and new protocols to coexist for years.
To develop a protocol that met all
these requirements, IETF issued a call for proposals and discussion in RFC
1550. Twenty-one responses were received, not all of them full proposals. By
December 1992, seven serious proposals were on the table. They ranged from
making minor patches to IP, to throwing it out altogether and replacing with a
completely different protocol.
One proposal was to run TCP over
CLNP, which, with its 160-bit addresses would have provided enough address
space forever and would have unified two major network layer protocols.
However, many people felt that this would have been an admission that something
in the OSI world was actually done right, a statement considered Politically
Incorrect in Internet circles. CLNP was patterned closely on IP, so the two are
not really that different. In fact, the protocol ultimately chosen differs from
IP far more than CLNP does. Another strike against CLNP was its poor support
for service types, something required to transmit multimedia efficiently.
Three of the better proposals were
published in IEEE Network (Deering, 1993; Francis, 1993; and Katz and Ford,
1993). After much discussion, revision, and jockeying for position, a modified
combined version of the Deering and Francis proposals, by now called SIPP (Simple
Internet Protocol Plus) was selected and given the designation IPv6.
IPv6 meets the goals fairly well. It
maintains the good features of IP, discards or deemphasizes the bad ones, and
adds new ones where needed. In general, IPv6 is not compatible with IPv4, but
it is compatible with the other auxiliary Internet protocols, including TCP,
UDP, ICMP, IGMP, OSPF, BGP, and DNS, sometimes with small modifications being
required (mostly to deal with longer addresses). The main features of IPv6 are
discussed below. More information about it can be found in RFCs 2460 through
2466.
First and foremost, IPv6 has longer
addresses than IPv4. They are 16 bytes long, which solves the problem that IPv6
set out to solve: provide an effectively unlimited supply of Internet
addresses. We will have more to say about addresses shortly.
The second major improvement of IPv6
is the simplification of the header. It contains only seven fields (versus 13
in IPv4). This change allows routers to process packets faster and thus improve
throughput and delay. We will discuss the header shortly, too.
The third major improvement was
better support for options. This change was essential with the new header
because fields that previously were required are now optional. In addition, the
way options are represented is different, making it simple for routers to skip
over options not intended for them. This feature speeds up packet processing
time.
A fourth area in which IPv6
represents a big advance is in security. IETF had its fill of newspaper stories
about precocious 12-year-olds using their personal computers to break into
banks and military bases all over the Internet. There was a strong feeling that
something had to be done to improve security. Authentication and privacy are
key features of the new IP. These were later retrofitted to IPv4, however, so
in the area of security the differences are not so great any more.
Finally, more attention has been
paid to quality of service. Various half-hearted efforts have been made in the
past, but now with the growth of multimedia on the Internet, the sense of
urgency is greater.
The IPv6 header is shown in Fig. 5-68. The Version field is always 6 for IPv6
(and 4 for IPv4). During the transition period from IPv4, which will probably
take a decade, routers will be able to examine this field to tell what kind of
packet they have. As an aside, making this test wastes a few instructions in
the critical path, so many implementations are likely to try to avoid it by
using some field in the data link header to distinguish IPv4 packets from IPv6
packets. In this way, packets can be passed to the correct network layer handler
directly. However, having the data link layer be aware of network packet types
completely violates the design principle that each layer should not be aware of
the meaning of the bits given to it from the layer above. The discussions
between the ''Do it right'' and ''Make it fast'' camps will no doubt be lengthy
and vigorous.
The Traffic class field is used to
distinguish between packets with different real-time delivery requirements. A
field designed for this purpose has been in IP since the beginning, but it has
been only sporadically implemented by routers. Experiments are now underway to
determine how best it can be used for multimedia delivery.
The Flow label field is also still
experimental but will be used to allow a source and destination to set up a
pseudoconnection with particular properties and requirements. For example, a
stream of packets from one process on a certain source host to a certain
process on a certain destination host might have stringent delay requirements
and thus need reserved bandwidth. The flow can be set up in advance and given
an identifier. When a packet with a nonzero Flow label shows up, all the
routers can look it up in internal tables to see what kind of special treatment
it requires. In effect, flows are an attempt to have it both ways: the
flexibility of a datagram subnet and the guarantees of a virtual-circuit
subnet.
Each flow is designated by the
source address, destination address, and flow number, so many flows may be
active at the same time between a given pair of IP addresses. Also, in this
way, even if two flows coming from different hosts but with the same flow label
pass through the same router, the router will be able to tell them apart using
the source and destination addresses. It is expected that flow labels will be
chosen randomly, rather than assigned sequentially starting at 1, so routers as
expected to hash them.
The Payload length field tells how
many bytes follow the 40-byte header of Fig. 5-68. The name was changed from the IPv4 Total
length field because the meaning was changed slightly: the 40 header bytes are
no longer counted as part of the length (as they used to be).
The Next header field lets the cat
out of the bag. The reason the header could be simplified is that there can be
additional (optional) extension headers. This field tells which of the
(currently) six extension headers, if any, follow this one. If this header is
the last IP header, the Next header field tells which transport protocol
handler (e.g., TCP, UDP) to pass the packet to.
The Hop limit field is used to keep
packets from living forever. It is, in practice, the same as the Time to live
field in IPv4, namely, a field that is decremented on each hop. In theory, in
IPv4 it was a time in seconds, but no router used it that way, so the name was
changed to reflect the way it is actually used.
Next come the Source address and Destination
address fields. Deering's original proposal, SIP, used 8-byte addresses, but
during the review process many people felt that with 8-byte addresses IPv6
would run out of addresses within a few decades, whereas with 16-byte addresses
it would never run out. Other people argued that 16 bytes was overkill, whereas
still others favored using 20-byte addresses to be compatible with the OSI
datagram protocol. Still another faction wanted variable-sized addresses. After
much debate, it was decided that fixed-length 16-byte addresses were the best
compromise.
A new notation has been devised for
writing 16-byte addresses. They are written as eight groups of four hexadecimal
digits with colons between the groups, like this:
8000:0000:0000:0000:0123:4567:89AB:CDEF
Since many addresses will have many
zeros inside them, three optimizations have been authorized. First, leading
zeros within a group can be omitted, so 0123 can be written as 123. Second, one
or more groups of 16 zero bits can be replaced by a pair of colons. Thus, the
above address now becomes
8000::123:4567:89AB:CDEF
Finally, IPv4 addresses can be
written as a pair of colons and an old dotted decimal number, for example
::192.31.20.46
Perhaps it is unnecessary to be so
explicit about it, but there are a lot of 16-byte addresses. Specifically,
there are 2128 of them, which is approximately 3 x 1038.
If the entire earth, land and water, were covered with computers, IPv6 would
allow 7 x 1023 IP addresses per square meter. Students of chemistry
will notice that this number is larger than Avogadro's number. While it was not
the intention to give every molecule on the surface of the earth its own IP
address, we are not that far off.
In practice, the address space will
not be used efficiently, just as the telephone number address space is not (the
area code for Manhattan, 212, is nearly full, but that for Wyoming, 307, is
nearly empty). In RFC 3194, Durand and Huitema calculated that, using the
allocation of telephone numbers as a guide, even in the most pessimistic
scenario there will still be well over 1000 IP addresses per square meter of
the entire earth's surface (land and water). In any likely scenario, there will
be trillions of them per square meter. In short, it seems unlikely that we will
run out in the foreseeable future.
It is instructive to compare the
IPv4 header (Fig. 5-53) with the IPv6 header (Fig. 5-68) to see what has been left out in IPv6.
The IHL field is gone because the IPv6 header has a fixed length. The Protocol
field was taken out because the Next header field tells what follows the last
IP header (e.g., a UDP or TCP segment).
All the fields relating to
fragmentation were removed because IPv6 takes a different approach to
fragmentation. To start with, all IPv6-conformant hosts are expected to
dynamically determine the datagram size to use. This rule makes fragmentation
less likely to occur in the first place. Also, the minimum has been raised from
576 to 1280 to allow 1024 bytes of data and many headers. In addition, when a
host sends an IPv6 packet that is too large, instead of fragmenting it, the
router that is unable to forward it sends back an error message. This message
tells the host to break up all future packets to that destination. Having the
host send packets that are the right size in the first place is ultimately much
more efficient than having the routers fragment them on the fly.
Finally, the Checksum field is gone
because calculating it greatly reduces performance. With the reliable networks
now used, combined with the fact that the data link layer and transport layers
normally have their own checksums, the value of yet another checksum was not
worth the performance price it extracted. Removing all these features has
resulted in a lean and mean network layer protocol. Thus, the goal of IPv6—a
fast, yet flexible, protocol with plenty of address space—has been met by this
design.
Some of the missing IPv4 fields are
occasionally still needed, so IPv6 has introduced the concept of an (optional) extension
header. These headers can be supplied to provide extra information, but encoded
in an efficient way. Six kinds of extension headers are defined at present, as
listed in Fig. 5-69. Each one is optional, but if more than
one is present, they must appear directly after the fixed header, and
preferably in the order listed.
Some of the headers have a fixed
format; others contain a variable number of variable-length fields. For these,
each item is encoded as a (Type, Length, Value) tuple. The Type is a 1-byte
field telling which option this is. The Type values have been chosen so that
the first 2 bits tell routers that do not know how to process the option what
to do. The choices are: skip the option; discard the packet; discard the packet
and send back an ICMP packet; and the same as the previous one, except do not
send ICMP packets for multicast addresses (to prevent one bad multicast packet
from generating millions of ICMP reports).
The Length is also a 1-byte field.
It tells how long the value is (0 to 255 bytes). The Value is any information
required, up to 255 bytes.
The hop-by-hop header is used for
information that all routers along the path must examine. So far, one option
has been defined: support of datagrams exceeding 64K. The format of this header
is shown in Fig. 5-70. When it is used, the Payload length
field in the fixed header is set to zero.
As with all extension headers, this
one starts out with a byte telling what kind of header comes next. This byte is
followed by one telling how long the hop-by-hop header is in bytes, excluding
the first 8 bytes, which are mandatory. All extensions begin this way.
The next 2 bytes indicate that this
option defines the datagram size (code 194) and that the size is a 4-byte
number. The last 4 bytes give the size of the datagram. Sizes less than 65,536
bytes are not permitted and will result in the first router discarding the
packet and sending back an ICMP error message. Datagrams using this header
extension are called jumbograms. The use of jumbograms is important for
supercomputer applications that must transfer gigabytes of data efficiently
across the Internet.
The destination options header is
intended for fields that need only be interpreted at the destination host. In
the initial version of IPv6, the only options defined are null options for
padding this header out to a multiple of 8 bytes, so initially it will not be
used. It was included to make sure that new routing and host software can
handle it, in case someone thinks of a destination option some day.
The routing header lists one or more
routers that must be visited on the way to the destination. It is very similar
to the IPv4 loose source routing in that all addresses listed must be visited
in order, but other routers not listed may be visited in between. The format of
the routing header is shown in Fig. 5-71.
The first 4 bytes of the routing
extension header contain four 1-byte integers. The Next header and Header
entension length fields were described above. The Routing type field gives the
format of the rest of the header. Type 0 says that a reserved 32-bit word
follows the first word, followed by some number of IPv6 addresses. Other types
may be invented in the future as needed. Finally, the Segments left field keeps
track of how many of the addresses in the list have not yet been visited. It is
decremented every time one is visited. When it hits 0, the packet is on its own
with no more guidance about what route to follow. Usually at this point it is
so close to the destination that the best route is obvious.
The fragment header deals with
fragmentation similarly to the way IPv4 does. The header holds the datagram identifier,
fragment number, and a bit telling whether more fragments will follow. In IPv6,
unlike in IPv4, only the source host can fragment a packet. Routers along the
way may not do this. Although this change is a major philosophical break with
the past, it simplifies the routers' work and makes routing go faster. As
mentioned above, if a router is confronted with a packet that is too big, it
discards the packet and sends an ICMP packet back to the source. This
information allows the source host to fragment the packet into smaller pieces
using this header and try again.
The authentication header provides a
mechanism by which the receiver of a packet can be sure of who sent it. The
encrypted security payload makes it possible to encrypt the contents of a packet
so that only the intended recipient can read it. These headers use
cryptographic techniques to accomplish their missions.
Given the open design process and
the strongly-held opinions of many of the people involved, it should come as no
surprise that many choices made for IPv6 were highly controversial, to say the
least. We will summarize a few of these briefly below. For all the gory
details, see the RFCs.
We have already mentioned the
argument about the address length. The result was a compromise: 16-byte
fixed-length addresses.
Another fight developed over the
length of the Hop limit field. One camp felt strongly that limiting the maximum
number of hops to 255 (implicit in using an 8-bit field) was a gross mistake.
After all, paths of 32 hops are common now, and 10 years from now much longer
paths may be common. These people argued that using a huge address size was
farsighted but using a tiny hop count was short-sighted. In their view, the
greatest sin a computer scientist can commit is to provide too few bits
somewhere.
The response was that arguments
could be made to increase every field, leading to a bloated header. Also, the
function of the Hop limit field is to keep packets from wandering around for a
long time and 65,535 hops is far too long. Finally, as the Internet grows, more
and more long-distance links will be built, making it possible to get from any
country to any other country in half a dozen hops at most. If it takes more
than 125 hops to get from the source and destination to their respective
international gateways, something is wrong with the national backbones. The
8-bitters won this one.
Another hot potato was the maximum
packet size. The supercomputer community wanted packets in excess of 64 KB.
When a supercomputer gets started transferring, it really means business and
does not want to be interrupted every 64 KB. The argument against large packets
is that if a 1-MB packet hits a 1.5-Mbps T1 line, that packet will tie the line
up for over 5 seconds, producing a very noticeable delay for interactive users
sharing the line. A compromise was reached here: normal packets are limited to
64 KB, but the hop-by-hop extension header can be used to permit jumbograms.
A third hot topic was removing the
IPv4 checksum. Some people likened this move to removing the brakes from a car.
Doing so makes the car lighter so it can go faster, but if an unexpected event
happens, you have a problem.
The argument against checksums was
that any application that really cares about data integrity has to have a
transport layer checksum anyway, so having another one in IP (in addition to
the data link layer checksum) is overkill. Furthermore, experience showed that
computing the IP checksum was a major expense in IPv4. The antichecksum camp
won this one, and IPv6 does not have a checksum.
Mobile hosts were also a point of
contention. If a portable computer flies halfway around the world, can it
continue operating at the destination with the same IPv6 address, or does it
have to use a scheme with home agents and foreign agents? Mobile hosts also
introduce asymmetries into the routing system. It may well be the case that a
small mobile computer can easily hear the powerful signal put out by a large
stationary router, but the stationary router cannot hear the feeble signal put
out by the mobile host. Consequently, some people wanted to build explicit
support for mobile hosts into IPv6. That effort failed when no consensus could
be found for any specific proposal.
Probably the biggest battle was
about security. Everyone agreed it was essential, The war was about where and
how. First where. The argument for putting it in the network layer is that it
then becomes a standard service that all applications can use without any
advance planning. The argument against it is that really secure applications
generally want nothing less than end-to-end encryption, where the source
application does the encryption and the destination application undoes it. With
anything less, the user is at the mercy of potentially buggy network layer
implementations over which he has no control. The response to this argument is
that these applications can just refrain from using the IP security features
and do the job themselves. The rejoinder to that is that the people who do not
trust the network to do it right, do not want to pay the price of slow, bulky
IP implementations that have this capability, even if it is disabled.
Another aspect of where to put
security relates to the fact that many (but not all) countries have stringent
export laws concerning cryptography. Some, notably France and Iraq, also
restrict its use domestically, so that people cannot have secrets from the
police. As a result, any IP implementation that used a cryptographic system
strong enough to be of much value could not be exported from the United States
(and many other countries) to customers worldwide. Having to maintain two sets
of software, one for domestic use and one for export, is something most
computer vendors vigorously oppose.
One point
on which there was no controversy is that no one expects the IPv4 Internet to
be turned off on a Sunday morning and come back up as an IPv6 Internet Monday
morning. Instead, isolated ''islands'' of IPv6 will be converted, initially
communicating via tunnels. As the IPv6 islands grow, they will merge into
bigger islands. Eventually, all the islands will merge, and the Internet will
be fully converted. Given the massive investment in IPv4 routers currently
deployed, the conversion process will probably take a decade. For this reason,
an enormous amount of effort has gone into making sure that this transition
will be as painless as possible. For more information about IPv6, see (Loshin,
1999).
No comments:
Post a Comment
silahkan membaca dan berkomentar