Saturday, January 24, 2009

LAPTOPS

Laptop

A laptop computer, also known as a notebook computer, is a small personal computer designed for mobile use. A laptop integrates all of the typical components of a desktop computer, including a display, a keyboard, a pointing device (a touchpad, also known as a trackpad, or a pointing stick) and a battery into a single portable unit. The rechargeable battery is charged from an AC/DC adapter and has enough capacity to power the laptop for several hours.



A laptop is usually shaped like a large notebook with thickness of 0.7–1.5 inches (18–38 mm) and dimensions ranging from 10x8 inches (27x22cm, 13" display) to 15x11 inches (39x28cm, 17" display) and up. Modern laptops weigh 3 to 12 pounds (1.4 to 5.4 kg), and some older laptops were even heavier. Most laptops are designed in the flip form factor to protect the screen and the keyboard when closed.

Originally considered "a small niche market"[1] and perceived as suitable for "specialized field applications" such as "the military, the Internal Revenue Service, accountants and sales representatives"[1][2], battery-powered portables had just 2% worldwide market share in 1986[3]. But today, there are already more laptops than desktops in the enterprise[4] and, according to a forecast by Intel, more laptops than desktops will be sold in the general PC market as soon as 2009.

History

As the personal computer became feasible in the early 1970s, the idea of a portable personal computer followed; in particular, a "personal, portable information manipulator" was envisioned by Alan Kay at Xerox PARC in 1968[6] and described in his 1972 paper as the "Dynabook".



The first commercially available portable computer appeared nine years later, in 1981. The Osborne 1 weighed 23.5 pounds (10.7 kg). It had no battery, a tiny 5" CRT screen and dual 5¼" single-density floppy drives. In the same year the first laptop-sized portable computer, the Epson HX-20, was announced[8]. The Epson had a LCD screen, a rechargeable battery and a calculator-size printer in a 1.6 kg (4 pounds) enclosure.

The first laptop using the clamshell design, utilized today by almost all laptops, appeared in 1982. The $8150 GRiD Compass 1100 was purchased by NASA and the military among others. The Gavilan SC, released in 1983, was the first notebook marketed using the term "laptop".

From 1983 onwards:

Several new input methods were introduced: the touchpad (Gavilan SC, 1983), the pointing stick (IBM ThinkPad 700, 1992) and handwriting recognition (Linus Write-Top[9], 1987).
CPUs became designed specifically for laptops (Intel i386SL, 1990), targeting low power consumption, and were augmented with dynamic power management features (Intel SpeedStep and AMD PowerNow!).
Displays reached VGA resolution by 1988 (Compaq SLT 286) and 256-color screens by 1993 (PowerBook 165c), progressing quickly to millions of colors and high resolutions.
High-capacity hard drives and optical storage (CD-ROM followed by DVD) became available in laptops soon after their introduction to the desktops.
Early laptops often had proprietary and incompatible architectures, operating systems and bundled applications.

Subnotebook

A subnotebook, also called an ultraportable by some vendors, is a laptop designed and marketed with an emphasis on portability (small size, low weight and long battery life) that retains the performance of a standard notebook. Subnotebooks are usually smaller and lighter than standard laptops, weighing between 0.8 and 2 kg (2 to 5 pounds)[10]; the battery life can exceed 10 hours[15] when a large battery or an additional battery pack is installed.



To achieve the size and weight reductions, ultraportables use high resolution 13" and smaller screens (down to 6.4"), have relatively few ports, employ expensive components designed for minimal size and best power efficiency, and utilize advanced materials and construction methods. Some subnotebooks achieve a further portability improvement by omitting an optical/removable media drive; in this case they may be paired with a docking station that contains the drive and optionally more ports or an additional battery.

The term "subnotebook" is usually reserved to laptops that run general-purpose desktop operating systems such as Windows, Linux or Mac OS X, rather than specialized software such as Windows CE, Palm OS or Internet Tablet OS.

Netbook

A netbook is a small laptop designed for portability and low price, with a performance inferior to that of a standard notebook yet adequate for surfing on the Internet and basic word processing. Netbooks use 10" and smaller screens[citation needed], weigh 0.6 to 1.2 kg (1.5 to 3 pounds), and are generally powered by a CPU from one of the low-cost families with a high performance-to-power ratio such as Intel Atom, Celeron ULV, or VIA C7 processors.[16]

Netbooks use general-purpose operating systems such as Linux or Windows XP. Some models use small-capacity (4 to 40 Gb) SSD drives instead of the usual HDDs to save weight and battery power.

Components

The basic components of laptops are similar in function to their desktop counterparts, but are miniaturized, adapted to mobile use, and designed for low power consumption. Because of the additional requirements, laptop components have worse performance than desktop parts of comparable price. Furthermore, the design bounds on power, size, and cooling of laptops limit the maximum performance of laptop parts compared to that of desktop components. [19]




The following list summarizes the differences and distinguishing features of laptop components in comparison to desktop personal computer parts:

Motherboard - laptop motherboards are highly make- and model-specific, and do not conform to a desktop form factor. Unlike a desktop board that usually has several slots for expansion cards (3 to 7 are common), a board for a small, highly integrated laptop may have no expansion slots at all, with all the functionality implemented on the motherboard itself; the only expansion possible in this case is via an external port such as USB. Other boards may have one or more standard or proprietary expansion slots. Several other functions (storage controllers, networking, sound card and external ports) are implemented on the motherboard.[20]
Central processing unit (CPU) - Laptop CPUs have advanced power-saving features and produce less heat than desktop processors, but are not as powerful.[21] There is a wide range of CPUs designed for laptops available from Intel (Pentium M, Celeron M, Intel Core and Core 2 Duo), AMD (Athlon, Turion 64, and Sempron), VIA Technologies, Transmeta and others. On the non-x86 architectures, Motorola and IBM produced the chips for the former PowerPC-based Apple laptops (iBook and PowerBook). Some laptops have removable CPUs, although support by the motherboard may be restricted to the specific models.[22] In other laptops the CPU is soldered on the motherboard and is non-replaceable.

A SODIMM memory module.Memory (RAM) - SO-DIMM memory modules that are usually found in laptops are about half the size of desktop DIMMs.[20] They may be accessible from the bottom of the laptop for ease of upgrading, or placed in locations not intended for user replacement such as between the keyboard and the motherboard.
Expansion cards - A PC Card (formerly PCMCIA) or ExpressCard bay for expansion cards is often present on laptops to allow adding and removing functionality, even when the laptop is powered on. Some subsystems (such as Wi-Fi or a cellular modem) can be implemented as replaceable internal expansion cards, usually accessible under an access cover on the bottom of the laptop. Two popular standards for such cards are MiniPCI and its successor, the PCI Express Mini. [23]
Power supply - laptops are powered by an internal rechargeable battery that is charged using an external power supply. The power supply can charge the battery and power the laptop simultaneously; when the battery is fully charged, the laptop continues to run on AC power. The charger adds about 400 grams (1 lb) to the overall "transport weight" of the notebook.
Battery - Current laptops utilize lithium ion batteries, with more recent models using the new lithium polymer technology. These two technologies have largely replaced the older nickel metal-hydride batteries. Typical battery life for standard laptops is two to five hours of light-duty use, but may drop to as little as one hour when doing power-intensive tasks. Batteries' performance gradually decreases with time, leading to an eventual replacement in one to five years, depending on the charging and discharging pattern. This large-capacity main battery should not be confused with the much smaller battery nearly all computers use to run the real-time clock and to store the BIOS configuration in the CMOS memory when the computer is off.
Video display controller - on standard laptops video controller is usually integrated into the chipset. This tends to limit the use of laptops for gaming and entertainment, two fields which have constantly escalating hardware demands[24]. Higher-end laptops and desktop replacements in particular often come with dedicated graphics processors on the motherboard or as an internal expansion card. These mobile graphics processors are comparable in performance to mainstream desktop graphic accelerator boards.[25]
Display - Most modern laptops feature 12 inch (30 cm) or larger color active matrix displays with resolutions of 1024×768 pixels and above. Many current models use screens with higher resolution than typical for desktop PCs (for example, the 1440×900 resolution of a 15" Macbook Pro[26] can be found on 19" widescreen desktop monitors).

A size comparison of 3.5" and 2.5" hard disk drivesRemovable media drives - a DVD/CD reader/writer drive is standard. CD drives are becoming rare, while Blu-Ray is not yet common on notebooks[27]. Many ultraportables and netbooks either move the removable media drive into the docking station or exclude it altogether.
Internal storage - Hard disks are physically smaller—2.5 inch (60 mm) or 1.8 inch (46 mm) —compared to desktop 3.5 inch (90 mm) drives. Some new laptops (usually ultraportables) employ more expensive, but faster, lighter and power-efficient Flash memory-based SSDs instead. Currently, 250 to 320 Gb sizes are common for laptop hard disks (64 to 128 Gb for SSDs).
Input - A pointing stick, touchpad or both are used to control the position of the cursor on the screen, and an integrated keyboard is used for typing. External keyboard and mouse may be connected using USB or PS/2 (if present).
Ports - several USB ports, an external monitor port (VGA or DVI), audio in/out, and an Ethernet network port are found on most laptops. Less common are legacy ports such as a PS/2 keyboard/mouse port, serial port or a parallel port. S-video or composite video ports are more common on consumer-oriented notebooks.

Advantages

Portability is usually the first feature mentioned in any comparison of laptops versus desktop PCs[30]. Portability means that a laptop can be used in many places - not only at home and at the office, but also during commuting and flights, in coffee shops, in lecture halls and libraries, at clients' location or at a meeting room, etc. The portability feature offers several distinct advantages:

Getting more done - using a laptop in places where a desktop PC can't be used, and at times that would otherwise be wasted. For example, an office worker managing his e-mails during an hour-long commute by train, or a student doing her homework at the university coffee shop during a break between lectures.[31]
Immediacy - Carrying a laptop means having instant access to various information, personal and work files. Immediacy allows better collaboration between coworkers or students, as a laptop can be flipped open to present a problem or a solution anytime, anywhere.
Up-to-date information - If a person has more than one desktop PC, a problem of synchronization arises: changes made on one computer are not automatically propagated to the others. There are ways to resolve this problem, including physical transfer of updated files (using a USB stick or CDs) or using synchronization software over the Internet. However, using a single laptop at both locations avoids the problem entirely, as the files exist in a single location and are always up-to-date.
Connectivity - A proliferation of Wi-Fi wireless networks and cellular broadband data services (HSDPA, EVDO and others) combined with a near-ubiquitous support by laptops [32] means that a laptop can have easy Internet and local network connectivity while remaining mobile. Wi-Fi networks and laptop programs are especially widespread at university campuses.[33]
Other advantages of laptops include:

Size - laptops are smaller than standard PCs. This is beneficial when space is at a premium, for example in small apartments and student dorms. When not in use, a laptop can be closed and put away.
Low power consumption - laptops are several times more power-efficient than desktops. A typical laptop uses 20-90 W, compared to 100-800 W for desktops. This could be particularly beneficial for businesses (which run hundreds of personal computers, multiplying the potential savings) and homes where there is a computer running 24/7 (such as a home media server, print server, etc.)
Quiet - laptops are often quieter than desktops, due both to better components (quieter, slower 2.5-inch hard drives) and to less heat production leading to use of fewer and slower cooling fans.
Battery - a charged laptop can run several hours in case of a power outage and is not affected by short power interruptions and brownouts. A desktop PC needs a UPS to handle short interruptions, brownouts and spikes; achieving on-battery time of more than 20-30 minutes for a desktop PC requires a large and expensive UPS.

Disadvantages

Performance
While the performance of mainstream desktops and laptops is comparable, laptops are significantly more expensive than desktop PCs at the same performance level.[35] The upper limits of performance of laptops are a little bit lower, and "bleeding-edge" features usually appear first in desktops and only then, as the underlying technology matures, are adapted to laptops.

However, for Internet browsing and typical office applications, where the computer spends the majority of its time waiting for the next user input, even netbook-class laptops are generally fast enough.[36] Standard laptops are sufficiently powerful for high-resolution movie playback, 3D gaming and video editing and encoding. Number-crunching software (databases, math, engineering, financial, etc.) is the area where the laptops are at the biggest disadvantage.


Upgradeability

Upgradeability of laptops is very limited compared to desktops, which are thoroughly standardized. In general, hard drives and memory can be upgraded easily. Optical drives and internal expansion cards may be upgraded if they follow an industry standard, but all other internal components, including the CPU and graphics, are not intended to be upgradeable.

The reasons for limited upgradeability are both technical and economic. There is no industry-wide standard form factor for laptops; each major laptop manufacturer pursues its own proprietary design and construction, with the result that laptops are difficult to upgrade and have high repair costs. With few exceptions, laptop components can rarely be swapped between laptops of competing manufacturers, or even between laptops from the different product-lines of the same manufacturer.

Some upgrades can be performed by adding external devices, either USB or in expansion card format such a PC Card: sound cards, network adapters, hard and optical drives, and numerous other peripherals are available. But those upgrades usually impair the laptop's portability, because they add cables and boxes to the setup and often have to be disconnected and reconnected when the laptop is moved.


Ergonomics and health

Laptop coaster preventing heating of lap and improving laptop airflow.Because of their small and flat keyboard and trackpad pointing devices, prolonged use of laptops can cause RSI.[37] Usage of ergonomic keyboards and pointing devices is recommended to prevent injury when working for long periods of time; they can be connected to a laptop easily by USB or via a docking station. Some health standards require ergonomic keyboards at workplaces.

The integrated screen often causes users to hunch over for a better view, which can cause neck or spinal injuries. A larger and higher-quality external screen can be connected to almost any laptop to alleviate that and to provide additional "screen estate" for more productive work.

A study by State University of New York researchers found that heat generated from laptops can raise the temperature of the scrotum, potentially putting sperm count at risk. The small study, which included little more than two dozen men aged 13 to 35, found that the sitting position required to balance a laptop can raise scrotum temperature by as much as 2.1 °C (3.8 °F). Heat from the laptop itself can raise the temperature by another 0.7 °C (1.4 °F), bringing the potential total increase to 2.8 °C (5.2 °F). However, further research is needed to determine whether this directly affects sterility in men.

A common practical solution to this problem is to place the laptop on a table or desk. Another solution is to obtain a cooling unit for the laptop, these units are usually USB powered consist of a hard thin plastic case housing 1, 2 or 3 cooling fans (the whole thing is designed to sit under a laptop) which results in the laptop remaining cool to the touch, and greatly reduces laptop heat generation. There are several companies which make these coolers.

Heat from using a laptop on the lap can also cause skin discoloration on the thighs.


Durability

A clogged heatsink on a 2.5 year old laptop.Due to their portability, laptops are subject to more wear and physical damage than desktops. Components such as screen hinges, latches, power jacks[40] and power cords deteriorate gradually due to ordinary use. A liquid spill onto the keyboard, a rather minor mishap with a desktop system, can damage the internals of a laptop and result in a costly repair. One study found that a laptop is 3 times more likely to break during the first year of use than a desktop.

Original external components are expensive (a replacement AC adapter, for example, could cost $75); other parts are inexpensive - a power jack can cost a few dollars - but their replacement may require extensive disassembly and reassembly of the laptop by a technician. Other inexpensive but fragile parts often cannot be purchased separate from larger more expensive components.The repair costs of a failed motherboard or LCD panel may exceed the value of a used laptop.

Laptops rely on extremely compact cooling systems involving a fan and heat sink that can fail due to eventual clogging by accumulated airborne dust and debris. Most laptops do not have any sort of removable dust collection filter over the air intake for these cooling systems, resulting in a system that gradually runs hotter and louder as the years pass. Eventually the laptop starts to overheat even at idle load levels. This dust is usually stuck inside where casual cleaning and vacuuming cannot remove it. Instead, a complete disassembly is needed to clean the laptop.

Battery life of laptops is limited; the capacity drops with time, necessitating an eventual replacement after a few years.

Security
Being expensive, common and portable, laptops are prized targets for theft. The cost of the stolen business or personal data and of the resulting problems (identity theft, credit card fraud, breach of privacy laws) can be many times the value of the stolen laptop itself. Therefore, both physical protection of laptops and the safeguarding of data contained on them are of the highest importance.

Most laptops have a Kensington security slot which is used to tether the computer to a desk or other immovable object with a security cable and lock. In addition to this, modern operating systems and third-party software offer disk encryption functionality that renders the data on the laptop's hard drive unreadable without a key or a passphrase.

Other portable computing devices

There are several categories of portable computing devices that can run on batteries but are not usually classified as laptops: portable computers, keyboardless tablet PCs, Internet tablets, PDAs, Ultra Mobile PCs (UMPCs) and smartphones.


The Compaq Portable
A keyboard-less tablet PC
A Palm TX PDA
A Nokia N800 Internet tablet
An OQO Ultra Mobile PC
An Apple iPhone smartphoneA Portable computer is a general-purpose computer that can be easily moved from place to place, but cannot be used while in transit, usually because it requires some "setting-up" and an AC power source. The most famous example is the Osborne 1. Also called a "transportable" or a "luggable" PC.

A Tablet PC that lacks a keyboard (also known as a non-convertible Tablet PC) is shaped like slate or a paper notebook, features a touchscreen with a stylus and handwriting recognition software. Tablets may not be best suited for applications requiring a physical keyboard for typing, but are otherwise capable of carrying out most tasks that an ordinary laptop would be able to perform.

An Internet tablet is an Internet appliance in tablet form. Unlike a Tablet PC, an Internet tablet does not have much computing power and its applications suite is limited - it can not replace a general purpose computer. Internet tablets typically feature an MP3 and video player, a web browser, a chat application and a picture viewer.

A Personal digital assistant (PDA) is a small, usually pocket-sized, computer with limited functionality. It is intended to supplement and to synchronize with a desktop computer, giving access to contacts, address book, notes, e-mail and other features.

An Ultra Mobile PC is a full-featured, PDA-sized computer running a general-purpose operating system.

A Smart phone is a PDA with an integrated cellphone functionality. Current smartphones have a wide range of features and installable applications.

Boundaries that separate these categories are blurry at times. For example, the OQO UMPC is also a PDA-sized tablet PC; the Apple eMate had the clamshell form factor of a laptop, but ran PDA software. The HP Omnibook line of laptops included some devices small enough to be called Ultra Mobile PCs. The hardware of the Nokia 770 internet tablet is essentially the same as that of a PDA such as the Zaurus 6000; the only reason it's not called a PDA is that it doesn't have PIM software. On the other hand, both the 770 and the Zaurus can run some desktop Linux software, usually with modifications.

Major brands and manufacturers

There is a multitude of laptop brands and manufacturers; several major brands, offering notebooks in various classes, are listed in the box to the right.

The major brands usually offer good service and support, including well-executed documentation and driver downloads that will remain available for many years after a particular laptop model is no longer produced. Capitalizing on service, support and brand image, laptops from major brands are more expensive than laptops by smaller brands and ODMs.

Some brands are specializing in a particular class of laptops, such as gaming laptops (Alienware), netbooks (EeePC) and laptops for children (OLPC).

Many brands, including the major ones, do not design and do not manufacture their laptops. Instead, a small number of Original Design Manufacturers (ODMs) design new models of laptops, and the brands choose the models to be included in their lineup. In 2006, 7 major ODMs manufactured 7 of every 10 laptops in the world, with the largest one (Quanta Computer) having 30% world market share.[43] Therefore, there often are identical models available both from a major label and from a low-profile ODM in-house brand.

Sales

For year 2008 it is estimated that 145.9 million notebooks were sold, and in 2009 the number will grow to 177.7 million.[45] The third quarter of 2008 was the first time when notebook PC shipments exceeded desktops, with 38.6 million units versus 38.5 million units.

Sunday, January 4, 2009

INTERNET PROTOCOLS (IP)

Internet Protocols

Background

The Internet protocols are the world's most popular open-system (nonproprietary) protocol suite because they can be used to communicate across any set of interconnected networks and are equally well suited for LAN and WAN communications. The Internet protocols consist of a suite of communication protocols, of which the two best known are the Transmission Control Protocol (TCP) and the Internet Protocol (IP). The Internet protocol suite not only includes lower-layer protocols (such as TCP and IP), but it also specifies common applications such as electronic mail, terminal emulation, and file transfer. This chapter provides a broad introduction to specifications that comprise the Internet protocols. Discussions include IP addressing and key upper-layer protocols used in the Internet. Specific routing protocols are addressed individually later in this document.

Internet protocols were first developed in the mid-1970s, when the Defense Advanced Research Projects Agency (DARPA) became interested in establishing a packet-switched network that would facilitate communication between dissimilar computer systems at research institutions. With the goal of heterogeneous connectivity in mind, DARPA funded research by Stanford University and Bolt, Beranek, and Newman (BBN). The result of this development effort was the Internet protocol suite, completed in the late 1970s.

TCP/IP later was included with Berkeley Software Distribution (BSD) UNIX and has since become the foundation on which the Internet and the World Wide Web (WWW) are based.

Documentation of the Internet protocols (including new or revised protocols) and policies are specified in technical reports called Request For Comments (RFCs), which are published and then reviewed and analyzed by the Internet community. Protocol refinements are published in the new RFCs. To illustrate the scope of the Internet protocols, maps many of the protocols of the Internet protocol suite and their corresponding OSI layers. This chapter addresses the basic elements and operations of these and other key Internet protocols.

Internet Protocol (IP)

The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains addressing information and some control information that enables packets to be routed. IP is documented in RFC 791 and is the primary network-layer protocol in the Internet protocol suite. Along with the Transmission Control Protocol (TCP), IP represents the heart of the Internet protocols. IP has two primary responsibilities: providing connectionless, best-effort delivery of datagrams through an internetwork; and providing fragmentation and reassembly of datagrams to support data links with different maximum-transmission unit (MTU) sizes.

The following discussion describes the IP packet fields illustrated in :

•Version—Indicates the version of IP currently used.

•IP Header Length (IHL)—Indicates the datagram header length in 32-bit words.

•Type-of-Service—Specifies how an upper-layer protocol would like a current datagram to be handled, and assigns datagrams various levels of importance.

•Total Length—Specifies the length, in bytes, of the entire IP packet, including the data and header.

•Identification—Contains an integer that identifies the current datagram. This field is used to help piece together datagram fragments.

•Flags—Consists of a 3-bit field of which the two low-order (least-significant) bits control fragmentation. The low-order bit specifies whether the packet can be fragmented. The middle bit specifies whether the packet is the last fragment in a series of fragmented packets. The third or high-order bit is not used.

•Fragment Offset—Indicates the position of the fragment's data relative to the beginning of the data in the original datagram, which allows the destination IP process to properly reconstruct the original datagram.

•Time-to-Live—Maintains a counter that gradually decrements down to zero, at which point the datagram is discarded. This keeps packets from looping endlessly.

•Protocol—Indicates which upper-layer protocol receives incoming packets after IP processing is complete.

•Header Checksum—Helps ensure IP header integrity.

•Source Address—Specifies the sending node.

•Destination Address—Specifies the receiving node.

•Options—Allows IP to support various options, such as security.

•Data—Contains upper-layer information.

IP Addressing

As with any other network-layer protocol, the IP addressing scheme is integral to the process of routing IP datagrams through an internetwork. Each IP address has specific components and follows a basic format. These IP addresses can be subdivided and used to create addresses for subnetworks.

Each host on a TCP/IP network is assigned a unique 32-bit logical address that is divided into two main parts: the network number and the host number. The network number identifies a network and must be assigned by the Internet Network Information Center (InterNIC) if the network is to be part of the Internet. An Internet Service Provider (ISP) can obtain blocks of network addresses from the InterNIC and can itself assign address space as necessary. The host number identifies a host on a network and is assigned by the local network administrator.

IP Address Format

The 32-bit IP address is grouped eight bits at a time, separated by dots, and represented in decimal format (known as dotted decimal notation). Each bit in the octet has a binary weight (128, 64, 32, 16, 8, 4, 2, 1). The minimum value for an octet is 0, and the maximum value for an octet is 255. illustrates the basic format of an IP address.

IP Address Classes

IP addressing supports five different address classes: A, B,C, D, and E. Only classes A, B, and C are available for commercial use. The left-most (high-order) bits indicate the network class. provides reference information about the five IP address classes.

Table 30-1 Reference Information About the Five IP Address Classes

IP Address Class Format Purpose High-Order Bit(s) Address Range No. Bits Network/Host Max. Hosts
A
N.H.H.H1
Few large organizations
0
1.0.0.0 to 126.0.0.0
7/24
167772142 (224 - 2)

B
N.N.H.H
Medium-size organizations
1, 0
128.1.0.0 to 191.254.0.0
14/16
65534 (216 - 2)

C
N.N.N.H
Relatively small organizations
1, 1, 0
192.0.1.0 to 223.255.254.0
21/8
254 (28 - 2)

D
N/A
Multicast groups (RFC 1112)
1, 1, 1, 0
224.0.0.0 to 239.255.255.255
N/A (not for commercial use)
N/A

E
N/A
Experimental
1, 1, 1, 1
240.0.0.0 to 254.255.255.255
N/A
N/A

IP Subnet Addressing
IP networks can be divided into smaller networks called subnetworks (or subnets). Subnetting provides the network administrator with several benefits, including extra flexibility, more efficient use of network addresses, and the capability to contain broadcast traffic (a broadcast will not cross a router).

Subnets are under local administration. As such, the outside world sees an organization as a single network and has no detailed knowledge of the organization's internal structure.

A given network address can be broken up into many subnetworks. For example, 172.16.1.0, 172.16.2.0, 172.16.3.0, and 172.16.4.0 are all subnets within network 171.16.0.0. (All 0s in the host portion of an address specifies the entire network.)

IP Subnet Mask

A subnet address is created by "borrowing" bits from the host field and designating them as the subnet field. The number of borrowed bits varies and is specified by the subnet mask. shows how bits are borrowed from the host address field to create the subnet address field.

Subnet masks use the same format and representation technique as IP addresses. The subnet mask, however, has binary 1s in all bits specifying the network and subnetwork fields, and binary 0s in all bits specifying the host field. illustrates a sample subnet mask.


Subnet mask bits should come from the high-order (left-most) bits of the host field, as illustrates. Details of Class B and C subnet mask types follow. Class A addresses are not discussed in this chapter because they generally are subnetted on an 8-bit boundary.

Various types of subnet masks exist for Class B and C subnets.

The default subnet mask for a Class B address that has no subnetting is 255.255.0.0, while the subnet mask for a Class B address 171.16.0.0 that specifies eight bits of subnetting is 255.255.255.0. The reason for this is that eight bits of subnetting or 28 - 2 (1 for the network address and 1 for the broadcast address) = 254 subnets possible, with 28 - 2 = 254 hosts per subnet.

The subnet mask for a Class C address 192.168.2.0 that specifies five bits of subnetting is 255.255.255.248.With five bits available for subnetting, 25 - 2 = 30 subnets possible, with
23 - 2 = 6 hosts per subnet.

The reference charts shown in table 30-2 and table 30-3 can be used when planning Class B and C networks to determine the required number of subnets and hosts, and the appropriate subnet mask.

Table 30-2 Class B Subnetting Reference Chart


Number of Bits Subnet Mask Number of Subnets Number of Hosts
2
255.255.192.0
2
16382

3
255.255.224.0
6
8190

4
255.255.240.0
14
4094

5
255.255.248.0
30
2046

6
255.255.252.0
62
1022

7
255.255.254.0
126
510

8
255.255.255.0
254
254

9
255.255.255.128
510
126

10
255.255.255.192
1022
62

11
255.255.255.224
2046
30

12
255.255.255.240
4094
14

13
255.255.255.248
8190
6

14
255.255.255.252
16382
2





Table 30-3 Class C Subnetting Reference Chart

-----------------------------------------------------------------------------------
Number of Bits Subnet Mask Number of Subnets Number of Hosts
----------------------------------------------------------------------------------
2 255.255.255.192 2 62
3 255.255.255.224 6 30
4 255.255.255.240 14 14
5 255.255.255.248 30 06
6 255.255.255.252 62 02
-----------------------------------------------------------------------------------


How Subnet Masks are Used to Determine the Network Number
The router performs a set process to determine the network (or more specifically, the subnetwork) address. First, the router extracts the IP destination address from the incoming packet and retrieves the internal subnet mask. It then performs a logical AND operation to obtain the network number. This causes the host portion of the IP destination address to be removed, while the destination network number remains. The router then looks up the destination network number and matches it with an outgoing interface. Finally, it forwards the frame to the destination IP address. Specifics regarding the logical AND operation are discussed in the following section.

Logical AND Operation

Three basic rules govern logically "ANDing" two binary numbers. First, 1 "ANDed" with 1 yields 1. Second, 1 "ANDed" with 0 yields 0. Finally, 0 "ANDed" with 0 yields 0. The truth table provided in table 30-4 illustrates the rules for logical AND operations.

Table 30-4 Rules for Logical AND Operations


Input Input Output
1 1 1
1 0 0
0 1 0
0 0 0


Two simple guidelines exist for remembering logical AND operations: Logically "ANDing" a 1 with a 1 yields the original value, and logically "ANDing" a 0 with any number yields 0.

illustrates that when a logical AND of the destination IP address and the subnet mask is performed, the subnetwork number remains, which the router uses to forward the packet.

Figure 30-9 Applying a logical AND the destination IP address and the subnet mask produces the subnetwork number.







Address Resolution Protocol (ARP) Overview

For two machines on a given network to communicate, they must know the other machine's physical (or MAC) addresses. By broadcasting Address Resolution Protocols (ARPs), a host can dynamically discover the MAC-layer address corresponding to a particular IP network-layer address.

After receiving a MAC-layer address, IP devices create an ARP cache to store the recently acquired IP-to-MAC address mapping, thus avoiding having to broadcast ARPS when they want to recontact a device. If the device does not respond within a specified time frame, the cache entry is flushed.

In addition to the Reverse Address Resolution Protocol (RARP) is used to map MAC-layer addresses to IP addresses. RARP, which is the logical inverse of ARP, might be used by diskless workstations that do not know their IP addresses when they boot. RARP relies on the presence of a RARP server with table entries of MAC-layer-to-IP address mappings.

Internet Routing .

Internet routing devices traditionally have been called gateways. In today's terminology, however, the term gateway refers specifically to a device that performs application-layer protocol translation between devices. Interior gateways refer to devices that perform these protocol functions between machines or networks under the same administrative control or authority, such as a corporation's internal network. These are known as autonomous systems. Exterior gateways perform protocol functions between independent networks.

Routers within the Internet are organized hierarchically. Routers used for information exchange within autonomous systems are called interior routers, which use a variety of Interior Gateway Protocols (IGPs) to accomplish this purpose. The Routing Information Protocol (RIP) is an example of an IGP.

Routers that move information between autonomous systems are called exterior routers. These routers use an exterior gateway protocol to exchange information between autonomous systems. The Border Gateway Protocol (BGP) is an example of an exterior gateway protocol.

IP Routing

IP routing protocols are dynamic. Dynamic routing calls for routes to be calculated automatically at regular intervals by software in routing devices. This contrasts with static routing, where routers are established by the network administrator and do not change until the network administrator changes them.

An IP routing table, which consists of destination address/next hop pairs, is used to enable dynamic routing. An entry in this table, for example, would be interpreted as follows: to get to network 172.31.0.0, send the packet out Ethernet interface 0 (E0).

IP routing specifies that IP datagrams travel through internetworks one hop at a time. The entire route is not known at the onset of the journey, however. Instead, at each stop, the next destination is calculated by matching the destination address within the datagram with an entry in the current node's routing table.

Each node's involvement in the routing process is limited to forwarding packets based on internal information. The nodes do not monitor whether the packets get to their final destination, nor does IP provide for error reporting back to the source when routing anomalies occur. This task is left to another Internet protocol, the Internet Control-Message Protocol (ICMP), which is discussed in the following section.

Internet Control Message Protocol (ICMP)
The Internet Control Message Protocol (ICMP) is a network-layer Internet protocol that provides message packets to report errors and other information regarding IP packet processing back to the source. ICMP is documented in RFC 792.

ICMP Messages

ICMPs generate several kinds of useful messages, including Destination Unreachable, Echo Request and Reply, Redirect, Time Exceeded, and Router Advertisement and Router Solicitation. If an ICMP message cannot be delivered, no second one is generated. This is to avoid an endless flood of ICMP messages.

When an ICMP destination-unreachable message is sent by a router, it means that the router is unable to send the package to its final destination. The router then discards the original packet. Two reasons exist for why a destination might be unreachable. Most commonly, the source host has specified a nonexistent address. Less frequently, the router does not have a route to the destination.

Destination-unreachable messages include four basic types: network unreachable, host unreachable, protocol unreachable, and port unreachable. Network-unreachable messages usually mean that a failure has occurred in the routing or addressing of a packet. Host-unreachable messages usually indicates delivery failure, such as a wrong subnet mask. Protocol-unreachable messages generally mean that the destination does not support the upper-layer protocol specified in the packet. Port-unreachable messages imply that the TCP socket or port is not available.

An ICMP echo-request message, which is generated by the ping command, is sent by any host to test node reachability across an internetwork. The ICMP echo-reply message indicates that the node can be successfully reached.

An ICMP Redirect message is sent by the router to the source host to stimulate more efficient routing. The router still forwards the original packet to the destination. ICMP redirects allow host routing tables to remain small because it is necessary to know the address of only one router, even if that router does not provide the best path. Even after receiving an ICMP Redirect message, some devices might continue using the less-efficient route.

An ICMP Time-exceeded message is sent by the router if an IP packet's Time-to-Live field (expressed in hops or seconds) reaches zero. The Time-to-Live field prevents packets from continuously circulating the internetwork if the internetwork contains a routing loop. The router then discards the original packet.

ICMP Router-Discovery Protocol (IDRP)

IDRP uses Router-Advertisement and Router-Solicitation messages to discover the addresses of routers on directly attached subnets. Each router periodically multicasts Router-Advertisement messages from each of its interfaces. Hosts then discover addresses of routers on directly attached subnets by listening for these messages. Hosts can use Router-Solicitation messages to request immediate advertisements rather than waiting for unsolicited messages.

IRDP offers several advantages over other methods of discovering addresses of neighboring routers. Primarily, it does not require hosts to recognize routing protocols, nor does it require manual configuration by an administrator.

Router-Advertisement messages enable hosts to discover the existence of neighboring routers, but not which router is best to reach a particular destination. If a host uses a poor first-hop router to reach a particular destination, it receives a Redirect message identifying a better choice.

Transmission Control Protocol (TCP)

The TCP provides reliable transmission of data in an IP environment. TCP corresponds to the transport layer (Layer 4) of the OSI reference model. Among the services TCP provides are stream data transfer, reliability, efficient flow control, full-duplex operation, and multiplexing.

With stream data transfer, TCP delivers an unstructured stream of bytes identified by sequence numbers. This service benefits applications because they do not have to chop data into blocks before handing it off to TCP. Instead, TCP groups bytes into segments and passes them to IP for delivery.

TCP offers reliability by providing connection-oriented, end-to-end reliable packet delivery through an internetwork. It does this by sequencing bytes with a forwarding acknowledgment number that indicates to the destination the next byte the source expects to receive. Bytes not acknowledged within a specified time period are retransmitted. The reliability mechanism of TCP allows devices to deal with lost, delayed, duplicate, or misread packets. A time-out mechanism allows devices to detect lost packets and request retransmission.

TCP offers efficient flow control, which means that, when sending acknowledgments back to the source, the receiving TCP process indicates the highest sequence number it can receive without overflowing its internal buffers.

Full-duplex operation means that TCP processes can both send and receive at the same time.

Finally, TCP's multiplexing means that numerous simultaneous upper-layer conversations can be multiplexed over a single connection.

TCP Connection Establishment
To use reliable transport services, TCP hosts must establish a connection-oriented session with one another. Connection establishment is performed by using a "three-way handshake" mechanism.

A three-way handshake synchronizes both ends of a connection by allowing both sides to agree upon initial sequence numbers. This mechanism also guarantees that both sides are ready to transmit data and know that the other side is ready to transmit as well. This is necessary so that packets are not transmitted or retransmitted during session establishment or after session termination.

Each host randomly chooses a sequence number used to track bytes within the stream it is sending and receiving. Then, the three-way handshake proceeds in the following manner:

The first host (Host A) initiates a connection by sending a packet with the initial sequence number (X) and SYN bit set to indicate a connection request. The second host (Host B) receives the SYN, records the sequence number X, and replies by acknowledging the SYN (with an ACK = X + 1). Host B includes its own initial sequence number (SEQ = Y). An ACK = 20 means the host has received bytes 0 through 19 and expects byte 20 next. This technique is called forward acknowledgment. Host A then acknowledges all bytes Host B sent with a forward acknowledgment indicating the next byte Host A expects to receive (ACK = Y + 1). Data transfer then can begin.

Positive Acknowledgment and Retransmission (PAR)
A simple transport protocol might implement a reliability-and-flow-control technique where the source sends one packet, starts a timer, and waits for an acknowledgment before sending a new packet. If the acknowledgment is not received before the timer expires, the source retransmits the packet. Such a technique is called positive acknowledgment and retransmission (PAR).

By assigning each packet a sequence number, PAR enables hosts to track lost or duplicate packets caused by network delays that result in premature retransmission. The sequence numbers are sent back in the acknowledgments so that the acknowledgments can be tracked.

PAR is an inefficient use of bandwidth, however, because a host must wait for an acknowledgment before sending a new packet, and only one packet can be sent at a time.

TCP Sliding Window
A TCP sliding window provides more efficient use of network bandwidth than PAR because it enables hosts to send multiple bytes or packets before waiting for an acknowledgment.

In TCP, the receiver specifies the current window size in every packet. Because TCP provides a byte-stream connection, window sizes are expressed in bytes. This means that a window is the number of data bytes that the sender is allowed to send before waiting for an acknowledgment. Initial window sizes are indicated at connection setup, but might vary throughout the data transfer to provide flow control. A window size of zero, for instance, means "Send no data."

In a TCP sliding-window operation, for example, the sender might have a sequence of bytes to send (numbered 1 to 10) to a receiver who has a window size of five. The sender then would place a window around the first five bytes and transmit them together. It would then wait for an acknowledgment.

The receiver would respond with an ACK = 6, indicating that it has received bytes 1 to 5 and is expecting byte 6 next. In the same packet, the receiver would indicate that its window size is 5. The sender then would move the sliding window five bytes to the right and transmit bytes 6 to 10. The receiver would respond with an ACK = 11, indicating that it is expecting sequenced byte 11 next. In this packet, the receiver might indicate that its window size is 0 (because, for example, its internal buffers are full). At this point, the sender cannot send any more bytes until the receiver sends another packet with a window size greater than 0.

TCP Packet Format
illustrates the fields and overall format of a TCP packet.

Figure 30-10 Twelve fields comprise a TCP packet.




TCP Packet Field Descriptions

The following descriptions summarize the TCP packet fields illustrated in :

•Source Port and Destination Port—Identifies points at which upper-layer source and destination processes receive TCP services.

•Sequence Number—Usually specifies the number assigned to the first byte of data in the current message. In the connection-establishment phase, this field also can be used to identify an initial sequence number to be used in an upcoming transmission.

•Acknowledgment Number—Contains the sequence number of the next byte of data the sender of the packet expects to receive.

•Data Offset—Indicates the number of 32-bit words in the TCP header.

•Reserved—Remains reserved for future use.

•Flags—Carries a variety of control information, including the SYN and ACK bits used for connection establishment, and the FIN bit used for connection termination.

•Window—Specifies the size of the sender's receive window (that is, the buffer space available for incoming data).

•Checksum—Indicates whether the header was damaged in transit.

•Urgent Pointer—Points to the first urgent data byte in the packet.

•Options—Specifies various TCP options.

•Data—Contains upper-layer information.

User Datagram Protocol (UDP)
The User Datagram Protocol (UDP) is a connectionless transport-layer protocol (Layer 4) that belongs to the Internet protocol family. UDP is basically an interface between IP and upper-layer processes. UDP protocol ports distinguish multiple applications running on a single device from one another.

Unlike the TCP, UDP adds no reliability, flow-control, or error-recovery functions to IP. Because of UDP's simplicity, UDP headers contain fewer bytes and consume less network overhead than TCP.

UDP is useful in situations where the reliability mechanisms of TCP are not necessary, such as in cases where a higher-layer protocol might provide error and flow control.

UDP is the transport protocol for several well-known application-layer protocols, including Network File System (NFS), Simple Network Management Protocol (SNMP), Domain Name System (DNS), and Trivial File Transfer Protocol (TFTP).

The UDP packet format contains four fields, as shown in . These include source and destination ports, length, and checksum fields.

Figure 30-11 A UDP packet consists of four fields.





Source and destination ports contain the 16-bit UDP protocol port numbers used to demultiplex datagrams for receiving application-layer processes. A length field specifies the length of the UDP header and data. Checksum provides an (optional) integrity check on the UDP header and data.

Internet Protocols Application-Layer Protocols
The Internet protocol suite includes many application-layer protocols that represent a wide variety of applications, including the following:

•File Transfer Protocol (FTP)—Moves files between devices

•Simple Network-Management Protocol (SNMP)—Primarily reports anomalous network conditions and sets network threshold values

•Telnet—Serves as a terminal emulation protocol

•X Windows—Serves as a distributed windowing and graphics system used for communication between X terminals and UNIX workstations

•Network File System (NFS), External Data Representation (XDR), and Remote Procedure Call (RPC)—Work together to enable transparent access to remote network resources

•Simple Mail Transfer Protocol (SMTP)—Provides electronic mail services

•Domain Name System (DNS)—Translates the names of network nodes into network addresses

lists these higher-layer protocols and the applications that they support.

Table 30-5 Higher-Layer Protocols and Their Applications


Application Protocols
File transfer
FTP

Terminal emulation
Telnet

Electronic mail
SMTP

Network management
SNMP

Distributed file services
NFS, XDR, RPC, X Windows