Anda di halaman 1dari 31

Part 1 Overview Chapter 1-Introduction 1.1 Introduction 1.1.

1 Introduction to Computer Networks A network is any collection of independent computers that communicate with one another over a shared network medium. A computer network is a collection of two or more connected computers. When these computers are joined in a network, people can share files and peripherals such as modems, printers, tape backup drives, or CDROM drives. When networks at multiple locations are connected using services available from phone companies, people can send e-mail, share links to the global Internet, or conduct video conferences in real time with other remote users. When a network becomes open sourced it can be managed properly with online collaboration software. As companies rely on applications like electronic mail and database management for core business operations, computer networking becomes increasingly more important. Every network includes:

At least two computers Server or Client workstation. Networking Interface Card's (NIC) A connection medium, usually a wire or cable, although wireless communication between networked computers and peripherals is also possible. Network Operating system software, such as Microsoft Windows NT or 2000, Novell NetWare, Unix and Linux.

Types of Networks:

LANs (Local Area Networks) A network is any collection of independent computers that communicate with one another over a shared network medium. LANs are networks usually confined to a geographic area, such as a single building or a college campus. LANs can be small, linking as few as three computers, but often link hundreds of computers used by thousands of people. The development of standard networking protocols and media has resulted in worldwide proliferation of LANs throughout business and educational organizations.

WANs (Wide Area Networks) Wide area networking combines multiple LANs that are geographically separate. This is accomplished by connecting the different LANs using services such as dedicated leased phone lines, dial-up phone lines (both synchronous and asynchronous), satellite links, and data packet carrier services. Wide area networking can be as simple as a modem and remote access server for employees to dial into, or it can be as complex as hundreds of branch offices globally linked using special routing protocols and filters to minimize the expense of sending data sent over vast distances. Internet The Internet is a system of linked networks that are worldwide in scope and facilitate data communication services such as remote login, file transfer, electronic mail, the World Wide Web and newsgroups. With the meteoric rise in demand for connectivity, the Internet has become a communications highway for millions of users. The Internet was initially restricted to military and academic institutions, but now it is a full-fledged conduit for any and all forms of information and commerce. Internet websites now provide personal, educational, political and economic resources to every corner of the planet.

Intranet With the advancements made in browser-based software for the Internet, many private organizations are implementing intranets. An intranet is a private network utilizing Internet-type tools, but available only within that organization. For large organizations, an intranet provides an easy access mode to corporate information for employees. MANs (Metropolitan area Networks) The refers to a network of computers with in a City. VPN (Virtual Private Network) VPN uses a technique known as tunneling to transfer data securely on the Internet to a remote access server on your workplace network. Using a VPN helps you save money by using the public Internet instead of making longdistance phone calls to connect securely with your private network. There are two ways to create a VPN connection, by dialing an Internet service provider (ISP), or connecting directly to Internet.

1.1.2 Applications of Computer Networks

Computer Networks are everywhere. From the distributed systems to the middle ware and to the world wide web, computer networking has proved to be improving in techniques to reach remote areas and applications to serve the purpose. Business Applications: Resource sharing is one of the most popular use of computer networks in the business applications. For Instance, a printer is shared in a network and hence saves a lot of investment in hardware. The computers connected in a network can make use of the printer in the network instead of having separate printers for every computer. Scanners, Cd burners, Fax machines are few other resources which can be shared in a network. Email facility with the help of Outlook application has enabled communication among the members of the company in sending reports and analyzing data. There would be a server handling the requests of all the computers connected in the network. Clients pass the request and the server works on the request by giving the reply. Home Networking: Computers are now a days used just for person to person communication with the help of Internet. Internet can be used to have remote access to the information, person - person communication as discussed earlier electronic commerce, Interactive entertainments like games. Interactive entertainments such as XBOX gaming online and online tutorials which used flash for interactive environment. Now a days, people are buying a computer just for the sake of checking their email which enables person to person contact. With the help of VPN ( Virtual Private Network) one can work and access of office data right from home. In peer -peer systems there is no client system. Every computer in a network is connected to every other computer through wire. Mobile Users: With the advent of technology in improving protocols for better communication, WAP (Wireless Access Protocol is now being increasingly used to communicate in a network. There are two forms of wireless: Fixed Wireless and Mobile Wireless. Desktop computers in an office are neither fixed nor mobile wireless. A notebook computer used in a Hotel room with the help of Ethernet cable is an example of mobile wireless and not of fixed wireless. Networks in old unwired building is an example of typical fixed wireless and not of mobile wireless. Portable office or PDA for store inventory is a perfect example for fixed as well as mobile wireless technology being used. M-commerce is using mobile device for paying cash using credit cards and act as an electronic wallet.

1.1.4 Data Communication We all are acquainted with some sorts of communication in our day to day life. For communication of information and messages we use telephone and postal communication systems. Similarly data and information from one computer system can be transmitted to other systems across geographical areas.

Thus data transmission is the movement of information using some standard methods.These methods include electrical signals carried along a conductor, optical signals along an optical fibers and electromagnetic areas. Suppose a manager has to write several letters to various clients. First he has to use his PC and Word Processing package to prepare the letter, if the PC is connected to all the client's PC through networking, he can send the letters to all the clients within minutes. Thus irrespective of geographical areas, if PCs are connected through communication channel, the data and information, computer files and any other programs can be transmitted to other computer systems within seconds. The modern form of communication like e-mail and Internet is possible only because of computer networking. Basic Elements of a Communication System The following are the basic requirements for working of a communication system. 1. The sender (source) who creates the message to be transmitted 2. A medium that carries the message 3. The receiver (sink) who receives the message In data communication four basic terms are frequently used. They are: Data : A collection of facts in raw forms that become information after processing. Signals : Electric or electromagnetic encoding of data. Signaling : Propagation of signals across a communication medium. Transmission : Communication of data achieved by the processing of signals. 1.1.4 Topology What is a Network topology? A network topology is the geometric arrangement of nodes and cable links in a LAN, There are three topology's to think about when you get into networks. These are the star, rind, and the bus. Star, in a star topology each node has a dedicated set of wires connecting it to a central network hub. Since all traffic passes through the hub, the hub becomes a central point for isolating network problems and gathering network statistics. Ring, a ring topology features a logically closed loop. Data packets travel in a single direction around the ring from one network device to the next. Each network device acts as a repeater, meaning it regenerates the signal

Bus, the bus topology, each node (computer, server, peripheral etc.) attaches directly to a common cable. This topology most often serves as the backbone for a network. In some instances, such as in classrooms or labs, a bus will connect small workgroups 1.1.5 Transmission Mode

There are three ways for transmitting data from one point to another as shown in Fig. 5.1 1. Simplex : In simplex mode the communication can take place in one direction. The receiver receives the signal from the transmitting device. In this mode the flow of information is Uni-directional. Hence it is rarely used for data communication. 2. Half-duplex : In half-duplex mode the communication channel is used in both directions, but only in one direction at a time. Thus a half-duplex line can alternately send and receive data. 3. Full-duplex : In full duplex the communication channel is used in both directions at the same time. Use of full-duplex line improves the efficiency as the line turnaround time required in half-duplex arrangement is eliminated. Example of this mode of transmission is the telephone line.

1.1.6 Categories Of Networks Network can be divided in to two main categories:


Peer-to-peer. Server based.

In peer-to-peer networking there are no dedicated servers or hierarchy among the computers. All of the computers are equal and therefore known as peers. Normally each computer serves as Client/Server and there is no one assigned to be an administrator responsible for the entire network. Peer-to-peer networks are good choices for needs of small organizations where the users are allocated in the same general area, security is not an issue and the organization and the network will have limited growth within the foreseeable future. The term Client/server refers to the concept of sharing the work involved in processing data between the client computer and the most powerful server computer. The client/server network is the most efficient way to provide:

Databases and management of applications such as Spreadsheets, Accounting, Communications and Document management. Network management. Centralized file storage.

The client/server model is basically an implementation of distributed or cooperative processing. At the heart of the model is the concept of splitting application functions between a client and a server processor. The division of labor between the different processors enables the application designer to place an application function on the processor that is most appropriate for that function. This lets the software designer optimize the use of processors-providing the greatest possible return on investment for the hardware. Client/server application design also lets the application provider mask the actual location of application function. The user often does not know where a specific operation is executing. The entire function may execute in either the PC or server, or the function may be split between them. This masking of application function locations enables system implementers to upgrade portions of a system over time with a minimum disruption of application operations, while protecting the investment in existing hardware and software.

1.2 Network Models 1.2.1 OSI Reference Model Open System Interconnection (OSI) reference model has become an International standard and serves as a guide for networking. This model is the best known and most widely used guide to describe networking environments. Vendors design network products based on the specifications of the OSI model. It provides a description of how network hardware and software work together in a layered fashion to make communications possible. It also helps with trouble shooting by providing a frame of reference that describes how components are supposed to function.

There are seven to get familiar with and these are the physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and the application layer.

Physical Layer, is just that the physical parts of the network such as wires, cables, and there media along with the length. Also this layer takes note of the electrical signals that transmit data throughout system. Data Link Layer, this layer is where we actually assign meaning to the electrical signals in the network. The layer also determines the size and format of data sent to printers, and other devices. Also I don't want to forget that these are also called nodes in the network. Another thing to consider in this layer is will also allow and define the error detection and correction schemes that insure data was sent and received. Network Layer, this layer provides the definition for the connection of two dissimilar networks. Transport Layer, this layer allows data to be broken into smaller packages for data to be distributed and addressed to other nodes (workstations).

Session Layer, this layer helps out with the task to carry information from one node (workstation) to another node (workstation). A session has to be made before we can transport information to another computer. Presentation Layer, this layer is responsible to code and decode data sent to the node. Application Layer, this layer allows you to use an application that will communicate with say the operation system of a server. A good example would be using your web browser to interact with the operating system on a server such as Windows NT, which in turn gets the data you requested.

1.3 Functions of the Layers The Open Systems Interconnect (OSI) model has seven layers. The layers are stacked this way:

Application Presentation Session Transport Network Data Link Physical

PHYSICAL LAYER The physical layer, the lowest layer of the OSI model, is concerned with the transmission and reception of the unstructured raw bit stream over a physical medium. It describes the electrical/optical, mechanical, and functional interfaces to the physical medium, and carries the signals for all of the higher layers. It provides: Data encoding: modifies the simple digital signal pattern (1s and 0s) used by the PC to better accommodate the characteristics of the physical medium, and to aid in bit and frame synchronization. It determines:
o o o

What signal state represents a binary 1 How the receiving station knows when a "bit-time" starts How the receiving station delimits a frame

Physical medium attachment, accommodating various possibilities in the medium:


o o

Will an external transceiver (MAU) be used to connect to the medium? How many pins do the connectors have and what is each pin used for?

Transmission technique: Determines whether the encoded bits will be transmitted by baseband (digital) or broadband (analog) signaling.

Physical medium transmission: Transmits bits as electrical or optical signals appropriate for the physical medium, and determines:
o o

What physical medium options can be used How many volts/db should be used to represent a given signal state, using a given physical medium

DATA LINK LAYER The data link layer provides error-free transfer of data frames from one node to another over the physical layer, allowing layers above it to assume virtually error-free transmission over the link. To do this, the data link layer provides:

Link establishment and termination: establishes and terminates the logical link

between two nodes. Frame traffic control: tells the transmitting node to "back-off" when no frame buffers are available. Frame sequencing: transmits/receives frames sequentially. Frame acknowledgment: provides/expects frame acknowledgments. Detects and recovers from errors that occur in the physical layer by retransmitting nonacknowledged frames and handling duplicate frame receipt.

Frame delimiting: creates and recognizes frame boundaries. Frame error checking: checks received frames for integrity. Media access management: determines when the node "has the right" to use the physical medium. NETWORK LAYER The network layer controls the operation of the subnet, deciding which physical path the data should take based on network conditions, priority of service, and other factors. It provides:

Routing: Routes frames among networks. Subnet traffic control: Routers (network layer intermediate systems) can instruct a sending station to "throttle back" its frame transmission when the router's buffer fills up. Frame fragmentation: If it determines that a downstream router's maximum transmission unit (MTU) size is less than the frame size, a router can fragment a frame for transmission and re-assembly at the destination station. Logical-physical address mapping: Translates logical addresses, or names, into physical addresses.

Subnet usage accounting: Has accounting functions to keep track of frames forwarded by subnet intermediate systems, to produce billing information.

Communications Subnet The network layer software must build headers so that the network layer software residing in the subnet intermediate systems can recognize them and use them to route data to the destination address. This layer relieves the upper layers of the need to know anything about the data transmission and intermediate switching technologies used to connect systems. It establishes, maintains and terminates connections across the intervening communications facility (one or several intermediate systems in the communication subnet). In the network layer and the layers below, peer protocols exist between a node and its immediate neighbor, but the neighbor may be a node through which data is routed, not the destination station. The source and destination stations may be separated by many intermediate systems. TRANSPORT LAYER The transport layer ensures that messages are delivered error-free, in sequence, and with no losses or duplications. It relieves the higher layer protocols from any concern with the transfer of data between them and their peers. The size and complexity of a transport protocol depends on the type of service it can get from the network layer. For a reliable network layer with virtual circuit capability, a minimal transport layer is required. If the network layer is unreliable and/or only supports datagrams, the transport protocol should include extensive error detection and recovery. The transport layer provides: Message segmentation: Accepts a message from the (session) layer above it, splits the message into smaller units (if not already small enough), and passes the smaller units down to the network layer. The transport layer at the destination station reassembles the message. Message acknowledgment: Provides reliable end-to-end message delivery with acknowledgments. Message traffic control: Tells the transmitting station to "back-off" when no message buffers are available.

Session multiplexing: Multiplexes several message streams, or sessions onto one

logical link and keeps track of which messages belong to which sessions (see session layer). Typically, the transport layer can accept relatively large messages, but there are strict message size limits imposed by the network (or lower) layer. Consequently, the transport layer must break up the messages into smaller units, or frames, prepending a header to each frame. The transport layer header information must then include control information, such as message start and message end flags, to enable the transport layer on the other end to recognize message boundaries. In addition, if the lower layers do not maintain sequence, the transport header must contain sequence information to enable the transport layer on the receiving end to get the pieces back together in the right order before handing the received message up to the layer above. End-to-end layers Unlike the lower "subnet" layers whose protocol is between immediately adjacent nodes, the transport layer and the layers above are true "source to destination" or end-to-end layers, and are not concerned with the details of the underlying communications facility. Transport layer software (and software above it) on the source station carries on a conversation with similar software on the destination station by using message headers and control messages.

SESSION LAYER The session layer allows session establishment between processes running on different stations. It provides:

Session establishment, maintenance and termination: allows two application processes on different machines to establish, use and terminate a connection, called a session. Session support: Performs the functions that allow these processes to communicate over the network, performing security, name recognition, logging, and so on. PRESENTATION LAYER The presentation layer formats the data to be presented to the application layer. It can be viewed as the translator for the network. This layer may translate data from a format used by the application layer into a common format at the sending station, then translate the common format to a format known to the application layer at the receiving station.

The presentation layer provides:

Character code translation: for example, ASCII to EBCDIC. Data conversion: bit order, CR-CR/LF, integer-floating point, and so on. Data compression: reduces the number of bits that need to be transmitted on the network. Data encryption: encrypt data for security purposes. For example, password encryption. APPLICATION LAYER The application layer serves as the window for users and application processes to access network services. This layer contains a variety of commonly needed functions:

Resource sharing and device redirection Remote file access Remote printer access Inter-process communication Network management Directory services Electronic messaging (such as mail) Network virtual terminals 1.4 TCP/IP Protocol Suite The TCP/IP protocol suite, also referred to as the Internet protocol suite, is the set of communications protocols that implements the protocol stack on which the Internet and most commercial networks run. It is named after the two most important protocols in the suite: the Transmission Control Protocol (TCP) and the Internet Protocol (IP).The TCP/IP protocol suite like the OSI reference model is defined as a set of layers. Upper layers are logically closer to the user and deal with more abstract data, relying on lower layer protocols to translate data into forms that are transmitted physically over the network. TCP/IP Model and the OSI Reference Model The TCP/IP protocol suite was developed before the OSI reference model. As such, it does not directly map to the 7-layer OSI reference model. The TCP/IP protocol stack has only layers that can be loosely mapped to the OSI protocol stack, as shown in Figure 1-2.

Figure 1-2: Comparing the OSI and TCP/IP Models Application Layer The application layer of the TCP/IP model corresponds to the application layer of the OSI reference model. Some well known examples of application level entities within the TCP/IP domain are: FTP/Telnet/SSH HTTP/Secure HTTP (SHTTP) POP3/SMTP SNMP Transport Layer The transport layer of the TCP/IP model maps fairly closely to the transport layer of the OSI model. Two commonly used transport layer entities are TCP and User Datagram Protocol (UDP) Internet Layer The Internet layer of the TCP/IP model maps to the network layer of the OSI model. Consequently, the Internet layer is sometimes referred to as the network layer. The primary component of the Internet layer is the Internet Protocol (IP).Many of the TCP/IP routing protocols are also classified as part of the Internet layer. Network Access Layer The lowest layer of the TCP/IP protocol stack is the network access layer. The network access layer contains two sublayers, the media access control (MAC) sublayer and the physical sublayer. The MAC sublayer aligns closely with the data link layer of the OSI

model, and is sometimes referred to by that name. The physical sublayer aligns with the physical layer of the OSI model. Note: Some references divide the TCP/IP model into 5 layers, with the MAC and physical layers occupying the lowest two layers. Examples of the network access layer Ethernet Wireless Fidelity (Wi-FI)/WiMAX PPP, PPP over Ethernet (PPPoE) ATM/Frame Relay

Figure 1-3: Encapsulation

In order to better understand the operation of the TCP/IP protocol suite, some important concepts and terms should be understood beforehand.

Encapsulation In computer networking, encapsulation means including data from an upper layer protocol into a lower layer protocol. This is a method of abstraction for networking that allows different layers to add features/functionality. Figure 1-3 illustrates the concept of encapsulating data from one layer within data passed to another. Protocol Data Unit In networking, protocol data unit (PDU) is a generic term for information that is delivered to the next lower level in the protocol stack. Service Data Unit The service data unit (SDU) is the data that a layer receives from the layer above. Generally speaking, the PDU for one layer becomes the SDU of the next lower layer. Packet In the generic sense, a packet is a formatted block of information carried by a computer network. A packet typically consists of three elements: a header, the payload, and a trailer. In the context of defining a protocol, a packet is used to pass information between layers of the stack. The packet payload contains the peer-exchanged PDU data. In this way, the packet can be thought of an envelope. The payload contains the PDU and the header provides delivery instructions to be used by the lower levels of the stack. Datagram The terms datagram and packet are often used interchangeably. However, in the strictest sense, a datagram is a packet that is not transmitted reliably through the network. More specifically the datagram is the PDU used by UDP and IP. Segment A segment is the unit of data exchanged by TCP peers. It is encapsulated in a TCP packet and passed to the internet protocol (IP). Frame A frame is a data block of fixed or variable length which has been formatted and encoded for digital transmission over a node-to -node link. Frames typically are used from the MAC sublayer downward. A frame can be thought of as the physical envelope that delivers an upper level packet or datagram.

Cell A cell is a 53-byte fixed-length MAC sublayer PDU used by Asynchronous Transfer Mode (ATM) networks. It serves the same purpose as the frames used in Ethernet and Frame Relay networks. The Application Layer The application layer is the topmost level of the TCP/IP protocol suite. It receives data from user applications and issues requests to the transport layer. The details of moving data between the application and other computers is shielded by the underlying layers. Application layer examples include: AIM, AOL Instant MessengerTM Protocol BitTorrent Domain Name Service (DNS) Dynamic Host Configuration Protocol (DHCP) File Transfer Protocol (FTP) Hypertext Transfer Protocol (HTTP) Internet Message Access Protocol (IMAP) Internet Relay Chat (IRC) Post Office Protocol Version 3 (POP3) Network Time Protocol (NTP) Simple Mail Transfer Protocol (SMTP) Simple Network Management Protocol (SNMP) Terminal Emulation Protocol (Telnet) Uniform Resource Locator (URL) Yahoo! Messenger Protocol As the TCP/IP application layer maps to the OSI application, presentation and session layers, it is also responsible for details such as character formats (For example, ASCII vs. EBCDIC) and basic encryption. The Transport Layer Within the TCP/IP protocol suite, the two most common transport layer entities are the UDP and the TCP. User Datagram Protocol The User Datagram Protocol is very simple. The PDU used by UDP is called a datagram. Datagrams are considered unreliable, in that there is no guarantee datagrams will be received in the correct order, if at all. If reliability of the information transmitted is needed, UDP should not be used. While UDP is unreliable, the lack of error checking and correction make UDP fast and efficient for many less data intensive or timesensitive applications, such as the Domain Name Service (DNS),the Simple Network Management Protocol (SNMP), the Dynamic Host Configuration Protocol (DHCP) and the Routing Information Protocol (RIP). UDP is also well suited for streaming video.

Basic Protocol Operation The UPD protocol is simple in operation. When invoked by the application layer, the UDP protocol performs the following operations: 1. Encapsulates the user data into UDP datagrams 2. Passes the datagram to the IP layer for transmission At the opposite end, the UDP datagram is passed up to UDP from the IP layer. UDP then removes the user data from the datagram and presents it upward to the application layer. Ports A port is a number that identifies the application using the UDP service. It can be thought of as an address for applications. For example, the application level protocols used for e-mail, POP3 and SMTP, are assigned standard port numbers. The port number is used by the UDP client on the receiving end to know what application to pass user data to. The UDP Packet Structure The UDP packet structure is illustrated in Figure 1-4. It consists of 5 fields, some of which are optional: Source PortThe sending application. This is an optional field. Destination PortThe target application at the receiving end. LengthThe length of the entire packet. ChecksumOptional field used to perform basic error correction on the packet. DataThe user data to be transmitted.

Figure 1-4: The UDP Packet Structure Transmission Control Protocol In the TCP/IP protocol suite, TCP is the intermediate layer between IP below it, and an application above it. Using TCP, applications on networked hosts can establish reliable connections to one another. The protocol guarantees in-order delivery of data from the sender to the receiver.

Basic Protocol Operation The Transmission Control Protocol is connection-oriented, meaning user data is not exchanged between TCP peers until a connection is established between the two end points. This connection exists for the duration of the data transmission. TCP connections have three phases: 1. Connection establishment 2. Data transfer 3. Connection termination Connection Establishment To establish a connection, TCP uses a 3-way handshake. Before a client attempts to connect with a server, the server must first bind to a port to open it up for connections. This is called a passive open. Once the passive open is established, a client may initiate an active open. The server then sends an acknowledgement to the client. At this point, both the client and server have received an acknowledgement of the connection. Data Transfer A few key features set TCP apart from UDP: Error-free data transfer Ordered-data transfer Retransmission of lost packets Discarding of duplicate packets Congestion throttling Error Free Data Transfer Error-free data transfer is guaranteed by TCP. It does this by calculating a 16-bit checksum over the TCP packet (header and data). At the receiving end, if the checksum does not match the contents of the packet, it is discarded. Because the sending side does not receive an acknowledgement of the discarded packet, it is retransmitted. Ordered-Data Transfer Streams of data called segments are used by TCP peers to speak to each other. The segments can be quite large, so TCP breaks up the segments into smaller units of data. These units are encapsulated in the TCP packet that is passed to the IP protocol. Each unit of data is assigned a sequence number, which becomes part of the TCP packet. At the receiving end, the TCP module uses the sequence numbers in the packet to reconstruct the user data in the correct order.

Retransmission of Lost Packets When transmitting large amounts of data, it is not unusual for some information to get lost along the way. In order to guarantee reliable transfer of data, TCP requires an acknowledgement of each packet it sends. This acknowledgement is sent by the TCP module at the receiving host. If an acknowledgement is not received within a specified time period, it will be retransmitted. Discarding Duplicate Packets The TCP client retransmits packets that it determines to be lost. The TCP module at the receive side may eventually receive packets that were considered to be lost after the sending side has retransmitted the data. This may result in the receiving end receiving two or more copies of the same packet. The receiving end TCP module uses the unique sequence numbers in the packet to determine if data duplication has occurred and discards any packets it determines to be duplicates. Congestion Throttling The final property of TCP is congestion throttling or flow control. The goal is for TCP to be able to send data to the receiving end at the fastest rate possible, without overwhelming it. When TCP first begins transmitting data to the far end, it sets a timer. The timer determines how long the sender should wait for a packet to be acknowledged before retransmitting it. If all packets are received well before the timer expires, TCP will incrementally increase the transmission speed, until packets begin to become unacknowledged during the time out period. When a significant number of packets have to be retransmitted, TCP slows down the rate at which it sends data to the other end. Connection Termination The connection termination phase uses, at most, a four-way handshake, with each side of the connection terminating independently. When an end point wishes to stop its half of the connection, it transmits a special packet with a flag indicating it is finished. The other end acknowledges the flag. A typical connection termination includes this two-phase handshake from both ends of the connection. TCP Sockets Transmission Control Protocol is connection-oriented. A virtual connection is first created then maintained through the duration of data transfer. The end points of the connection between TCP peers are called sockets. A socket is identified by a combination of the source host address and port together with the destination host address and port. Arriving TCP data packets are identified as belonging to a specific TCP connection by its socket. From a logical standpoint, TCP peers communicate directly with each other over the socket connection. In reality, reading and writing packets to a socket is how TCP interfaces with the IP layer below it.

TCP Packet Structure A TCP packet consists of two sections, header and data. All fields may not be used in every transmission. A flag field is used to indicate the type of transmission the packet represents and how the packet should be interpreted. The header consists of 11 fields, of which 10 are required: Source portIdentifies the sending application. Destination portIdentifies the destination application. Sequence numberUsed for assembling segmented data in the proper order at the receiving end. Acknowledgement numberThe sequence number the sender (the receiving end) expects next. Data offsetThe size of the TCP header, it is also the offset from the start of the TCP packet to the data portion. ReservedReserved for future use, should be set to zero. Flags (also known as control bits)contains 6 1-bit flags: - URGUrgent pointer field is significant. - ACKAcknowledgement field is significant. - PSHPush function. - RSTReset the connection. - SYNSynchronize sequence numbers. - FINNo more data from sender. WindowThe number of bytes the sender is willing to receive starting from the acknowledgement field value. Checksumused for error-checking of the header and data. Urgent pointerIf the URG flag is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte. OptionsAdditional header fields (called options) may follow the urgent pointer. DataThe contents of this field are the user data being transmitted between two application level entities.

Figure 1-5: TCP Packet Structure Applications that use TCP The following is a list of common applications that directly us the reliable data transfer services provided by TCP: File Transfer Protocol (FTP)Provides a mechanism for moving data files between systems. The FTP client and server programs, as well as most Web browsers, contain an implementation of the FTP protocol. HyperText Transfer Protocol (HTTP)Protocol used to move Web pages across an internet connection. The HTTP protocol is built into Web browsers and Web servers. Interactive Mail Access Protocol (IMAP)Provides clients access to e-mail messages and mailboxes over a network. It is incorporated into e-mail applications. Post Office Protocol (POP)Allows clients to read and remove e-mail residing on a remote server. It is incorporated into e-mail applications. Remote Login (Rlogin)Provides network remote login capability. Simple Mail Transfer Protocol (SMTP)Used to deliver email from one system to another. It is incorporated into email applications. Secure Shell (SSH)Provides remote access to computers while providing encryption of the data. TelnetProvides network terminal, or remote login capability

The Internet Layer The Internet layer is the third layer in the TCP/IP protocol suite.The Internet layer responds to service requests from the transport layer (typically TCP or UDP) and issues service requests to the network access layer.The various Internet layer modules provide: Translation between logical addresses and physical addresses Routing from the source to the destination computer Managing traffic problems, such as switching, routing, and controlling the congestion of data packets Maintaining the quality of service requested by the transport Layer. The transport layer is responsible for application-to-application data delivery. The Internet layer is responsible for source host to -destination host packet delivery, whereas the next layer (network access) is responsible for node to node (hop to hop) frame delivery. The Network Access Layer The network access layer (sometimes referred to as the network interface level or the data link level) defines the procedures for interfacing with the network hardware and accessing the transmission medium. In general, these functions map to the data link and physical layers of the OSI protocol stack. Within the TCP/IP protocol suite, the network access layer is commonly viewed as a single layer with two sublayers: the media access control (MAC) sublayer and the physical sublayer. The rationale behind the single layer approach reflects that the functionality of both sublayers are often combined with a single device with accompanying driver and firmware. An Ethernet card with its driver is a good example. The network access layer moves network frames between two hosts. The hosts may be end systems, such as computers or intermediate devices such as routers and switches. The network access layer only moves frames directly between two physically connected devices. All other tasks are the responsibility of the upper levels. MAC Sublayer The MAC sublayer prepares data for transmission and obtains access to the transmission medium in shared access systems. Physical Sublayer The physical sublayer encodes data and transmits it over the physical network media. It operates with data in the form of bits transmitted over a variety of electrical and optical cables, as well as radio frequencies. Example Network Layers Just as IP is independent of the transport layer protocol being used, many different network access layers are defined that carry IP traffic. Example network layers: Point-to-Point Protocol (PPP) Ethernet

Point-to-Point over Ethernet (PPoE) Wireless Fidelity (Wi-Fi) Worldwide Interoperability for Microwave Access (WiMAX) Frame Relay Asynchronous Transfer Mode (ATM)

PART-2 Layers and Media Chapter-2 The Physical Layer 2.1 Transmission Media Transmission Media through which data is transformed from one place to another is called transmission or communication media. There are two categories of transmission media used in computer communications.

BOUNDED/GUIDED MEDIA UNBOUNDED/UNGUIDED MEDIA

2.1.1 BOUNDED MEDIA: Bounded media are the physical links through which signals are confined to narrow path. These are also called guide media. Bounded media are made up o a external conductor (Usually Copper) bounded by jacket material. Bounded media are great for LABS because they offer high speed, good security and low cast. However, some time they cannot be used due distance communication. Three common types of bounded media are used of the data transmission. These are

Coaxial Cable Twisted Pairs Cable Fiber Optics Cable

COAXIAL CABLE: Coaxial cable is very common & widely used commutation media. For example TV wire is usually coaxial. Coaxial cable gets its name because it contains two conductors that are parallel to each other. The center conductor in the cable is usually copper. The copper can be either a solid wire or stranded martial. Outside this central Conductor is a non-conductive material. It is usually white, plastic material used to separate the inner Conductor form the outer Conductor. The other Conductor is a fine mesh made from Copper. It is used to help shield the cable form EMI. Outside the copper mesh is the final protective cover. (as shown in Fig)

The actual data travels through the center conductor in the cable. EMI interference is caught by outer copper mesh. There are different types of coaxial cable vary by gauge & impedance. Gauge is the measure of the cable thickness. It is measured by the Radio grade measurement, or RG number. The high the RG number, the thinner the central conductor core, the lower the number the thicker the core. Here the most common coaxial standards.

50-Ohm RG-7 or RG-11 : used with thick Ethernet. 50-Ohm RG-58 : used with thin Ethernet 75-Ohm RG-59 : used with cable television 93-Ohm RG-62 : used with ARCNET.

CHARACTERISTICS OF COAXIAL CABLE


Low cost Easy to install Up to 10Mbps capacity Medium immunity form EMI Medium of attenuation

ADVANTAGES COAXIAL CABLE


Inexpensive Easy to wire Easy to expand Moderate level of EMI immunity

DISADVANTAGE COAXIAL CABLE

Single cable failure can take down an entire network

Twisted Pair Cable The most popular network cabling is Twisted pair. It is light weight, easy to install, inexpensive and support many different types of network. It also supports the speed of 100 mps. Twisted pair cabling is made of pairs of solid or stranded copper twisted along each other. The twists are done to reduce vulnerably to EMI and cross talk. The number of pairs in the cable depends on the type. The copper core is usually 22-AWG or 24-AWG, as measured on the American wire gauge standard. There are two types of twisted pairs cabling 1. Unshielded twisted pair (UTP) 2. Shielded twisted pair (STP) 1.Unshielded twisted pair (UTP) UTP is more common. It can be either voice grade or data grade depending on the condition. UTP cable normally has an impedance of 100 ohm. UTP cost less than STP and easily available due to its many use. There are five levels of data cabling Category 1 These are used in telephone lines and low speed data cable. Category 2 These cables can support up to 4 mps implementation. Category 3 These cable supports up to 16 mps and are mostly used in 10 mps. Category 4 These are used for large distance and high speed. It can support 20mps. Category 5 This is the highest rating for UTP cable and can support up to 100mps. UTP cables consist of 2 or 4 pairs of twisted cable. Cable with 2 pair use RJ-11 connector and 4 pair cable use RJ-45 connector.

Characteristics of UTP

low cost easy to install High speed capacity High attenuation Effective to EMI 100 meter limit

Advantages of UTP

Easy installation Capable of high speed for LAN Low cost

Disadvantages of UTP

Short distance due to attenuation

2. Shielded twisted pair (STP) It is similar to UTP but has a mesh shielding thats protects it from EMI which allows for higher transmission rate. IBM has defined category for STP cable.

Type 1 STP features two pairs of 22-AWG Type 2 This type include type 1 with 4 telephone pairs

Type 6 This type feature two pairs of standard shielded 26-AWG Type 7 This type of STP consist of 1 pair of standard shielded 26-AWG Type 9 This type consist of shielded 26-AWG wire Characteristics of STP

Medium cost Easy to install Higher capacity than UTP Higher attenuation, but same as UTP Medium immunity from EMI 100 meter limit

Advantages of STP:

Shielded Faster than UTP and coaxial

Disadvantages of STP:

More expensive than UTP and coaxial More difficult installation High attenuation rate

Fiber Optics Fiber optic cable uses electrical signals to transmit data. It uses light. In fiber optic cable light only moves in one direction for two way communication to take place a second connection must be made between the two devices. It is actually two stands of cable. Each stand is responsible for one direction of communication. A laser at one device sends pulse of light through this cable to other device. These pulses translated into 1sand 0s at the other end. In the center of fiber cable is a glass stand or core. The light from the laser moves through this glass to the other device around the internal core is a reflective material known as CLADDING. No light escapes the glass core because of this reflective cladding. Fiber optic cable has bandwidth more than 2 gbps (Gigabytes per Second)

Characteristics Of Fiber Optic Cable:


Expensive Very hard to install Capable of extremely high speed Extremely low attenuation No EMI interference

Advantages Of Fiber Optic Cable:


Fast Low attenuation No EMI interference

Disadvantages Fiber Optics:


Very costly Hard to install

2.1.2 UNBOUNDED / UN GUIDED MEDIA Unbounded / Unguided media or wireless media doesn't use any physical connectors between the two devices communicating. Usually the transmission is send through the atmosphere but sometime it can be just across the rule. Wireless media is used when a physical obstruction or distance blocks are used with normal cable media. The three types of wireless media are:

RADIO WAVES MICRO WAVES INFRARED WAVES

1. RADIO WAVES:It has frequency between 10 K Hz to 1 G Hz. Radio waves has the following types.

Short waves VHF (Very High Frequency) UHF (Ultra High Frequency)

SHORT WAVES:There are different types of antennas used for radio waves. Radio waves transmission can be divided into following categories.

LOW POWER, SINGLE FREQUENCY. HIGH POWER, SINGLE FREQUENCY

1. LOW POWER , SINGLE FREQUENCY:As the name shows this system transmits from one frequency and has low power out. The normal operating ranges on these devices are 20 to 25 meter. CHARACTERISTICS LOW POWER , SINGLE FREQUENCY:

Low cost Simple installation with pre-configured 1 M bps to 10 M bps capacity High attenuation Low immunity to EMI

2. HIGH POWER, SINGLE FREQUENCY:This is similar to low power single frequency. These devices can communicate over greater distances. CHARACTERISTICS HIGH POWER, SINGLE FREQUENCY:

Moderate cost Easier to install than low power single frequency 1 Mbps to 10 Mbps of capacity Low attenuation for long distances Low immunity to EMI

MICRO WAVES Micro waves travels at high frequency than radio waves and provide through put as a wireless network media. Micro wave transmission requires the sender to be inside of the receiver. Following are the types of Micro waves. 1. Terrestrial Micro waves 2. Satellite Micro waves

1. Terrestrial Micro waves:Terrestrial Micro waves are used are used to transmit wireless signals across a few miles. Terrestrial system requires that direct parabolic antennas can be pointed to each other. These systems operate in a low Giga Hertz range.

CHARACTERISTICS of Terrestrial Micro waves:

Moderate to high cost. Moderately difficult installation 1 M bps to 10 M bps capacity Variable attenuation Low immunity to EMI

Satellite Micro waves The main problem with aero wave communication is the curvature of the earth, mountains & other structure often block the line of side. Due to this reason, many repeats are required for long distance which increases the cost of data transmission between the two points. This problem is recommended by using satellites. Satellite micro wave transmission is used to transmit signals through out the world. These system use satellites in orbit about 50,000 Km above the earth. Satellite dishes are used to send the signals to the satellite where it is again send back down to the receiver satellite. These transmissions also use directional parabolic antenna with in line of side. In satellite communication micro wave signals at 6 GHz is transmitted from a transmitter on the earth through the satellite position in space. By the time signal reaches the satellites becomes weaker due to 50,000 Km distance. The satellite amplifies week signals and transmits it back to the earth at the frequency less than 6 GHz. Characteristics Satellite Micro waves:

High cost Extremely difficult and hare installation. Variable attenuation. Low immunity to EMI High security needed because a signal send to satellite is broadcasts through all receivers with in satellite.

Infrared Infrared frequencies are just below visible light. These high frequencies allow high sped data transmission. This technology is similar to the use of a remote control for a TV. Infrared transmission can be affected by objects obstructing sender or receiver. These transmissions fall into two categories. 1. Point to point 2. Broadcast (i) Point to Point: - Point to point infrared transmission signal directly between two systems. Many lap top system use point to pint transmission. These systems require direct alignment between many devices. Characteristics of Point to point:

Wide range of cost Moderately easy installation. 100 k bps to 16 Mb of capacity. Variable attenuation. High immunity to EMI

(i) Broad Cast: - These infrared transmission use sprayed signal, one broad cast in all directions instead of direct beam. This help to reduce the problems of proper alignment and abstraction. It also allows multiple receiver of signal Characteristics of Broad Cast:

In expensive. Single installation. 1M bps capacity. Variable attenuation.

Anda mungkin juga menyukai