Download as pdf
Download as pdf
You are on page 1of 189
| GATE i PSUs mave EASY Publications POSTAL STUDY PACKAGE Scanned with CamScanner Chapter 1 Networking Fundamentals and Physical layer... uM 12 13 4 1s 16 7 18 19 Introduction. Signal Transmission Mecia No}se a IP AddreSS199 nn Subnetting.... 19 CIDR (Classiess inter Domain ROUting) 20 Network Address Translation (NAT). Student Assignments Chapter 2 Data Link Layer. 2a 22 23 24 Delays in Computer Networks nen PrOtOCOl LAY EEA nnn Circuit Switched... Packet Switching. Student Assignments Chapter 3 MAC Sublayer.. a 32 33 34 a8 36 a7 38 IntrodUction enon Data Link Layer Functions. Data Link Layer Framing nnn Error Control. | Data Link Layer: Eror Detection/Cortectioniw.AS Error-Detecting and Correcting Codes... Sliding Window Protocols (SWP) Repeaters mun Computer Ne! Chapter 4 Chapter 5 Transport Layer. 39 3.10 3a 3.2 313 3.14, Student Assignments mmo 42. Channel Allocation Problem. 43. Multiple Access Protocols. 44 CSMAwith Colson Detection (CSMA/CD)a.=79 U5 Routing Algorithms nee 46 _ RIP-Routing information Protocol 47 Open Shortest Path Fist (OSPF) nes 48 Border Gateway Protocol (BGP) 100° Internet rot0Col (Pe 101 ‘Address Resolution Protocol ————s 105 410 an an 413 ane 4as ‘Transition from IPV4 0 IPV6 nnenernenee 18 Student Assignments 5 119 5.2) IMtrOdUtiON wenn 52 Transport Layer Services 5.3. Transmission Control Protocol (TCP). 5.4 Introduction t0 UDP ev nnnnee 53° Congestion Control. 56 Scanned with CamScanner cere IS WWW Serie and HTT. 155 75 165 _ E-mail Services and SMTP/POP Protocols 157 16 65 FIP (Fle Transfer Prot0COl mm 159 167 Telnet Services and Protocol. 160 Td Basis ‘Student ASSIQAMENS nnn nnnnmrnmnm VER . Scanned with CamScanner CHAPTER Networking Fundamentals and Physical Layer 1.1. Introduction Source (as shown in the following figure) is where the dat ccan be any other electronic equipment such as telephone hands {or transmission to some destination. is originated, Typically itis a computer, but it video camera, etc., which can generate data [source }-+[Transmiter a = Medium Destination J Receiver J Figure: Simpltied model ofadata communication system Transmitter ‘As data cannot be sent in its native form, itis necessary the help of a transmitter such as modem. vert it into signal. This is performed with ted-pair of wire, a signal that comes out ofthe c Th iver receives the signal and converts it back to data before forwarding to the destination. 1n is where the data is absorbed, Again, it can be a computer system, a telephone handset, 2 set and so on. wwwimadeeasypublications.org meDE eee Theory with Solved Examples K< Scanned with CamScanner a Se. Di! Se Figure: Analog signaland Digital inal Digital signal can have only a limited number of defined values, usually tw ‘signals are continuous with the wave forms as shown inthe figure. 121 Signal Characteristics ‘A signal can be represented as a function of time, i.e. it varies with time, However, it can be expressed as a function of frequency, i.e. a signal can be considered as a composition of different freq. components. Thus, a signal has both ime-domain and frequency domain representation. Bandwidth fo values 0 and 1. petersenii ‘signal is contained is known as bandwidth or effective bandwidth ofthe signal. The term ‘most is somewhat arbitrary. Usualy, itis defined. The TET Zi frequency spectrum and spectrum of a signals shown in Figur. Pure: Bandvith 8) = Fj regency specu td bran 1.22. DigitalSignal Most digital signals are aperiodic and thus, period or 4 gecond= 8 itnervals ‘fequency is not appropriate Two new terms, bit interval (instead of |. tae = Bb Period) and birate(instead of frequency) are usedio describedigital Z{4 0 11 9 0 The bitrate isthe numberof bit interval per second, This mean that {hebitrateis the numberof bits sentin one second, usually expressed Btitenal Te inbits per second (bps) as shown in Figure Figure: Bit Rate and Bt itoval ‘Adigital signal can be considered as a signal with an infinite numberof frequencies and transmission d Gigital requires alow-pass channel as shown in Fi r nin Figure. On the other hand, transmission of analog signal requ band-pass channel shown in Figure a Scanned with CamScanner ASY Postal Study Package BLL) mane ens EET Compute Netors | 5 ‘ i : i Fi Band pass, ‘ — ‘ 4 Figure: lowpass channelrequied for transmission of digal and nlogslgnal biotal ransmisson has several advantages over analog transmission, Thats why theres ashitiowards digital ranamissin despite large analog base, Some ofthe advantages of cil ransmision ae highlighted bow: = Analog circuits require amplifiers, and each amplifier adds distortion and noise to the signal In ‘contrast, digital amplifiers regenerate an exact signal, eliminating cumulative errors. An incoming (analog signal's sampled, its value is determined, and the nade then generates a new signal from the bitvalue: the incoming signal s discarded. With analog circuits, intermediate nodes amplify the incoming signal, noise and all. «Voice, data, video, etc. can all by carried by digital circuits. What about carrying digital signals over analog cicui? The modem example shows the ificutes in carrying digital ove: analog A simple encoding method isto use constant voltage levels fora"1” and a0". Can leadtolong periods where the voltage does not change. «Easier to multiplex large channel capacities with digital Easy to apply encryption to digital da Better integration i all signals are in one form. Can integrate voice, video and digital data .se-band and Broadband Signals ‘Base-bandis defined as one that uses digital signaling, which is inserted in the transmission channel as 1. In baseband LANs, the entire frequency spectrum of the mediums utilized and transmission is ce communication. alog signaling to transmitinformation using a carrier ofhigh which use a tems use analog signaling, frequency division multiplexing is possible, where the ‘um of the cable is divided into sev ions of bandwidth, These separate channels can ent types of signals of various frequency ranges to travel at the same instance: Broadband is a unidirectional medium where the signal inserted into the media propagates in only one ion, Two are ad at a point in the network called headend. Allthe slations transmit towards the he: eceived at the headend are propagated throug} Since broadband sy fend on one path and the signs C0 ath, 1.3 Transmission Media ansmission media can be def physical path between transmitter and recelver inal data mission system, Classified as * Guided: Transmission capacity depends critically on the m length, and whether the mediumis—— —_-— point-to-point or multipoint (e.g. LAN). Examples are co-axial cable, twisted pair, and optical fiber. | + Unguided: Provides a means for ransmitingelectro- [Tae magnetic signals but do not guide them. Example pur: casafcton of he tnarasson mi wireless transmission. (wwewamadeeasypublications.org Roe Eee Theory with Solved Scanned with CamScanner Postal Study Package BIZ) 6 | Computer Science & IT a 13.1 Guided Media Transmission s : Ea in twisted pair technology, two copper wires are st rung between two points: . S ae aily “twisted” together na hlix(as shown in Figure) t0 reduc interfere, The two wires ar interfer ‘and cross-talk interference, + Cancarry both analog and digital sionals. ea ‘© Data rates of several Mbps common. ere, ‘+ Spans cistances of several Klometers. Figure: " «Data ate determined by wire thickness and length, Good, low-cost communication. rate hat can be supported over atwisted-pairs inversely proportional tothe square ofthe ine a transmission distance of km can be achieved for data rates up to 1 Mb/s. os the twisted paircan be shielded with metalic braid. This type of wire isknown as Shielded aise Pa Parsied the other form is known as Unshielded Twisted-Pair (UTP). Used for telephone lines small AN(100m). (b) Base Band Coaxial eon |With “coax”, the medium consists of a copper core wire ‘suounded by insulating matetia anda braided outer conductor. ‘The term base bandindicates digital transmission (as opposed ‘0 broadband analog) coax Characteristics ee Co-axial cable has superior frequency characteristics compared to twisted-pair and can be used for both ‘analog and digital signaling. In baseband LAN, the data rates lies in the range of 1 KHz to 20 MHz over’a. distance in the range of 1 km, Coaxial cables are used both for baseband and broadband communication. In broadband signaling, signal propagates only in one ditection, in contrast to propagation in both directions in basebaf signaling, Needed fr every kiometer or so, Data rate depends on physical properties of cable, but 10 Mbps s typical Use: One of the most popular use of co-axial cable is in cable TV (CATV) for the distribution of TV Signals, Another importance use of co-axial cable isin LAN. (©) Broadband Coaxial ‘The term broadband refers to analog transmission over coaxial ‘cable. (Note, however, that the telephone folks use broadband to refer to any channel wider than 4 kH2). The technology. ‘+ Typical bandwith of 300 MHz, total data rate of about 160 Mbps. * Operates at distances up to 100 km (metropolitan areal). '* Uses analog signaling. ‘* Technology used in cable television. Thus, may have TV classes. Total available spectrum ‘typically divided into smaller channels of ‘6 MHz each. That is, to get more than 6 MHz of bandwidth, you have to use two smaller channels and somehow Combine the signals. Requires ampitiers to boost signal sength; because amplifier are one way, data ows" conly one direction. itis already available at sites such as universities that ees ea ——— ae ee rvniications ——— acid Two types of systens have emerged: 4. Dual cable systems use two cables, one for transmission in each direction (@ One cable is used for receiving data. (0) Second cable used to communicate with headend. When a sends the data to a special node called the headend, The head first cable, Thus, the headend acts as a root ofthe tree, and al redistribution to the other nodes. 2, Midsplit systems divide the raw channel into two smaller chang same purpose as above. Which is better, broadband! or base band? There rarely a simple answer to such is simple toinsal, interfaces are inexpensive, but doesn't have the same range. Broadban ‘more expensive, and requires regular adjustment by a trained technician, but offers more, audio and video too). a {d) Fiber Optics cam? Joe Infiber optic technology, the medium consists of a hair width ‘rand of siicon or glass, and the signal consists of pulses of light For instance, a pulse of ight means *1", lack of pulse means “0” It tasacylindical shape and consists of three concentric sections the stem sessnnurala etacoe eae ‘core, the cladding, and the Jacket as shown in Figure Figur: Oa Fee Thecoreinermost section consists ofa single sol cilectio cylinder of ciameter dando rave Indes The core surounded by a solid dilectc cladding of reractvo index n that coos hang ane mADE EASY Postal Study Package BPI) Computer Networks |7 ade wishes to transmit data, fend then resends the data ont I ata must be sent to the root it e for 8: with each sub channel having the Questions. Base band \dis more complicated, services (e.g, it carries by 2 jacket made of plastic. The jacket is used to protect against moisture, abrasion, crushing and other ‘environmental hazards. Three components are required: 1 Fiber medium: Current technology carries ight pulses for tremendous distances (eg, 100s of kilometers) with virtually no signal loss. 2 Light source: Typically a Light Emitting Diode (LED) or laser diode. Running current through the material generates a pulse of light. %. Aphoto diode light detector, which converts light pulses into electrical signals. Advantages ‘Very high data rate, low error rate. 1000 Mbps (1 Gbps) over distances of kilometers common. Eror rates are so low they are almost negligible. 2 Difficult to tap, which makes it hard for unauthorized taps as well. This is responsible for higher ‘liability of this medium. How dificutisitto prevent coax taps? Very difficult indeed, unless one can keep the entire cable in alocked room! 3. Much thinner than existing copper circuits 4. Not susceptibie to electrical interference lightning) or corrosion (rust). 8. Greater repeater distance than coax ne ‘coax * Difficult to tap. It really is point-to-point technology. In contrast, tapping into ‘special training or expensive tools or parts are required ek * One-way channel. Two fibers needed to get full duplex (both ways) communicat Scanned with CamScanner Jane 8 | Computer i Becal i lighter weight, low attonuay (2 Gbps), smaller diameter, a Fiber Uses: nel goat ba sh dee spacing, optical oer cables reincng wicesrag Ly Seorynricetart Especially, the single mode fiber is suitable for this purpose In long-distance te ‘prccables ral ved inhigh-speed LAN applicati Fee ions. Mult- mode flberis commonly used in LAN, *Long-haultunks-noreasingly common intel Jephone network (Sprint ads) Metropolitan trunks-wthout repeaters (average 6 miles inength) *S Rural exchange trunks towns and vilages Local loops-direct from central exchange to a ‘subscriber (business or home) ‘Local area networks-100Mbps ring networks. Unguided Transmission = transmission is used when running a physical able (either fiber or copper) between two eng points ‘5 oe stl For example, running wites between buildings is probably not legal if the building is ‘separated by a public street. Difficulties ‘4, Weather interferes with signals: For instance, clouds, rain, lightning, etc. may adversely atte ‘communication, 2, Racio transmissions easy to tap: A big concem for companies worried about competitors stealing plans, ‘3. Signals bouncing off of structures may lead to out-of-phase signals that the receiver must filter out 1.4 Noise As signals transmitted through a channel, undesired signal in the form of noise gets mixed up with the ane: dona with the cistron inroduced by the transmission mecla, Noise canbe calegorisedint the following tour types: Thermal Noise Intermodulation Noise Cross tak * Impulse Noise Signal share a single transmission medium, intermodulation noise Panerai For example, two signals and, vill generate signals of requencies (+ interfere withthe signals of the same frequen : a )and (f,~f,), which may icles sent by the transmitter. Intermodulati i "erenlnearypresertinany part ec Maton noses inttoduced dve sommunication system, J EASY Pa 2020} Compute Newer: | 9 ADE re pandwidth and Channel Capacity Bandwidth of a medium decides the quality of the signal atthe other end. A digital signal (veya ‘bandwith from 0 to infty. So It needs a low-pass channel characteristic ae show 2 ic) requires @ channel characteristic is required for the transmission of ang n of analog Figure (a), On the other hand, @ band-p signals, as shown in Figure (b) . CO) ee eed [mo ° A r 1 Figure: (a) Low-passchannel characteristic required forthe transmission of lta signals (b) Bandpass channel characteristic requledfor the transmission of enalog sgnals ‘Nyquist Bit Rate ‘Themaximum rate at which data can be correctly communicated over a channel in presence of noise and distortion is known as its channel capacity. Consider frst a noise-free channel of Bandwidth B. Based on Nyquist formulation itis known that given a bandwidth B of a channel, the maximum data rate that can be carriedis 28, This limitation arises due to the effect of intersymbol interference caused by the frequency components higher than B. Ifthe signal consists of m discrete levels, then Nyquist theorem states: Maximum datarate C = 2B log, mbits/sec, Cis known as the channel capacity, where Bis the bandwidth of the channel and mis the number of signal levels used. Baud Rate The baud rate or Signaling rate is defined as the number of distinct symbols transmitted per second, lrrespective of the form of encoding. For baseband digital transmission m = 2. So, the maximum baud rate = 1/Element width (in Seconds) = 2B Bit Rate The bitrate or information rate Zis the actual equivalent number of bits transmitted per second. 1 = Baud Rate x Bits per Baud = Baud Rate xN = Baud Rate xlog,m For binary encoding, the bit rate and the baud rate are the same; ie., /= Baud Rate. Letus consider the telephone channel having bandwidth B = 4 kHz. Assuming determine channel capacity for the following encoding levels: (a) 2, and (b) 128. there is no noise, Solution: (@) C= 2B =2x 4000 = 8Kbits/s (be) C= 2x 4000 x log, 128 = 8000 x 7 = 56 Kbits/s Effects of Noise a. When here is noise prsentin the medium, theimtaions of both bandwith ancrcse must be conse A noise spike may cause a given level to be interpreted as a signal of greater level, iit isin positve P? ‘smaller level iit is negative phase. Noise becomes more problematic as the numberof levels increase®. fa} Scanned with CamScanner FS MADE cnn, 10 | Compusr teens & ‘Shannon Capacity (Nolsy Channel) ' Pe ‘ny prosence of Gaussian band-limited white noise, Shannon-Hartley theorem gives the m. ‘ate capacity C= Blog, (1 + SIN), ‘Signal to noise ratlo Is represented in dB (decibell). 100 ,9(8IN) 0 nels a ae antes orn power is dominating, where as -ve value of S/N fepresents noise wer ‘ve SE. Wane isis noise power, respectively atthe output ofthe channel. This tec gives wee ‘bound of the data rate which can be: feliably transmitted over a thermal-noise limited channey following signal-to-noise ratios: (a) 20 48, (b) 30 dB, (c) 40 4B, Solution: () C=Blo9,(1+ SN) (©) C=Blog, (1+smy © cs = 4% 10% loge (1 4 100) = 4 x 108 3:39 x = 4% 108 log, (1 + 1000) Blog, (1 + SIN) = 4x 108 2.004 = 266 kbits/s =4%10°x332x30= 398 kbitsle *1002(1 + 10000) = 4 108 332%4.0 = 534 Koitss channel has 8 = 4 KHz and a oi A-level encoding, A Solution: ‘The Nya Bit Rate for B= 4 kz and Mo 128 levels is 56 kbitss, Again the mtsrtn eat B= Wind SN alse ae ine The emallst ofthe two values decides the is} Scanned with CamScanner mADE ERSY OU 2020) Computer Networks lu Solution: oF ‘Nyquist Bit Rate to determine number of levels, C » 28 log, (M) Sey 16Dx 10" = 2x 20% 108 log, (Mi, o M-= 24 which means 4bite/baud, (b)_ Apply Shannon capacity to determine the S/N ratio C = B log? (1 + S/N), py 160 x 10% = 20 x 10 log, (1 + S/N) x 10" log, (M), o SN = 2°-1, of S/N= 255, a SIN = 24,07 4B, | Assuming ter ero rab ha madum of B= 4, daaming char | capacity for the encoding level 4, Seltion: T= 2% 4000 x log, 4 = 16 Kbps ‘Acchannel has B= 10 MHz, Determine the channel capacity for signalto- | noise ratio 60 dB. Solution: C= Bx log, (1 + SIN) = 10 x og, (1 + 60) ESE Te digital signals to bo designed to permit 56 kbps for a bandwidth of 4 kHz, Determine (a) number of levels and (b) S/N ratio, Solution: Nyquist bit rate 56 x 10° = 2x 4x 10° x og, M 7 = logM = M= 128 levels ‘Shannon capacity 56 = B x log (1 + SIN) $= 10?-1= 7008 1.5 Transmission of Signals The frst approach converts di ital data to digital signal, known as line coding, as shown in Figure. Important parameters those characteristics line ‘Coding techniques are mentioned below. Ay Distal signal Digital data sooo | te Ld \ Figure Unecoingto conver dgaldtato ctl sed Number. of Signal Levels This refers to the number values allowed in a signal, known as signal levels, to represent data. Figure (a) ‘whereas Figure (b) shows three signal levels to represent binary data. Bit Rate versus Baud Rate ‘The bitrate represents the number of bits sent Per second, whereas the baud rate defines the number of signal elements per second in the: Signal. Depending on the encoding technique used, baud rate may be more than or less than the data rate, ‘shows two signal levels, > Scanned with CamScanner 12 | Computer Science & IT La 1 Study Package BIBT] MADE Ep, et = y rate 4 1 ) ‘Figure: (a) Signalwith wovoltagelevels (b) Signalwith three voltage levels Line Coding Techniques {ine coding techniques can be broadly divided into three broad categories: Unipolar, Polar and Bipoly ‘8s shown in Figure, (ine Coan Unipolar] — [[Poiar Bipolar Figure: Threebasiccategoresoflincoding techniques Unipolar ‘unipolar encoding technique, only wo voltage levels are used. 't uses only one polarity of voltage level as shown in Figure. In this ‘encoding approach, the bit rate same as data rate. Unfortunately, DC 21 T component present in the encoded signal and there is loss of ol fb ‘Synchronization forlong sequences of Os and 1. tis simple but obsolete. aeCOteeO= "0 1 ‘Fgura: Unipolar encoding mth wo votoge ess Polar Polar encoding technique uses two voltage levels -one positive and the ‘encoding schemes shown in Figure under this category discusced below, [rez] (TR) [erates] tron ‘Figure: Encoding Schemesunderpolar category Non Return to Zero (NRZ) Saray aco ong a9) itowobs aia ey 1 +A ‘other one negative. Four different a Tmt = Ho Ferrante bt anc atin te ‘Nrnan hon raga vets coe aera Figure: NRZencoding scheme Scanned with CamScanner Eee 2020) Computer Networks | 13 ‘The most common and easiest way to tranemit digital signals is to use two difrent voltage level forthe wo tiny cits Usvely a negative volage is used 10 represent one binary valve and a postive votage to ort te other. The datais encoded asthe presence or absence ofa signal ranstion atthe begining othe (ope. As shown nthe igure below, in NRZ encoding, the signal level remains same throughout the bt period eee ae two encodnd echemes in NRZ: NRZ-L and NAZ-I, as shown in Figure. ‘The advantages of NAZ coding are «Detecting a transition in presence of noise is more reliable than to compare a value to a threshold. + NAZ codes are easy to engineer and it makes efficient use of bandwidth. Return to Zero RZ Jo ensure synchronization, there must be a signal transition in each bit as shown in Figure. Key characteristics of the RZ coding are: Three levels 1 0 1 “ep [Rta we Bit rate is double than that of data rate +A Node component Oo i Good synchronization “| I ‘Main limitation is the increase in bandwidth Figere: RZ. Biphase To overcome the limitations of NRZ encoding, biphase encoding techniques can be adopted. Manchester ‘end differential Manchester Coding are the two common Biphase techniques in use, as shown in Figure (a) & (b). In Manchester coding the mid-bit transition serves as a clocking mechanism and also as data. In the standard Manchester coding there is a transition at the middle of each bit period. A binary 1 corresponds to a /ow-to-high transition and a binary 0 to a high-to-/ow transition in the middle. In Differential ‘Manchester, inversion in the middle of each bit is used for synchronization. The encoding of ais represented by the presence of a transition both at the beginning and at the middle and 1 is represented by a transition only in the middle of the bit period. * NoDC component * Good synchronization * Higher bandwidth due to doubling of bit rate with respect to data rate The bandwidth required for biphase techniques are greater than that of NRZ techniques, but due tothe Predictable transition during each bit time, the receiver can synchronize properly on that transition. Biphase ae signals have no DC components. A Manchester code is now very popular and has been specified for ‘802.3 standard for base band coaxial cables and twisted pair CSMA/CD bus LANS. ae S Scanned with CamScanner Scanned with CamScanner Pee 2020} Computer Networks | 15 Machines read the IP adress as a stream of 32 bits. However, for human consumption, the IP writen in dotted decimal notation. » The 32-bit address is divided into 4 groups of 8 bits (an octet or a byte) + Each octet is written as a decimal number ranging from 0 to 266. + The decimal numbers are separated by periods, or dots, address BUF ot yi pontn0ci/00010-0-04-0-0°8'8 O08 8 V0 4 o Ce a) 10 For a given IP network... '* The network bits remain fixed and the host bits vary. ‘© Thenetwork address is the one that results when all the host bits are not set (the result of performing ‘an AND operation on the address and its mask). The broadcast address is the one that results when all the host bits are set, Host addresses are those that result with all remaining combinations of the host bits. Figure: Subnetting masking withthe help of router Scanned with CamScanner Postal Study Package Epi] Computer Networks 7 jetworks and Hosts ever an IP hosts ary device with an IP address, euch as a PC. + Mutple hosts reside ona gven IP network or subnet short for subnetwork), Subnet willbe ccusy sed later. + Agroup of IP networks san internetwork, with the largest internetwork being the internet + Whats typicaly cle “data network i technical an intemetwork, because mip P retvens are connected together by routers. + This internetwork contains 6 IP networks. ‘© Note that even a link between routers is a network, Determining Number of hosts in given network * Given that there are N host bits in an address, the number of hosts for that network ie 2% addresses are subtracted for the network address and the broadcast address, ‘© Bhost bits: 2°- 2 = 254 hosts + 1®host bits: 2"°— 2 = 65534 hosts + 2shost bits: 2&2 = 16777214 hosts -2.Two Public IP Addresses + Most|P addresses are public addresses. Public addresses are registered as belonging toa specific organization. * Internet Service Providers (ISP) and extremely large organizations in the U.S. obtains blocks of public addresses from the American Registry for Internet Numbers (ARIN http:Jlrwwarin.nel). Other ‘organizations obtain public addresses from their ISPs. * There are ARIN counterparts in other parts of the world, and allof these regional registration authorities 4are subjectto the global Internet Assigned Numbers Authority (IANA http:/wwiana.org). * Public IP addresses are routed across the Internet, so that hosts with public addresses may freely communicate with one another globally, ‘+ Noorganization is permitted use public addresses that are not registered with that organization! Private Addresses RFC 1918 designates the following as private addresses. * Class A range: 10.0.0.0 through 10.255.255.255, * Class B range: 172.16.0,0 through 172.31,255.255, * Class C range: 192. 168.0.0 through 192.168.255.255. Private addresses may be used by any organization, without any requirement for registration. Because private addresses are ambiguous - can't tell where they're coming from or going to because ‘anyone can use them - private addresses are not permitted to be routed across the Internet. * ISPs block private addresses from being routed across thelr infrastructure. Scanned with CamScanner Scanned with CamScanner Ree nave EASY mane pobieions Computer Networks | 19 1.7. Subnetting Subnot masks aro Ubed 10 make olaselul networks more managonblo and ei suns and reucing the number of ho Auldronson por subnet to what la actualy requiey’ oes aamalir wae bene ited, Subnat masks worg Default Mask ana Subnet Mask Dott Mask 286-2800 ‘Patton > Neher na (a) Without subnetting Subnet Mask 265,265,192.0 ‘Paste Network doe (©) wn subneting Example: Tako class A network 10,0.0.0 with network mask 256.0.0 0. + Add additional 8 subnt bits to network mask + New subnet mask is 255.255.0.0, © New subnets are 10.0.0. 10.1.0.0, 10.2.0. and so on with 65594 host addresses per subnet. Sill 00 many hosts per subnet. Take class A network 10.0.0.0 with network mask 255.0.0.0, ‘Add additional 16 subnet bits to network mask. New subnet mask!s 255,255.255.0 New subnets are 10.0000, 10.0.1.0, 10.2.0... 10,1.00, 10.110, 10.1,20..102.00, 102,10, 10229, ‘and s0 on with 254 host addresses per subnet, Example rie class B network 172,16.0.0 with network mask 255,255.00. Add adional 8 suet bis © network mask. ‘© New subnet mask is 255,255.256.0 «New subnets are 172,16.0.0, 172.16.1.0, 172.1 ‘As shown in these examplot ® Aclass A network can be subnetted to create 266 (2) /16 subnets ®Aclass A network can be subnetted to create 65536 (2') /24 subnets © Aclass B network can be subnetted to oreali 256 (2) /24 subnets. 16.2.0, and so on wth 254 host addresses Per subnet Scanned with CamScanner Scanned with CamScanner maApE ensy Postal Study Package BLpI) Computer Networks | 21 * _ Athough the term supernetis used inthis tutorial to explain CIDR, this terms not commonly used in casual communication. Instead, most will simply use the term network. F Route table rectly connected to networks C and D to get to networks A and B, forward o router X Goto networks E and F, forward to router 2 * Hosts P and Q (@) Hosts P and Q have only one way to get off their networks, router connected to their respective networks. (©) These hosts each have a default route to a default gateway-router X or Z. © Router x ‘and that is to forward traffic to the (@) Router X has interfaces directly connected to networks A, between these networks w/o additional configurations. (©) This router has onty one option to get to other networks, and that i to forward trafic to router Y, So ithas a default route to router Y. * Router Z B, and C, so it can route traffic (@) Router Zhas interfaces directly connected tonetworks D, E, and F, soitcan route trafic between these networks w/o additional configurations. (0) This router has only one option to getto other networks, and that isto forward trafic to router . So it has a default route to router Y. + Router Y (2) Router Y automatically knows how to route trafic between networks C and D. (0) To getto networks A and B, this router forwards trafic to router X. (¢) To.getto networks E and F, this router forwards traffic to router 2. (6) One of these routes could be made the default route, 3 Scanned with CamScanner MADE Ep, (2) — Sy 22 | Computer Science & IT } Same Routing with IP addresses ‘destination mask gateway nooo 0172.16.01 172.1600 30 connected 472.1604 130 connected 392.16840 (24 172.1605 302070 (24 172.1605 ‘destination mask gateway 0000 0 1721601 192.1684.0 124 connected 10207.0 24 connected 172.16.04 130 connected | 192.1684,0724 192,168.2.008 ret — 10208.0724 10205.024 host a eatoation ‘gateway ination mask ‘+ _ Inthe preceding diagram, the network could not have worked with classful routing, * Without subnet masks, router Y would have a route to class Anetwork 10.1.1.1 via gateway 172.1605, {@) This would result in all 10.x.x.x packets that traverse router Y, being forwarded to router Z. (0) Forexample, router Z would forward destination 10.20.5.x packets to router Y, and router Y woule return them to router Z. (©) This's because router ¥ has no way to distinguish between 10.20.5.0 and 10.20.4.0 without: subnet mask. (9) Destination 10.20.5.x packets within router X-that i be affected by this phenomenon. =a ‘What is the subnetwork address if the destination address le 200.45.34.56 ‘and the subnet mask is 255.255.240.07 is, those sourced from 192.168.2.x - would ne Solution: 200 45 34 56 11001000 (00101101 0100010 00111000 49090111 19999911 1111 9000 90000000 11001000 00101101 00100000 00000000 The subnet work address is 200.45.32.0 company is x subnets of 25 host each. Desi Solution: Granted the site address 201.70.6 ign the subnets, 4.0 (class C). The company The total number of Os is 5 (32 - 27). The mask is iad 19999994 49999914 11100000 or 255.255.255.224 Pesos mee et Scanned with CamScanner MADE EASY Postal Study Package Ply) Computer Networks | 23 the number of subnets theoretically is 8. But Practically only 6 subnets are possible, (All 1's and all O's in subnet Id bits because they are Direct Broad Cast address and Network Id respectively), The subnets are 201 70 64 11001001 01000110 01000000 [000] 00000 Network Id (201.70,64.0) 41001001 01000110 01000000 {001J00000 +4" Subnet ID 201,70.64.32 17001001 01000110 01000000 [010]00000 24 subnet ID 201.70.64.64 11001001 01000110 01000000 [011]00000 3" subnet ID 201.70.64.96 11001001 01000110 01000000 [100]00000 —_4"" subnet ID 201.70.64.128 17001001 01000110 01000000 [101]00000 5" subnet Id 201.70.64.160 17001001 .01000110 01000000 [110}00000 6" subnet 1D 201.70.64.224 17001001 01000110 01000000 [111]00000 [111] cannot be used as subnet id because in last octet all 1's is used as DBA (direct broadcast address) ofthe network 201.70.64.0 i.e. 19111111 11111111 11111111 [111]11111 Is DBA of the network. ‘The number of addresses in each subnet is 25 (5 is the number of Os) or 32, A company is granted the site address 181.56.0.0 needs 1000 subnets. What is the DBA of the first subnet? Solution: (class B), The company ‘The company needs 1000 subnets. We need 10 bits to represent those 1000 subnets, ‘The total number of 1s in the subnet mask is 26 (16 + 10). Six Therefore we can have 25-2 hosts. (All 1's in host bits rep Network ID (181.56.0.0) ‘The MASK for these subnets is VN 11111117 19191111 11000000 ~—_181.56.255.192 ‘The first subnet ID is 10110101 90111000 90000000 01000000 ~—181.56.0.64 ‘The first host of first subnet is 10110101 09111000 00000000 01000001 ~—_—181.56065 2 host forio101 00111000 90000000 o1000010 ow ~—181.56.0.66. DBA (direct broadcast address) of first subnet 10110101 00111000 op000000 01111111 181.56.0.127 ‘The number of subnets is 1024 and the number of addresses in each subnets 26 (Gis the number of 0s) or 64, ay ‘Acompany is granted the site address 181.56,0.0 (class B). The company needs 1000 subnets. What is the DBA of the 4th subnet? Solution; 4 subnet id is 10110101 90111000 90000001 00000000 —181.56.10 DBA of 4 subnet (all host bits 1's) is Tor10101 00111000 G0000001 0111111 181.56.1.63 are left for host bits, present DBA and all 0's would be the case of iS Scanned with CamScanner home 24 | Computer Science & IT Postal Study Package BLP) MADE Ensy Which ofthe following can be used as both source IP a8 well as dostinayo, IP (a) 192.168.11.255 (b) 143.18.255.255 (c) 255.255.255.255 (d) 19.19.19.25 Solution: (a) NO it cannot be used as source IP as it is aDBA (direct broadcast address) (b) NO itis DBA (©) NOitis Limited broadcast address and it cannot be used as source (@)_ YES itcan be used as both source and destination IP Identify which of the following IP's belong to same subnet. Given subnoi mask is 255.255.255.240? (a) 207.19.96.58 (b) 207.19.36.75 (c) 207.19.36.89 (8) 207.19.36.97 (@) None of them Solution: (e) 240 (11110000) first four bits of last octet are subnet bits. If first 4 bits match then they both belong / to'same subnet 58-00111010 bm 75-01001011 89-01011001 97-01110001 None of them belong to same subnet. ‘A company needs 600 addresses. Which of the following set of class C blocks can be used to form a supernet for this company? (a) 198.47.32.0 198.47.33.0 _198.47.50.0 (b) 198.47.32.0 198.47.42.0 198.47.52.0 _198.47.62.0 (C) 198.47.31.0 198.47.32.0 — 198.47.33.0 _198.47.52.0 (d) 198.47.32.0 198.47.33.0 198.47.34.0 _198.47.35.0 Solution: (d) In order to combine networks into a single Network (super netting) the networks must be continuous and number of networks to be combined should be powers of 2. [EEEEBETAT We need to make a supemetwork out of 16 clase © blocks. What is the supernet mask? Solution: We need 16 blocks. For 16 blocks we need to change four 1s to 0s in the default mask. So the mas is 11111111 11111111 11110000 00000000 or 255.255.240.0 Publiostone Scanned with CamScanner MADE ERSY Se od 2020) Computer Networks | 25 A supernet has a first address of 205.16.32.0 and @ supernet mask of |] 255.255.248.0. A router receives three packets with the following destination addresses: 205.16.37.44, 205.16.42.56 and 205.17.33.76 Which packet belongs to the supernet? Solution: We apply the supemet mask to see if we can find the beginning address (205.16.37.44 AND 255.255.248.0 => 205.16.32.0 205.16.42.56 AND 255.255.248.0 => 205.16.40.0 205.17.33.76 AND 255.255.248.0 => 205.17.32.0 ‘Oniy the first address belongs to this supernet. FEES 4 suvernet has a frst address of 205 16.520 anda ‘Supernet mask of | 255.258.248.0. How many blocks are in this supernet and what is the range of addresses? Solution: ‘Thesupemethas 21 1s, The default maskhas 24 1s. Since the difference is 3 there are 29 in this supemet. The blocks are 205. 16.32.0 to 205.1639. adress is 205.16.39.255. EEEREEI rien ofthe otowing can be the beginning address of a block that contains | 18 addresses? (@) 123.45.24.52 (©) 17.17.33.80 (©) 190.16.42.44 (©) 205.16.37.32 Solution: ‘The condition on the number of addresses in a block; it must be a power of 2(2, 4,8.) ‘The beginning address must be evenly divisible by the numberof addresses. For example, ra block contains 4 addresses, the beginning address must be divisible by 4 | ithe block has less than 256 addresses, we need to check only the rightmost byt. ithas less than | £5,536 addresses, we need to check only the two rightmost bytes, and so on, ‘The address 205.16.37.32is eligible because 32s divisible by 16. The address 17.17 33.80iseigibie | because 80 is divisible by 16. Ear Which of the following can be the beginning address of a biock that contains 1024 addresses? (a) 205.16.37.32 (0) 190.16.42.0 (©) 17.17.32.0 (6) 123.45.24.52 Solution: (e) Tobe divisible by 1024, the rightmost byt ofan address should be 0 and the second rightmost byte ‘must be divisible by 4. Only the address 17,17,92.0 meets this condition, ‘or 8 blocks | 0. The first address is 205.16.32.0. The last. MADE EASY 7 mples [3 Psion Scanned with CamScanner MADE Eng, 26 | Computer Science & IT : ‘K emall organization is given a block with the beginning address ang jh "37.24/29 (in slash notation). What is the range of the block? prefix length 205. ution: & begining address is 25.16 37.24 To find the last address we keep the frst 29 bits and change the last 3 bits to 18, Beginning: 11001111 00010000 00100101 00011000 0011114 Ending: 41001111 00010000 00100101 ‘There are only 8 addresses in this block Gane What is the network address if one of the addresses is 167.199.170.82/27) Solution: ‘The prefixlength is 27, which means that we must keep the first 27 bits as is and change the remaining bits (6) 100s. The 5 bits affect only the last byte. The last byte is 01010010. Changing the last 5 bits to 1, we get 01000000 or 64. The network address is 167, 199.170.64/27. ‘AnISP is granted a block of addresses starting with 190.100.0.0/16. The isP_ needs to distribute these addresses to three groups of customers as follows: {@) The first group has 64 customers; each needs 256 addresses. (b) The second group has 128 customers; each needs 128 addresses. (©) The thitd group has 128 customers; each needs 64 addresses. Design the sub biocks and give the slash notation for each sub block. Find out how many ‘addresses are still available after these allocations. Solution: Group 1 For this group, each customer needs 256 addresses. This means the suffix length is 8 (28 = 256). The prefix length is then 32-8 = 24, 01; 190.100.0.9/24 => 190,100.0.255/24 02: 190,100.1.0/24 => 190.100.1.255/24. And s0 on up to 64: 190,100.63.0/24 = 190.100.63,255/24 Total = 64 x 256 = 16,984 Group 2 For this group, each customer needs 128 addresses, This means the Suffix lengths 7 (27 = 128). The Prefix length is then 32-7 = 25, The addresses are: 001; 190.100.864.025 = 190.100.64.127/25 002: 190.100.64.128/25 = 190.100.64,255/25, 003: 190.100.127.128/25 = 190,100.127,255/25 Total = 128 x 128 = 16,384 Scanned with CamScanner MADE EASY 220) Computer Networks | 27 Group 3 | For this group, each customer needs 64 addresses. This moans the sutfix length is 6 (2° = 64). The | prefix length is then 32 - 6 = 26. | 001:190.100,128.0/26 =» 190.100,128.63/26 002:190.100.128,64/26 =» 190,100.128, 127/26... And so on up to 428: 190.100.159.192/26 => 190.100.159.255/26 Total = 128 x 64 = 8,192 | Number of granted, allocated and availabe addresses ae 65,596, 40,960 and24,576,espectvely | 1.9 Network Address Translation (NAT) \With the increasing number of internet users requiring an unique IP address for each host, there is an ‘acute shortage of IP addresses (until everybody moves to IPV6). The Network Address Translation (NAT) approach is a quick interim solution to this problem. NAT allows a large set of IP addresses to be used in an internal (private) network and a handful of addresses to be used for the external internet. The internet authorities has set aside three sets of addresses to be used as private addresses as shown in Table. It may be noted that these ‘addresses can be reused within aifferent internal networks simultaneously, which in effect has helped to increase the lifespan of the IPV4. However, to make use of the concept, itis necessary to have a router to perform the operation of address translation between the private network and the internet. As shown in Figure, the NAT router maintains @ table with a pair of entries for private and interet address. The source address of all outgoing ‘packets passing through the NAT router gets replaced by an internet address based on table look up. Similarly, the destination address of all incoming packets passing through the NAT router gets replaced by the corresponding private address, as shown in the figure. The NAT can use a pool of internet addresses to have internet access by 2 limited number of stations of the private network at a time, Range of addresses Total number 70000 to 10255.258.255 ra T2760 WAI 2 FW2T6800 12 102,108 255285 Fu ‘Addresses fr Private Network Destination “Translation Table Privato_[_intomat 72.19.21] 200.19.8.2 Figure: NATAddresstranslation MADE EASY cs Scanned with CamScanner = Scanned with CamScanner (FP (ome |_____ 0.1. A researcher wishes to digitally record analog sounds tor oeting animal hearing with frequencies ‘of up to 100 {KHz}. Use Shannon's formula to {ind the minimum signal to noise ratio (in JB!) required to sustain the given data rate over 1500 KHz radio channel &) 18 @) 195 fora Router, Medium Access Control, Repeater and FTP is (a) Network, Data link, Application and Physical (b) Physical, Data Link, Session and Transport (0) Network, Data Link, Physical and Application (@) Presentation, Network, Transport and ‘Which of the following statement is correct with reepect to Half Duplex communication? (@) Error correction is not possible (0) Aways a pair of physical links is necessary (6) Two connections can be used for sending ‘and receiving data (6) Itcannot be used in broadcast networks (8) The Internet protocol (IP) address, (b) The physical (MAC) address (6) The address resolution protocol (ARP) ‘The data link layer is responsible for (a) Flow control (b) Error contol (©) Access control (4) All ofthese Computer Networks | 29 2.7 The topology with highest pee is (a) BUS (b) ST (©) RING @ Wot ‘Tranoport layer is responsible for (8) node-to-node delivery (b) end-to-end delivery (0) station-to-station delivery (6) network-to-network delivery Which network topologies degrades most gracefully in high network load situations? (@) Ring (©) Star (c) Mesh (@) Bus Q.10 Youhave been asked to wire a conference room with six computers for a demonstration tomorrow. Itneeds be done as quickly and with the lowest possible expense. What network topology is best suited to this situation? (@) Star (b) Ring (©) Mesh () Bus Q.11 Which layer is responsible for data translating? (@) Application (b) Network (©) Presentation (0) Datalink Q.12 Which one is the least expensive that can ‘support 100 Mbps? (a) Coaxial (o) UTP (C) Fiberoptic (d) STP Q.13 With the use of which of the following device(s) and cables can a LAN based on star topology be setup? (@) Router (b) Bridge (c) Switch (¢) Repeater Q.14 Identity the unequal pair(s). (@) Physical Address ~ MAC Address (b) IP Address ~ Logical Address (c) Ethernet - IEEE 802.4 (d) Serial port-COM1 Q.16 Inatopology, if here are n devices in a network, each device has n—1 ports for cables. Identify it (@) Mesh (b) Star (©) Ring () Bus RR on ens TERT fn topology with n devices and halt Tibi he tba 6050 ay new inks are needed. (@n-1 nes )n (d) 2n 17 Match List| (Function) with Lit-ll (Layer) and select the correct answer using the codes given below the lists List-1 ‘A. Reassembly of packets B. Responsibility for delivery between adjacent nodes C. Mechanical electrical and functional interface D. Error correction and retransmission Listel 9-19 Match List! with Lista and answer using the cod List-1 A. Data link layer 8. Physical layer C. Presentation layer D. Network layer List-I1 1. The lowest Ja activate, deacti between DTE® Select the correct 8 given below the lists: yer whose function is to "vate and maintain the circ it OCE - ee ered 2020] Q.25 Ifthe Value of si Oe Be, 2. Performs routing and communic 9, Detection and recovery from o, transmitted data Pe 4. Provides for the syntax of the data Codes: Ree 5) Dp aeoeet e @ 2 1 4 3 C4, 4 2g ea az oh eg (0.20 The header added by the transport layer Packet coming from the upper layer include, (@) Logical address (©) Services-point address (©) Physical address (A) Network address Q.21 Ifthere aren devices (nodes) in a network isthe number of cable links required for a, and a star topology respectively, @ nn-1 (©) n-1)2, n~+ © n-4.n ©) 1-4, r(n— 12 layer protocol hierarchy ‘ate messages of lengin he layers, an h-byte heade: ractions of the networs with headers? (b) hni(M + nh) (8) 1~(nhimy What mesh Q.22 A system has an | Applications gener: Mbytes. Ateach of is added. What f bandwidth is filled (@) him (©) nhim (@) Logical, port (©) Logical, network (©) Logical, physical (2) Physical, logical (a) Message ‘Switching (b) Circuit: switching (o) Packet switching (2) Circular switching 'gnal changes over a very shot Span of time, it's frequency is (@) Short (b) Low (c) High (d)_ Long Scanned with CamScanner Scanned with CamScanner Scanned with CamScanner mADE aaEe Postal Study Package BLD) ‘Computer Networks | 33 2.2 Protocol Layering ‘There are several advantages of protocol layering, 1, Protocol layering enables us to divide a complex task into several smaller simpler tasks. This is referred to as modularity. 2. Itallows to separate the services from the implementation, 3._Itermediate systems need only some layers but not all layers. Protocol layering helps us in designing the system or devices with required number of layers implemented in it. ‘Application A ‘Application B propteatoy Peer-to-peer [Application] Layer Transport Peer-to-peer rani ee ‘Communication Network Layer Nemo [ptt Navn son Nahar ter Reno > |_baver Layer aan [er Da po tr Da Physical [PoP Physical [SP Physical Physical Layer [S$ *|_Layer_ [S| tayer_ [> |_ Layer pee ge (OSilayer vs TCP/IP layer ‘35 (Span System nwreonnecton). TEP (ranamissionGonrl Protocol ema retocal ~ O51 pode layer fielon an lo dees tncion of |» TCPIP model te tareport lye oes ot guaaress sie diver epoca ~ INOS model rarepa layer guaraies te avery [> Felows vera ape Seow + Foiowsnerzortaleprcech = TOPIP does othave a separate pesraton yer + OS! mel has a separate resort lye + TPIP adel anette vedin any abr epleaton ~ OStis a general model = The network ayer TCPIP mal proves conecteries sevens ~ Relat ayr of O8\ model prove bah connection | » TOPAP model doe et any poco ‘ered at connects soe. 7 Pratocls we heen in OS adel and we esky | » nTOPAP oplacng praca rl oa ‘eles os oeiogy ranges ~ 0S) mace! defines serves ntertces and protocols | » in TOPIP Wi ol Gea spared is wenices, very ery ard makes ear daincuonbetween rer |” nflaces andprotcl thas yee = Ras Saye ‘The Open Systems Interconnection (OS!) modelis a standard “reference model" created by the international Organization for Standardization (ISO) to describe how the different software and hardware components involved ina network communication should divide labor and interact with one another. !tdefines a sever-layer set of functional elements, ranging from the physical interconnections at Layer 1 (also known as the physical layer, or PHY interface) all the way up to Layer 7, the application layer. The Transmission Control Protocol (TCP) and the Internet Protocol (IP) are two of the network standards that define the Internet. IP defines how computers can get data to each other aver a routed, interconnected set of networks. TOP defines how applications can create reliable channels of communication across such a network. Basically IP defines addressing and routing, while TOP defines how tohave a conversation across the link without garbling or MADE ERSU 3 Scanned with CamScanner mr 34 | Computer Science & IT SOE Ene, Josing data. TCP/IP grew out of research by the U.S. Dept. of Defense and is based on a loose ater than approach to layering, Many other key Internet protocols, such as the Hypertext Transfer Pro tocol (Tp Proloco (SMTP), the core emailtanster proto hs ‘basic protocol ofthe Web, and the Simple Mail Transfer Hoe ‘ontop of TCP, The User Datagram Protocol (UDP), a companion to TCP, sacrifices the: guarantees of raja iY ha returr fi ‘communications, uf os a Parsaiy to the OSI model, since it was developed betore the Osi Mode! ang ag {esigned to solve a spectc set of problems, not to be a general description forall network communi. fone ‘1SOI0SI Model ‘Sample Protocols Devices co mn ae ive Contr Serie Suter $_Frwrston a Layer? Suchen | |e_frveeten 5 Sesion eicaion < 4 _Trrepe e | = | 3_Newok [Tapa Tor ube ai Lae Swen | 2_Daaune [newer 1 I, IGUP. PX —— Pre ‘ar oe Eri] bs. Ropanon a Ge Token Ring, FOO! some lances na CF Proce! suite because it was completed vihen TOPIP was flyin Place and beca.s: ‘some layers in the OSI model were never fully defined, ‘Similarities between OSi Model and TCP/IP Model J, Bothot hem use alayered architecture to exp Each layer performs well-defined function: Similar types of protocols are used in bath models OS! and TCP/IP reference models are open in nature. Both models give @ good explanation on how vatous ypes of network hardware and software interac {during a data communication process, Data hiding principe is well maintained on each layer inthe tm Gelails of each layer are not revealed to other layers ‘Tanspor layer defines enc-end data communication process and leToF-correction techniques in bh the models, OSI and TCP/IP reference models process data in th Encapsulation and Decapsulation Messages generated by ‘below it Information that is e Called as ‘header. lain data communication process in computer networks 'sin both models, peer #0 Models. The core level functional 7. 8 ¥e form of packets to periorm routing. application are encapsulated by every layer before passing on tothe le noapsulated where is from layer-to-layer. This encapsulated information s a=? Data link ayer includes the MAC address information, eror control, error detection, error coecons¢ other useful information, Scanned with CamScanner Data Flow Communication between two devices can be simplex, half-duplex, or full-duplex. (@) Simplex: n simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two devices on a link can transmit; the other can only receive. Example: Keyboards and Traditional Monitors. (©) Half-Duplex: In half-duplex, each station can both transmit and receive, but net atthe same time When one device is sending, the other can only receive, and vice versa. Example: Walkie-talkies and Citizen band (CB) Radio. (©) Full-Duplex: In fuil-duplex, both stations can transmit an Example: Telephone networks. ‘The simplex mode can use the entire capacity of the channel to send data in one direction. The halt Suplex mode is used in cases where there is no need for communication in both direction at the same timo, the entire capacity of the channel can be utilized for each direction. ‘Thefull-duplex mode is used when communication in both directions is required allthe time. The capacity | ofthe channel, however, must be divided between the two directions. Network Topologies (@) Mesh Topology: In mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the link carries traffic only between the two devices it connects. ‘Node 1 must be connected to n— 1 nodes, node 2 must be connected to n— 1 nodes, and finally node n must be connected to n- 1 nodes. Hence in total we need n(n 1) physical links. Every node ‘must have n—1 input/output (1/0) ports, (©) Star Topology: In a start topology, each device has a dedicated point-to-point link only to a central controller, usually called a hub. The devices are not directly linked to one another. Unlike a mesh t topology, a star topology does not allow direct traffic between devices. Ina star, each device needs | ‘only one link and one /O port to connect ito any number of others. i (©) Bus Topology: A bus topology is multipoint. One long cable acts as backbone 10 lnk af he | devices in a network. A drop lines @ connection running between the device andthe main cae, (6) Ring Topology: In a ring topology, each device has a dedicated point-to-point connection t direction, trom device to the two devices on either side of it. A signal is passed along the ring in on Pach deuce device, until it reaches its destination, Each device in the ring incorporates a repeater. is linked to only its immediate neighbours. \d receive simultaneously. Scanned with CamScanner 36 | Computer Science & Mane Ens, 2.3 Circuit-Switched Acircult-switched network consists of a set of switches conn i ‘network is made of a set of switches connected by physical links, in Circuit switching takes place at the physical layer. Before make a reservation for the resources to be used during the communi (bandwidth in FOM and time siots in TOM), j ‘must remain dedicated during the entire d Data transferred between the two | data are a continuous flow sent be periods of silence. Thereisno addressing ‘band (FDM) or time slot (TDM), see shortly, In circuit switching, ‘dedicated for the entire durati lected by physical inks. A circu Swit which each linkis divided ints..." Starting communication, ication. These re Switch buffers, switch processing time, and switch input uration of data transfer until the teardow m phase. Stations are not packetized (physical layer transter of the signal 1), ]onstation, although theres, ton ch, the stations m SOUICES, SUCH as chan, ua Put pon by the source station and received by the destinati (Grolved during data transfer. The switches route the data based on their occupy Of course, there is end-to-end addressing used luring the setup phase, as we ys original message, 3. Most modern Wide Area Networ it . Including TEP/IP, x.25, Pased on packet-switching technologies = —"" Incontrast, normal tele line is allocated fort &. Circult-switching is ideal when data muet be € transmit ee Med quickty and must arve in the same or 4, Computer Networks | 37 Propagation dolay: itis tho immo akon by 1 bilWo Vaverda Wo NR Pye dV. Tranamiselon dolay: Tho timo takon to push tho ont frame into tho wo ty= LB. Quouing dolay: Time for which packet stays in tho bur is callod quouing del Prooassing dolay: Tho timo routor akes to process tho packot header {6 called ‘processing delay’, Protocol layering onables us to divide a complox task Into several smaller ‘simpler tasks, OS! layer has 7 layer i.0,, Applicaton, Presentation, Session, Tranaport Network, Data Link and Physical layer. TCPIIP has § layer .e., Application, Transport, Network, Data Link and Physical layer, Messages generated by application are encapsulated by every layer before passing ‘nto the layer below it. ‘The TCP header informatio includes the port address, Ack information, checksum and other Useful information, ‘The network layer header includes source and destination IP address, header ‘checksum, fragmentation information and other useful information, Data link layer includes the MAC address information, error contro, error. detection, error correction and other useful information, In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two devices on alink can transmit; the other can only receive, \n half-duplex, each station can both transmit and receive, but not atthe same tine, ‘When one device is sending, the other can only receive, and vice versa, 'n fulrcuplex, both stations can tranemit and receive simultaneously. In mesh topology, every device has a dedicated point-to-point ink to every other device. Ina start topology, each device has a dedicated point-to-point lnk only to a central controller, usually called a hub. ‘Abus topology is multipoint. One long cable acts as backbone tolink all the devices in anetwork, !n.aring topology, each device has a dedicated point-to-point connection with only the two devices on either side of it. Acircuit-switched network consists ofa set of switches connected by physical links. Acitcuit-switched network has three phase: (1) Setup phase (2) Data-transfer phase: and (3) Teardown phase, {In Packet Switching messages are divided into packets before they are sent. Each Packet is then transmitted individually and can even follow different routes to its ‘destination, Scanned with CamScanner MAC Sublayer a 3.1 Introduction Communication atthe data ink layer is node-to-node, The datalink layer, provides services to the network lever I receives services from the physical layer The scope of the data hn layer Is node-to-node. When a packet i traveling in the Intemet, the data link layer of a node (host or outer) is responsible for delivering a ‘datagram to the next node in the path, We encapsulate and decaps which is encapsulated by frame. TOPIP model did not define any protocol or data link layer and physical layer. Therefore we can define ‘our on protocol for data link and physical layer Link layer Addressing ‘The source and destination I Should pass through. A link-layer a ‘and sometimes a MAC adaress, When a datagram passes from the network layer to the data-ink layer, the datagram willbe encapsulated inatrame and two data-ink addresses are added to the rame header These two addresses are changed every {ime the frame moves from one link to another, sulate at each node because IP address information is prosont in packet, Ip addresses define the two ends b Ut Cannot define which links the datagram iddress is sometimes called a link ‘address, sometimes a physical address, "NOTEIMAG adresses are represen using 48 bits ‘Types of Addresses Unicast address: Each host or each interface ofa router is. assigned a unicast address. A frame ‘with @ unicast address destination is destined only for one entity inthe link, AS: 34: 2 92: FY Multicasting means one-to-many communication, AQ: 34: 45: 11 & Broadoast address: irame with a destinations broadcast address 's Sent to all entities in the link, FF: FF: : FF (12 hexadecimal digits separated by a colons). 2. Multicast address: 3 Scanned with CamScanner 40 | Computer Science & IT 3.2. Data Link Layer Functions Concerned with reliable, error-free and effi through the following functions: Data Framing Theterm data bits toffrom the physical layer into discre' Framing method ‘* Character count © Starting and ending characters, with character stuffing, Starting and ending flags with bit-stuffing, = Physical layer coding violations. strame" refers toa small block of data used in a specific network. The data link i te frames with error detection/correction code bits a Error Detection/Correction Error detection: Include enough redundant information in each frame to allow the receiver to deduce that an err ‘occurred, and to request a retransmission. ‘+ Uses error-detecting codes. Error correction: © Include redundant information in the transmitted frame to enable the receiver not only to dedus ‘an error has occurred but also correct the error. ‘© Useserror-correcting codes. Services to the Network Layer Unacknowiedged connectionless service - best effort: ‘The receiver does not return acknowledgments to the sender, so the sender has no way of knowing frame has been successfully delivered. i ‘When would such a service be appropriate? (@ When high layers can recover from errors with litle loss in performance. That is, when errors are: infrequent that there is litle to be gained by the data link layer performing the recovery. Its just easy to have higher layers deal with occasional lost packets. (0) Independent frames sent without having the destination acknowledge them. (©) For real-time applications requiring “better never than late" semantics. Old data may be worse th ‘no data. For example, should an airplane bother calculating the proper wing flap angle using od attitude and wind speed data when newer data is already available?. Also used in real time applical such as speech video etc. ‘Acknowledged connection-less service-acknowledged delivery: * The receiver returns an acknowledgment frame to the sender indicating that a data frame was prope’ received. * Likewise, the receiver may hand received frames to higher layers in the order in which they artiv® regardless of the original sending order, * Typically, each frame is assigned a unique sequence number, which the receiver returns in 6” ‘acknowledgment frame to indicate which frame the ACK refers to, The sender must retrans™ unacknowledged (e.g, lost or damaged) frames, vs Scanned with CamScanner

You might also like