computer science engineering : computer networks, the gate academy
DESCRIPTION
THE GATE ACADEMY's GATE Correspondence Materials consist of complete GATE syllabus in the form of booklets with theory, solved examples, model tests, formulae and questions in various levels of difficulty in all the topics of the syllabus. The material is designed in such a way that it has proven to be an ideal material in-terms of an accurate and efficient preparation for GATE. Quick Refresher Guide : is especially developed for the students, for their quick revision of concepts preparing for GATE examination. Also get 1 All India Mock Tests with results including Rank,Percentile,detailed performance analysis and with video solutions GATE QUESTION BANK : is a topic-wise and subject wise collection of previous year GATE questions ( 2001 β 2013). Also get 1 All India Mock Tests with results including Rank,Percentile,detailed performance analysis and with video solutions Bangalore Head Office: THE GATE ACADEMY # 74, Keshava Krupa(Third floor), 30th Cross, 10th Main, Jayanagar 4th block, Bangalore- 560011 E-Mail: [email protected] Ph: 080-61766222TRANSCRIPT
CCoommppuutteerr NNeettwwoorrkkss
ffoorr
CCoommppuutteerr SScciieennccee && IInnffoorrmmaattiioonn TTeecchhnnoollooggyy
By
www.thegateacademy.com
Syllabus Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, KeshavaKrupa (third Floor), 30th Cross, 10th Main, Jayanagar 4th Block, Bangalore-11
: 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com
Syllabus for Computer Networks
ISO/OSI stack, LAN technologies (Ethernet, Token ring), Flow and error control techniques,
Routing algorithms, Congestion control, TCP/UDP and sockets, IP(v4), Application layer
protocols (ICMP, DNS, SMTP, POP, FTP, HTTP); Basic concepts of hubs, switches, gateways, and
routers.
Analysis of GATE Papers
(Computer Network)
Year Percentage of marks Overall Percentage
2013 7.00
6.513 %
2012 9.00
2011 3.00
2010 8.00
2009 3.33
2008 6.00
2007 9.33
2006 7.33
2005 6.00
2004 7.33
2003 5.33
Contents Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page i
CC OO NN TT EE NN TT SS
CChhaapptteerrss PPaaggee NNoo
##11 IInnttrroodduuccttiioonn 11 ββ 3322
CCoommppuutteerr NNeettwwoorrkk 11
GGooaallss// AAddvvaannttaaggeess ooff NNeettwwoorrkkiinngg 11 ββ 33
CCoommppoonneennttss ooff NNeettwwoorrkk 33
CCrriitteerriiaa ooff aa NNeettwwoorrkk 33
CCllaassssiiffiiccaattiioonn ooff aa NNeettwwoorrkk 33
TTyyppeess ooff NNeettwwoorrkk CCoonnnneeccttiioonn 44
NNeettwwoorrkk TTooppoollooggyy 44 ββ 66
TTrraannssmmiissssiioonn MMooddeess 66 ββ 77
DDaattaa aanndd DDaattaa CCoommmmuunniiccaattiioonn 77
TThhee MMooddeell 77 ββ 2200
NNeettwwoorrkkss CCoonnnneeccttiinngg DDeevviicceess 2200 ββ 2244
AAssssiiggnnmmeenntt 11 2255 ββ 2288
AAssssiiggnnmmeenntt 22 2299
AAnnsswweerr KKeeyyss 3300
EExxppllaannaattiioonnss 3300 ββ 3322
##22 PPhhyyssiiccaall LLaayyeerrss ((DDaattaa rraattee,, DDiiggiittaall ttrraannssmmiissssiioonn)) 3333 ββ 4477
IInnttrroodduuccttiioonn 3333
TTrraannssmmiissssiioonn IImmppaaiirrmmeenntt 3333 ββ 3344
DDiiggiittaall ttrraannssmmiissssiioonn 3344 ββ 3388
TTrraannssmmiissssiioonn MMooddee 3388 ββ 3399
MMuullttiipplleexxiinngg 3399 ββ 4400
TTrraannssmmiissssiioonn MMeeddiiaa 4400 ββ 4411
AAssssiiggnnmmeenntt 11 4422 ββ 4444
AAssssiiggnnmmeenntt 22 4444 ββ 4455
AAnnsswweerr KKeeyyss 4466
EExxppllaannaattiioonnss 4466 ββ 4477
Contents Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page ii
##33 MMeeddiiuumm AAcccceessss SSuubbllaayyeerr ((LLAANN TTeecchhnnoollooggiieess:: EEtthheerrnneett,, TTookkeenn RRiinngg))
4488 ββ 6644
IInnttrroodduuccttiioonn 4488
MMuullttiippllee AAcccceessss PPrroottooccoollss 4488 ββ 5522
EEtthheerrnneett CCaabblliinngg 5533
TThhee 880022..33 MMAACC ssuubbllaayyeerr pprroottooccooll 5544
IIEEEEEE ssttaannddaarrdd 880022..44--TTookkeenn BBuuss 5544 ββ 5555
IIEEEEEE ssttaannddaarrdd 880022..55--TTookkeenn RRiinngg 5555 ββ 5588
AAssssiiggnnmmeenntt 11 5599 ββ 6600
AAssssiiggnnmmeenntt 22 6600 ββ 6611
AAnnsswweerr KKeeyyss 6622
EExxppllaannaattiioonnss 6622 ββ 6644
##44 TThhee DDaattaa LLiinnkk LLaayyeerr ((FFllooww aanndd eerrrroorr ccoonnttrrooll tteecchhnniiqquueess)) 6655 -- 9999
DDaattaa lliinnkk LLaayyeerr DDeessiiggnn IIssssuueess 6655 ββ 6688
EErrrroorr DDeetteeccttiioonn aanndd EErrrroorr CCoorrrreeccttiioonn 6699 ββ 7788
FFllooww CCoonnttrrooll aanndd EErrrroorr CCoonnttrrooll 7788 ββ 9911
HHiigghh--lleevveell DDaattaa LLiinnkk CCoonnttrrooll ((HHDDLLCC)) PPrroottooccooll 9911 ββ 9933
AAssssiiggnnmmeenntt 11 9944 ββ 9955
AAssssiiggnnmmeenntt 22 9955 ββ 9966
AAnnsswweerr KKeeyyss 9977
EExxppllaannaattiioonnss 9977 ββ 9999
##55 Routing & Congestion Control 110000 ββ 111144
Routing 110000 ββ 110011
Routing Algorithms: 110011 ββ 110077
AAssssiiggnnmmeenntt 11 110088 ββ 111100
AAssssiiggnnmmeenntt 22 111100 ββ 111111
AAnnsswweerr KKeeyyss 111122
EExxppllaannaattiioonnss 111122 ββ 111144
Contents Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page iii
##66 TTCCPP//IIPP,, UUDDPP AAnndd SSoocckkeettss,, IIPP((VV44)) 111155 ββ 114455
OOvveerr VViieeww ooff TTCCPP//IIPP 111155 ββ 111177
NNeettwwoorrkk LLaayyeerr 111177 ββ 112211
AAddddrreessssiinngg oonn IInntteerrnneett 112222 ββ 112266
SSuubbnneettttiinngg 112277 ββ 113311
OOtthheerr PPrroottooccooll iinn tthhee NNeettwwoorrkk LLaayyeerr 113311 ββ 113333
TTrraannssppoorrtt LLaayyeerr 113333 ββ 113377
AAssssiiggnnmmeenntt 11 113388 ββ 113399
AAssssiiggnnmmeenntt 22 114400 ββ 114411
AAnnsswweerr KKeeyyss 114422
EExxppllaannaattiioonnss 114422 ββ 114455
##77 AApppplliiccaattiioonn LLaayyeerr 114466 ββ 115577
TThhee DDoommiiaann NNaammee SSeerrvviiccee ((DDNNSS)) 114466 ββ 114477
FFiillee TTrraannssffeerr PPrroottooccooll ((FFTTPP)) 114488 ββ 114499
TTrriivviiaall FFiillee TTrraannssffeerr PPrroottooccooll ((TTFFTTPP)) 114499
SSiimmppllee MMaaiill TTrraannssffeerr PPrroottooccooll ((SSMMTTPP)) 114499 ββ 115500
UUnniiffoorrmm RReessoouurrccee LLooccaattoorr ((UURRLL)) 115500
MMuullttiippoossee IInntteerrnneett MMaaiill EExxtteennssiioonnss ((MMIIMMEE)) 115500
PPoosstt OOffffiiccee PPrroottooccooll ((PPOOPP)) 115511
HHyyppeerrtteexxtt TTrraannssffeerr PPrroottooccooll ((HHTTTTPP)) 115511
AAssssiiggnnmmeenntt 11 115522 ββ 115533
AAssssiiggnnmmeenntt 22 115544
AAnnsswweerr KKeeyyss 115555
EExxppllaannaattiioonnss 115555 ββ 115577
##88 NNeettwwoorrkk SSeeccuurriittyy 115588 ββ 117755
SSyymmmmeettrriicc kkeeyy oorr PPrriivvaattee kkeeyy aallggoorriitthhmmss 115588 ββ 116600
AAssyymmmmeettrriicc kkeeyy AAllggoorriitthhmm ((oorr)) PPuubblliicc kkeeyy AAllggoorriitthhmm 116600 ββ 116611
DDiiggiittaall SSiiggnnaattuurreess 116611 ββ 116622
FFiirreewwaallllss 116622 ββ 116688
Contents Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page iv
AAssssiiggnnmmeenntt 11 116699 ββ 117700
AAssssiiggnnmmeenntt 22 117711 ββ 117722
AAnnsswweerr KKeeyyss 117733
EExxppllaannaattiioonnss 117733 ββ 117755
##99 MMoodduullee TTeesstt 117766 -- 119911
TTeesstt QQuueessttiioonnss 117766 ββ 118844
AAnnsswweerr KKeeyyss 118855
EExxppllaannaattiioonnss 118855 ββ 119911
RReeffeerreennccee BBooookkss 119922
Chapter 1 Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page 1
CHAPTER 1
Introduction
Computer Network A computer network is created when several computers and terminal device are connected together by data communication system. A network is basically a communication system for computers. Just as the telephone system allows two people to talk, networks allow computers to communicate. Figure 1.1 illustrate a simple computer network where computer A and B can communicate and share resources through computer C.
Fig. 1.1 Computer A and B can access files on C, and can use the printer connected to C.
Goals / Advantages of Networking
(1) Program and file sharing Software resources can also be used more effectively over a network. With stand-alone
computers (i.e. not connected to network), the software used on the computer must be present on each computerβs hard disk. It is also difficult and time consuming to install and
A B
C
Chapter 1 Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page 2
configure the software individually on every computer. With a network one can centrally install and configure the software, which can be accessed at the entire connected computer.
(2) Network Resource sharing Network resources include printers, plotters, Fax modems, scanners, floppy disks, CD-ROMS and storage devices (i.e. Hard disks) which can be shared by terminals connected to network. For example the sharing of a resource such as a storage device.
(3) Database sharing A database program is an ideal application for a network. A network feature called record locking lets multiple users simultaneously access a file without corrupting the data. Record locking insures that no two users edit the same record at the same time.
(4) Economical Expansion of the PC Base Networks provide an economical way to expand the number of computers in an organization.
(5) Ability to use network software A class of software called Groupware is designed specifically for networks. It lets users interact and coordinate their activities. Note: Not all software will use a network even if one is installed. You should check the software documentation to see what features, if any, the software provides in a network environment.
(6) Ability to use electronic mail Electronic mail lets users easily communicate with one another Messages are dropped in βmailboxesβ for the recipients to read at a convenient time.
(7) Creation of workgroups Groups are important in networks. They can consist of users who work in a department or who are assigned to special project. With Netware, one can assign users to groups and then give each group access to special directories and resources not accessible by other users. This saves the trouble of assigning access to each individual user.
(8) Centralized Management Because Netware userβs dedicated servers can be grouped in one location, along with the shared resource attached to them, for easier management. Hardware upgrades, software backups, system maintenance and system protection are much easier to handle when these devices are in one location.
(9) Security A network provides more secure environment for a companyβs important information. Security starts with the login procedure to ensure that a user accesses the network using his or her own account. This account is tailored (i.e. made according to the user requirements) to give the user access only to authorized areas of the server and the network. Login restrictions can force a user a log in at one specific station and only during specific time frame or period.
(10) Access to more than one operating system Netware provides connections for many different operating systems, including DOS, OS/2, UNIX, and Apple Talk. Users of these systems can access files on the Netware server.
Chapter 1 Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page 3
(11) Enhancement of the corporate structure Networks can change the structure of an organization and the way it is managed. Users who work in a specific department and for a specific manager no longer need to be in the same physical area. Their offices can be located in areas where their expertise is most needed. The network ties them to their department managers and systems. This arrangement is useful for special project in which individuals from different departments, such as research, production and marketing, need to work closely with each other.
Components of Network
Computer networks have the following fundamental components: 1. Server 2. Workstations 3. Network Interface Cards 4. Cabling system 5. Shared Resources and Peripherals.
Criteria of a Network A network must able to meet a certain number of criteria. The most important of these are follows
(i) Performance: performance can be measured in many ways, including transmit time and response time. The performance of a network depends upon these following factors: (i) Number of users (ii) Types of transmission medium (iii) Capacity of connected hardware (iv) Efficiency of the software
(ii) Reliability: In addition to accuracy of delivery. Network reliability is measured by the
frequency of failure, the time it takes for a link to recover from a failure.
(iii) Security: Network security issues include protecting data from the unauthorized access.
Classification of network It contains two or more computer along with a transmission path to share information and resource of communication system. By the networking we can make interconnection of two or more network device Depending upon the graphical area, we can divide the computer network in 3 parts.
(i) LAN (Local Area Network) (ii) MAN (Metropolitan Area Network) (iii) WAN (Wide Area Network)
(i) LAN: It spans over a diameter of 2 km, typically data transfer rate for LAN is 10-100 Mbps, it is used by a signal organization. It propagates high transmission over unexpensive media. Example co-axial cable, twisted pair cable.
(ii) MAN: It spans over 10 β 100km diameter. Data rate for MAN is 10 Mbps. Some special equipments are required for transmission.
(iii) WAN: It spans across the country or nation. Data transfer rate for WAN is 1.5 mbps. It is used by multiple organizations
Chapter 1 Computer Networks
THE GATE ACADEMY PVT.LTD. H.O.: #74, Keshava Krupa (third Floor), 30th
Cross, 10th
Main, Jayanagar 4th
Block, Bangalore-11 : 080-65700750, [email protected] Β© Copyright reserved. Web: www.thegateacademy.com Page 4
Types of Network Connection
In a network two or more device are connected together through link. Link is a path for communication that transfer data from one device to another.
There are two possible type of connection. (i) Point to point (ii) Multi-point
(i) Point to point: In this case one device is connected to another device.
Fig 1.2 Point to Point connection
(ii) Multi-point: Here two or more device are connected to each other. In a multipoint
connection the capacity of the channel is shared either spatially or temporarily.
Fig 1.3 Multi-point connection
Network Topology There are two types of topology
1. Physical topology 2. Logical topology
1. Physical topology: Physical topology represent the physical structure of computer
network. It tells how different computers are connected across its communication path. There are six basic topology possible. (i) Mess (ii) Star (iii) Ring (iv) Hybrid (v) Bus (vi) Cellular
(i) Mess Topology: In mesh topology every device has a dedicated point to point link to every other device. A fully connected mesh network has n(n β 1)/2 physical channel to link n device. To accommodate that many links, every device on the network must have (n-1) input/output ports.
Advantages (i) Eliminate traffic problems (ii) A mesh topology is robust (iii) It is more secure and private (iv) Fault identification and fault isolation is easy
Work station
Work station
Main frame
Work station
Work station Work station Link