Вы находитесь на странице: 1из 34

1 MC0075_Computer Networks

Set 1. Q 1. Write about the detailed classification of Computer Networks .


Ans:

A computer network, often simply referred to as a network, is a collection of computers and other hardware components interconnected by communication channels that allow sharing of resources and information. Where at least one process in one device is able to send/receive data to/from at least one process residing in a remote device, then the two devices are said to be in a network. Simply, more than one computer interconnected through a communication medium for information interchange is called a computer network. The term Computer Network is used to mean an interconnected collection of autonomous computers. Classification of Computer Networks:There is no generally taxonomy accepted into which all computer networks fit. The computer networks are classified depending on transmission technology and scale. Computer networks may be classified according to the network layer at which they operate according to some basic reference models that are considered to be standards in the industry such as the seven layer OSI reference model and the four layers TCP/IP model. Few ways of classification are listed below. By transmission techniques: Computer networks may be classified as broadcast or point to point networks. By scale: to the scale or extent of reach of the network, for example as a Personal area network (PAN), Local area network (LAN), Campus area network (CAN), Metropolitan area network (MAN), or Wide area network (WAN). By connection method: Computer networks may be classified according to the technology that is used to connect the individual devices in the network such as Home PNA, Power line communication, Ethernet, or Wireless LAN. By functional relationship: Computer networks may be classified according to the functional relationships which exist between the elements of the network, for example Active Networking, Client-server and Peer-to-peer (workgroup) architectures. By network topology: Computer networks may be classified according to the network topology upon which the network is based, such as Bus network, Star network, Ring network, Mesh network, Star-bus network, Tree or Hierarchical topology network, etc. By services provided: Computer networks may be classified according to the services which they provide, such as Storage area networks, Server farms, Process control networks, Valueadded network, Wireless community network, etc. By Protocol: Computer networks may be classified according to the communications protocol that is being used on the network. Read the articles on List of network protocols and protocol stacks for more information. Broadcast Network : Broadcast networks have a single communication channel that is shared by all the users on the network. Short messages are commonly called as packets or frames (in certain context). The user on the network sends packets. All other machines receive these packets. An address field within the packet or frame specifies the address of the destination machine. So upon receiving the packet, all
Moumita Mondal. MCA 3rd SEM

2 MC0075_Computer Networks

machines check the address field. Only intended user uses or processes the packet or frame and others neglect and discard it. As an example in a class of 50 students, the teacher puts question to say X student (where X is the name of the student). All the students here to the question but will not answer as the question is intended to X only. Hence only X will analyze the question and others will not respond. Broadcast system generally allows the possibility of addressing a packet to all the destinations by using a special code in the address field. When this code is transmitted, it is received and processed by every machine on the network. Again considering the above example: A teacher put forth the question in a class to all students. That is the teacher does not ask to a specific student by any unique name. Then, all are supposed to analyze the question and answer. This mode of operation is referred to broadcasting. Some broadcasting systems also support transmission to a subset of the users, which is a group of users. This mode is called as multicasting. Point-to-point Networks: The point-to-point network consists of many connections between individual pairs of machines. A packet to be sent from source to destination may have to first visit one or more intermediate machines. Usually different routes of different length are possible. So finding the best path or route is important in point-to-point networks. This type of transmission with one sender and one receiver is also referred to as unicasting. Geographically localized networks or smaller networks tend to use broadcasting where as larger networks usually are point-to-point networks. Local area network (LAN): A local area network (LAN) supplies networking capability to a group of computers in close proximity to each other such as in an office building, a school, or a home. A LAN is useful for sharing resources like files, printers, games or other applications. A LAN in turn often connects to other LANs, and to the Internet or other WAN. Most local area networks are built with relatively inexpensive hardware such as Ethernet cables, network adapters, and hubs. Wireless LAN and other more advanced LAN hardware options also exist. Wide area network (WAN): A Wide Area Network (WAN) is a telecommunication network that covers a broad area (i.e., any network that links across metropolitan, regional, or national boundaries). Business and government entities utilize WANs to relay data among employees, clients, buyers, and suppliers from various geographical locations. In essence this mode of telecommunication allows a business to effectively carry out its daily function regardless of location.

Moumita Mondal. MCA 3rd SEM

3 MC0075_Computer Networks

Set 1. Q 2. With a labeled diagram explain the Layers, protocols and interfaces of OSI Model. Ans: The Open Systems Interconnection (OSI) model is a product of the Open Systems Interconnection effort at the International Organization for Standardization. It is a prescription of characterizing and standardizing the functions of a communications system in terms of abstraction layers. Similar communication functions are grouped into logical layers. A layer serves the layer above it and is served by the layer below it. For example, a layer that provides error-free communications across a network provides the path needed by applications above it, while it calls the next lower layer to send and receive packets that make up the contents of that path. Two instances at one layer are connected by a horizontal connection on that layer.

Layer 1: physical layer


The physical layer defines electrical and physical specifications for devices. In particular, it defines the relationship between a device and a transmission medium, such as a copper or fiber optical cable. This includes the layout of pins, voltages, cable specifications, hubs, repeaters, network adapters, host bus adapters (HBA used in storage area networks) and more. The major functions and services performed by the physical layer are:

Establishment and termination of a connection to a communications medium. Participation in the process whereby the communication resources are effectively shared among multiple users. For example, contention resolution and flow control. Modulation or conversion between the representation of digital data in user equipment and the corresponding signals transmitted over a communications channel. These are signals operating over the physical cabling (such as copper and optical fiber) or over a radio link.

Moumita Mondal. MCA 3rd SEM

4 MC0075_Computer Networks

Parallel SCSI buses operate in this layer, although it must be remembered that the logical SCSI protocol is a transport layer protocol that runs over this bus. Various physical-layer Ethernet standards are also in this layer; Ethernet incorporates both this layer and the data link layer. The same applies to other local-area networks, such as token ring, FDDI, ITU-T G.hn and IEEE 802.11, as well as personal area networks such as Bluetooth and IEEE 802.15.4.

Layer 2: data link layer


The data link layer provides the functional and procedural means to transfer data between network entities and to detect and possibly correct errors that may occur in the physical layer. Originally, this layer was intended for point-to-point and point-to-multipoint media, characteristic of wide area media in the telephone system. Local area network architecture, which included broadcast-capable multiaccess media, was developed independently of the ISO work in IEEE Project 802. IEEE work assumed sub layering and management functions not required for WAN use. In modern practice, only error detection, not flow control using sliding window, is present in data link protocols such as Pointto-Point Protocol (PPP), and, on local area networks, the IEEE 802.2 LLC layer is not used for most protocols on the Ethernet, and on other local area networks, its flow control and acknowledgment mechanisms are rarely used. Sliding window flow control and acknowledgment is used at the transport layer by protocols such as TCP, but is still used in niches where X.25 offers performance advantages. The ITU-T G.hn standard, which provides high-speed local area networking over existing wires (power lines, phone lines and coaxial cables), includes a complete data link layer which provides both error correction and flow control by means of a selective repeat Sliding Window Protocol. Both WAN and LAN service arranges bits, from the physical layer, into logical sequences called frames. Not all physical layer bits necessarily go into frames, as some of these bits are purely intended for physical layer functions. For example, every fifth bit of the FDDI bit stream is not used by the layer.

Layer 3: network layer


The network layer provides the functional and procedural means of transferring variable length data sequences from a source host on one network to a destination host on a different network (in contrast to the data link layer which connects hosts within the same network), while maintaining the quality of service requested by the transport layer. The network layer performs network routing functions, and might also perform fragmentation and reassembly, and report delivery errors. Routers operate at this layer, sending data throughout the extended network and making the Internet possible. This is a logical addressing scheme values are chosen by the network engineer. The addressing scheme is not hierarchical. The network layer may be divided into three sub-layers: 1. Sub-network access that considers protocols that deal with the interface to networks, such as X.25; 2. Sub-network-dependent convergence when it is necessary to bring the level of a transit network up to the level of networks on either side
Moumita Mondal. MCA 3rd SEM

5 MC0075_Computer Networks

3. Sub-network-independent convergence handles transfer across multiple networks. An example of this latter case is CLNP, or IPv6 ISO 8473. It manages the connectionless transfer of data one hop at a time, from end system to ingress router, router to router, and from egress router to destination end system. It is not responsible for reliable delivery to a next hop, but only for the detection of erroneous packets so they may be discarded. In this scheme, IPv4 and IPv6 would have to be classed with X.25 as subnet access protocols because they carry interface addresses rather than node addresses. A number of layer-management protocols, a function defined in the Management Annex, ISO 7498/4, belong to the network layer. These include routing protocols, multicast group management, networklayer information and error, and network-layer address assignment. It is the function of the payload that makes these belong to the network layer, not the protocol that carries

Layer 4: transport layer


The transport layer provides transparent transfer of data between end users, providing reliable data transfer services to the upper layers. The transport layer controls the reliability of a given link through flow control, segmentation/desegmentation, and error control. Some protocols are state- and connection oriented. This means that the transport layer can keep track of the segments and retransmit those that fail. The transport layer also provides the acknowledgement of the successful data transmission and sends the next data if no errors occurred. OSI defines five classes of connection-mode transport protocols ranging from class 0 (which is also known as TP0 and provides the least features) to class 4 (TP4, designed for less reliable networks, similar to the Internet). Class 0 contains no error recovery, and was designed for use on network layers that provide error-free connections. Class 4 is closest to TCP, although TCP contains functions, such as the graceful close, which OSI assigns to the session layer. Also, all OSI TP connection-mode protocol classes provide expedited data and preservation of record boundaries.

Layer 5: session layer


The session layer controls the dialogues (connections) between computers. It establishes, manages and terminates the connections between the local and remote application. It provides for full-duplex, half-duplex, or simplex operation, and establishes check pointing, adjournment, termination, and restart procedures. The OSI model made this layer responsible for graceful close of sessions, which is a property of the Transmission Control Protocol, and also for session check pointing and recovery, which is not usually used in the Internet Protocol Suite. The session layer is commonly implemented explicitly in application environments that use remote procedure calls. On this level, Inter-Process communication happen (SIGHUP, SIGKILL, End Process, etc.).

Layer 6: presentation layer


The presentation layer establishes context between application-layer entities, in which the higherlayer entities may use different syntax and semantics if the presentation service provides a mapping between them. If a mapping is available, presentation service data units are encapsulated into session protocol data units, and passed down the stack.
Moumita Mondal. MCA 3rd SEM

6 MC0075_Computer Networks

This layer provides independence from data representation (e.g., encryption) by translating between application and network formats. The presentation layer transforms data into the form that the application accepts. This layer formats and encrypts data to be sent across a network. It is sometimes called the syntax layer. The original presentation structure used the basic encoding rules of Abstract Syntax Notation One (ASN.1), with capabilities such as converting an EBCDIC-coded text file to an ASCII-coded file, or serialization of objects and other data structures from and to XML.

Layer 7: application layer


The application layer is the OSI layer closest to the end user, which means that both the OSI application layer and the user interact directly with the software application. This layer interacts with software applications that implement a communicating component. Such application programs fall outside the scope of the OSI model. Application-layer functions typically include identifying communication partners, determining resource availability, and synchronizing communication. When identifying communication partners, the application layer determines the identity and availability of communication partners for an application with data to transmit. When determining resource availability, the application layer must decide whether sufficient network or the requested communication exists. In synchronizing communication, all communication between applications requires cooperation that is managed by the application layer.

OSI protocols:The Open Systems Interconnection (OSI) protocols are a family of information exchange standards developed jointly by the ISO and the ITU-T starting in 1977. Layer 1: physical layer This layer deals with the physical plugs and sockets and electrical specification of signals. This is the medium over which the digital signals are transmitted. It can be twisted pair, coaxial cable, optical fiber, wireless, or other transmission media. Layer 2: data link layer The data link layer packages raw bits from the physical layer into frames (logical, structured packets for data). It is specified in ITU-T Rec. X.212 [ISO/IEC 8886], ITU-T Rec. X.222 and others. This layer is responsible for transferring frames from one host to another. It might perform error checking. Layer 3: network layer

Connectionless Network Service (CLNS) ITU-T Rec. X.213 [ISO/IEC 8348]. SCCP is based on X.213.
Moumita Mondal. MCA 3rd SEM

7 MC0075_Computer Networks

Connectionless Network Protocol (CLNP) ITU-T Rec. X.233 [ISO/IEC 8473-1]. Connection-Oriented Network Service (CONS) ITU-T Rec. X.213 [ISO/IEC 8348]. Connection-Oriented Network Protocol (X.25) ITU-T Rec. X.233 [ISO/IEC 8878]. This is the use of the X.25 protocol to provide the CONS. Network Fast Byte Protocol ISO/IEC 14700 End System to Intermediate System Routing Exchange Protocol (ES-IS) - ISO/IEC 9452 (reprinted in RFC 995). Intermediate System to Intermediate System Intra-domain Routing Protocol (IS-IS) - ISO/IEC 10589 (reprinted in RFC 1142), later adapted for the TCP/IP model. End System Routing Information Exchange Protocol for use with ISO/IEC 8878 (SNARE) ITU-T Rec. X.116 [ISO/IEC 10030].

This level is in charge of transferring data between systems in a network, using network-layer addresses of machines to keep track of destinations and sources. This layer uses routers and switches to manage its traffic (control flow control, error check, routing etc.). Layer 4: transport layer The connection-mode and connectionless-mode transport services are specified by ITU-T Rec. X.214 [ISO/IEC 8072]; the protocol that provides the connection-mode service is specified by ITU-T Rec. X.224 [ISO/IEC 8073], and the protocol that provides the connectionless-mode service is specified by ITU-T Rec. X.234 [ISO/IEC 8602].

Transport Protocol Class 0 (TP0) Transport Protocol Class 1 (TP1) Transport Protocol Class 2 (TP2) Transport Protocol Class 3 (TP3) Transport Protocol Class 4 (TP4) Transport Fast Byte Protocol ISO 14699

The transport layer transfers data between source and destination processes. Generally, two connection modes are recognized, connection-oriented or connectionless. Connection-oriented service establishes a dedicated virtual circuit and offers various grades of guaranteed delivery, ensuring that data received is identical to data transmitted. Connectionless mode provides only best-effort service without the built-in ability to correct errors, which includes complete loss of data without notifying the data source of the failure. No logical connection, and no persistent state of the transaction exists between the endpoints, lending the connectionless mode low overhead and potentially better real-time performance for timing-critical applications such as voice and video transmissions. Layer 5: session layer

Session service ITU-T Rec. X.215 [ISO/IEC 8326] Connection-oriented Session protocol ITU-T Rec. X.225 [ISO/IEC 8327-1] Connectionless Session protocol ITU-T Rec. X.235 [ISO/IEC 9548-1]

The session layer controls the dialogues (connections) between computers. It establishes, manages and terminates the connections between the local and remote application. It provides for full-duplex,
Moumita Mondal. MCA 3rd SEM

8 MC0075_Computer Networks

half-duplex, or simplex operation, and establishes check pointing, adjournment, termination, and restart procedures. The OSI model made this layer responsible for graceful close of sessions, which is a property of the Transmission Control Protocol, and also for session check pointing and recovery, which is not usually used in the Internet Protocol Suite. The session layer is commonly implemented explicitly in application environments that use remote procedure calls. Layer 6: presentation layer

Presentation service ITU-T Rec. X.216 [ISO/IEC 8822] Connection-oriented Presentation protocol ITU-T Rec. X.226 [ISO/IEC 8823-1] Connectionless Presentation protocol ITU-T Rec. X.236 [ISO/IEC 9576-1]

This layer defines and encrypts/decrypts data types from the application layer. Protocols such as MIDI, MPEG, and GIF are presentation layer formats shared by different applications. Layer 7: application layer Common-Application Service Elements (CASEs)

Association Control Service Element (ACSE) ITU-T Rec. X.217 [ISO/IEC 8649], ITU-T Rec. X.227 [ISO/IEC 8650-1], ITU-T Rec. X.237 [ISO/IEC 10035-1]. Reliable Transfer Service Element (RTSE) ITU-T Rec. X.218 [ISO/IEC 9066-1], ITU-T Rec. X.228 [ISO/IEC 9066-2]. Remote Operations Service Element (ROSE) ITU-T Rec. X.219 [ISO/IEC 9072-1], ITU-T Rec. X.229 [ISO/IEC 9072-2]. TCAP is related to X.219. Commitment, Concurrency, and Recovery service element (CCRSE) Security Exchange Service Element (SESE)

This keeps track of how each application talks to another application. Destination and source addresses are linked to specific applications. Application processes

Common management information protocol (CMIP) ISO 9596 / X.700 Directory services (DS) X.500, later modified for the TCP/IP stack as LDAP File transfer, access, and management (FTAM) Message handling system (MHS) X.400 Virtual terminal protocol (VT) - ISO 9040/9041 Remote Database Access (RDA) Distributed Transaction Processing (OSI TP) Interlibrary Loan Application Protocol (ILAP) Document Transfer And Manipulation (DTAM) Document Printing Application (DPA) Document Filing and Retrieval (DFR)

Moumita Mondal. MCA 3rd SEM

9 MC0075_Computer Networks

Interfaces :Neither the OSI Reference Model nor OSI protocols specify any programming interfaces, other than as deliberately abstract service specifications. Protocol specifications precisely define the interfaces between different computers, but the software interfaces inside computers, known as network sockets are implementation-specific. For example Microsoft Windows' Winsock, and Unix's Berkeley sockets and System V Transport Layer Interface, are interfaces between applications (layer 5 and above) and the transport (layer 4). NDIS and ODI are interfaces between the media (layer 2) and the network protocol (layer 3). Interface standards, except for the physical layer to media, are approximate implementations of OSI service specifications. . Set 1. Q 3. Write about the following with respect to theoretical basis for data communications: Fourier analysis Band limited signals Maximum data rate of a channel Ans: Theoretical basis for data communications :Information is transmitted on wires by varying some physical property such voltage or current. Signals are represented mathematically as a function of time and analyzed by using the Fourier analysis to determine the frequency contents of the signals. Fourier Analysis : Fourier showed that a periodic function g(t) can be represented mathematically as an infinite series of sines and cosines:

The series representation of g(t) is called its Fourier series expansion. In communications, we can always represent a data signal using a Fourier series by imagining that the signal repeats the same pattern forever.

Moumita Mondal. MCA 3rd SEM

10 MC0075_Computer Networks

For instance, suppose we use voltages (on/off) to represent 1"s and 0"s, and we transmit the bit string 011000010'. The signal would look as follows: Recall (from calculus): 1. the derivative of sin(x) = cos(x)dx 2. the derivative of cos(x) = -sin(x)dx

Points to note about the Fourier expansion 1. The more terms in the expansion, the more exact our representation becomes.
Moumita Mondal. MCA 3rd SEM

11 MC0075_Computer Networks

So what does this have to do with data communication? The following facts are important: 1. Signals attenuate (strength of signal falls off with distance) during transmission. How much attenuation occurs? The exact amount is dependent on physical properties of the medium. 2. Distortion results because attenuation is non-uniform across the frequency spectrum; some frequencies distort more than others. That is, the signal doesn't distort uniformly. If every component decreased by the same amount, the signal would be weaker, but not distorted, and amplifying the signal would restore it. Because the received signal is distorted, however, amplification simply magnifies the distortion and probably won't help. 3. A transmission medium carries signals lying within in a spectrum or range of frequencies; the absolute width of the spectrum is called the bandwidth of the channel. In other words, most channels completely attenuate (e.g. chop off) frequencies beyond some threshold value. What does this mean in terms of Fourier harmonics? In terms of fundamental frequencies of a Fourier representation, higher harmonics get completely chopped off during transmission and are not received at the receiving end!

Band limited signals :

Figure shows the signal that is the ASCII representation of the character b which consists of the bit pattern 01100010 along with its harmonics.

A binary signal and its root-mean-squareFourier amplitudes.

Moumita Mondal. MCA 3rd SEM

12 MC0075_Computer Networks

Moumita Mondal. MCA 3rd SEM

13 MC0075_Computer Networks

Maximum Data Rate of a Channel : Nyquist (1924) studied the problem of data transmission for a fine bandwidth noiseless channel. Nyquist states: 1. If a signal has been run through a low-pass filter of bandwidth H, the filtered signal can be completely reconstructed by making 2H samples. The important corollary to Nyquist's rule is that sampling more often is pointless because the higher frequencies have been filtered out. 2. If the encoding signals method consists of V states: maximum data rate = 2H log2 V bps

What's the maximum data rate over phone lines? Going back to our telephone example, Nyquist's theorem tells us that a one-bit signal encoding can produce no better than: 2 _ 3000 _ log2 2 = 6000bps. But there is a catch. In practice, we don't come close to approaching this limit, because Nyquist's rule applies only to noiseless channels. For a noisy channel with bandwidth is again H, knowing signal to noise ratio S/N, the maximum data rate according to Shannon is given as Maximum data rate = H.log2 (1+S/N) bits per second. Example 1: A noiseless 3-KHz channel transmits binary signals at a rate of __________ . Solution Maximum data rate = 2H.log2 (V) bits per second Where H = 3000Hz, and V= 2 as given a binary channel hence two levels Hence the maximum rate is 2.(3000).log2(2) = 6000 bits/sec or 6kbps. Example 2: A noisy channel of 3000 Hz Bandwidth, and signal to noise ratio of 30dB can never transmit more than Maximum data rate = 3000.log2 (1+1000) bits per second. = 3000( 9.9672) = 29901.6 bits/sec

Moumita Mondal. MCA 3rd SEM

14 MC0075_Computer Networks

Set 1. Q 4. Explain in detail the Internet Architecture: B1-226, B2-56. Ans: Internet Architecture: B1-226, B2-56 : The Internet is a worldwide, publicly accessible network of interconnected computer networks that transmit data by packet switching using the standard Internet Protocol (IP). It is a "network of networks" that consists of millions of smaller domestic, academic, business, and government networks, which together carry various information and services, such as electronic mail, online chat, file transfer, and the interlinked web pages and other documents of the World Wide Web. How are networks interconnected to form an internetwork? The answer has two parts. Physically, two networks can only be connected by a computer that attaches both of them. But just a physical connection cannot provide interconnection where information can be exchanged as there is no guarantee that the computer will cooperate with other machines that wish to communicate. Internet is not restricted in size. Internets exist that contain a few networks and internets also exist that contain thousands of networks. Similarly the number of computers attached to each network in an internet can vary. Some networks have no computers attached, while others have hundreds. To have a viable internet, we need a special computer that is willing to transfer packets from one network to another. Computers that interconnect two networks and pass packets from one to the other are called internet gateways or internet routers. Let us assume a client calls his/her Internet Service provider (ISP) over a dial up telephone line. The modem is a card within a PC that converts the digital signals the computer produces to analog signals that can pass over telephone system. These signals are transferred to the ISPs point of presence (POP), where they are removed from the telephone system and injected into the ISPs regional network. From this point onwards, the system is fully digital and packet switched. The ISPs regional network consists of interconnected routers in the various cities the ISP serves. If the packet is destined for a host served directly by the ISP, then the packet is delivered to the host. Otherwise, it is handed over to the ISPs backbone operator. At the top we have companies like AT&T, Sprint, that are major backbone operators. They operate large international backbone networks with thousands of routers connected by high bandwidth optical fibers. Large companies run server farms often connect directly to the backbone. Backbone operators encourage this direct connection by renting space called Carrier hotels. If a packet given to the backbone is destined for an ISP or company served by the backbone, it is sent to the closet router and handed off there. Many backbones of varying sizes exist in the world. In such cases the packet may have to be sent to a competing backbone. To allow packets to hop between backbones, all major backbones connect at the network access point (NAP). Basically a NAP is a room full of routers, at least one per backbone. A LAN in a room connects all these routers, so packets can be forwarded from any backbone to any other backbone. In addition to being interconnected at NAPs, the larger backbones have numerous direct connections between their routers, a technique known as private peering.

Moumita Mondal. MCA 3rd SEM

15 MC0075_Computer Networks

An organization uses single router to connect its entire network. There are two reasons Because the CPU and memory in a router are used to process each packet, the processor in one router is insufficient. Redundancy improves internet reliability. Protocol software continuously monitors internet connections and instructs the routers to send traffic along alternative paths when a network or router fails. Hence when planning an internet, an organization must choose a design that meets its need for reliability, capacity, and cost. In particular, the exact details of the expected traffic, the organizations reliability requirements, internet topology, that often depends on the bandwidth of the physical networks and finally the cost of available router hardware. Set 1. Q 5. Write about Different classes of IP addresses. Ans: An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there."

Different classes of IP addresses : In order to provide the flexibility required to support different size networks. The designers decided that the IP address space should be divided into five different address classes. They are 1. Class A 2. Class B 3. Class C 4. Class D 5. Class E Primary addresses Out of five the three classes are called Class A, Class B, and Class C. These three classes together are often referred to as "classful" addressing or primary address class. Each class fixes the boundary between the network-prefix and the host-number at a different point within the 32-bit address. One of the fundamental features of classful IP addressing is that each address contains a self-encoding key that identifies the dividing point between the network-prefix and the host-number.

Moumita Mondal. MCA 3rd SEM

16 MC0075_Computer Networks

Class A Networks (/8 Prefixes) : Each Class A network address has an 8-bit network-prefix with the highest order bit set to 0 and a seven-bit network number, followed by a 24-bit host-number. Today, it is no longer considered 'modern' to refer to a Class A network. Class A networks are now referred to as "/8s" (pronounced "slash eight" or just "eights") since they have an 8-bit network-prefix. A maximum of 126 (2 7 -2) /8 networks can be defined as shown in figure 2.1(b). The calculation requires that the 2 is subtracted because the /8 network 0.0.0.0 is reserved for use as the default route and the /8 network 127.0.0.0 (also written 127/8 or 127.0.0.0/8) has been reserved for the "loop back" function. Each /8 supports a maximum of 16,777,214 (2 24 -2) hosts per network. The host calculation requires that 2 is subtracted because the all-0s ("this network") and all-1s ("broadcast") host-numbers may not be assigned to individual hosts. Since the/8 address block contains 231 (2,147,483,648) individual addresses and the IPv4 address space contains a maximum of 2 32 (4,294,967,296) addresses, the /8 address space is 50% of the total IPv4 unicast address space. Class B Networks (/16 Prefixes) : Each Class B network address has a 16-bit network-prefix with the two highest order bits set to 1-0 and a 14-bit network number, followed by a 16-bit host-number as illustrated in figure 2.1(b). Class B networks are now referred to as"/16s" since they have a 16-bit network-prefix. A maximum of 16,384 (2 14) /16 networks can be defined with up to 65,534 (2 16 -2) hosts per network. Since the entire /16 address block contains 2 30 (1,073,741,824) addresses, it represents 25% of the total IPv4 unicast address space.

Moumita Mondal. MCA 3rd SEM

17 MC0075_Computer Networks

Class C Networks (/24 Prefixes) : Each Class C network address has a 24-bit network-prefix with the three highest order bits set to 1-10 and a 21-bit network number, followed by an 8-bit host-number as shown in figure 2.1(b). Class C networks are now referred to as "/24s" since they have a 24-bit network-prefix. A maximum of 2,097,152 (2 21) /24 networks can be defined with up to 254 (2 8 -2) hosts per network. Since the entire /24 address block contains 2 29 (536,870,912) addresses, it represents 12.5% (or 1/8th) of the total IPv4 unicast address space. Class D Networks These addresses have their leading four-bits set to 1-1-1-0 and the remaining 28 bits are used to support IP Multicasting. Class E addresses They have their leading four-bits set to 1-1-1-1 and are reserved for experimental use or future use. .. Set 1. Q 6. Explain the different types of address resolution with respect to: Resolution through Direct mapping Resolution through Dynamic Binding Ans: Types of Address Resolution Address mapping must be performed at each step along a path from the original source to the final destination. In particular there are two different situations of mapping 1. At any point along the path the packet must be sent to an intermediate router. Here the sender must map the intermediate routers Internet address to a physical address. 2. At the last step of delivering a packet, the packet must be sent across one physical network to its final destination. Here the machine sending the packet must map the final destinations Internet address to the destinations physical address. Resolution through Direct mapping : Address resolution can be made easy for networks which have small physical addresses if one is given freedom to choose both IP and physical addresses. Typically one assigns IP addresses with host ID portion equal to 1, 2, and so on. When installing network interface hardware, it selects a physical address that corresponds to the IP address. Example: Let the machine has an IP address as 192.5.48.3. Recall from previous unit, the machines IP address is a Class C address with host ID field with 8 bits. Thus the host ID for that machine is 3. Hence the system administrator would select physical address 3 for that machine. The computation consists of extracting host portion from the IP address. Extraction is computationally efficient on most architecture, because it requires only few machine instructions. The mapping is easy to maintain as it can be performed without reference to external data. Finally new computers can be added to the networking without changing existing assignments or recompiling code.
Moumita Mondal. MCA 3rd SEM

18 MC0075_Computer Networks

Choosing a numbering scheme means selecting a function f that maps Internet IP address to the physical address. The designer may select the function or the numbering scheme depending on the hardware. Mathematically we can express the resolving IP address Ia as Pa = f ( Ia ) The computation of function f must be efficient. For larger networks like ATM one cannot choose physical addresses. On such networks resolution is possible by using efficient mappings like look up tables. Storage is done in a form of tables in memory to speed searching. Example: one or more computer or servers store pairs of addresses in the form of look up tables. Here each pair consists of Internet address and the corresponding physical address as shown in table 3.1.

To guarantee efficient address resolution software can use a hash function to search a table. Resolution through Dynamic Binding : Address resolution is difficult for networks like Ethernets. Ethernet interface is assigned with 48 bit physical address when the device is manufactured. As a consequence when hardware fails and requires an Ethernet interface to be replaced, the machines physical address changes. There is no encoding that can be used as the Ethernet address is 48 bit long and IP address is 32 bit long. A creative solution exits for such networks that have broadcasting capability. This solution allows new hosts or routers to be added to the network without recompiling the code. It also does not require maintenance of centralized database. To avoid maintaining of mapping table, the designer chooses to use a low level protocol to bind addresses dynamically. This is termed as address resolution protocol (ARP). .. .

Moumita Mondal. MCA 3rd SEM

19 MC0075_Computer Networks

Set 2. Q 1. Write about the following: The TCP/IP Reference Model Comparison of the OSI & the TCP/IP Reference Models Ans:

The TCP/IP Reference Model :

The Internet protocol suite is the set of communications protocols used for the Internet and similar networks, and generally the most popular protocol stack for wide area networks. It is commonly known as TCP/IP, because of its most important protocols: Transmission Control Protocol (TCP) and Internet Protocol (IP), which were the first networking protocols defined in this standard. It is occasionally known as the DoD model due to the foundational influence of the ARPANET in the 1970s (operated by DARPA, an agency of the United States Department of Defense). TCP/IP provides end-to-end connectivity specifying how data should be formatted, addressed, transmitted, routed and received at the destination. It has four abstraction layers, each with its own protocols. From lowest to highest, the layers are:
1. 2. 3. 4. The link layer (commonly Ethernet) contains communication technologies for a local network. The internet layer (IP) connects local networks, thus establishing internetworking. The transport layer (TCP) handles host-to-host communication. The application layer (for example HTTP) contains all protocols for specific data communications services on a process-to-process level (for example how a web browser communicates with a web server).

The TCP/IP model and related protocols are maintained by the Internet Engineering Task Force (IETF).

Application layer or process layer


The application layer contains the higher-level protocols used by most applications for network communication. Examples of application layer protocols include the File Transfer Protocol (FTP) and the Simple Mail Transfer Protocol (SMTP). Data coded according to application layer protocols are then encapsulated into one or (occasionally) more transport layer protocols (such as TCP or UDP), which in turn use lower layer protocols to effect actual data transfer. Since the IP stack defines no layers between the application and transport layers, the application layer must include any protocols that act like the OSI's presentation and session layer protocols. This is usually done through libraries. Application layer protocols generally treat the transport layer (and lower) protocols as black boxes which provide a stable network connection across which to communicate, although the applications are usually aware of key qualities of the transport layer connection such as the end point IP addresses and port numbers. As noted above, layers are not necessarily clearly defined in the Internet protocol suite. Application layer protocols are most often associated with clientserver applications, and the commoner servers have specific ports assigned to them by the IANA: HTTP has port 80; Telnet has
Moumita Mondal. MCA 3rd SEM

20 MC0075_Computer Networks

port 23; etc. Clients, on the other hand, tend to use ephemeral ports, i.e. port numbers assigned at random from a range set aside for the purpose. Transport and lower level layers are largely unconcerned with the specifics of application layer protocols. Routers and switches do not typically "look inside" the encapsulated traffic to see what kind of application protocol it represents; rather they just provide a conduit for it. However, some firewall and bandwidth throttling applications do try to determine what's inside, as with the Resource Reservation Protocol (RSVP). It's also sometimes necessary for Network Address Translation (NAT) facilities to take account of the needs of particular application layer protocols. (NAT allows hosts on private networks to communicate with the outside world via a single visible IP address using port forwarding, and is an almost ubiquitous feature of modern domestic broadband routers).

Transport layer or host-to-host layer


The transport layer establishes host-to-host connectivity, meaning it handles the details of data transmission that are independent of the structure of user data and the logistics of exchanging information for any particular specific purpose. Its responsibility includes end-to-end message transfer independent of the underlying network, along with error control, segmentation, flow control, congestion control, and application addressing (port numbers). End to end message transmission or connecting applications at the transport layer can be categorized as connection-oriented, implemented in TCP, or connectionless, implemented in UDP. The transport layer can be thought of as a transport mechanism, e.g., a vehicle with the responsibility to make sure that its contents (passengers/goods) reach their destination safely and soundly, unless another protocol layer is responsible for safe delivery. The layer simply establishes a basic data channel that an application uses in its task-specific data exchange. For this purpose the layer establishes the concept of the port, a numbered logical construct allocated specifically for each of the communication channels an application needs. For many types of services, these port numbers have been standardized so that client computers may address specific services of a server computer without the involvement of service announcements or directory services. Since IP provides only a best effort delivery, the transport layer is the first layer of the TCP/IP stack to offer reliability. IP can run over a reliable data link protocol such as the High-Level Data Link Control (HDLC). For example, the TCP is a connection-oriented protocol that addresses numerous reliability issues to provide a reliable byte stream:

data arrives in-order data has minimal error (i.e. correctness) duplicate data is discarded lost/discarded packets are resent includes traffic congestion control
Moumita Mondal. MCA 3rd SEM

21 MC0075_Computer Networks

Internet layer
The internet layer has the responsibility of sending packets across potentially multiple networks. Internetworking requires sending data from the source network to the destination network. This process is called routing. In the Internet protocol suite, the Internet Protocol performs two basic functions:

Host addressing and identification: This is accomplished with a hierarchical addressing system (see IP address). Packet routing: This is the basic task of sending packets of data (datagram) from source to destination by sending them to the next network node (router) closer to the final destination.

The internet layer is not only agnostic of application data structures as the transport layer, but it also do not distinguish between operations of the various transport layer protocols. So, IP can carry data for a variety of different upper layer protocols. These protocols are each identified by a unique protocol number: for example, Internet Control Message Protocol (ICMP) and Internet Group Management Protocol (IGMP) are protocols 1 and 2, respectively. Some of the protocols carried by IP, such as ICMP (used to transmit diagnostic information about IP transmission) and IGMP (used to manage IP Multicast data) are layered on top of IP but perform internetworking functions. This illustrates the differences in the architecture of the TCP/IP stack of the Internet and the OSI model. The internet layer only provides an unreliable datagram transmission facility between hosts located on potentially different IP networks by forwarding the transport layer datagram to an appropriate next-hop router for further relaying to its destination. With this functionality, the internet layer makes possible internetworking, the interworking of different IP networks, and it essentially establishes the Internet. The Internet Protocol is the principal component of the internet layer, and it defines two addressing systems to identify network hosts computers, and to locate them on the network. The original address system of the ARPANET and its successor, the Internet, is Internet Protocol version 4 (IPv4). It uses a 32-bit IP address and is therefore capable of identifying approximately four billion hosts. This limitation was eliminated by the standardization of Internet Protocol version 6 (IPv6) in 1998, and beginning production implementations in approximately 2006.

Link layer
The link layer is the networking scope of the local network connection to which a host is attached. This regime is called the link in Internet literature. This is the lowest component layer of the Internet protocols, as TCP/IP is designed to be hardware independent. As a result TCP/IP is able to be implemented on top of virtually any hardware networking technology.

Moumita Mondal. MCA 3rd SEM

22 MC0075_Computer Networks

The link layer is used to move packets between the Internet layer interfaces of two different hosts on the same link. The processes of transmitting and receiving packets on a given link can be controlled both in the software device driver for the network card, as well as on firmware or specialized chipsets. These will perform data link functions such as adding a packet header to prepare it for transmission, and then actually transmit the frame over a physical medium. The TCP/IP model includes specifications of translating the network addressing methods used in the Internet Protocol to data link addressing, such as Media Access Control (MAC), however all other aspects below that level are implicitly assumed to exist in the link layer, but are not explicitly defined. This is also the layer where packets may be selected to be sent over a virtual private network or other networking tunnel. In this scenario, the link layer data may be considered application data which traverses another instantiation of the IP stack for transmission or reception over another IP connection. Such a connection, or virtual link, may be established with a transport protocol or even an application scope protocol that serves as a tunnel in the link layer of the protocol stack. Thus, the TCP/IP model does not dictate a strict hierarchical encapsulation sequence.

Comparison of the OSI & the TCP/IP Reference Models 1.defination :OSI model is a layered framework for design of network system that allows to communicate with all the computer system, And TCP/IP is a protocol suite that defines how data is exchanged across various computers over internet. 2.purpose :Purpose of OSI model is to show that how to facilitate a communication between different computers without requiring changes in the logic of hardware and software. Whereas the purpose of TCP/IP is to connect multiple networks. 3.no of layers :The OSI model has 7 layers, Whereas TCP/IP has 4 layers. 4.protocol/model :OSI model is a model not a protocol .i.e. first the model was designed and then protocol was designed, Whereas TCP/IP model is reverse of the OSI model .i.e. first protocol was designed and the model is use as a description of an existing protocol. 5. connectionless and connection-oriented communication :The OSI model supports both connectionless and connection-oriented communication in the network layer, but only connection-oriented communication in transport layer.
Moumita Mondal. MCA 3rd SEM

23 MC0075_Computer Networks

The TCP/IP model supports both connectionless and connection-oriented communication in the transport layer, giving users the choice.

. Set 2. Q 2. Write about the following concepts with respect to Wireless transmission Electromagnetic spectrum Radio transmission Microwave transmission Ans: For unguided media, transmission and reception are achieved by means of an antenna. The antenna radiates electromagnetic energy into the medium (usually air) for transmission and for reception the antenna picks up electromagnetic waves from the surrounding medium. Electromagnetic spectrum :

Moumita Mondal. MCA 3rd SEM

24 MC0075_Computer Networks

There are basically two types of configurations for wireless transmission: directional and Omni directional. For the directional configuration, the transmitting antenna puts out a focused electromagnetic beam; the transmitting and receiving antennas must therefore be carefully aligned. In the Omni directional case, the transmitted signal spreads out in all directions and can be received by many antennas. In general, the higher the frequency of a signal, the more it is possible to focus into a directional beam. Three general ranges of frequencies are of interest for wireless transmission. 1. Frequencies in the range of about 2GHz (giga hertz=109 Hz) to 40GHz are referred to as microwave frequencies. At these frequencies, highly directional beams are possible, and microwave is quite suitable for pint-to-point transmission. Microwave is also used for satellite communications. 2. Frequencies in the range of 30MHz to 1GHz are suitable for Omni directional applications. We will refer to this range as the broadcast radio range. The table given below summarizes the characteristics of unguided transmission at various frequency bands. Microwave covers part of UHF and the entire SHF band, and broadcast radio covers the VHF and part of the UHF band. 3. Another important frequency range, for local applications, is the infrared portion of the spectrum. This covers, roughly, from 3x1011 to 2x1014Hz. Infrared is useful to local point-to-point and multipoint applications within confined areas, such as a single room

Radio transmission : Radio is a transmission medium with a large field of applications, and a medium that provides the user with great flexibility (for example, cordless telephones). Radio can be used locally, intercontinental, and for fixed as well as mobile communication between network nodes or between users and network nodes. In this subsection, we deal with radio link and satellite connections. The radio spectrum

The radio spectrum, from 3 kHz to 300 GHz, is one range of the electromagnetic spectrum (infrared, visible and ultraviolet light, and X-ray frequencies are other ranges). The propagation of a radio wave depends on its frequency. Radio waves with frequencies below 30 MHz are reflected against different layers of the atmosphere and against the ground, allowing them to be used for maritime radio, telegraphy and telex traffic. The capacity is limited to some tens or hundreds of bit/s. Above 30 MHz, the frequencies are too high to be reflected by the ionized layers in the atmosphere. The VHF and UHF frequency bands, which are used for TV, broadcasting and mobile telephony,
Moumita Mondal. MCA 3rd SEM

25 MC0075_Computer Networks

belong to this group. Frequencies above 3 GHz suffer severe attenuation caused by objects (such as buildings) and therefore require a free "line of sight" between the transmitter and the receiver. Radio link systems use frequencies between 2 and 40 GHz, and satellite systems normally use frequencies between 2 and 14 GHz. The capacity is in the magnitude of 10-150 Mbit/s.

Radio link

In radio link connections, transmission is effected via a chain of radio transmitters and radio receivers. The radio link is used for analog as well as for digital transmission. At regular intervals, the signal is received and forwarded to the next link station. The link station may be either active or passive. An active link station amplifies or regenerates the signal. A passive link station generally consists of two directly interconnected parabolic antennas without any amplifying electronics between them. Each radio link needs two radio channels: one for each direction. A few MHz spacing is needed between the transmitter frequency and the receiver frequency. The same parabolic antenna and waveguide are used for both directions. The distance between the link stations - also called the hop length - is dependent on output power, antenna type and climate, as well as on the frequency. The higher is the carrier frequency, the shorter is the range. For example, a 2 GHz system has a range of approximately 50 kilometers, and an 18 GHz system has a range of 5-10 km.

Microwave transmission : Microwave transmission refers to the technique of transmitting information over a Microwave link. Since microwaves are highly susceptible to attenuation by the atmosphere (especially during wet weather), the use of microwave transmission is limited to a few contexts. Properties It is only suitable over Line of Sight transmission links. Provides good bandwidth. Affected by rain, vapor, dust, snow, cloud, mist and fog, heavy moisture. Not suitable for links where an obstacle is in between the transmitter and receiver

Moumita Mondal. MCA 3rd SEM

26 MC0075_Computer Networks

Uses

Backbone carriers in cellular networks. Used to link BTS-BSC and BSC-MSC. Communication with satellites Microwave relay links for telephone service providers.

.. Set 2. Q 3. Write about the following IEEE Standards: Ethernets Fast Ethernet Gigabit Ethernet IEEE 802.3 Frame Format Ans: Ethernets : Ethernet was originally based on the idea of computers communicating over a shared coaxial cable acting as a broadcast transmission medium. The methods used show some similarities to radio systems, although there are major differences, such as the fact that it is much easier to detect collisions in a cable broadcast system than a radio broadcast. The common cable providing the communication channel was likened to the ether and it was from this reference that the name "Ethernet" was derived. From this early and comparatively simple concept, Ethernet evolved into the complex networking technology that today powers the vast majority of local computer networks. The coaxial cable was later replaced with point-to-point links connected together by hubs and/or switches in order to reduce installation costs, increase reliability, and enable point-to-point management and troubleshooting. Star LAN was the first step in the evolution of Ethernet from a coaxial cable bus to a hub-managed, twisted-pair network. Above the physical layer, Ethernet stations communicate by sending each other data packets, small blocks of data that are individually sent and delivered. As with other IEEE 802 LANs, each Ethernet station is given a single 48-bit MAC address, which is used both to specify the destination and the source of each data packet. Network interface cards (NICs) or chips normally do not accept packets addressed to other Ethernet stations. Adapters generally come programmed with a globally unique address, but this can be overridden, either to avoid an address change when an adapter is replaced, or to use locally administered addresses. The most kinds of Ethernets used were with the data rate of 10Mbps. Fast Ethernet : Fast Ethernet is a collective term for a number of Ethernet standards that carry traffic at the nominal rate of 100 Mbit/s, against the original Ethernet speed of 10 Mbit/s. Of the 100 megabit Ethernet standards 100baseTX is by far the most common and is supported by the vast majority of Ethernet hardware currently produced. Full duplex fast Ethernet is sometimes referred to as "200 Mbit/s" though this is somewhat misleading as that level of improvement will only be achieved if traffic

Moumita Mondal. MCA 3rd SEM

27 MC0075_Computer Networks

patterns are symmetrical. Fast Ethernet was introduced in 1995 and remained the fastest version of Ethernet for three years before being superseded by gigabit Ethernet. A fast Ethernet adaptor can be logically divided into a medium access controller (MAC) which deals with the higher level issues of medium availability and a physical layer interface (PHY). The MAC may be linked to the PHY by a 4 bit 25 MHz synchronous parallel interface known as MII. Repeaters (hubs) are also allowed and connect to multiple PHYs for their different interfaces. 100BASE-T is any of several Fast Ethernet standards for twisted pair cables. 100BASE-TX (100 Mbit/s over two-pair Cat5 or better cable), 100BASE-T4 (100 Mbit/s over four-pair Cat3 or better cable, defunct), 100BASE-T2 (100 Mbit/s over two-pair Cat3 or better cable, also defunct).

Gigabit Ethernet : In computer networking, Gigabit Ethernet (GbE or 1 GigE) is a term describing various technologies for transmitting Ethernet frames at a rate of a gigabit per second (1,000,000,000 bits per second), as defined by the IEEE 802.3-2008 standard. It came into use beginning in 1999, gradually supplanting Fast Ethernet in wired local networks where it performed considerably faster. The cables and equipment are very similar to previous standards, and by the year 2010, were very common and economical.

IEEE 802.3 Frame format :

Moumita Mondal. MCA 3rd SEM

28 MC0075_Computer Networks

Preamble field Each frame starts with a preamble of 8 bytes. Each containing bit patterns 10101010. Preamble is encoded using Manchester encoding. Thus the bit patterns produce a 10MHz square wave for 6.4usec to allow the receivers clock to synchronize with the senders clock. Address field The frame contains two addresses, one for the destination and for the sender. The length of address field is 6 bytes. The MSB of destination address is 0 for ordinary addresses and 1 for group addresses. Group addresses allow multiple stations to listen to a single address. When a frame is sent to a group of users, all station in that group receive it. This type of transmission is referred to as multicasting. The address consisting of all 1 bits is reserved for broadcasting. SOF This field is 1 byte long and is used to indicate the start of the frame. Length This field is of 2 bytes long. It is used to specify the length of the data in terms of bytes that is present in the frame. Thus the combination of the SOF and the length field is used to mark the end of the frame. Data The length of this field ranges from zero to a maximum of 1500 bytes. This is the place where the actual message bits are to be placed. Pad When a transceiver detects a collision, it truncates the current frame, which means the stray bits and pieces of frames appear on the cable all the time. To make it easier to distinguish valid frames from garbage, Ethernet specifies that valid frame must be at least 64 bytes long, from the destination address to the checksum, including both. That means the data field come must be of 46 bytes. But if there is no data to be transmitted and only some acknowledgement is to be transmitted then the length of the frame is less than what is specified for the valid frame. Hence these pad fields are provided. That is if the data field is less than 46 bytes then the pad field comes into picture. Such that total data and pad field must be equal to 46bytes minimum. If the data field is greater than 46 bytes then pad field is not used. Checksum It is 4 byte long. It uses a 32-bit hash code of the data. If some data bits are in error, then the checksum will be wrong and the error will be detected. It uses CRC method and it is used only for error detection and not forward error correction. ..

Moumita Mondal. MCA 3rd SEM

29 MC0075_Computer Networks

Set 2. Q 4. Explain the following with respect to the ARP frame format: ARP request frame ARP reply frame Ans: Address Resolution Protocol (ARP) is a telecommunications protocol used for resolution of network layer addresses into link layer addresses, a critical function in multiple-access networks. ARP was defined by RFC 826 in 1982. It is Internet Standard STD 37. It is also the name of the program for manipulating these addresses in most operating systems. ARP has been implemented in many combinations of network and overlaying internetwork technologies, such as IPv4, Chaosnet, DECnet and Xerox PARC Universal Packet (PUP) using IEEE 802 standards, FDDI, X.25, Frame Relay and Asynchronous Transfer Mode (ATM), IPv4 over IEEE 802.3 and IEEE 802.11 being the most common cases. In Internet Protocol Version 6 (IPv6) networks, the functionality of ARP is provided by the Neighbor Discovery Protocol (NDP). An ARP protocol uses two frame formats as seen in above example. One is ARP request and the other is ARP reply. ARP request frame : An ARP request is structured in a particular way. As shown in figure 3.2 an ARP request frame consists of two fields 1. Frame header 2. ARP request message

Frame header is subdivided into 1. Physical address 2. IP address We have seen that broadcast address consists of all 1s. hence the destinations physical address in ARP request frame is broadcast address with all ones equivalently FF-FF-FF-FF-FF-FF.

Moumita Mondal. MCA 3rd SEM

30 MC0075_Computer Networks

ARP reply frame : An ARP reply frame is also structured in a similar way as ARP request frame. An ARP reply frame also consists of two fields 1. Frame header 2. ARP reply message

ARP reply Frame header is subdivided again into 1. Physical address 2. IP address

. Set 2. Q 5. With respect to the concept of testing Destination Reachability and status, explain: Echo Request and Echo Reply message format Reports of Un-reachability Ans:

Echo Request and Echo Reply message format :

Moumita Mondal. MCA 3rd SEM

31 MC0075_Computer Networks

It is possible that a source device may want to send more than one Echo message to either a single destination or multiple destinations. Conversely, a single destination might receive Echo messages from more than one source. It is essential that a device receiving an Echo Reply knows which Echo prompted it to be sent. Two special fields are used within the format of these messages to allow Echo and Echo Reply messages to be matched together, and to allow a sequence of messages to be exchanged. The Identifier field was envisioned as being used as a higher-level label, like a session identifier, while the Sequence Number was seen as something to identify individual test messages within a series. However, the use of these fields is up to the particular implementation. In some cases, the Identifier field is filled in with the process number of the application that is using the Echo or Echo Reply message, to allow several users to use utilities like ping without interference.

Reports of Un-reachability :

When a router cannot forward or deliver the datagram to the destination owing to various problems, it sends a destination unreachable message back to the original sender and then drops the datagram.

Moumita Mondal. MCA 3rd SEM

32 MC0075_Computer Networks

The format of destination unreachable is as shown in figure above. The TYPE field in destination unreachable message contains an integer equal to 3. The CODE field here contains an integer that describes the problem why the datagram is not reachable. Possible values for CODE field are listed below:

Network unreachable errors imply routing failures and host unreachable errors imply delivery failures. As ICMP error message contains a short prefix of the datagram that caused the problem, the source will know exactly which address is unreachable. The port is the destination point discussed at the transport layer. If the datagram contains the source route option with a wrong route, it may report source route failure message. If a router needs to fragment a datagram and DF-bit which is dont fragment bit in IP header is set, the router sends a Fragment needed and DF set message back to the source. Set 2. Q 6. With respect to the concept of File Transport Protocol (FTP), discuss: FTP features FTP process Model Transfer Modes Ans: FTP or File Transfer Protocol is used to transfer data from one computer to another over the Internet, or through a network. FTP is a commonly used protocol for exchanging files over any network that supports the TCP/IP protocol (such as the Internet or an intranet).
Moumita Mondal. MCA 3rd SEM

33 MC0075_Computer Networks

FTP features :

FTP offers many facilities beyond the transfer function itself. o Interactive Access: It provides an interactive interface that allows humans to easily interact with remote servers. For example: A user can ask for listing of all files in a directory on a remote machine. Also a client usually responds to the input help by showing the user information about possible commands that can be invoked. o Format (Representation) Specification: FTP allows the client to specify the type of format of stored data. For example: the user can specify whether a file contains text or binary integers and whether a text files use ASCII or EBCDIC character sets. o Authentication Control: FTP requires clients to authorize themselves by sending a login name and password to the server before requesting file transfers. The server refuses access to clients that cannot supply a valid login and password.

FTP Process Model : o FTP server implementations allow simultaneous access by multiple clients o Clients use TCP to connect to a server. o The FTP server process awaits connections and creates a slave process to handle each connection. o The slave process accepts and handles a control connection from the client. The control connection carries commands that tell the server which file to transfer. o An additional TCP connection and process is created to handle each data transfer operation. The new TCP connection and process on both the client and server is created for each data transfer operation. o The control connection is kept alive as long as the client keeps the FTP session active. o The data transfer connection is kept alive for the duration of one file transfer. For each file that is being transferred, a new data transfer connection is created.

Moumita Mondal. MCA 3rd SEM

34 MC0075_Computer Networks

Transfer modes : Depending on the transfer mode, the process of setting up the data stream is different. o Active mode In active mode the FTP client opens a random port (> 1023), sends the FTP server the random port number on which it is listening over the control stream and waits for a connection from the FTP server. When the FTP server initiates the data connection to the FTP client it binds the source port to port 20 on the FTP server. In order to use active mode, the client sends a PORT command, with the IP and port as argument. The format for the IP and port is "h1,h2,h3,h4,p1,p2". Each field is a decimal representation of 8 bits of the host IP, followed by the chosen data port. For example, a client with an IP of 192.168.0.1, listening on port 1025 for the data connection will send the command PORT 192,168,0,1,4,1. The port fields should be interpreted as 4*256 + 1 = 1025. o Passive mode In passive mode, the FTP server opens a random port (> 1023), sends the FTP client the server's IP address to connect to and the port on which it is listening (a 16 bit value broken into a high and low byte) over the control stream and waits for a connection from the FTP client. In this case the FTP client binds the source port of the connection to a random port greater than 1023. To use passive mode, the client sends the PASV command to which the server would reply with something similar to "227 Entering Passive Mode (127,0,0,1,78,52)". The syntax of the IP address and port are the same as for the argument to the PORT command. o Extended passive mode In extended passive mode, the FTP server operates exactly the same as passive mode, however it only transmits the port number (not broken into high and low bytes) and the client is to assume that it connects to the same IP address that was originally connected to. Extended passive mode was added by RFC 2428 in September 1998. While data is being transferred via the data stream, the control stream sits idle. This can cause problems with large data transfers through firewalls which time out sessions after lengthy periods of idleness. While the file may well be successfully transferred, the control session can be disconnected by the firewall, causing an error to be generated. The objectives of FTP, as outlined by its RFC are: 1. To promote sharing of files (computer programs and/or data). 2. To encourage indirect or implicit use of remote computers. 3. To shield a user from variations in file storage systems among different hosts. 4. To transfer data reliably, and efficiently.

Moumita Mondal. MCA 3rd SEM

Вам также может понравиться