الأحد، 16 يونيو 2013

Line Printer Daemon - LPD

Line Printer Daemon - LPD

The Line Printer Daemon (LPD) protocol - also known as the Berkeley printing system is designed for printer sharing.UNIX was the original target for LPD usage, originally developed for BSD UNIX systems and there are many types of LPD software for UNIX printing available today.

The LPD protocol uses a client/server model. An LPD printer may be an IP address of the PC on the network, or it could be a device, in addition to the queue name. Each queue has it’s own settings with instructions of where to send and what to do with the file. LPD software is usually installed on the PC receiving the print files from the host system. Or, the LPD software can be installed on a print server that has a list of the network printers it may print to.

Line Printer Request- LPR


An LPR (Line Printer Request) typically sends the print request or print file to the address (IP) of the Line Printer Daemon, whether on a PC or Server.A print job consists of 2 files, a data file that contains the actual data to be printed, and a control file that contains information about the data file, such as its name and attributes. The control file may be sent to the LPD server before or after the data file. 
An LPD will listen for messages on the TCP port 515 from various programs such as LPR, LPRM, LPQ, LPC programs. LPD isn’t limited to local messages, it can also listen to network messages from a remote client using the LPD protocol.
Line Printer Daemon Softwar
RPM Remote Print Manager is one of the best line printer daemons on the market. RPM installs on Windows and receives print files from ANY host system (mainframe, midrange, UNIX, Linux, and Windows®) via TCPIP and print them to your Windows printer (networked, local or shared). RPM has many features that a standard LPD or print server do not offer. RPM can take a print job and save it to disk for archiving or processing, email it, convert the print job into PDF or HTML and more.

Simple Mail Transfer Protocol - SMTP

Simple Mail Transfer Protocol (SMTP) , answering our ubiquitous call to email, uses a spooled, or queued, method of mail delivery. Once a message has been sent to a destination, the message is spooled to a device—usually a disk. The server software at the destination posts a vigil, regularly checking the queue for messages. When it detects them, it proceeds to deliver them to their destination. SMTP is used to send mail; POP3 is used to receive mail.

Network File System - NFS

Network File System (NFS) is a jewel of a protocol specializing in file sharing. It allows two different types of file systems to interoperate. It works like this: Suppose the NFS server software is running on an NT server and the NFS client software is running on a Unix host. NFS allows for a portion of the RAM on the NT server to transparently store Unix files, which can, in turn, be used by Unix users. Even though the NT file system and Unix file system are unlike—they have different case sensitivity, filename lengths, security, and so on—both Unix users and NT users can access that same file with their normal file systems, in their normal way.

Trivial File Transfer Protocol -TFTP

Trivial File Transfer Protocol (TFTP) is the stripped-down, stock version of FTP, but it’s the protocol of choice if you know exactly what you want and where to find it, plus it’s so easy to use and it’s fast too! It doesn’t give you the abundance of functions that FTP does, though. TFTP has no directory-browsing abilities; it can do nothing but send and receive files. This compact little protocol also skimps in the data department, sending much smaller blocks of data than FTP, and there’s no authentication as with FTP, so it’s insecure. Few sites support it because of the inherent security risks.

File Transfer Protocol -FTP

Introduction

File Transfer Protocol, FTP was first proposed on April 16, 1971 by Abhay Bhushan for and developed for implementation on hosts at MIT and was later defined by RFC 959 published in 1985.

File Transfer Protocol (FTP) is the protocol that actually lets us transfer files, and it can accomplish this between any two machines using it. As a user, you can use FTP with a simple command line interface (for example, from the Windows MS-DOS Prompt window) or with a commercial program that offers a graphical user interface.. It is also important to realize that FTP is insecure. When your username and password are sent to the server they're both sent as plain text and could be intercepted and read. 

If your server supports SFTP or FTP with TLS encryption, we suggest one of them instead of plain FTP to help keep your information private.


Accessing a host through FTP is only the first step, though. Users must then be subjected to an authentication login that’s probably secure.
Though what you’ll gain access to will be limited. Even when employed by users manually as a program, FTP’s functions are limited to listing and manipulating directories, typing file contents, and copying files between hosts. It can’t execute remote files as programs.
 with passwords and usernames implemented by system administrators to restrict access. You can get around this somewhat by adopting the username anonymous.


How It Works

TCP and IP are the two major protocols that keep the internet running smoothly. TCP manages data transfer while IP directs traffic to internet addresses. FTP is an underling of TCP and shuttles files back and forth between FTP server and FTP client. Because FTP requires that two ports be open--the server's and the client's--it facilitates the exchange of large files of information.
First, you as client make a TCP control connection to the FTP server's port 21 which will remain open during the transfer process. In response, the FTP server opens a second connection that is the data connection from the server's port 20 to your computer.
Using the standard active mode of FTP, your computer communicates the port number where it will stand by to receive information from the controller and the IP address--internet location--from which or to which you want files to be transferred.

If you are using a public--or anonymous--FTP server, you will not need proprietary sign-in information to make a file transfer, but you may be asked to enter your email address. If you are using a private FTP server, however, you must sign in with a user name and password to initiate the exchange of data.
Modes of File Transfer
Three modes of transferring data are available via FTP.
The system can use a stream mode, in which it transfers files as a continuous stream from port to port with no intervention or processing of information into different formats. For example, in a transfer of data between two computers with identical operating systems, FTP does not need to modify the files.
In block mode, FTP divides the data to be transferred into blocks of information, each with a header, byte count, and data field.
 In the third mode of transfer, the compressed mode, FTP compresses the files by encoding them. Often these modifications of data are necessary for successful transfer because the file sender and file receiver do not have compatible data storage systems.

Passive FTP

Should your computer have firewall protection, you may have difficulties using FTP. A firewall protects your PC by preventing internet sites from initiating file transfers. You can circumvent your firewall's function by using the PASV command that reverses the FTP process, allowing your computer to initiate the transfer request.
Many corporate networks use PASV FTP as a security measure to protect their internal network from assaults of unwanted external files. Also called passive FTP, the process requires that any transfer of information from the internet or other external source must be initiated by the client or private network rather than the external source.
Passive FTP mode is used by some newer FTP servers on the Internet to better work with firewalls. Microsoft Internet Explorer includes a setting for Passive FTP (sometimes called "PASV") mode. You may need to either enable or disable this setting to allow Internet Explorer to work as an FTP client with a given FTP server. Follow these instructions to make it happen.
Here's How:
1.    Open Internet Explorer from the Start Menu or command line.
2.    On the Internet Explorer menu, click Tools to open the Tools menu.
3.    On the Tools menu, click Internet Options... . A new Internet Options window will appear on the screen. 
4.    In the Internet Options window, click the Advancedtab.
5.    First, find the setting called Enable folder view for FTP sites (located near the top of the list of settings). Ensure this feature is disabled (unchecked). Passive FTP mode in Internet Explorer will not work unless this feature is disabled.
6.    Next, find the setting called Use Passive FTP (located approximately halfway down in the list of settings).
7.    To enable the Passive FTP feature, set the checkmark in the box next to the Use Passive FTP setting. To disable the feature, clear the checkmark. Alternately set and clear the checkmark by clicking once inside the checkbox.
8.    Click OK or Apply to save the Passive FTP setting.
Tips:
1.    It is not necessary to reboot your computer to enable or disable Passive FTP.

Further FTP Security

In response to the need for a more secure transfer process for sensitive information such as financial data, Netscape developed a Secure Sockets Layer (SSL) protocol in 1994 that it used primarily to secure HTTP--HyperText Transfer Protocol--transmissions from tampering and eavesdropping. The industry subsequently applied this security protocol to FTP transfers, developing SFTP, a file transfer protocol armored with SSL for protection from hackers.

FTP Commands


!
Using this command you will have the capability of toggling back and forth between the operating system and ftp. Once back in the operating system, typing exit will take you back to the FTP command line.
?
Access the Help screen.
append
Append text to a local file.
ascii
Switch to ASCII transfer mode
bell
Turns bell mode on or off.
binary
Switches to binary transfer mode.
bye
Exits from FTP.
cd
Changes directory.
close
Exits from FTP.
delete
Deletes a file.
debug
Sets debugging on or off.
dir
Lists files if connected.

dir -C = Will list the files in wide format.
dir -1 = Lists the files in bare format in alphabetic order
dir -r = Lists directory in reverse alphabetic order.
dir -R = Lists all files in current directory and sub directories.
dir -S = Lists files in bare format in alphabetic order.
disconnect
Exits from FTP.
get
Get file from the computer connected to.
glob
Sets globbing on or off. When turned off the file name in the put and get commands is taken literally and wildcards will not be looked at.
hash
Sets hash mark printing on or off. When turned on for each 1024 bytes of data received a hash-mark (#) is displayed.
help
Access the Help screen and displays information about command if command typed after help.
lcd
Displays local directory if typed alone or if path typed after lcd will change local directory.
literal
Sends a literal command to the connected computer with an expected one line response.
ls
Lists files of the remotely connected computer.
mdelete
Multiple delete.
mdir
Lists contents of multiple remote directories.
mget
Get multiple files.
mkdir
Make directory.
mls
Lists contents of multiple remote directories.
mput
Sent multiple files
open
Opens address.
prompt
Enables or disables the prompt.
put
Send one file
pwd
Print working directory
quit
Exits from FTP.
quote
Same as the literal command.
recv
Receive file.
remotehelp
Get help from remote server.
rename
Renames a file.
rmdir
Removes a directory on the remote computer.
send
Send single file.
status
Shows status of currently enabled and disabled options
trace
Toggles packet tracing.
Type
Set file transfer type.
user
Send new user information.
verbose
Sets verbose on or off.

Telnet Protocol


Telnet is the chameleon of protocols—its specialty is terminal emulation. It allows a user on a remote client machine, called the Telnet client, to access the resources of another machine, the Telnet server. Telnet achieves this by pulling a fast one on the Telnet server and making the client machine appear as though it were a terminal directly attached to the local network. This projection is actually a software image—a virtual terminal that can interact with the chosen remote host.
These emulated terminals are of the text-mode type and can execute refined procedures such as displaying menus that give users the opportunity to choose options and access the applications on the duped server. Users begin a Telnet session by running the Telnet client software and then logging into the Telnet server.

Ethernet Cabling

Ethernet cabling is an important discussion, especially if you are planning on taking the Cisco exams. Three types of Ethernet cables are available:
  1. Straight-through cable
  2.  Crossover cable
  3.  Rolled cable
We will look at each in the following sections.

Straight-Through Cable
The straight-through cable is used to connect
1- Host to switch or hub
2-Router to switch or hub
Four wires are used in straight-through cable to connect Ethernet devices. It is relatively simple to create this type; Figure  shows the four wires used in a straight-through Ethernet cable. Notice that only pins 1, 2, 3, and 6 are used. Just connect 1 to 1, 2 to 2, 3 to 3, and 6 to 6 and you’ll be up and networking in no time. However, remember that this would be an Ethernet-only cable and wouldn’t work with voice, Token Ring, ISDN, and so on.

Crossover Cable
The crossover cable can be used to connect
  1.  Switch to switch
  2.  Hub to hub
  3.  Host to host
  4.  Hub to switch
  5.  Router direct to host
The same four wires are used in this cable as in the straight-through cable; we just connect different pins together. Figure 1.23 shows how the four wires are used in a crossover Ethernet cable.Notice that instead of connecting 1 to 1, 2 to 2, and so on, here we connect pins 1 to 3 and 2 to 6 on each side of the cable.





Rolled Cable
Although rolled cable isn’t used to connect any Ethernet connections together, you can use a rolled Ethernet cable to connect a host to a router console serial communication (com) port. If you have a Cisco router or switch, you would use this cable to connect your PC running HyperTerminal to the Cisco hardware. Eight wires are used in this cable to connect serial devices, although not all eight are used to send information, just as in Ethernet networking. Figure  shows the eight wires used in a rolled cable.

Half- and Full-Duplex Ethernet

Half-duplex Ethernet is defined in the original 802.3 Ethernet; Cisco says it uses only one wire pair with a digital signal running in both directions on the wire. Certainly, the IEEE specifications discuss the process of half duplex somewhat differently, but what Cisco is talking about is a general sense of what is happening here with Ethernet.
It also uses the CSMA/CD protocol to help prevent collisions and to permit retransmitting if a collision does occur. If a hub is attached to a switch, it must operate in half-duplex mode because the end stations must be able to detect collisions. Half-duplex Ethernet—typically 10BaseT—is only about 30 to 40 percent efficient as Cisco sees it because a large 10BaseT network will usually only give you 3 to 4Mbps, at most.But full-duplex Ethernet uses two pairs of wires instead of one wire pair like half duplex.And full duplex uses a point-to-point connection between the transmitter of the transmitting device and the receiver of the receiving device. This means that with full-duplex data transfer, you get a faster data transfer compared to half duplex. And because the transmitted data is sent on a different set of wires than the received data, no collisions will occur.
The reason you don’t need to worry about collisions is because now it’s like a freeway with multiple lanes instead of the single-lane road provided by half duplex. Full-duplex Ethernet is supposed to offer 100 percent efficiency in both directions—for example, you can get 20Mbps with a 10Mbps Ethernet running full duplex or 200Mbps for Fast Ethernet. But this rate is something known as an aggregate rate, which translates as “you’re supposed to get” 100 percent efficiency. No guarantees, in networking as in life.Full-duplex Ethernet can be used in three situations:
  1.  With a connection from a switch to a host
  2.  With a connection from a switch to a switch
  3. With a connection from a host to a host using a crossover cable.
Now, if it’s capable of all that speed, why wouldn’t it deliver? Well, when a full-duplex Ethernet port is powered on, it first connects to the remote end and then negotiates with the other end of the Fast Ethernet link. This is called an auto-detect mechanism. This mechanism first decides on the exchange capability, which means it checks to see if it can run at 10 or 100Mbps. It then checks to see if it can run full duplex, and if it can’t, it will run half duplex. 

Lastly, remember these important points:
  1.  There are no collisions in full-duplex mode.
  2.  A dedicated switch port is required for each full-duplex node.
  3. The host network card and the switch port must be capable of operating in full-duplex mode.

Ethernet Networking

Ethernet is a contention media access method that allows all hosts on a network to share the same bandwidth of a link. Ethernet is popular because it’s readily scalable, meaning that it’s comparatively easy to integrate new technologies, such as Fast Ethernet and Gigabit Ethernet, into an existing network infrastructure. It’s also relatively simple to implement in the first place, and with it, troubleshooting is reasonably straightforward. Ethernet uses both Data Link and Physical layer specifications, and this section of the chapter will give you both the Data Link layer and Physical layer information you need to effectively implement, troubleshoot,and maintain an Ethernet network.
Ethernet networking uses Carrier Sense Multiple Access with Collision Detection (CSMA/CD),a protocol that helps devices share the bandwidth evenly without having two devices transmit at the same time on the network medium. CSMA/CD was created to overcome the problem of those collisions that occur when packets are transmitted simultaneously from different nodes. And trust me—good collision management is crucial, because when a node transmits in a CSMA/CD network, all the other nodes on the network receive and examine that transmission. Only bridges and routers can effectively prevent a transmission from propagating throughout the entire network!
So, how does the CSMA/CD protocol work? Let’s  start by taking a look at Figure When a host wants to transmit over the network, it first checks for the presence of a digital signal on the wire. If all is clear (no other host is transmitting), the host will then proceed with its transmission. But it doesn’t stop there. The transmitting host constantly monitors the wire to make sure no other hosts begin transmitting. If  the host detects another signal on the wire, it sends out an extended jam signal that causes all nodes on the segment to stop sending data (think
busy signal). The nodes respond to that jam signal by waiting a while before attempting to transmit again. Backoff algorithms determine when the colliding stations can retransmit. If collisions keep occurring after 15 tries, the nodes attempting to transmit will then timeout. Pretty clean!
When a collision occurs on an Ethernet LAN, the following happens:
1- A jam signal informs all devices that a collision occurred. 
2-The collision invokes a random backoff algorithm
3- Each device on the Ethernet segment stops transmitting for a short time until the timers expire.
4- All hosts have equal priority to transmit after the timers have expired.

The following are the effects of having a CSMA/CD network sustaining heavy collisions:
1-Delay
2-Low throughput
3- Congestion

السبت، 15 يونيو 2013

Public and Private IP Addresses

Some networks connect to each other through the Internet, whereas others are private.Public and private IP addresses are required, therefore, for both of these network types.Internet stability depends directly on the uniqueness of publicly used network addresses.Therefore, some mechanism is needed to ensure that addresses are, in fact, unique. This responsibility originally rested within an organization known as the InterNIC (Internet Network Information Center). This organization was succeeded by the Internet Assigned
Numbers Authority (IANA). IANA carefully manages the remaining supply of IP addresses to ensure that duplication of publicly used addresses does not occur. Such duplication would cause instability in the Internet and compromise its capability to deliver datagrams to networks using the duplicated addresses.To obtain an IP address or block of addresses, you must contact an Internet service provider (ISP). The ISP allocates addresses from the range assigned by their upstream registry or their appropriate regional registry, which is managed by IANA, as follows:
■ Asia Pacific Network Information Center (APNIC)
■ American Registry for Internet Numbers (ARIN)
■ Réseaux IP Europens Network Coordination Centre (RIPE NCC)
With the rapid growth of the Internet, public IP addresses began to run out, so new
addressing schemes such as classless interdomain routing (CIDR) and IPv6 were developed
to help solve the problem. CIDR and IPv6 are discussed later in this chapter in the “Address
Exhaustion” section.
Although Internet hosts require a globally unique IP address, private hosts that are not connected to the Internet can use any valid address, as long as it is unique within the private network. Because many private networks exist alongside public networks, grabbing “just any address” is strongly discouraged. Therefore, the IETF defined 3 blocks of IP addresses (1 Class A network, 16 Class B networks, and 256 Class C networks) in RFC 1918 for private, internal use. Addresses in this range are not routed on the Internet backbone, as shown in Table 1-2. Internet routers are configured to discard private addresses as defined
by RFC 1918.
If you are addressing a nonpublic intranet, these private addresses can be used instead of globally unique addresses. If you want to connect a network using private addresses to the Internet, however, it is necessary to translate the private addresses to public addresses. This translation process is referred to as Network Address Translation (NAT). A router is often the network device that performs NAT.
Address Exhaustion The growth of the Internet has resulted in enormous demands for IP addresses. This section describes the capabilities of IPv4 in relation to that demand.When TCP/IP was first introduced in the 1980s, it relied on a two-level addressing scheme,which at the time offered adequate scalability. The architects of TCP/IP could not havepredicted that their protocol would eventually sustain a global network of information,commerce, and entertainment. Twenty years ago, IPv4 offered an addressing strategy that,although scalable for a time, eventually resulted in an inefficient allocation of addresses.

The Class A and B addresses make up 75 percent of the IPv4 address space, but a relative handful of organizations (fewer than 17,000) can be assigned a Class A or B network number. Class C network addresses are far more numerous than Class A and B addresses, although they account for only 12.5 percent of the possible 4 billion IP addresses.
Unfortunately, Class C addresses are limited to 254 hosts, which does not meet the needs of larger organizations that cannot acquire a Class A or B address.
Table 1-2 Private IP Addresses
Class RFC 1918 Internal Address Range
A 10.0.0.0 to 10.255.255.255
B 172.16.0.0 to 172.31.255.255
C 192.168.0.0 to 192.168.255.255

IP Address Classes

When IP was first developed, no classes of addresses existed, because it was assumed that 254 networks would be more than enough for an internetwork of academic, military, and research computers.As the number of networks grew, the IP addresses were broken into categories called classes to accommodate different sizes of networks and to aid in identifying them.
Assigning IP addresses to classes is known as classful addressing. The allocation of addresses is managed by a central authority, the American Registry for Internet Numbers (ARIN), which you can go to at http://www.arin.net for more information about network numbers.
Five IP address classes are used, as follows:

■ Class A: The Class A address category was designed to support extremely large networks. A Class A address uses only the first octet to indicate the network address. The remaining three octets are used for host addresses. The first bit of a Class A address is always 0; therefore, the lowest number that can be represented is 00000000 (decimal 0), and the highest number that can be represented is 01111111 (decimal 127). However, these two network numbers, 0 and 127, are reserved and cannot be used as a network address. Any address that starts with a value between 1 and 126 in the first octet, then, is a Class A address.
■ Class B: The Class B address category was designed to support the needs of moderateto large-sized networks. A Class B address uses two of the four octets to indicate the network address. The other two octets specify host addresses.
 The first 2 bits of the first octet of a Class B address are always binary 10. The remaining 6 bits might be populated with either 1s or 0s. Therefore, the lowest number that can be represented with a Class B address is 10000000 (decimal 128), and the highest number that can be represented is 10111111 (decimal 191). Any address that starts with a value in the range of 128 to 191 in the first octet is a Class B address.

■ Class C: The Class C address category is the most commonly used of the original address classes. This address category was intended to support a lot of small networks.A Class C address begins with binary 110. Therefore, the lowest number that can be represented is 11000000 (decimal 192), and the highest number that can be represented is 11011111 (decimal 223). If an address contains a number in the range of 192 to 223 in the first octet, it is a Class C address.
■ Class D: The Class D address category was created to enable multicasting in an IP address. A multicast address is a unique network address that directs packets with that destination address to predefined groups of IP addresses. Therefore, a singlestation can simultaneously transmit a single stream of datagrams to multiple recipients.
The Class D address category, much like the other address categories, is mathematically constrained. The first 4 bits of a Class D address must be 1110. Therefore, the first octet range for Class D addresses is 11100000 to 11101111, or 224 to 239. An IP address that starts with a value in the range of 224 to 239 in the first octet is a Class D address. As illustrated in Figure 1-30, Class D addresses (multicast addresses) include the following range of network numbers: 224.0.0.0 to 239.255.255.255.

■ Class E: Although a Class E address category has been defined, the Internet Engineering Task Force (IETF) reserves the addresses in this class for its own research. Therefore, no Class E addresses have been released for use in the Internet. The first 4 bits of a Class E address are always set to 1111. Therefore, the first octet range for Class E addresses is 11110000 to 11111111, or 240 to 255.

IP Network Addressing

Just as you use addresses to identify the specific locations of homes and businesses so that mail can reach them efficiently, you use IP addresses to identify the location of specific devices on a network so that data can be sent correctly to those locations. IP addressing has various aspects, including the calculations for constructing an IP address, the classes of IP addresses designated for specific routing purposes, and public versus private IP addresses.
Learning how IP addresses are structured and how they function in the operation of a network provides an understanding of how data is transmitted through Layer 3 internetworking devices using TCP/IP. To facilitate the routing of packets over a network, the TCP/IP protocol suite uses a 32-bit logical address known as an IP address. This address must be unique for each device in the internetwork.
The header of the Internet layer of TCP/IP is known as the IP header.Note that each IP datagram carries this header, which includes a source IP address anddestination IP address that identify the source and destination network and host.
An IP address is a hierarchical address, and it consists of two parts:
■ The high order, or leftmost, bits specify the network address component (network ID) of the address.
■ The low order, or rightmost, bits specify the host address component (host ID) of the address.

Every physical or virtual LAN on the corporate internetwork is seen as a single network that must be reached before an individual host within that company can be contacted.Each LAN has a unique network address. The hosts that populate that network share those same bits, but each host is identified by the uniqueness of the remaining bits. Like a group of houses along the same road, the street address is the same, but the house number is unique.

Understanding TCP/IP’s Internet Layer

Among the protocols included in the TCP/IP protocol stack are a network layer protocol and a transport layer protocol. The internetworking layer handles the routing of packets of data by using IP addresses to identify each device on the network. Each computer, router, printer, or any other device attached to a network has its own unique IP address that routes packets of data.

Each IP address has a specific structure, and various classes of IP addresses exist. In addition, subnetworks and subnet masks play a role in IP addressing schemes, and different routing functions and protocols are involved in transmitting data from one network node to another using IP addresses.

The various aspects of IP addressing include calculations for constructing an IP address, classes of IP addresses designated for specific routing purposes, and public versus privateIP addresses. Also, two different types of IP addresses exist: IP version 4 (IPv4) andIP version 6 (IPv6). The 32-bit IPv4 address type is currently the most common, but the128-bit IPv6 address is also in use and will probably become the more common addresstype over time. This lesson describes 32-bit IPv4 addressing, except where IPv6 is
explicitly identified.

How do end systems initially obtain their IP address information? Although manual assignment of IP address information is possible, it does not scale and is a barrier to deployment and maintenance of networks. Therefore, protocols for the automatic assignment of IP address information have evolved and now provide this essential function without end user intervention. This lesson describes how IP address protocols function.

OSI Model Versus TCP/IP Stack

Both similarities and differences exist between the TCP/IP protocol stack and the OSI reference model. Similarities between the TCP/IP protocol stack and the OSI reference model include the following:

■ Both have application layers, though they include different services.
■ Both have comparable transport and network layers.
■ Both assume packet-switched technology, not circuit-switched. (Analog telephone calls are an example of circuit-switched technology.)

The differences that exist between the TCP/IP protocol stack and the OSI reference model include the following:

■ TCP/IP combines the presentation and session layers into its application layer.
■ TCP/IP combines the OSI data link and physical layers into the network access layer.
TCP/IP protocols are the standards around which the Internet developed, so the TCP/IP protocol stack gains credibility just because of its protocols. In contrast, networks are not typically built on the OSI reference model, even though the OSI reference model is used as a guide.

The TCP/IP Protocol Stack

The TCP/IP suite is a layered model similar to the OSI reference model. Its name is actually a combination of two individual protocols, Transmission Control Protocol (TCP) and Internet Protocol (IP). It is divided into  layers, each of which performs specific functions in the data communication process. Both the OSI model and the TCP/IP stack were developed by different organizations at approximately the same time as a means to organize and communicate the components that guide the transmission of data.

Although the OSI reference model is universally recognized, the historical and technical open standard of the Internet is the TCP/IP protocol stack. The TCP/IP protocol stack, varies slightly from the OSI reference model.The TCP/IP protocol stack has four layers. Note that although some of the layers in theTCP/IP protocol stack have the same names as layers in the OSI reference model, the layershave different functions in each model, as is described in the following list:
■ Application layer: The application layer handles high-level protocols, including issues of representation, encoding, and dialog control. The TCP/IP model combines all application-related issues into one layer and ensures that this data is properly packaged for the next layer.
■ Transport layer: The transport layer deals with QoS issues of reliability, flow control,and error correction. One of its protocols, TCP, provides for reliable network communications.
■ Internet layer: The purpose of the Internet layer is to send source datagrams from any network on the internetwork and have them arrive at the destination, regardless of the path they took to get there.
■ Network access layer: The name of this layer is broad and somewhat confusing. It is also called the host-to-network layer. It includes the LAN and WAN protocols and all the details in the OSI physical and data link layers.

Peer-to-Peer Communication

For data to travel from the source to the destination, each layer of the OSI reference model at the source must communicate with its peer layer at the destination. This form of communication is referred to as peer-to-peer communication. During this process, the protocols at each layer exchange information, called protocol data units (PDU), between peer layers.
Data packets on a network originate at a source and then travel to a destination. Each layer depends on the service function of the OSI layer below it. To provide this service, the lower layer uses encapsulation to put the PDU from the upper layer into its data field. It then adds whatever headers the layer needs to perform its function. As the data moves down through Layers 7 through 5 of the OSI reference model, additional headers are added. The grouping of data at the Layer 4 PDU is called a segment.

The network layer provides a service to the transport layer, and the transport layer presents data to the internetwork subsystem. The network layer moves the data through the internetwork by encapsulating the data and attaching a header to create a datagram (the Layer 3 PDU). The header contains information required to complete the transfer, such as source and destination logical addresses.
The data link layer provides a service to the network layer by encapsulating the network layer datagram in a frame (the Layer 2 PDU). The frame header contains the physical addresses required to complete the data link functions, and the frame trailer contains the FCS. The physical layer provides a service to the data link layer, encoding the data link frame into a pattern of 1s and 0s (bits) for transmission on the medium (usually a wire) at Layer 1.Network devices such as hubs, switches, and routers work at the lower three layers. Hubs
are at Layer 1, switches are at Layer 2, and routers are at Layer 3.

Layer 1: The Physical Layer

The physical layer defines the electrical, mechanical, procedural, and functional specifications for activating, maintaining, and deactivating the physical link between end systems. Characteristics such as voltage levels, timing of voltage changes, physical data rates, maximum transmission distances, physical connectors, and other similar attributes are defined by physical layer specifications.

Layer 2: The Data Link Layer

The data link layer defines how data is formatted for transmission and how access to the network is controlled. This layer is responsible for defining how devices on a common media communicate with one another, including addressing and control signaling between devices.

Layer 3: The Network Layer

The network layer provides connectivity and path selection between two host systems that might be located on geographically separated networks. The growth of the Internet has increased the number of users accessing information from sites around the world, and the network layer manages this connectivity.

Layer 4: The Transport Layer

The transport layer segments data from the sending host’s system and reassembles the data into a data stream on the receiving host’s system. For example, business users in large corporations often transfer large files from field locations to a corporate site. Reliable delivery of the files is important, so the transport layer breaks down large files into smaller segments that are less likely to incur transmission problems.The boundary between the transport layer and the session layer can be thought of as the boundary between application protocols and data-flow protocols.
Whereas the application, presentation, and session layers are concerned with application issues, the lower four layers are concerned with data-transport issues. The transport layer attempts to provide a data-transport service that shields the upper layers from transport implementation details. Specifically, issues such as reliability of transport between two hosts are the concern of the transport layer. In providing communication service, the transport layer establishes, maintains, and properly terminates virtual circuits. Transport error detection and recovery and information flow control provide reliable service.

Layer 5: The Session Layer

The session layer establishes, manages, and terminates sessions between two communicating hosts. It provides its services to the presentation layer. The session layer also synchronizes dialogue between the presentation layers of the two hosts and manages their data exchange. For example, web servers have many users, so many communication processes are open at a given time.
Therefore, keeping track of which user communicates on which path is important. In addition to session regulation, the session layer offers provisions for efficient data transfer, class of service, and exception reporting of session layer, presentation layer, and application layer problems.

Layer 6: The Presentation Layer

The presentation layer ensures the information that the application layer of one system sends out is readable by the application layer of another system. For example, a PC program communicates with another computer, one using extended binary coded decimal interchange code (EBCDIC) and the other using ASCII to represent the same characters. If necessary, the presentation layer might be able to translate between multiple data formats by using a common format.

Layer 7: The Application Layer

The application layer is the OSI layer that is closest to the user. This layer provides network services to the user’s applications. It differs from the other layers in that it does not provide services to any other OSI layer, but only to applications outside the OSI reference model.
The application layer establishes the availability of intended communication partners and synchronizes and establishes agreement on procedures for error recovery and control of data integrity.

Advantages dividing the network into seven layers

Reduces complexity: It breaks network communication into smaller, simpler parts.
■ Standardizes interfaces: It standardizes network components to allow multiple vendor development and support.
■ Facilitates modular engineering: It allows different types of network hardware and software to communicate with each other.
■ Ensures interoperable technology: It prevents changes in one layer from affecting the other layers, allowing for quicker development.
■ Accelerates evolution: It provides for effective updates and improvements to individual components without affecting other components or having to rewrite the entire protocol.
■ Simplifies teaching and learning: It breaks network communication into smaller components to make learning easier.
The practice of moving information between computers is divided into seven techniques in the OSI reference model.Each OSI layer contains a set of functions performed by programs to enable data to travel from a source to a destination on a network. The following sections provide brief descriptions of each layer in the OSI reference model.

OSI Reference Model

The OSI reference model is the primary model for network communications. The early development of LANs, MANs, and WANs was chaotic in many ways. The early 1980s saw tremendous increases in the number and sizes of networks. As companies realized that they could save money and gain productivity by using networking technology, they added networks and expanded existing networks as rapidly as new network technologies and products were introduced.
By the mid-1980s, companies began to experience difficulties from all the expansions they had made. It became more difficult for networks using different specifications and implementations to communicate with each other. The companies realized that they needed to move away from proprietary networking systems, those systems that are privately developed, owned, and controlled.

To address the problem of networks being incompatible and unable to communicate with each other, the ISO researched different network schemes. As a result of this research, the ISO created a model that would help vendors create networks that would be compatible with, and operate with, other networks.The OSI reference model, released in 1984, was the descriptive scheme that the ISO created. It provided vendors with a set of standards that ensured greater compatibility and interoperability between the various types of network technologies produced by companies around the world. Although other models exist, most network vendors today relate their products to the OSI reference model, especially when they want to educate customers on the use of their products. The OSI model is considered the best tool available for teaching
people about sending and receiving data on a network. The OSI reference model has seven layers each illustrating a particular network function.
 This separation of networking functions is called layering. The OSI reference model defines the network functions that occur at each layer. More importantly, the OSI reference model facilitates an understanding of how information travels throughout a network. In addition, the OSI reference model describes how data travels from application programs (for example, spreadsheets), through a network medium, to an application program located in another computer, even if the sender and receiver are connected using different network media.