Full Transcript

CC SEM Unit-1 1. Explain about the classification of computer Networks with examples. A computer network is a group of computers linked to each other that enables the computer to communicate with another computer and...

CC SEM Unit-1 1. Explain about the classification of computer Networks with examples. A computer network is a group of computers linked to each other that enables the computer to communicate with another computer and share its resources, data, and applications.A computer network can be categorized by their size. A computer network is mainly of four types: LAN(Local Area Network) 1. Local Area Network is a group of computers connected to each other in a small area such as a building, or office. 2. LAN is used for connecting two or more personal computers through a communication medium such as twisted pair, coaxial cable, etc. 3. It is less costly as it is built with inexpensive hardware such as hubs, network adapters, and ethernet cables. 4. The data is transferred at an extremely fast rate in the Local Area Network. 5. Local Area Network provides higher security. PAN(Personal Area Network): 1. A personal Area Network is a network arranged within an individual person, typically within a range of 10 meters. 2. Personal Area Network is used for connecting the computer devices of personal use is known as Personal Area Network. 3. Personal Area Network covers an area of 30 feet. 4. Personal computer devices that are used to develop the personal area network are the laptop, mobile phones, media players and play stations. MAN(Metropolitan Area Network): 1. A metropolitan area network is a network that covers a larger geographic area by interconnecting a different LAN to form a larger network. 2. Government agencies use MAN to connect to the citizens and private industries. 3. In MAN, various LANs are connected to each other through a telephone exchange line. 4. The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-3, ADSL, etc. 5. It has a higher range than the Local Area Network(LAN). Uses Of Metropolitan Area Network: 1. MAN is used in communication between the banks in a city. 2. It can be used in an Airline Reservation. 3. It can be used in a college within a city. 4. It can also be used for communication in the military. WAN(Wide Area Network) 1. A Wide Area Network is a network that extends over a large geographical area such as states or countries. 2. A Wide Area Network is quite a bigger network than the LAN. 3. A Wide Area Network is not limited to a single location, but it spans a large geographical area through a telephone line, fiber optic cable or satellite links. 4. The internet is one of the biggest WANs in the world. 5. A Wide Area Network is widely used in the fields of Business, government, and education. Examples Of Wide Area Networks: Mobile Broadband, Private network Advantages Of Wide Area Network: 1. Geographical area: A Wide Area Network provides a large geographical area. 2. Centralized data: In the case of a WAN network, data is centralized. Therefore, we do not need to buy the emails, files or backup servers. 3. Sharing of software and resources: In the WAN network, we can share the software and other resources like a hard drive, and RAM. 4. High bandwidth: If we use the leased lines for our company then this gives the high bandwidth. The high bandwidth increases the data transfer rate which in turn increases the productivity of our company. 2. What is the importance of layered architecture in network models? OR 3. Discuss in detail with a neat diagram of layered architecture. Every network consists of a specific number of functions, layers, and tasks to perform. Layered Architecture in a computer network is defined as a model where a whole network process is divided into various smaller sub-tasks. These divided sub-tasks are then assigned to a specific layer to perform only the dedicated tasks. A single layer performs only a specific type of task. To run the application and provide all types of services to clients a lower layer adds its services to the higher layer present above it. Therefore layered architecture provides interactions between the sub-systems. If any type of modification is done in one layer it does not affect the next layer. As shown in the above diagram, there are five different layers. Therefore, it is a five-layered architecture. Each layer performs a dedicated task. The lower-level data for example from layer 1 data is transferred to layer 2. Below all the layers Physical Medium is present. The physical medium is responsible for the actual communication to take place. For the transfer of data and communication layered architecture provides a clean-cut interface. Features of Layered Architecture 1. The use of Layered architecture in computer networks provides the feature of modularity and distinct interfaces. 2. Layered architecture ensures independence between layers, by offering services to higher layers from the lower layers and without specifying how these services are implemented. 3. Layered architecture segments as larger and unmanageable designs into small sub-tasks. 4. In layer architecture, every network has a different number of functions, layers and content. 5. In a layered architecture, the physical route provides communication which is available under layer 1. 6. In a layered architecture, the implementation done by one layer can be modified by another layer. Elements of Layered Architecture There are three different types of elements of layered architecture. They are described below: 1. Service: Service is defined as a set of functions and tasks being provided by a lower layer to a higher layer. Each layer performs a different type of task. Therefore, the actions provided by each layer are different. 2. Protocol: Protocol is defined as a set rule used by the layer for exchanging and transmission of data with its peer entities. These rules can consist of details regarding a type of content and the order passed from one layer to another. 3. Interface: Interface is defined as a channel that allows the transmission of messages from one layer to another. Need for Layered Architecture 1. Divide and Conquer Approach: Layered architecture supports the divide and conquer approach. The unmanageable and complex task is further divided into smaller sub-tasks. Each sub-task is then carried out by a different layer. Therefore, using this approach reduces the complexity of the problem or design process. 2. Easy to Modify: The layers are independent of each other in a layered architecture. If any sudden change occurs in the implementation of one layer, it can be changed. This change does not affect the working of other layers involved in the task. Therefore, layered architectures are required to perform any sudden update or change. 3. Modularity: Layered architecture is more modular as compared to other architecture models in computer networks. Modularity provides more independence between the layers and is easier to understand. 4. Easy to Test: Each layer in layered architecture performs a different and dedicated task. Therefore, each layer can be analyzed and tested individually. It helps to analyze the problems and solve them more efficiently as compared to solving all the problems at a time. In computer networks, layered architecture is majorly used for communication. The two network models that make use of layered architecture are: 1. OSI Model 2. TCP/IP Model 4. Define the major components of Computer Networks. A computer network consists of several physical components. In other words, two or more devices are connected via a computer network to exchange an almost infinite amount of data and services. Here Below are some physical components of computer Networks: 1. NIC(Network Interface Card) NIC or Network Interface Card is a network adapter used to connect the computer to the network. It is installed in the computer to establish a LAN. It has a unique ID that is written on the chip, and it has a connector to connect the cable to it. The cable acts as an interface between the computer and the router or modem. NIC card is a layer 2 device, which means it works on the network model’s physical and data link layers. Types of NIC: 1. Wired NIC: Cables and Connectors use Wired NIC to transfer data. 2. Wireless NIC: These connect to a wireless network such as Wifi, Bluetooth, etc. 2. HUB A hub is a multiport repeater. A hub connects multiple wires coming from different branches, for example, the connector in star topology which connects different stations. Hubs cannot filter data, so data packets are sent to all connected devices. In other words, the collision domain of all hosts connected through the hub remains one. Hub does not have any routing table to store the data of ports and map destination addresses. The routing table is used to send/broadcast information across all the ports. Types of HUB: 1. Active HUB: Active HUB regenerates and amplifies the electrical signal before sending it to all connected devices. This hub is suitable for transmitting data for long-distance connections over the network. 2. Passive HUB: As the name suggests it does not amplify or regenerate electric signals, it is the simplest type of Hub among all and it is not suitable for long-distance connections. 3. Switching HUB: This is also known as intelligent HUB, they provide some additional functionality over active and passive hubs. They analyze data packets and make decisions based on MAC addresses and they are operated on a DLL(Data Link Layer). 3. Router A Router is a device like a switch that routes data packets based on their IP addresses. The router is mainly a Network Layer device. Routers normally connect LANs and WANs and have a dynamically updating routing table based on which they make decisions on routing the data packets. The router divides the broadcast domains of hosts connected through it. 4. Modem A Modem is a short form of Modulator/Demodulator. The Modem is a hardware component/device that can connect computers and other devices such as routers and switches to the internet. Modems convert or modulate the analogue signals coming from telephone wire into a digital form that is in the form of 0s and 1s. 5. Switch A Switch is a multiport bridge with a buffer and a design that can boost its efficiency(a large number of ports implies less traffic) and performance. A switch is a data link layer device. The switch can perform error checking before forwarding data, which makes it very efficient as it does not forward packets that have errors and forward good packets selectively to the correct port only. 6. Nodes Node is a term used to refer to any computing devices such as computers that send and receive network packets across the network. Types of nodes: End Nodes: These types of nodes are going to be the starting point or the end point of communication. E.g., computers, security cameras, network printers, etc. Intermediary Nodes: These nodes are going to be in between the starting point or end point of the end nodes. E.g., Switches, Bridges, Routers, cell towers, etc. 7. Media It is also known as Link which is going to carry data from one side to another side. This link can be Wired Medium (Guided Medium) and Wireless Medium (Unguided Medium). 8. Repeater Repeater is an important component of computer networks as it is used to regenerate and amplify signals in the computer networks. Repeaters are used to improve the quality of the networks and they are operated on the Physical Layer of the OSI Model. 9. Server A server is a computer program that provides various functionality to another computer program. The server plays a vital role in facilitating communication, data storage, etc. Servers have more data storage as compared to normal computers. They are designed for the specific purpose of handling multiple requests from clients. 5. Summarize the applications of computer networks. Uses of Computer Network There are multiple uses for a computer network including: 1. Communication: Through computer networks individuals and organizations can collaborate using communication channels that may include email, chat, and video conferencing. 2. Resource sharing: These bags are a boon to users since they provide a way to share the printer, scanner, and files, which will help to improve work activities and reduce costs. 3. Remote access: Network technologies bring the power of information and assistance by making it accessible from anywhere on the globe. Hence, this enables users to operate with more freedom and comfort. 4. Collaboration: Networks function to make collaboration gin and tonic by offering the opportunities to work jointly on something, share thoughts, and critique in the biggest way. 5. E-commerce: Online sales and payments processing are empowered with the computer networks that enable businesses to sell products online and execute secure payments. 6. Education: From their use in the educational setting they are employed to provide a basis for distance learning, access to resources of higher education and give opportunity for collaboration among students and teachers. 7. Entertainment: Networks are applied to matters of entertainment like online gaming, online film and music streaming, and social networking. Applications of Computer Network There are multiple applications of computer networks including: There are multiple applications of computer networks including: 1. Business applications: Computer networks are often used by businesses to ensure impact communication, to share resources, and to allow their employees to access the whole system and applications from remote locations. 2. Educational applications: Online networks are widely employed in educational institutions allowing students to access educational possibilities, share knowledge, and collaborate with their professors. 3. Healthcare applications: The healthcare sector has benefited a lot from computer networks. which are used to store and share patient details thus allowing healthcare providers to provide more personalized treatment. 4. Entertainment applications: Besides that with computer networks, you can entertain yourself with online games, streaming movies and music, or utilization of social media. 5. Military applications: Military networks are often closed and not used for general communication, which ensures the safety of military information. 6. Scientific applications: Scientific research heavily depends on computer networks because they will help establish collaboration among researchers and facilitate the sharing of data and information. 7. Transportation applications: Computer networks are used to monitor a transit system in various ways, by managing the traffic, tracking vehicles as well as even improving efficiency in transportation. 8. Banking and finance applications: The banks and finance sector are the biggest users of computer networks to carry out transactional processing, information sharing, and the provision of secure access to financial services. Advantages of Computer Networks 1. Improved communication and collaboration. 2. Resource sharing may play the role of cost-cutting. 3. Data quality management and data security. 4. Higher automation benefits and remote access possibilities. 5. Enhanced productivity and efficiency 6. Compare star and ring topologies with a neat sketch. Star topology: Each device has a dedicated point-to-point link only to a central controller, called a hub. These devices are not directly linked one to another and the controller acts as an exchange i.e. if one node wants to send data, it sends the data to the controller and the controller sends it to the recipient. Adv: - i) Less expensive than mesh, because each node needs one link, one I/O port less cable. ii) Robustness. Disadv:- Dependency of the whole topology on one single point, when the hub goes down, the whole system will be down. Ex:- LAN Ring Topology: Each node has a dedicated point-to-point connection with only two nodes on either side of it. A single node to node until it reaches its destination. Each node in the ring incorporates a repeater. (It regenerates the bits & passes them along the ring) Adv:- i) It is easy to install. Each node is linked with its immediate neighbor. ii) It is easy to add (or) delete a device. Disadv:- Unidirectional traffic is a major drawback. Ex: - IEEE token Ring 7. Enumerate the merits and demerits of Mesh and Bus topologies in detail. Mesh topology: Here, every node has a dedicated point-to-point link to every other node. To find the no.of links in a fully connected mesh network with n-nodes, consider each node must be connected to every other node i.e node1 must be connected to n-1 nodes, node2, node3,....... Till node n, all must be connected to n-1 nodes individually. If each link allows duplex mode communication, we can divide the no.of links by 2. So, here we need n(n-1) physical links, and we need mesh topology n(n-1)/2 duplex-mode links. Advantages: i) Dedicated links, so each connection can carry its own data load, thus eliminating traffic problems which occur when links must be shared by multiple nodes. ii) This topology is robust. i.e. if one link becomes unusable, the entire system is not down. iii) Privacy (or) security, the message travels along a dedicated line, and only the intended recipient can access it. Disadvantages: i)Large amounts of cabling and I/O ports are required. ii) Installation and reconnection are difficult. iii) Space (larger space required) iv) H/W required to connect each link can be expensive. Ex: - Connection of telephone regional offices. Bus topology: This topology is a multipoint long cable that acts as a backbone to link all the modes in a network. Here nodes are connected to the bus cable by drop lines and taps. A drop line is a connection running between the device and the main cable. A tap is a connector that splices into the main cable. Adv: i) Easy of installation ii) It uses less cabling than mesh (or) star. Disadv: i) It is difficult to reconnect. ii) Adding new devices requires modification/replacement of the backbone. iii) A fault (or) break in the bus cable stops all transmission and creates noise in both directions. Ex: - Ethernet LAN 8. Explain the ISO-OSI reference model with a neat sketch and compare it with the TCP/IP reference model. The OSI model layers: The OSI model consists of seven ordered layers. 1. Physical 2. Data Link 3. Network 4. Transport 5. Session 6. Presentation 7. Application Layer. When the message travels from node a to node b it may pass through intermediate nodes, These involve only the first 3 layers of OSI. The passing of data and n/w information through the layer is made possible by an interface b/w each pair of adjacent layers because the interface defines services (i.e. set of primitives) that the layer provides the above layer. With in single machine, each layer Calls upon the services of the layer just below it. Ex: - layer 3 uses the services of layer 2 and provides to layer 4). Layer n on one machine communicates with layer n on another machine, which is governed by a set of rules called a peer-to-peer protocol. 1. Physical layer: It is mainly concerned with transmitting raw bits over a communication channel. It deals with mechanical and electrical specifications of the interface and transmission medium. It includes issues like representation bits and sending and receiving bit streams are correct (or) not, how many volts were used, how many pins the n/w connector has, how transmission proceeds etc. It also includes the data transmission rate, physical topology, mode of transmission (simplex, duplex...) etc. 2. Data Link Layer: It is responsible for moving frames from one to the next. It divides the stream of bits received from the n/w layer into manageable data units called frames. The DLL adds a header to the frame to define the sender/receiver of the frame, called physical addressing. It imposes a flow control mechanism and an error control mechanism to detect and retransmit damaged (or) last frames. It also includes access control when two (or) more devices are connected to the same link, and who has control over it. 3. Network layer: It is responsible for the delivery of individual packets from the source host to the destination host across multiple networks [end-to-end packet delivery]. If two systems are connected to the same link, there is no need for a network layer. If two systems are connected to different links then the n/w layer is necessary to deliver packets. This layer adds a header to the packet coming from the upper layer, i.e. includes the logical address of the sender and receiver. Another important function of the n/w layer is to route (or) switch the packets to their final destination [provide this mechanism to routers]. 4. Transport layer: This is responsible for process-to-process delivery of the entire message. A process of an application program running on a host. It accepts messages from the above layer and into smaller units [segmentation], sent to the n/w layer and also that they arrive correctly at the receiving end [connection counter]. It adds a header which includes the port address (or) service point address. It is responsible for flow control and error control flow control is performed end-to-end rather than across a single link. Error control is also from end to end. Error correction is usually achieved through retransmission. 5. Session layer: This layer is responsible for dialogue control and synchronization. Dialogue control: - It allows traffic in both directions at the same time, i.e it keeps track of whose turn it is Synchronization:- This layer allows a process to add checkpoints (or) synchronization points, to a stream of data. Ex: - If a system is scheduling a file of 2000 pages, it is advisable to insert checkpoints after every 100 pages to ensure that it is received and acknowledged. So whenever a crash occurs, only the data transmitted after the checkpoint has to be repeated. 6. Presentation layer: This layer is responsible for translation, compression and encryption. It is concerned with the syntax and semantics of information transmitted. Compression – reduces the no.of bits in information Translation – changes the format of information into the receiver – dependant format Encryption – must be able to ensure privacy. 7. Application layer: It is responsible for providing services to the user it contains a variety of protocols which are commonly needed by users some of them are, HTTP (HyperText Transfer Protocol) FTP (File Transfer Protocol) FTAM (File Transfer and Management) NVT (Network Virtual Terminal) TCP/IP: Therefore a new reference model was needed, the major goal of this model is, the ability to connect multiple networks. The original TCP/IP model has four layers: - 1. Host-to-network 2. Internet 3. Transport 4. Application layer 1) Host-to-network: It is equivalent to the combination of the Physical and Data Link Layer. The Lower layer is called the Host-to-network layer. The host has to connect to the n/w using some protocol. Here it doesn't define any specific protocol. It supports all standard protocols. Then This layer sends IP packets to n/w. 2) Network Layer or Internet Layer: This layer is responsible for permitting hosts to inject IP packets into any n/w and travel them independently to destinations. TCP/IP n/w layer supports IP protocol (Internetworking Protocol), later it uses 4 supporting protocols called ARP, RARP, ICMP and IGMP. 3) Transport Layer: This layer is responsible for the delivery of a message from one process to another process. Two end-to-end protocols have been defined in this layer is i) TCP ii) UDP iii) SCTP 4) Application Layer: This is equivalent to the combined session, presentation and application layers of the OSI Model. It defines many standard, higher-level protocols. Initially, it included TELNET(which allows a user on one machine to log onto a remote machine), FTP(provides a way to move data efficiently from one machine to another machine), SMTP(Transfer electronic mail) Protocols. 9. Differentiate between twisted pair cables and coaxial cables. 10. What are the advantages of fiber optic cables? Explain with a neat sketch. A fiber-optic cable is made of glass or plastic and transmits signals in the form of light. A light pulse can be used to signal a one (1) bit. The absence of a pulse signals a zero(0). The bandwidth of an optical transmission system is potentially enormous. Optical fiber has a cylindrical shape and consists of 3 concentric sections – (i) Core (ii) Cladding (iii) Jacket 1. Core:- It’s the innermost section is made of glass or plastic and is surrounded by its own cladding. The core diameter is in the range of 8 to 50 μm. 2. Cladding: - A glass or plastic coating that has optical properties different from those of the core having a diameter of 125 μm. The cladding acts as a reflector to light that would otherwise escape the core. 3. Jacket: - The outermost layer surrounding caddied fiber is the jacket. The jacket is composed of plastic or other material layers to protect against moisture, cut, crushing and other environmental dangers. Advantages: Provides high-quality transmission of signals at very high speed (bandwidth 2 Gbps) These are not affected by electromagnetic interference, so noise and distortion is very less. Highly secure due to tap difficulty and lack of signal radiation. Used for both analogue and digital signals. Smaller size and lightweight Lower attenuation Applications: 1. Telephone 2. Internet 3. LANs 4. Transportation 5. Military 11. Differentiate between guided and unguided transmission media. 12. Explain unguided transmission in detail. 1. Unguided media is used for transmitting the signal without any physical media. 2. It transports electromagnetic waves and is often called wireless communication 3. Signals are broadcast through air and received by all who have devices to receive them. Radio Waves: 1. RF waves are easy to generate, can travel long distances, and can penetrate buildings easily, so they are widely used for communication, both indoors and outdoors. 2. Radio waves also are omnidirectional, meaning that they travel in all directions from the source, so the transmitter and receiver do not have to be carefully aligned physically. 3. Radio waves can be received both inside and outside the building. 4. Radio waves are very useful in multicasting and hence used in AM and FM radios, cordless phones and paging. 5. If the communication is between a single source and destination then it is called unicast 6. On the other hand, if one source is transmitting a signal and any destination that is in the range may be able to reach it then it is called broadcast. 7. Multicast is when a source transmits a signal for some specific group of destinations which may be more than one. Bluetooth: 1. Bluetooth is a very popular application of short wavelength radio transmission in the frequency band of 2400 to 2480 MHz. 2. It is a proprietary wireless technology standard used for exchanging data over short distances in mobile phones and other related devices. 3. It allows wireless devices to be connected to a wireless host which may be a computer over short distances. You may have it for transferring data between a mobile phone and computer provided both have Bluetooth technology. Microwave Transmission: 1. Travels in straight lines and therefore narrowly focused concentrating all the energy into a beam. 2. Periodic repeaters are necessary for long distances. 3. For transmitting and receiving, antennas should be aligned accurately. 4. Can not penetrate through buildings. 5. It operates in the GHz range with data rates in the order of hundreds of Mbps per channel. 6. Telecommunication carriers and TV stations are the primary users of microwave transmission. 7. Before fiber optics, for decades these microwaves formed the long-distance telephone transmission system. Terrestrial Microwave: 1. The terrestrial microwave transmission typically uses the radio frequency spectrum 2 to 40GHz. 2. The transmitter is a parabolic dish(shaped like a bowl) and is mounted as high as possible to get the best frequency and transmission. 3. An unblocked line of sight must be available between the source and the receiver. 4. Terrestrial microwaves are used for both radio (voice) and television transmission. 5. It can be expensive to adhere to the 30-mile line of sight requirement. 6. The towers and repeaters can be fairly costly and there is a risk of interference from airplanes, birds and rain. Satellite Microwave: 1. This is a microwave relay station which is placed in outer space. 2. The satellites are launched either by rockets or space shuttles carrying them. 3. The signals transmitted by earth stations are received, amplified, and retransmitted to other earth stations by the satellite. 4. These are positioned 3600 km above the equator with an orbit speed that exactly matches the rotation speed of the Earth. 5. As the satellite is positioned in a geosynchronous orbit, it is stationary relative to Earth and always stays over the same point on the ground. This is usually done to allow ground stations to aim the antenna at a fixed point in the sky. 6. The transmitting station can receive back its own transmission and check whether the satellite has transmitted information correctly. 7. A single microwave relay station is visible from any point. 8. It is very expensive both in satellite manufacturing and satellite launching. 9. Transmission depends on the weather conditions. Infrared: 1. Infrared signals range between 300 Giga-Hertz to 400 Tera-Hertz. 2. These can be used for short-range communication. 3. High-range infrared rays cannot be used for long-range communication as it cannot penetrate walls. 4. Infrared signals are generated and received using optical transceivers. 5. Infrared systems represent a cheap alternative to most other methods because there is no cabling involved and the necessary equipment is relatively cheap. 6. However, applications are limited because of distance limitations (of about one kilometer). 7. It cannot be used outside the building as rays of the sun contain infrared which leads to interference in communication. 8. Infrared having wide bandwidth can be used to transmit digital data with a very high data rate. Unit-2 1. Discuss each field of Ethernet Frame format with a neat sketch. PREAMBLE ◦ 56 bits of alternating 1s and 0s. ◦ 8 bytes with pattern 10101010 used to synchronize receiver, and sender clock rates. ◦ In IEEE 802.3, an eighth byte is the start of the frame (10101011) SFD: Start frame delimiter, flag(10101011) Addresses: 6 bytes (48 bits), nominally written in hexadecimal notation, with a colon between the bytes. Type (DIX) ◦ Indicates the type of the Network layer protocol being carried in the payload (data) field, mostly IP Length (IEEE 802.3): number of bytes in the data field. Maximum 1500 bytes CRC: checked at receiver, if the error is detected, the frame is discarded ◦ CRC-32 Data: carries data encapsulated from the upper-layer protocols Pad: Zeros are added to the data field to make the minimum data length = 46 bytes 2. What are the types of traditional Ethernet and explain the functionality in detail. Fast Ethernet Fast Ethernet was designed to compete with LAN protocols such as FDDI or Fiber Channel. IEEE created Fast Ethernet under the name 802.3u. Fast Ethernet is backwards-compatible with Standard Ethernet, but it can transmit data 10 times faster at a rate of 100 Mbps. The goals of Fast Ethernet can be summarized as follows: 1. Upgrade the data rate to 100 Mbps. 2. Make it compatible with Standard Ethernet. 3. Keep the same 48-bit address. 4. Keep the same frame format. 5. Keep the same minimum and maximum frame lengths 3. Enumerate the merits and demerits of Token Ring and Token Bus. Token Ring: Advantages: 1. It provides controlled access to the network. 2. Deterministic performance because each device has a guaranteed opportunity to transmit data. 3. It is stable because they have fewer collisions. 4. Stability. Disadvantages: 1. Expensive compared to Ethernet. 2. Complex to install. 3. If the token fails, the entire network may become unavailable. 4. Limited speed. Token Bus: Advantages: 1. Similar to the token ring provides controlled access to the network. 2. Provides deterministic performance. 3. It can handle a large number of devices providing scalability. 4. It provides more resistance to collisions. Disadvantages: 1. Complex to maintain and install. 2. Single point of failure. 3. Limited speed. 4. Expensive than Ethernet networks. 4. Define Multiplexing. Discuss the Frequency Division Multiplexing. Multiplexing is the set of techniques that allows the simultaneous transmission of multiple signals across a single data link. 1. A Multiplexer (MUX) is a device that combines several signals into a single signal. 2. A Demultiplexer (DEMUX) is a device that performs the inverse operation. Frequency division multiplexing(FDM): Frequency-division multiplexing (FDM) is an analogue technique that can be applied when the bandwidth of a link (in hertz) is greater than the combined bandwidths of the signals to be transmitted. ▪ In FDM, signals generated by each sending device modulate different carrier frequencies. These modulated signals are then combined into a single composite signal that can be transported by the link. ▪ Carrier frequencies are separated by sufficient bandwidth to accommodate the modulated signal. These bandwidth ranges are the channels through which the various signals travel. ▪ Channels can be separated by strips of unused bandwidth guard bands to prevent signals from overlapping. ▪ In addition, carrier frequencies must not interfere with the original data frequencies. The demultiplexer uses a series of filters to decompose the multiplexed signal into its constituent component signals. The individual signals are then passed to a demodulator that separates them from their carriers and passes them to the output lines. 5. Summarize the benefits of Time Division Multiplexing. Time-division multiplexing (TDM) is a digital process that allows several connections to share the high bandwidth of a link. ▪ Instead of sharing a portion of the bandwidth as in FDM, time is shared. ▪ Each connection occupies a portion of time in the link. Note that the same link is used as in FDM; here, however, the link is shown sectioned by time rather than by frequency. In the below figure, portions of signals 1, 2, 3, and 4 occupy the link sequentially. ▪ TDM is a digital multiplexing technique for combining several low- rate channels into one high-rate one. ▪ TDM is divided into two different schemes: synchronous and statistical Synchronous TDM: ▪ In synchronous TDM, each input connection has an allotment in the output even if it is not sending data. ▪ Time Slots and Frames: In synchronous TDM, the data flow of each input connection is divided into units, where each input occupies one input time slot. A unit can be 1 bit, one character, or one block of data. Each input unit becomes one output unit and occupies one output time slot. ▪ However, the duration of an output time slot is n times shorter than the duration of an input time slot. ▪ If an input time slot is T s, the output time slot is T/n s, where n is the number of connections. In other words, a unit in the output connection has a shorter duration; it travels faster. ▪ In synchronous TDM, the data rate of the link is n times faster and the unit duration is n times shorter. 1. Multilevel multiplexing is a technique used when the data rate of an input line is a multiple of others. For example, in Figure, we have two inputs of 20 kbps and three inputs of 40 kbps. The first two input lines can be multiplexed together to provide a data rate equal to the last three. A second level of multiplexing can create an output of 160 kbps. 2. Multiple-Slot Allocation Sometimes it is more efficient to allot more than one slot in a frame to a single input line. For example, we might have an input line that has a data rate that is a multiple of another input. In Figure, the input line with a 50-kbps data rate can be given two slots in the output. We insert a serial-to-parallel converter in the line to make two inputs out of one. 3. Pulse Stuffing Sometimes the bit rates of sources are not multiple integers of each other. Therefore, neither of the above two techniques can be applied. One solution is to make the highest input data rate the dominant data rate and then add dummy bits to the input lines with lower rates. This will increase their rates. This technique is called pulse stuffing, bit padding, or bit stuffing. The input with a data rate of 46 is pulse-stuffed to increase the rate to 50 kbps. Now multiplexing can take place. Statistical Time-Division Multiplexing: As we saw in the previous section, in synchronous TDM, each input has a reserved slot in the output frame. This can be inefficient if some input lines have no data to send. In statistical time-division multiplexing, slots are dynamically allocated to improve bandwidth efficiency. Only when an input line has a slot's worth of data to send is it given a slot in the output frame? In statistical multiplexing, the number of slots in each frame is less than the number of input lines. The multiplexer checks each input line in a round-robin fashion; it allocates a slot for an input line if the line has data to send; otherwise, it skips the line and checks the next line. Addressing: An output slot in synchronous TDM is totally occupied by data; in statistical TDM, a slot needs to carry data as well as the address of the destination. In synchronous TDM, there there is no need for addressing. Slot Size: Since a slot carries both data and an address in statistical TDM, the ratio of the data size to address size must be reasonable to make transmission efficient. For example, it would be inefficient to send 1 bit per slot as data when the address is 3 bits. In statistical TDM, a a block of data is usually many bytes while the address is just a few bytes. No Synchronization Bit: The frames in statistical TDM need not be synchronized, so we do not need synchronization bits. Bandwidth: In statistical TDM, the capacity of the link is normally less than the sum of the capacities of each channel. The designers of statistical TDM define the capacity of the link based on the statistics of the load for each channel. If on average only x percent of the input slots are filled, the capacity of the link reflects this. Of course, during peak times, some slots need to wait. 6. Differentiate between Synchronous and Statistical TDM. 7. What are the advantages of 802.11 wireless LAN? Explain the Frame format of 802.11.1 Advantages: 1. Provide users with mobility within the coverage area. 2. Wireless LANs offer flexibility in network deployment. 3. Cost-effective compared to wired LANs to deploy especially in environments where wiring infrastructure would be difficult. 4. Convenient as users can connect to the network without a physical cable connection. 5. Easily accommodates new devices making it scalable. 6. Extended network connectivity to areas where wired access is impractical. 802.11 Frame Format The MAC layer frame consists of nine fields. Frame control (FC): The FC field is 2 bytes long and defines the type of frame and some control information. Addresses: There are four address fields, each 6 bytes long. The meaning of each address field depends on the value of the To DS and From DS subfields. (distributed System) D. In all frame types except one, this field defines the duration of the transmission that is used to set the value of NAV. In one control frame, this field defines the ID of the frame Length (IEEE Sequence control. This field defines the sequence number of the frame to be used in flow control. Frame body: This field, which can be between 0 and 2312 bytes, contains information based on the type and the subtype defined in the FC field. FCS(Frame control Sequence): The FCS field is 4 bytes long and contains a CRC-32 error detection sequence. Protocol version − The first sub-field is a two-bit field set to 00. It has been included to allow future versions of IEEE 802.11 to operate simultaneously. Type − It is a two-bit subfield that specifies whether the frame is a data frame, control frame or management frame. Subtype − it is a four-bit subfield that states whether the field is a Request to Send (RTS) or a Clear to Send (CTS) control frame. For a regular data frame, the value is set to 0000. To DS − A single-bit subfield indicating whether the frame is going to the access point (AC), which coordinates the communications in centralized wireless systems. From DS − A single-bit subfield indicating whether the frame is coming from the AC. More Fragments − A single-bit subfield which when set to 1 indicates that more fragments would follow. Retry − A single-bit subfield which when set to 1 specifies a retransmission of a previous frame. Power Management − A single-bit subfield indicating that the sender is adopting power-save mode. More Data − A single-bit subfield showing that the sender has further data frames for the receiver. Protected Frame − A single-bit subfield indicating that this is an encrypted frame. Order −–bit, informs the receiver that frames should be in an ordered sequence. 8. Demonstrate the architecture of Bluetooth with a neat sketch. RadioLayer: Roughly equivalent to the physical layer of theInternet model. Physical links can be synchronous or asynchronous. ◦ Uses Frequency-hopping spread spectrum[Changing Frequency of usage]. Changes Its Modulation frequency 1600 times per second. ◦ Uses frequency shift keying (FSK )with Gaussian bandwidth filtering to transform it to a signal. Baseband layer: Roughly equivalent to MAC sublayer LANs. Access is usingTime Division (Time slots). ◦ Length of time slot = dwell time = 625 microsec. So, during one frequency, a sender sends a frame to a slave, or a slave sends a frame to the master. Time-division duplexing TDMA (TDD-TDMA) is a kind of half-duplex communication in which the slave and receiver send and receive data, but not at the same time (half-duplex). However, communication for each direction uses different hops, like walkie-talkies. 9. Define Demultiplexing. What are the merits of Demultiplexing? At the receiver site, the relationship is one-to-many and requires demultiplexing. The transport layer receives datagrams from the network layer. After error checking and dropping of the header, the transport layer delivers each message to the appropriate process based on the port Number. Merits: 1. By using demultiplexers, we can increase the efficiency of the communication systems. 2. Demultiplexer can separate different signals from a mixed signal stream. 3. Demultiplexer can decode the signals produced by a multiplexer. 10. Summarize the merits and demerits of Wavelength Division Multiplexing. Wavelength-division multiplexing (WDM) is designed to use the high-data-rate capability of fiber-optic cable. The optical fiber data rate is higher than the data rate of metallic transmission cables. Using a fiber-optic cable for one single line wastes the available bandwidth. Multiplexing allows us to combine several lines into one. ▪ WDM is an analogue multiplexing technique to combine optical signals. ▪ The combining and splitting of light sources are easily handled by a prism. Recall from basic physics that a prism bends a beam of light based on the angle of incidence and the frequency. ▪ Using this technique, a multiplexer can be made to combine several input beams of light, each containing a narrow band of frequencies, into one output beam of a wider band of frequencies. A demultiplexer can also be made to reverse the process. ▪ One application of WDM is the SONET network in which multiple optical fiber lines are multiplexed and de-multiplexed. A new method, called dense WDM (DWDM), can multiplex a very large number of channels by spacing channels very close to one another. It achieves even greater efficiency. 11. Discuss about Virtual LAN in detail. ▪ Suppose we have two departments in an organization- Sales and Marketing, connected as shown in the figure. ▪ The sales PC wants to broadcast a message for its department only but switch broadcasts that message to each PC connected to it; hence, the marketing PC will also be reading that particular message. ▪ One of the solutions is to buy different switches for each department and connect them accordingly. - Cost of the infrastructure increases. - A lot of switch ports might remain vacant. ▪ If We need to broadcast that message individually for each department, the solution is VLAN. ▪ VLAN is a logical grouping of network devices connected to a switch. By creating VLAN, we create smaller broadcast domains at layer 2 by assigning different ports to different subnetworks on one switch. ▪ In simple words, we are creating a small LAN inside a LAN. ▪ With the help of VLAN, frames broadcasted get switched between ports and groups within the same VLAN. ▪ Virtual Local Area Networks (VLANs) separate an existing physical network into multiple logical networks. Thus, each VLAN creates its own broadcast domain. Communication between two VLANs can only occur through a router that is connected to both. ▪ So now, let us assign VLAN 10 to Sales and VLAN 20 to Marketing, as shown in the figure. ▪ Now if the Sales PC sends out the broadcast packet, it will also reach another Sales PC or the PCs assigned with VLAN 10. ▪ Similar is the case with Marketing PCs. Whenever a Marketing PC broadcasts a message, it will reach the PCs with VLAN 20. Features of VLAN Advantages of VLAN VLANs offer several features and benefits, including: Improved network security: VLANs can be used to separate network traffic and limit access to specific network resources. This improves security by preventing unauthorized access to sensitive data and network resources. Better network performance: By segregating network traffic into smaller logical networks, VLANs can reduce the amount of broadcast traffic and improve network performance. Simplified network management: VLANs allow network administrators to group devices together logically, rather than physically, which can simplify network management tasks such as configuration, troubleshooting, and maintenance. Flexibility: VLANs can be configured dynamically, allowing network administrators to quickly and easily adjust network configurations as needed. Cost savings: VLANs can help reduce hardware costs by allowing multiple virtual networks to share a single physical network infrastructure. Scalability: VLANs can be used to segment a network into smaller, more manageable groups as the network grows in size and complexity. 12. Demonstrate various types of Gigabit Ethernet. Give examples. Gigabit Ethernet can be categorized as either a two-wire or a four-wire implementation. The two-wire implementations use fiber-optic cable (1000Base-SX, short-wave, or l000Base-LX, long-wave), or STP (1000Base-CX). The four-wire version uses category 5 twisted-pair cable (l000Base-T). Speed 1gbps Minimum Frame Length Is 512 bytes Operates sinful/half duplex modes mostly full duplex Unit-3: Check sums for error correction detection etc. 1. Define Block coding. What are the Block coding methods used for error detection? ▪ In block coding, we divide our message into blocks, each of k bits, called data words. We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called codewords. ▪ How can errors be detected by using block coding? If the following two conditions are met, the receiver can detect a change in the original codeword. 1. The receiver has (or can find) a list of valid codewords. 2. The original codeword has changed to an invalid one. ▪ The sender creates codewords out of data words by using a generator that applies the rules and procedures of encoding. Each codeword sent to the receiver may change during transmission. ▪ If the received codeword is the same as one of the valid codewords, the word is accepted; the corresponding data word is extracted for use. ▪ If the received codeword is not valid, it is discarded. However, if the codeword is corrupted during transmission but the received word still matches a valid codeword, the error remains undetected. ▪ This type of coding can detect only single errors. Two or more errors may remain undetected. Error Correction As we said before, error correction is much more difficult than error detection. In error detection, the receiver needs to know only that the received codeword is invalid; in error correction, the receiver needs to find (or guess) the original codeword sent. We can say that we need more redundant bits for error correction than for error detection. Methods: Parity Check Codes Parity check codes are the simplest block codes used for error detection in digital electronics. In this block coding technique, an extra parity bit is included with each block of data. The calculation of the parity bit is done as per the number of 1s in the block of data. However, the parity check codes can detect only 1-bit errors, and they cannot correct them. Hamming Codes Hamming codes are relatively more advanced codes than parity check codes used for block coding in digital electronics. These codes are able to detect as well as correct 1-bit errors. This method adds additional redundant bits to each data block to create a specific code word. The positions of the redundant bits in the code word allow for the detection and correction of errors in the data. 2. Differentiate Error Detection and Error Correction methods. Error correction and error detection techniques work on the data- link layer. The data link layer ensures the frames are sent from the sender to the receiver with accuracy. Error correction is more difficult than error detection. Error An error is a situation when the data sent by the sender and received by the receiver, but that data doesn't match the sender data. For example, the sender sends the 0101010 data, and the receiver receives the 1101010. Types of Error: 1. Single bit error 2. Burst error Single-bit error: In the single-bit error, only one bit is changed in the frame. For example, the sender sends the data (01010100) in the frame, and the receiver receives the data (11010100) in the frame. Burst error: In the burst error, one or more than one consecutive bits is changed in the frame. For example, the sender sends the data (01010100) in the frame, and the receiver receives the data (11010100) in the frame. Redundancy The main concept of error detection and error correction is redundancy. To the error detection and error correction, redundancy adds some extra redundant bits in the bits. The sender adds these redundant bits, and the receiver eliminates these redundant bits. Error Detection: Error detection is the method of identifying errors. To identify these errors, it uses some redundancy codes. Redundancy codes added in actual data, and it has been transmitted by the sender. These codes are known as error detection codes. Types of error detection techniques: 1. Parity Checking 2. Checksum 3. Cyclic Redundancy Check (CRC) Simple Parity Check Data sent from the sender undergoes parity check : 1 is added as a parity bit to the data block if the data block has an odd number of 1's. 0 is added as a parity bit to the data block if the data block has an even number of 1's. This procedure is used for making the number of 1's even. And this is commonly known as even parity checking. Disadvantage: Only single-bit error is detected by this method, it fails in multi- bit error detection. It cannot detect an error in case of an error in two bits. Checksum: Checksum is a error detection which detects the error by dividing the data into the segments of equal size and then use 1's complement to find the sum of the segments and then sum is transmitted with the data to the receiver and same process is done by the receiver and at the receiver side, all zeros in the sum indicate the correctness of the data. 1. First of all data is divided into k segments in a checksum error detection scheme and each segment has m bits. 2. For finding out the sum at the sender’s side, all segments are added through 1's complement arithmetic. And for determining the checksum we complement the sum. 3. Along with data segments, the checksum segments are also transferred. 4. All the segments that are received on the receiver's side are added through 1S complement arithmetic to determine the sum. Then complement the sum also. 5. The received data is accepted only on the condition that the result is found to be 0. And if the result is not 0 then it will be discarded. Disadvantages: In checksum error is not detected, if one subunit of the data has one or more corrupted bits and corresponding bits of the opposite values are also corrupted in another sub-unit. Error is not detected in this situation because in this case the sum of columns is not affected by corrupted bits. Error Correction As we said before, error correction is much more difficult than error detection. In error detection, the receiver needs to know only that the received codeword is invalid; in error correction, the receiver needs to find (or guess) the original codeword sent. We can say that we need more redundant bits for error correction than for error detection. Hamming Distance One of the central concepts in coding for error control is the idea of the Hamming distance. The Hamming distance between two words (of the same size) is the number of differences between the corresponding bits. We show the Hamming distance between two words x and y as d(x, y). The Hamming distance can easily be found if wc apply the XOR operation ( ) on the two words and count the number of 1s in the result. Note that the Hamming distance is a value greater than zero. The Hamming distance between two words is the number of differences between corresponding bits. CYCLIC CODES Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another codeword. Cyclic Redundancy Check We can create cyclic codes to correct errors. However, the theoreticalbackground required is beyond the scope of this book. In this section, we simply discuss a category of cyclic codes called the cyclic redundancy check (CRC) that is used in networks such as LANs and WANs. In the encoder, the dataword has k bits (4 here); the codeword has n bits (7 here).The size of the dataword is augmented by adding n - k (3 here) Os to the right-hand side of the word. The n-bit result is fed into the generator. The generator uses a divisor of size n - k + I (4 here), predefined and agreed upon. The generator divides the augmented dataword by the divisor (modulo-2 division). The quotient ofthe division is discarded; the remainder ( ro) is appended to the dataword to create the codeword. The decoder receives the possibly corrupted codeword. A copy of all n bits is fed to the checker which is a replica of the generator. The remainder produced by the checker is a syndrome of n - k (3 here) bits, which is fed to the decision logic analyzer. The analyzer has a simple function. If the syndrome bits are all as, the 4 leftmost bits of the codeword are accepted as the dataword (interpreted as no error); otherwise, the 4 bits are discarded (error). Encoder Let us take a closer look at the encoder. The encoder takes the dataword and augments it with n - k number of as. It then divides the augmented dataword by the divisor, as shown in Figure Decoder The codeword can change during transmission. The decoder does the same division process as the encoder. The remainder of the division is the syndrome. If the syndrome is all Os, there is no error; the dataword is separated from the received codeword and accepted. Otherwise, everything is discarded. 3. Explain about cyclic redundancy checksum method with a suitable example Refer above question for theory Encoder: Decoder: 4. Enumerate the merits and demerits of the Parity check. The primary advantages of parity are its simplicity and ease of use. Disadvantage: Only single-bit error is detected by this method, it fails in multi- bit error detection. It cannot detect an error in case of an error in two bits. 5. Define Error Correction. Discuss the Hamming Error Correction technique in detail. Error Correction As we said before, error correction is much more difficult than error detection. In error detection, the receiver needs to know only that the received codeword is invalid; in error correction, the receiver needs to find (or guess) the original codeword sent. We can say that we need more redundant bits for error correction than for error detection. Hamming Error Correction One of the central concepts in coding for error control is the idea of the Hamming distance. The Hamming distance between two words (of the same size) is the number of differences between the corresponding bits. We show the Hamming distance between two words x and y as d(x, y). The Hamming distance can easily be found if wc apply the XOR operation ( ) on the two words and count the number of 1s in the result. Note that the Hamming distance is a value greater than zero. The Hamming distance between two words is the number of differences between corresponding bits. Example Let us find the Hamming distance between two pairs of words. 1. The Hamming distance d(000, 011) is 2 because 000 011 is 011 (two 1s). 2. The Hamming distance d(10101, 11110) is 3 because 10101 11110 is 01011 (three 1s). 6. What are the Error Detection methods in the Data Link Layer? Explain about Even and odd parity methods.->Refer above questions. 7. Summarize the benefits of Sliding window protocols. Sender can send several frames before needing an acknowledgement. In sliding window protocol frame segmentally which are including in its header. If the header of the frame allows m bits for the sequence number, the sequence numbers range from 0 to 2m-1. Advantages: The link can carry several frames at once. Its capacity can be used. 1. Efficient use of network resources: Sliding window protocols allow for efficient utilization of network bandwidth by enabling multiple data packets to be transmitted without waiting for acknowledgement for each individual packet. 2. Error control: They provide mechanism for error detection and recovery. Timeout mechanism help in detecting loss packets, allowing for retransmission of only those packets that are missing than the entire data stream. 3. Flow control: Sliding window protocols include flow control mechanisms to prevent overwhelming the reciever a with data. 8. Define Piggybacking. What are the advantages of piggybacking? * Piggybacking is a bi-directional data transmission technique in the network layer. It is a technique used to improve the efficiency of the bidirectional protocols. * It is a method to combine a data frame with ACK. If station A and B both have to send data, instead of sending separately, station A sends a data frame that includes an ACK. Station B does the same thing. * This practically means, that instead of sending an acknowledgement in an individual frame it is piggy-backed on the data frame * When a frame is carryingdata from A to B, it can also carry controlinformation about arrived (or lost) framesfrom B, * When a frame is carrying data from B to A, it can also carry controlinformation about the arrived (or lost) frames from A. * An important point about piggybacking is that both sites must use the same algorithm. * This algorithm is complicated because it needs to combine two arrival events 9. Differentiate between Go..Back N and Selective repeat protocols. 10. Compare Pure ALOHA and Slotted ALOHA.->Refer answer 15. 11. Demonstrate the CSMA/CD protocol. CSMA/CD (Collision Detection): specifies certain rules as stated below. Sense the medium, if the medium is idle, transmit; otherwise, goto step 2. If the medium is busy, continue to listen until the channel is idle, once the channel is idle then transmit immediately. If a collision is detected during transmission, transmit a brief jamming signal to assure that all stations know that there has been a collision and then cease transmission. After transmitting the jamming signal, wait a random amount of time, then attempt to transmit again. (Repeat from step 1.) 12. Explain about simplex stop-and-wait protocol for noisy channels. The Stop and Wait ARQ protocol sends a data frame and then waits for an acknowledgment (ACK) from the receiver. The ACK indicates that the receiver successfully received the data frame. After receiving the ACK from the receiver, the sender delivers the next data frame. So there is a stop before the next data frame is transferred, hence it is known as the Stop and Wait ARQ protocol. At Sender Send one data packet at a time. Send the next packet only after receiving acknowledgment for the previous. At Receiver Send acknowledgement after receiving and consuming a data packet. After consuming packet acknowledgement need to be sent (Flow Control) 13. Differentiate between CSMA/CD and CSMA/CA for channel allocation. S.NO CSMA/CD CSMA/CA CSMA / CD is effective after a Whereas CSMA / CA is effective before a 1. collision. collision. CSMA / CD is used in wired Whereas CSMA / CA is commonly used in 2. networks. wireless networks. Whereas CSMA/ CA minimizes the 3. It only reduces the recovery time. possibility of collision. CSMA / CD resends the data frame Whereas CSMA / CA will first transmit 4. whenever a conflict occurs. the intent to send for data transmission. While CSMA / CA is used in 802.11 5. CSMA / CD is used in 802.3 standard. standard. It is more efficient than simple While it is similar to simple 6. CSMA(Carrier Sense Multiple CSMA(Carrier Sense Multiple Access). Access). It is the type of CSMA to detect the It is the type of CSMA to avoid collision 7 collision on a shared channel. on a shared channel. 8. It works in the MAC layer. It also works in the MAC layer. 14. Discuss about Go-Back-N sliding window protocol. In Go-Back-N ARQ the sending process continues to send a number of frames specified by a window size even without receiving an acknowledgement (ACK) packet from the receiver. The send window can slide one after one slots when a valid acknowledgment arrives. The receiver process keeps track of the sequence number of the next frame it expects to receive, and sends that number with every ACK it sends. Frames 0, 1, 2, and 3 are sent. However, frame 1 is lost. The receiver receives frames2 and 3, but they are discarded because they are received out of order. Sender received acknowledgement for frame 0 only. It didn’t receive any acknowledgements for frame 1 which is lost. Its timer finally expires. So the sender resend the frames 1,2 and 3 and it received acknowledgements for them. Now Sender window slid to frame 4. It starts sending frames 4, 5, 6 and so on. And the same process repeats. The sender sends the frames within its window continuously, and checks the acknowledgements from the receiver before the time expires. 15. Explain Pure ALOHA and Slotted ALOHA channel allocation Methods. Pure ALOHA This is a random access scheme, without a central arbiter controlling access and without coordination among the stations. If two or more stations access the medium at the same time, a collision occurs and the transmitted data is destroyed. In a pure ALOHA system users transmit frames whenever they have data to be sent and wait for the acknowledgement. If there is no acknowledgement within specified time the sender assumes that the frame is damaged due to collision and just waits a random amount of time and sends it again. This process continues until the sender receives the acknowledgement. The limit for maximum number of attempts is normally 15. The vulnerable time is 2Tfr. The throughput for slotted ALOHA is S = G × e-2G Slotted ALOHA Refinement of the classical Aloha scheme is provided by the introduction of time slots(slotted Aloha). In this case, all senders have to be synchronized, transmission can only start at the beginning of a time slot. Vulnerable time for slotted ALOHA protocol is Tfr. The throughput for slotted ALOHA is S = G × e−G. Unit-4: 1. What are the functions of Network Layer? The Network layer is responsible for the source-to-destination delivery of a packet possible across multiple networks. It converts Frames into packets. Functions of Network Layer: Source-to-Destination Delivery of a Packet: The network layer ensures that data packets are transmitted from the source device to the intended destination device. It handles the end-to-end delivery process, including segmentation of data into smaller packets for efficient transmission. Logical Addressing: Logical addressing involves assigning unique addresses to devices within a network. These addresses are used to identify the sender and receiver of data packets. Routing: Routing is a crucial function of the network layer. It determines the best path for data packets to travel from the source to the destination. Routers play a key role in routing. They use various routing algorithms (such as link state routing, distance vector routing, and flooding) to find the optimal route. Internetworking: Internetworking refers to connecting different networks (subnets) to create a larger interconnected network (the internet). The network layer facilitates communication between devices on different networks by forwarding packets across routers. It ensures seamless data exchange across diverse media types (such as Ethernet, fiber optic, serial, and token ring). 2. Draw a neat sketch of the IPV4 Header Format and explain all fields in it. IPv4 was the first version of Internet Protocol to be widely used, and accounts for most of today’s Internet traffic. There are just over 4 billion IPv4 addresses. While that is a lot of IP addresses, it is not enough to last forever. IPv4 is an unreliable and a connectionless datagram protocol, without error control or flow control (except for error detection on the header). For reliability IPv4 must be paired with a reliable protocol such as TCP. IPv4 uses the datagram approach. Each datagram is handled independently, and can follow a different route to the destination. Datagrams sent by the same source to the same destination could arrive out of order. Also, some could be lost or corrupted during transmission. A datagram is a variable length packet consisting of two parts: header and data. The header is 20 to 60 bytes in length and contains information essential to routing and delivery. The fields of IPv4 are: VER is a 4-bit field that defines the version of the IPv4 protocol. Currently the version is 4. HLEN is a 4-bit field that defines the total header length of the datagram. With no options, the header length is 20 bytes, and the value of this field is 5 (5 x 4 = 20). When the option field is at its maximum size, the value of this field is 15 (15 x 4 = 60). Services: This field, previously called service type, is now called differentiated services. The first 3 bits are called precedence bits. The next 4 bits are called type of service (TOS) bits, and the last bit is not used. Total length. This 16-bit field defines the total length (header plus data) of the IPv4 datagram in bytes. Identification. This field is used in fragmentation. Flags. This field is used in fragmentation Fragmentation offset. This field is used in fragmentation Time to live. A datagram has a limited lifetime in its travel through the internet. This field is used mostly to control the maximum number of hops (routers) visited by the datagram. Protocol. This 8-bit field defines the higher-level protocol used such as TCP, UDP, ICMP and IGMP. The value of this field helps the receiving network layer know to which protocol the data belong. Checksum: The checksum used to identify the data packet integrity. Source address. This 32-bit field defines the IPv4 address of the source. Destination address. This 32-bit field defines the IPv4 address of the destination. 3. Draw a neat sketch of the IPV6 Header Format and explain all fields in it. IPv6 is a newer numbering system that provides a much larger address pool than IPv4. It was deployed in 1999 and should meet the world’s IP addressing needs well into the future. The IPv6 packet (128 bits) is composed of a mandatory base header followed by the payload. The payload consists of two parts: optional extension headers and data from an upper layer. The base header occupies 40 bytes, whereas the extension headers and data from the upper layer contain up to 65,535 bytes of information. Version: This 4-bit field defines the version number of the IP. For IPv6, the value is 6. Priority: The 4-bit priority field defines the priority of the packet with respect to traffic congestion. Flow label: The flow label is a 3-byte (24-bit) field that is designed to provide special handling for a particular flow of data. Payload length: The 2-byte payload length field defines the length of the IP datagram excluding the base header. Next header: The next header is an 8-bit field defining the header that follows the base header in the datagram. The next header is either one of the optional extension headers used by IP or the header of an encapsulated packet such as UDP or TCP. Hop limit: This 8-bit hop limit field serves the same purpose as the TTL field in IPv4. Source address: The source address field is a 16-byte (128-bit) Internet address that identifies the original source of the datagram. Destination address. The destination address field is a 16-byte (128-bit) Internet address that usually identifies the final destination of the datagram. 4. Compare and contrast IPV4 and IPv6 5. What is the role of Address Resolution Protocol in communication? Explain. ARP Mapping Logical (IP address) to Physical (MAC) Address. When a host (or a router) has an IP datagram to send to another host or router, it needs both physical address and the logical (IP) address of the receiver. Since the logical (IP) address can be obtained from the DNS, the sender needs the physical address of the receiver. To find the physical address of the receiver, the sending host (or the router) broadcasts an ARP query packet which includes the physical and IP addresses of the sender and the IP address of the receiver. Every host or router on the network receives and processes the ARP query packet, but only the intended recipient recognizes its IP address and sends back an ARP response packet which contains the recipient’s IP and physical addresses. The packet is unicast directly to the inquirer by using the physical address received in the query packet. 6. What is the role of the DHCP Protocol in communication? Explain. DHCP (Dynamic Host Configuration Protocol). DHCP allows both manual IP address assignment and automatic assignment. Like RARP and BOOTP, DHCP is based on the idea of a special server that assigns IP addresses to hosts asking for one. The DHCP server need not be on the same LAN as the requesting host. Since the DHCP server may not be reachable by broadcasting, a DHCP relay agent is needed on each LAN. To find its IP address, a newly-booted machine broadcasts a DHCP DISCOVER packet. The DHCP relay agent on its LAN intercepts all DHCP broadcasts. When it finds a DHCP DISCOVER packet, it sends the packet as a unicast packet to the DHCP server, possibly on a distant network. The only piece of information the relay agent needs is the IP address of the DHCP server. DHCP has a database with a pool of available IP addresses. When a DHCP client requests a temporary IP address, the DHCP server goes to the pool of available (unused) IP addresses and assigns an IP address for a negotiable period. When a DHCP client sends a request to a DHCP server, the server first checks its static database. If an entry with the requested physical address exists in the static database, the permanent IP address of the client is returned. On the other hand, if the entry does not exist in the static database, the server selects an IP address from the available pool, assigns the address to the client, and adds the entry to the dynamic database. The IP address assignment may be for a fixed period of time, a technique called leasing. Just before the lease expires, the host must ask the DHCP for a renewal. If it fails to make a request or the request is denied, the host may no longer use the IP address. 7. Define unicast and multicast routing protocols. Unicast: This type of information transfer is useful when there is a participation of a single sender and a single recipient. So, in short, you can term it a one-to-one transmission. For example, if a device having IP address 10.1.2.0 in a network wants to send the traffic stream(data packets) to the device with IP address 20.12.4.2 in the other network, then unicast comes into the picture. This is the most common form of data transfer over networks. Multicast: In multicasting, one/more senders and one/more recipients participate in data transfer traffic. In this method traffic reclines between the boundaries of unicast (one-to-one) and broadcast (one-to-all). Multicast lets servers direct single copies of data streams that are then simulated and routed to hosts that request it. IP multicast requires the support of some other protocols like IGMP (Internet Group Management Protocol), Multicast routing for its work. Also in Classful IP addressing Class D is reserved for multicast groups. Feature Unicast Multicast A communication where a message is A communication where a message is Definition sent from one sender to a group of sent from one sender to one receiver. receivers Transmission Data is sent to a single recipient Data is sent to a group of recipients Addressing Uses a unique destination address Uses a special multicast address Not all devices may be interested in Delivery Guaranteed delivery the data Generates the least amount of network Network Traffic Generates moderate network traffic traffic More secure because data is sent to a Moderately secure because data is sent Security specific recipient to a specific group of devices Examples Email, file transfer Video streaming, online gaming Destination Single receiver Group of receivers Bandwidth usage Moderate Moderate Latency Low Moderate 8. How to find the shortest path using the Dijkstra algorithm? Explain with an example. To find out the optimum path or shortest path we use the Dijkstra algorithm. Two Phases are there Phase-1: Reliable flooding Each node knows the cost of its neighbor nodes. Each node Knows the entire Graph Phase-2: Route Calculator Each node uses the Dijkstra algorithm to calculate the route. Finding the Link State information and flooding that information through all the nodes. 9. Write about the flooding concept with an example. Requires no network information like topology, load condition, cost of diff. paths. Every incoming packet to a node is sent out on every outgoing line except the one it arrived on. For Example in the above figure An incoming packet to (1) is sent out to (2),(3). from (2) is sent to (6),(4), and from (3) it is sent to (4),(5). from (4) it is sent to (6),(5),(3), from (6) it is sent to (2),(4),(5), from (5) it is sent to (4),(3). Characteristics: All possible routes between Source and Destination are tried. A packet will always get through if the path exists. As all routes are tried, there will be at least one route which is the shortest All nodes directly or indirectly connected are visited Limitations: Flooding generates a vast number of duplicate packets Suitable damping mechanism must be used 10. Discuss Link State Routing and Hierarchical Routing Methods in detail. Link State Routing: Link state routing is the second family of routing protocols. While distance-vector routers use a distributed algorithm to compute their routing tables, link-state routing uses link-state routers to exchange messages that allow each router to learn the entire network topology. Based on this learned topology, each router is then able to compute its routing table by using the shortest path computation. Link state routing is a technique in which each router shares the knowledge of its neighborhood with every other router i.e. the internet work. The three keys to understand the link state routing algorithm. Knowledge about the neighborhood: Instead of sending its routing table, a router sends the information about its neighborhood only. A router broadcasts its identities and the cost of the directly attached links to other routers. Flooding: Each router sends the information to every other router on the internetwork except its neighbors. This process is known as flooding. Every router that receives the packet sends the copies to all the neighbors. Finally each and every router receives a copy of the same information. Information Sharing: A router sends the information to every other router only when the change occurs in the information. Link state routing has two phase: Reliable Flooding: Initial state– Each node knows the cost of its neighbors. Final state- Each node knows the entire graph. Route Calculation: Each node uses Dijkstra’ s algorithm on the graph to calculate the optimal routes to all nodes. The link state routing algorithm is also known as Dijkstra’s algorithm which is used to find the shortest path from one node to every other node in the network. Hierarchical Routing Methods: Hierarchical routing protocols consist of a hierarchical topology to organize the network and routing information. Multiple layers and levels are introduced in a network. Each layer may be assigned a different responsibility like forwarding packets, maintaining routing tables, etc. HRPs are valuable for large networks, as they provide the capability of organizing network information and reducing the amount of routing information that should be exchanged between nodes. Hence, HRPs demonstrate significant scalability and fault tolerance. This is attributed to their hierarchical structure, which provides redundancy and facilitates the efficient distribution of routing data throughout the network. There are two well known hierarchical routing protocols: Hierarchical State Routing Protocol: The hierarchical state routing protocol (HSR) is a multi-level and distributed routing protocol. It makes use of clustering, present on different levels. Each level of cluster has the potential to manage its members efficiently. This improves resource allocation and management. Leaders are elected in each cluster, which form the members of the immediate higher level. Various clustering algorithms are employed for electing leaders in each level. There can be two types of clustering: physical and logical. One level of physical clustering is done among nodes that are available in a single wireless hop. The other level is made among nodes that act as cluster heads of each of the first-level clusters. Logical clustering scheme of HSR is based on relationships among nodes rather than their geographical locations. Nodes have complete details about how to route packets to destinations within its own cluster. But it does not have any information on the internal structure of other regions. At the lowest level, there are three clusters. Nodes 1, 3 and 6 are classified as cluster leaders, or gateway nodes. A cluster leader is entrusted with responsibilities such as slot/frequency/code allocation, call admission control, scheduling of packet transmissions, exchange of routing information, and handling route breaks. The higher level nodes are further organized into clusters. Fisheye State Routing Protocol: Fisheye State Routing (FSR) is an implicit hierarchical routing protocol most meant for mobile ad hoc networks. This protocol makes use of the fisheye technique to reduce information required to represent graphical data, in order to reduce routing overhead. It is based on the property of a fish’s eye that can capture pixel information with greater accuracy near its eye’s focal point. As the distance from the center of the focal point decreases, accuracy decreases. Similarly, in FSR, accurate information about nodes in its local topology is maintained, and not-so-accurate information about far-away nodes is recorded. Hence, we can say accuracy of network information decreases with increasing distance. Topology of the network is maintained at every node, but this information is not flooded in the entire network, which is mostly what happens in link state routing protocols. Instead, a node shares topology information only with its neighbors. 11. What are the design issues of the Transport Layer? The transport Layer is the second layer in the TCP/IP model and the fourth layer in the OSI model. It is an end-to-end layer used to deliver messages to a host. It is termed an end-to-end layer because it provides a point-to-point connection rather than hop-to-hop, between the source host and destination host to deliver the services reliably. The unit of data encapsulation in the Transport Layer is a segment. The transport layer in the OSI model handles critical functions to ensure reliable data transmission between hosts. Let's expand on the design issues in the transport layer: Accepting Message Segments from the Application Layer and Dividing into Packets: The transport layer receives data from the application layer and divides it into smaller units called segments or packets. This is necessary because the network layer below may not support data units of the same size as the application layer. End-to-End Delivery of the Packet: The transport layer is responsible for ensuring that packets are delivered from the source to the destination across potentially multiple network segments. This involves addressing, routing, and ensuring that the packets reach the correct application process on the receiving end. Combining Packets into Message Segment at the Receiver Side: Upon receiving packets, the transport layer reassembles them into the original message. This includes handling out-of-order packets and ensuring that the message is correctly reconstructed before passing it to the application layer. Connection Management: The transport layer manages connections between devices. This includes establishing, maintaining, and terminating connections. It ensures that data can flow smoothly between devices and handles issues like flow control, error control, and congestion control. Error Detection and Correction: The transport layer must detect and correct errors that occur during transmission. This involves using mechanisms like checksums and acknowledgments to ensure data integrity. If errors are detected, the transport layer can request retransmission of corrupted packets, ensuring reliable communication. 12. Explain each field in TCP header format with a neat sketch. Unlike UDP, TCP is a connection oriented protocol; it uses flow and error control mechanisms at the transport level. It adds connection-oriented and reliability features to the services of IP. Every byte on a TCP connection has its own 32-bit sequence number. The sending and receiving TCP entities exchange data in the form of segments. A TCP segment consists of a fixed 20-byte header (plus an optional part) followed by zero or more data bytes. The TCP software decides how big segments should be. It can accumulate data from several writes into one segment or can split data from one write over multiple segments. Two limits restrict the segment size. TCP segment consists of a 20-byte header. The fixed header may be followed by header options. After the options, if any, up to 65,535 - 20 - 20 = 65,495 data bytes may follow, where the first 20 refer to the IP header and the second to the TCP header. Segments without any data are used for acknowledgements and control messages. The Source and Destination port address use 16 bits each. A port (16 bit) plus its host’s IP address (32 bit) forms a 48-bit unique end point. Sequence number: This 32-bit field defines the number assigned to the first byte of data contained in this segment. To ensure connectivity, each byte to be transmitted is numbered. The sequence number tells the destination which byte in this sequence comprises the first byte in the segment. Acknowledgment number: This 32-bit field defines the byte number that the receiver of the segment is expecting to receive from the other party. Acknowledgement and data can be piggybacked together. TCP header length: tells how many 32-bit words are contained in the TCP header. Next comes a 6-bit field that is not used followed by six 1-bit flags. Flags: ○ Urgent pointer (if set to 1) is used when urgent data are to be found. ○ The ACK bit is set to 1 to indicate that the Acknowledgement number is valid. ○ The PSH bit indicates PUSHed data- to deliver the data to the application upon arrival and not buffer it until a full buffer has been received. ○ The RST bit is used to reset a connection. ○ The SYN bit is used to establish connections. ○ The FIN (Finish) bit is used to release a connection. The Window size field tells how many bytes may be sent starting at the byte acknowledged. A Checksum is also provided for extra reliability. Urgent pointer. This l6-bit field, which is valid only if the urgent flag is set, is used when the segment contains urgent data. Options. There can be up to 40 bytes of optional information in the TCP header. 13. Explain each field in UDP header format with a neat sketch. The User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol. It performs very limited error checking. It does not add anything to the services of IP except to provide process-to-process communication instead of host-to- host communication. UDP packets, also known as user datagrams, have a fixed-size header of 8 bytes as shown in the below figure. Source port number: This is a 16 bits long port number used by the source host. In most cases, If the source host is the server, the port number is a well-known port number. If the source host is the client, the port number is a temporary port number. Destination port number: A 16 bit port number used by the destination host. Length: A16-bit field that defines the total length (header plus data) of the user datagram. Checksum: The UDP checksum is optional and stored as 0 if not computed. 14. Differentiate between TCP and UDP Header Formats. TCP UDP Transmission Control Protocol User Datagram Protocol Connection Oriented Connection Less Slow Fast Highly Reliable Unreliable 20 Bytes 8 Bytes It takes acknowledgement of data and has the It neither takes acknowledgement, nor it ability to retransmit if the user requests. retransmits the lost data. TCP is heavy-weight. UDP if light weight. Stream-based Message-based Delivery of all data is managed. Not performed. Flow control using sliding window protocol. None TCP doesn’t support Broadcasting. UDP supports Broadcasts. Small to moderate amounts of data. Small to enormous amounts of the data. Applications where reliable transmission of Application where data delivery speed data matters. matters. FTP, Telnet, SMTP, IMAP DNS, BOOTP, DHCP, TFTP 15. How to improve the Quality of Service in communication between hosts? Quality-of-service (QoS) refers to traffic control mechanisms that seek to differentiate performance based on application or network-operator requirements or provide predictable or guaranteed performance to applications, sessions, or traffic aggregates. The basic phenomenon for QoS is in terms of packet delay and losses of various kinds. Techniques for achieving good Quality of Service: Overprovisioning: The logic of overprovisioning is to provide greater router capacity, buffer space and bandwidth. It is an expensive technique as the resources are costly. Eg: Telephone System. Buffering: Flows can be buffered on the receiving side before being delivered. It will not affect reliability or bandwidth, but helps to smooth out jitter. This technique can be used at uniform intervals. Traffic Shaping: It is defined as about regulating the average rate of data transmission. It smooths the traffic on server side other than client side. When a connection is set up, the user machine and subnet agree on a certain traffic pattern for that circuit called Service Level Agreement. It reduces congestion and thus helps the carrier to deliver the packets in the agreed pattern. 16. Explain each field in SCTP header format with a neat sketch. SCTP is a reliable message oriented protocol. It preserves the message boundaries and at the same time detects lost data, duplicate data, and out-of-order data. It also has congestion control and flow control mechanisms. The general header (packet header) defines the endpoints of each association to which the packet belongs, guarantees that the packet belongs to a particular association. The format of the general header is shown in Figure. Source port address. 16-bit field defines the port number of the sender process Destination port address. The 16-bit field defines the port number of the receiving process. Verification tag. This prevents a packet from a previous association from being mistaken as a packet in this association. It serves as an identifier for the association; it is repeated in every packet during the association. Checksum. This 32-bit field contains a CRC-32 checksum. Chunks - Control information or user data are carried in chunks. The first three fields are common to all chunks; the information field depends on the type of chunk. 17. What are the benefits of SCTP compared to TCP? As SCTP is a full duplex connection, it enables the data to be sent and received simultaneously. The data is delivered in chunks and in an ordered way which are independent to each stream this helps in isolating the data from other streams. SCTP provides the following advantage Flow control: It adjusts the data transmission in a particular order and quantity. Congestion control: It checks for network prior transmission to prevent the congestion over the links. Fault tolerance: It uses the IP address from different internet services providers. So, if an ISP fails, another connection can be used for establishing the connection. It is message oriented rather than byte oriented as of UDP. It provides a path selection functionality to select the primary data transmission and a monitoring function to test the connectivity of the transmission path. 18. Demonstrate the Leaky Bucket algorithm with a neat sketch. Leaky Bucket Algorithm mainly controls the total amount and the rate of the traffic sent to the network. Step 1 − Let us imagine a bucket with a small hole at the bottom where the rate at which water is poured into the bucket is not constant and can vary but it leaks from the bucket at a constant rate. Step 2 − So (up to water is present in the bucket), the rate at which the water leaks does not depend on the rate at which the water is input to the bucket. Step 3 − If the bucket is full, additional water that enters into the bucket that spills over the sides and is lost. Step 4 − Thus the same concept applied to packets in the network. Consider that data is coming from the source at variable speeds. Suppose that a source sends data at 10 Mbps for 4 seconds. Then there is no data for 3 seconds. The source again transmits data at a rate of 8 Mbps for 2 seconds. Thus, in a time span of 8 seconds, 68 Mb data has been transmitted. That’s why if a leaky bucket algorithm is used, the data flow would be 8 Mbps for 9 seconds. Thus, the constant flow is maintained. 19. Demonstrate the Token Bucket algorithm with a neat sketch. The leaky bucket algorithm enforces output patterns at the average rate, no matter how busy the traffic is. So, to deal with the more traffic, we need a flexible algorithm so that the data is not lost. One such approach is the token bucket algorithm. Let us understand this algorithm step wise as given below − Step 1 − In regular intervals tokens are thrown into the bucket f. Step 2 − The bucket has a maximum capacity f. Step 3 − If the packet is ready, then a token is removed from the bucket, and the packet is sent. Step 4 − Suppose, if there is no token in the bucket, the packet cannot be sent. Example Let us understand the Token Bucket Algorithm with an example − In Figure (a) the bucket holds two tokens, and three packets are waiting to be sent out of the interface. In Figure (b) two packets have been sent out by consuming two tokens, and 1 packet is still left. When compared to the Leaky bucket the token bucket algorithm is less restrictive which means it allows more traffic. The limit of busyness is restricted by the number of tokens available in the bucket at a particular instant of time. The implementation of the token bucket algorithm is easy − a variable is used to count the tokens. For every t seconds, the counter is incremented and then it is decremented whenever a packet is sent. When the counter reaches zero, no further packet is sent out. This is shown in below given diagram 20. Explain the connection establishment mechanism in the transport layer. The transport layer in computer networks is responsible for process-to-process or end-to-end delivery of the entire message. It ensures efficient, reliable, and cost-effective services. There are two main types of transport layer services: connection-oriented (TCP) and connectionless (UDP). Connection Establishment in the Transport Layer Process – Process Delivery The transport layer ensures that the entire message arrives intact at the destination process. This layer provides reliable and efficient delivery by handling errors, data flow, and retransmissions if necessary. Connection-Oriented Service: TCP Transmission Control Protocol (TCP) is a connection-oriented protocol, meaning it requires a connection to be established between the client and server before data can be transmitted. This is achieved through a process known as the three-way handshake: SYN (Synchronize): The client sends a TCP segment with the SYN flag set to the server. This segment includes the client's initial sequence number (ISN). SYN-ACK (Synchronize-Acknowledge): The server responds with a TCP segment with both the SYN and ACK flags set. This segment includes the server

Use Quizgecko on...
Browser
Browser