stuti(2)

65
SWAMI VIVEKANAD COLLEGE OF ENGINEERING, INDORE INDUSTRIAL TRAINNIG ON BASICS OF NETWORKING AND INTRODUCTION OF LINUX SUBMITTED TO SUBMITTED BY MR. U.B.S. CHANDRAWAT STUTI SAHA

Transcript of stuti(2)

Page 1: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 1/65

SWAMI VIVEKANAD COLLEGE OF

ENGINEERING, INDORE

INDUSTRIAL TRAINNIG ON

BASICS OF NETWORKING AND INTRODUCTION OF LINUX

SUBMITTED TO SUBMITTED BYMR. U.B.S. CHANDRAWAT STUTI SAHA

Page 2: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 2/65

SWAMI VIVEKANAD COLLEGE OF

ENGINEERING, INDORE

CERTIFICATE

This to certify that the industrial training report titledINDUSTRIAL TRAINNIG ON

BASICS OF NETWORKING AND INTRODUCTION OF LINUX

In the fide work of 

STUTI SAHA

This has been successful completed for report work in partial fulfillment of the requirement for the award of Bachelor of Engineering in Electronics &Communication, as per the course curriculum prescribed by Rajiv GandhiTechnical University, BHOPAL, during the academic session 2010-2011.

INTERNAL EXTERNAL

Page 3: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 3/65

ACKNOWLEDGEMENT

With extreme gratitude I express my thankfulness to all themembers of CMS, Indore for rendering full support in my trainingon “THE BASICS OF NETWORKING AND INTRODUCTIONTO LINUX”.

I am sincerely thankful to our faculties, SWAMIVIVEKANAND COLLEGE OF ENGINEERING for grooming

and instilling me a spirit that helps me to complete my report.

I also express my sincere thanks to our H.O.D.U.B.S.Chandrawat who was present with us during all presentationand encouraging me constantly.

Finally, I thank all the teaching and non –teachingstaff members.

STUTI SAHA

Page 4: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 4/65

ABSTRACT

In this report we are going to discuss some basic concepts of networking,various terminologies and are going to discuss how basically a network is

 being designed and is maintained. Some basic portion of Linux is also beingincluded in this report. Various basic commands are also being discussed in

the report.

Page 5: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 5/65

OBJECTIVE

To study the basic concepts of networking and to learn some brief introduction about LINUX

Page 6: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 6/65

CONTENTS

1. Abstract2. Objective3. Networking:

Introduction

 Network Topologies

OSI Model

TCP/IP Model Cables

IP (Internet protocols)

Routing protocols

Other different types of protocols

Switches

4. Linux:

Introduction

Architecture of Linux Various commands of Linux

How to install Linux

YUM

WEB SERVER 

FTP

Open audit

5. Conclusion

6. References

Page 7: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 7/65

NETWORKING

Page 8: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 8/65

INTRODUCTIONIn the world of computers, networking is the practice of linking two or more computingdevices together for the purpose of sharing data. Networks are built with a mix of computer hardware and computer software.A computer network allows sharing of resources and information among interconnecteddevices. In the 1960s, the Advanced Research Projects Agency (ARPA) started fundingthe design of the Advanced Research Projects Agency Network (ARPANET) for theUnited States Department of Defense. It was the first computer network in theworld. Development of the network began in 1969, based on designs developed duringthe 1960s.

  Purpose

Computer networks can be used for several purposes:Facilitating communications. Using a network, people can communicate efficiently andeasily via email, instant messaging, chat rooms, telephone, video telephone calls, andvideo conferencing.Sharing hardware. In a networked environment, each computer on a network mayaccess and use hardware resources on the network, such as printing a document on ashared network printer.

Sharing files, data, and information. In a network environment, authorized user mayaccess data and information stored on other computers on the network. The capability of  providing access to data and information on shared storage devices is an importantfeature of many networks.

• Sharing software. Users connected to a network may run application programs onremote computers.

• Information preservation.

• Security.

Page 9: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 9/65

• Speed up.

NETWORKING DEVICES Network devices provide transport for the data that needs to be transferred betweenend-user devices. Network devices provide extension of cable connections,

concentration of connections, conversion of data formats, and management of datatransfers. Examples of devices that perform these functions are repeaters, hubs, bridges, switches, and routers

• REPEATER: A repeater is a network device used to regenerate a signal.

Repeaters regenerate analog or digital signals distorted by transmission loss due toattenuation. A repeater does not perform intelligent routing

• HUB: Hubs concentrate connections. In other words, they take a group of hosts

and allow the network to see them as a single unit. This is done passively, without anyother effect on the data transmission. Active hubs not only concentrate hosts, but theyalso regenerate signals.

• BRIDGES: Bridges convert network transmission data formats as well as

 perform basic data transmission management. Bridges provide connections betweenLANs. Bridges also perform a check on the data to determine whether it should cross

the bridge or not.

• W0RKGROUP SWITCHES: Workgroup switches add more

intelligence to data transfer management. Not only can they determine whether 

data should remain on a LAN or not, but they can transfer the data only to the

connection that needs that data. Another difference between a bridge and switch is

that a switch does not convert data transmission formats.

• ROUTERS: Routers can regenerate signals, concentrate multiple

connections, convert data transmission formats, and manage data transfers. Theycan also connect to a WAN, which allows them to connect LANs that areseparated by great distances.

Page 10: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 10/65

TYPES OF NETWORKING:

Example of a basic type of network 

1. PAN: It stands for personal area network. It is have a network of single system.Here limited sources are present.

2. MAN: It stands for main area network or metropolitican area network. It is used between two different cities. Its range is approx 150km.

3. LAN: It stands for local area network. It is used for fixed geographical area for system communication. Its range is approx 2.6 miles or 5 km.

Page 11: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 11/65

4. SAN: It stands for storage area. Here data is being stored in centralized area. E.g.Hard disk (It can be called as SAN)

5. WAN: It stands for wide area network. It is used when communication is to bedone between two different states. E.g. When communication is to be done

 between M.P. and Gujarat WAN is being used.

6. GAN: It stands global area network or geographical area network. Here nolimitation of distance occurs. Satellite communication mainly occurs here.

NETWORK TOPOLOGIES Network topology defines the structure of the network. One part of the topologydefinition is the physical topology, which is the actual layout of the wire or media. Theother part is the logical topology, which defines how the media is accessed by the hostsfor sending data.

Physical Topologies

BUS: A bus topology uses a single backbone cable that is terminated at both ends. All

the hosts connect directly to this backbone.

RING: A ring topology connects one host to the next and the last host to the first.

This creates a physical ring of cable.

Page 12: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 12/65

STAR : A star topology connects all cables to a central point of concentration.

EXTENDED STAR : An extended star topology links individual stars together 

 by connecting the hubs and/or switches. This topology can extend the scope and coverageof the network 

HIERARCHICAL: A hierarchical topology is similar to an extended star.

However, instead of linking the hubs and/or switches together, the system is linked to a

computer that controls the traffic on the topology.

MESH: A mesh topology is implemented to provide as much protection as possible

from interruption of service. Each host has its own connections to all other hosts.

Page 13: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 13/65

PARTIALLY MESH TOPOLOGY

The type of network topology in which some of the nodes of the network are connectedto more than one other node in the network with a point-to-point link – this makes it possible to take advantage of some of the redundancy that is provided by a physical fullyconnected mesh topology without the expense and complexity required for a connection between every node in the network.

TREE TOPOLOGY

The type of network topology in which a central 'root' node (the top level of thehierarchy) is connected to one or more other nodes that are one level lower in thehierarchy (i.e., the second level) with a point-to-point link between each of the secondlevel nodes and the top level central 'root' node, while each of the second level nodes thatare connected to the top level central 'root' node will also have one or more other nodesthat are one level lower in the hierarchy (i.e., the third level) connected to it, also with a point-to-point link, the top level central 'root' node being the only node that has no other node above it in the hierarchy (The hierarchy of the tree is symmetrical.) Each node in

Page 14: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 14/65

the network having a specific fixed number, of nodes connected to it at the next lower level in the hierarchy, the number, being referred to as the 'branching factor' of thehierarchical tree. This tree has individual peripheral nodes.

HYBRID TOPOLOGYHybrid networks use a combination of any two or more topologies in such a way that theresulting network does not exhibit one of the standard topologies (e.g., bus, star, ring,etc.). For example, a tree network connected to a tree network is still a tree network, buttwo star networks connected together exhibit a hybrid network topology. A hybridtopology is always produced when two different basic network topologies are connected.Two common examples for Hybrid network are: star ring network and star bus network 

• A Star ring network consists of two or more star topologies connected using amultistation access unit (MAU) as a centralized hub.

• A Star Bus network consists of two or more star topologies connected using a bustrunk (the bus trunk serves as the network's backbone).

Logical Topologies: The logical topology of a network is how the hosts

communicate across the medium. The two most common types of logical topologies are

 broadcast and token passing.

BROADCAST: Broadcast topology simply means that each host sends its data to

all other hosts on the network medium. There is no order that the stations must follow touse the network. It is first come, first serve. Ethernet works this way

TOKEN PASSING: Broadcast topology simply means that each host sends its

data to all other hosts on the network medium. There is no order that the stations mustfollow to use the network. It is first come, first serve. Ethernet works this way.

Page 15: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 15/65

INTERNETWORKING

Breaking of larger network into smaller one is called network segmentation using routers, switches and bridges. Used for LAN traffic, for low B.W., having too many hosts in broadcast. For this purpose in 1977,ISO created OSI model. The main function of of OSI layer is to provide developers a standard based onwhich they can make their products. All layers are independent. They have indepent from each other 

OSI LAYER MODEL

The Open Systems Interconnection model (OSI model) is a product of the OpenSystems Interconnection effort at the International Organization for Standardization. It isa way of sub-dividing a communications system into smaller parts called layers. A layer is a collection of conceptually similar functions that provide services to the layer above itand receives services from the layer below it.

Page 16: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 16/65

Layer 1: Physical LayerThe Physical Layer defines the electrical and physical specifications for devices. In particular, it defines the relationship between a device and a transmission medium, suchas a copper or optical cable. This includes the layout of pins, voltages, cablespecifications, hubs, repeaters, network adapters, host bus adapters (HBA used in storagearea networks) and more. The major functions and services performed by the PhysicalLayer are:

• Establishment and termination of a connection to a communications medium.• Participation in the process whereby the communication resources are effectively

shared among multiple users. For example, contention resolution and flowcontrol.

• Modulation or conversion between the representation of digital data in user equipment and the corresponding signals transmitted over a communicationschannel. These are signals operating over the physical cabling (such as copper andoptical fiber) or over a radio link.

Page 17: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 17/65

Layer 2: Data Link LayerThe Data Link Layer provides the functional and procedural means to transfer data between network entities and to detect and possibly correct errors that may occur in thePhysical Layer. Originally, this layer was intended for point-to-point and point-to-multipoint media, characteristic of wide area media in the telephone system. Local area

network architecture, which included broadcast-capable multi-access media, wasdeveloped independently of the ISO work in IEEE Project 802. IEEE work assumed sublayering and management functions not required for WAN use.

Layer 3: Network LayerThe Network Layer provides the functional and procedural means of transferring variablelength data sequences from a source to a destination via one or more networks, whilemaintaining the quality of service requested by the Transport Layer. The Network Layer  performs network routing functions, and might also perform fragmentation andreassembly, and report delivery errors. Routers operate at this layer—sending datathroughout the extended network and making the Internet possible. This is a logical

addressing scheme – values are chosen by the network engineer. The addressing schemeis not hierarchical.

Careful analysis of the Network Layer indicated that the Network Layer could have atleast three sublayers:

1. Subnetwork Access - that considers protocols that deal with the interface tonetworks, such as X.25;

2. Subnetwork Dependent Convergence - when it is necessary to bring the level of atransit network up to the level of networks on either side;

3. Subnetwork Independent Convergence - This handles transfer across multiple

networks.

Layer 4: Transport Layer

The Transport Layer provides transparent transfer of data between end users, providingreliable data transfer services to the upper layers. The Transport Layer controls thereliability of a given link through flow control, segmentation/desegmentation, and error control. Some protocols are state and connection oriented. This means that the TransportLayer can keep track of the segments and retransmit those that fail. The Transport layer also provides the acknowledgement of the successful data transmission and sends the

next data if no errors occurred.

Layer 5: Session Layer

The Session Layer controls the dialogues (connections) between computers. Itestablishes, manages and terminates the connections between the local and remoteapplication. It provides for full-duplex, half-duplex, or simplex operation, and establishes

Page 18: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 18/65

checkpointing, adjournment, termination, and restart procedures. The OSI model madethis layer responsible for graceful close of sessions, which is a property of theTransmission Control Protocol, and also for session checkpointing and recovery, which isnot usually used in the Internet Protocol Suite. The Session Layer is commonlyimplemented explicitly in application environments that use remote procedure calls.

Layer 6: Presentation Layer

The Presentation Layer establishes context between Application Layer entities, in whichthe higher-layer entities may use different syntax and semantics if the presentationservice provides a mapping between them. If a mapping is available, presentation servicedata units are encapsulated into session protocol data units, and passed down the stack.This layer provides independence from data representation (e.g., encryption) bytranslating between application and network formats.

Layer 7: Application Layer

The Application Layer is the OSI layer closest to the end user, which means that both theOSI application layer and the user interact directly with the software application. Thislayer interacts with software applications that implement a communicating component.Such application programs fall outside the scope of the OSI model. Application layer functions typically include identifying communication partners, determining resourceavailability, and synchronizing communication

TCP/IP MODEL

The U.S. Department of Defense (DOD) created the TCP/IP reference model, because itwanted to design a network that could survive any conditions, including a nuclear war.TCP/IP was developed as an open standard. This meant that anyone was free to useTCP/IPDOD (Department of defense) developed this model in 1960. It consists of four different

layers. The layers are:• Application layer 

• Host to host layer 

• Internet layer 

•  Network layer/Access layer 

Page 19: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 19/65

 

The figure illustrates some of the common protocols specified by the TCP/IPreference model layers.

Page 20: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 20/65

The Process/ Application layer defines protocol for node-to-node applicationcommunication and also controls user interface specification. A vast array of protocolscombine at this layer of DoD’s model to integrate the activities and duties of upper layer of OSI.Example for this layer are: Telnet, FTP, TFTP, NFS, SMTP,SNMP, DNS DHCP, BootPetc.

HOST-TO-HOST LAYER :

The Host-to-Host layer parallel the function of the OSIs Transport layer. It performs thefollowing:Defining protocols for setting up the level of transmission service for application

• It tackles issues like creating reliable end-to-end communication.

• It ensures the error free delivery of data.

• It handles packet sequencing and maintains data integrity.

INTERNET LAYER 

Internet layer correspond to the OSI’s Network Layer. It performs the following:Designating the protocols relating to the logical transmission of packets over the entirenetwork 

• It takes care of the addressing of hosts by giving them an IP address

• It handles routing of packets among multiple networks.

• It also controls the communication flow between the two hosts.

NETWORK ACCESS LAYER 

This layer is equivalent of the Data Link and Physical Layer of OSI model. It performs the following:

Page 21: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 21/65

• It monitors the data exchange between the host and the network.• Network Access Layer overseas hardware addressing and defines protocols

for the physical transmission of the Data

TELNET: It is used for Terminal Emulation. It allows a user on a remote machine to

access the resource of another machine.FTP: It allows you to transfer files from one machine to another. It allows access to both directories and file and uses TCP for data transfer and hence slow but reliable.NETWORK FILE SYSTEM: It is jewel of protocols specializing in file sharing. Itallows two different types of file system to interoperate.TFTP ( File Transfer Protocol): This is striped down version of FTP. It has nodirectory browsing abilities. It can only send and receive files. It uses UDP for datatransfer and hence faster but not reliable.LPD(Line Printer Daemon): The Line Printer Daemon protocol/Line Printer

Remote protocol (or LPD, LPR ) is a network protocol for submitting print jobs to aremote printer. The original implementation of LPD was in the Berkeley printing

system in the BSD UNIX operating system; the project also supports that protocol.The Common UNIX Printing System (or CUPS), which is more common onmodern Linux distributions, supports LPD as well as the Internet Printing Protocol(IPP).DNS (Domain Name Service): The Domain Name System (DNS) is a hierarchicalnaming system built on a distributed database for computers, services, or any resourceconnected to the Internet or a private network. It associates various informationwith domain names assigned to each of the participating entities. Most importantly, ittranslates domain names meaningful to humans into the numerical identifiersassociated with networking equipment for the purpose of locating and addressingthese devices worldwide.

Bootstrap Protocol (BootP): In computer networking, the Bootstrap Protocol,or BOOTP, is a network protocol used by a network client to obtain an IPaddress from a configuration server. BOOTP is usually used duringthe bootstrap process when a computer is starting up. A BOOTP configuration server assigns an IP address to each client from a pool of addresses. BOOTP uses the User Datagram Protocol (UDP) as a transport on IPv4 networks only.DHCP (Dynamic Host Configuration Protocol): The Dynamic Host

Configuration Protocol (DHCP) is an auto configuration protocol used on IPnetworks. Computers that are connected to IP networks must be configured beforethey can communicate with other computers on the network. DHCP allows acomputer to be configured automatically, eliminating the need for intervention by anetwork administrator.TCP: The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite,complementing the Internet Protocol (IP), and therefore the entire suite is commonlyreferred to as TCP/IP . TCP provides the service of exchanging data directly betweentwo network hosts, whereas IP handles addressing and routing message across one or more networks.

Page 22: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 22/65

TCP STRUCTURE

TCP Header

Bit

offs

et

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

0 Source port Destination port

32 Sequence number 

64 Acknowledgment number 

96 Data offset ReservedC

W

R

E

C

E

U

R

G

A

C

K

P

S

H

R

S

T

S

Y

N

F

I

NWindow Size

128 Checksum Urgent pointer  

160

...Options (if Data Offset > 5)

...

Source port (16 bits) – identifies the sending port

A TCP segment consists of a segment header and a data section. The TCP header contains 10 mandatory fields, and an optional extension field (Options, pink backgroundin table).The data section follows the header. Its contents are the payload data carried for theapplication. The length of the data section is not specified in the TCP segment header. Itcan be calculated by subtracting the combined length of the TCP header and theencapsulating IP segment header from the total IP segment length (specified in the IPsegment header).

UDP (User Datagram Protocol): The User Datagram Protocol (UDP) is one of thecore members of the Internet Protocol Suite, the set of network protocols used for the Internet. UDP uses a simple transmission model without implicit hand-shaking

Page 23: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 23/65

dialogues for providing reliability, ordering, or data integrity. Thus, UDP provides anunreliable service and datagrams may arrive out of order, appear duplicated, or gomissing without notice.

PACKET STRUCTURE

UDP is a minimal message-oriented Transport Layer protocol that is documentedin IETF RFC 768.

UDP provides no guarantees to the upper layer protocol for message delivery and the

UDP protocol layer retains no state of UDP messages once sent. For this reason, UDP is

sometimes referred to as Unreliable Datagram Protocol.

UDP provides application multiplexing (via port numbers) and integrity verification

(via checksum) of the header and payload. If transmission reliability is desired, it must be

implemented in the user's application.

bits 0 – 15 16 – 31

0 Source Port Number Destination Port Number 

32 Length Checksum

64

 Data

 

INTERNET LAYER PROTOCOLS:

• Internet Protocol(IP)• Internet Control Message Protocol (ICMP)

• Address Resolution Protocol(ARP)

• Reverse Address Resolution Protocol (RARP)

INTERNET PROTOCOL: The Internet Protocol (IP) is the principal communications protocol used for relaying datagrams(packets) acrossan internetwork using the Internet Protocol Suite. Responsible for routing packetsacross network boundaries, it is the primary protocol that establishes the Internet.

IP HEADER 

Page 24: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 24/65

00 010203040506070809101112 13 14 15 161718192021222324 25 26 27 282930 31

Version IHLDifferentiated

ServicesTotal length

Identification Flags Fragment offset

TTL Protocol Header checksumSource IP address

Destination IP address

Options and padding :::

Internet Control Message Protocol (ICMP): The Internet Control Message

Protocol (ICMP) is one of the core protocols of the Internet Protocol Suite. It ischiefly used by the operating systems of networked computers to send error messages —indicating, for instance, that a requested service is not available or that a host or router could not be reached. ICMP can also be used to relay query messages.

ICMP segment structure Header 

The ICMP header starts after the IPv4 header. All ICMP packets will have an 8 byte

header and variable sized data section. The first 4 bytes of the header will be consistent.

The first byte is for the ICMP type. The second byte is for the ICMP code. The third and

fourth bytes are a checksum of the entire ICMP message. The contents of the remaining 4

 bytes of the header will vary based on the ICMP type and code.

Bits 0-7 8-15 16-23 24-31

0 Type Code Checksum

32 Rest of Header 

Type - ICMP type as specified below.

Code - further specification of the ICMP type as specified below.

Checksum - This field contains error checking data calculated from the ICMP

header+data, with value 0 for this field. The algorithm is the same as the header 

checksum for IPv4.

Address Resolution Protocol (ARP):

Page 25: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 25/65

The Address Resolution Protocol (ARP) is a computer networking protocol for 

determining a network host's Link Layer or hardware address when only its Internet

Layer (IP) or Network Layer address is known. This function is critical in local area

networking as well as for routing internetworking traffic across gateways (routers) based

on IP addresses when the next-hop router must be determined. ARP was defined in

1982. It is Internet Standard STD 37.

The Address Resolution Protocol uses a simple message format that contains oneaddress resolution request or response. The size of the ARP message depends on theupper layer and lower layer address sizes, which are given by the type of networking protocol (usually IPv4) in use and the type of hardware or virtual link layer that the upper layer protocol is running on. The message header specifies these types, as well as the sizeof addresses of each. The message header is completed with the operation code for request (1) and reply (2). The payload of the packet consists of four addresses, thehardware and protocol address of the sender and receiver hosts.

REVERSE ARP (RARP):

The Reverse Address Resolution Protocol (RARP) is an obsolete computer networking

 protocol used by a host computer to request its Internet Protocol (IPv4) address from an

administrative host, when it has available its Link Layer or hardware address, such as

a MAC address.

RARP is described in Internet Engineering Task Force (IETF) publication RFC 903. It

has been rendered obsolete by the Bootstrap Protocol (BOOTP) and the modern Dynamic

Host Configuration Protocol (DHCP), which both support a much greater feature set than

RARP.

RARP requires one or more server hosts to maintain a database of mappings of Link 

Layer addresses to their respective protocol addresses. Media Access Control (MAC)

addresses needed to be individually configured on the servers by an administrator. RARP

was limited to serving only IP addresses.

Reverse ARP differs from the Inverse Address Resolution Protocol (InARP) described

in RFC 2390, which is designed to obtain the IP address associated with another host's

MAC address. In ARP is the complement of the Address Resolution Protocol used for the

reverse lookup.

COMPARISION BETWEEN OSI MODEL AND TCP/IP MODEL

Page 26: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 26/65

CISCO THREE LAYER HIERARCHY MODEL

Page 27: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 27/65

1. CORE LAYER:It handles the bulk data (traffic). Multilayer switches works over here. Its failure affectsindividual data.

2. DISTRIBUTION LAYER:

This layer takes data from the access layer and gives it to core layer. This layer implementssecurity to the network. Tools like access list and packet filter are being used here.

3. ACCESS LAYER :

It manages all users and is called Desktop layer. It helps continuous access control and policesfrom distribution layer and segmentation .It makes n/w more predictable.

CABLESThe cables which are being used in internetworking are having following specifications:

Page 28: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 28/65

CABLE SPECIFICATIONS:

ETHERNET CABLELING

 

There are three types of cables being used . They are:

• Straight cable

• Cross cable

• Rolled over cable

The major differences between the three cables are as given follows

STRAIGHT CABLE CROSS CABLE ROLLED OVER CABLE

Different devices areconnected.

E.g. Connection betweenswitch and an system andany router to PC is done bystraight cable

Connection between samedevices are being done by

cross cablesE.g. Connection betweentwo routers or connection between two switches

These cables are used onlyfor configuration.

E.g. Used for configuringrouters and switches.

Colour Coding:

White Orange OrangeWhite Green Blur White Blue GreenWhite Brown Brown

Colour Coding:

White Green GreenWhite Orange BlueWhite Blue OrangeWhite Brown Brown

This is types of manageableswitches.

IP (INTERNET PROTOCOL)

CABLES DISTANCE THROUGHPUT ETHERNET

STANDARD

CONNECTOR 

Coaxial thinnet 185 m 10 Mbps 10 Base 2 T-Connector  

Coaxial thicknnet 500 m 100 10 Base 5 AUI

Cat 3 100m 100 10 Base T RJ-45

Cat 5 100 m 100 10 Base X/FastEthernet

RJ-45

Fiber optic 10 km 64 Fast Ethernet RJ-45

Page 29: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 29/65

IPV4:

Class A 0 to 127 Used in private IP address

Class B 128 to 191 Used in private IP address

Class C 192 to 223 Mostly public

Class D 224 to 239 Used in multicasting

Class E 240 to 255 Research and invention

SUBNET MASK 

• In computer networks, an abbreviation for sub network.• In mathematics, a subnet (mathematics) of a net in a topological space.• Subnet mask is used to identify the host and network.• When using class A we can take the subnet mask of class B and class C.• When using class B we can take the subnet mask of class C• When using class C both class A and class B can be used

Class A 255.0.0.0

Class B 255.255.0.0

Class C 255.255.255.0

Page 30: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 30/65

Range of private IP:

Class A 10.0.0.0 to 10.255.255.255

Class B 172.16.0.0 to 172.31.255.255

Class C 192.10.8.0.0 to 192.168.255.255

IP ADDRESSING

An IP address is a numeric identifier assigned to each machine in an ip network. Itdesignates the location of device assigned to a network. This type of address is a softwareaddress not a hardware address. It is made up of 32 bits of information. This are divided

in four sections compromising of 4 bytes each.

IP addressing can be of three types. They are:1. Subneeting2. VLSM3. Superneeting

Subneeting VLSM Superneeting

This is of fixed length. Cannot be used for different subnet

masks.

This is variable in length. Thiscan be defined according to

hosts.

Use for root summarization

Wastage of IP space is more Used to reduce the wastage of IP.

Here the root which iscommon is being allotted

An Internet Protocol address (IP address) is a numerical label that is assigned to anydevice participating in a computer network that uses the Internet Protocol for communication between its nodes. In other words, it is an address that is assigned to anydevice that is connected to a network that follows the Internet Protocol, i.e. the Internet.

An IP address serves two principal functions host or network interface identification andlocation addressing.

The Hierarchical IP Addressing Scheme8 bits 8 bits 8 bits 8

 bits

 Network Host Host Host

 Network Network Host Host

 Network Network Network Host

Page 31: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 31/65

Class A:Class B:Class C:

Class D: Multicast

Class E: Research•  Network Address Range :Class A

The Class A range of network address:00000000=001111111=127

•  Network Address Range : Class BThe Class B range of network address:

10000000=12810111111=191

•  Network Address Range : Class CThe Class C range of network address:

11000000=19211011111=223

•  Network Address Ranges: Classes D and EThe address between 224 and 225 are reserved for Class D and E network 

.Class D (224-239)is used for multicast address and Class E(240-255) for scientific purpose.

•  Network Address :Special PurposeSome IP address are reserved for special purposes, no network administrator 

can’t ever assign these address to nodes.

SUBNETTING

  A subnetwork , or subnet, is a logically visible subdivision of an IP network. The

 practice of dividing a network into subnetworks is called subnetting.

All computers that belong to a subnet are addressed with a common, identical, most-

significant bit-group in their IP address. This results in the logical division of an IP

address into two fields, a network or routing prefix and the rest field, which is a host

number or interface identifier. The rest field is computer or network interface specific.

The routing prefix is expressed in CIDR notation. It is written as the first address of a

network followed by the bit-length of the prefix, separated by a slash ( / ) character.FOR Eg: 192.168.1.0/24 is the prefix of the Internet Protocol Version

4 network starting at the given address, having 24 bits allocated for the network number,

and the rest (8 bits) reserved for host addressing. The IPv6 address

specification2001:db8::/32 is a large network for 296 hosts, having a 32-bit routing

 prefix. In IPv4 the routing prefix is also specified in the form of the subnet mask , which

Page 32: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 32/65

is expressed in quad-dotted decimal representation like an address. For 

example, 255.255.255.0 is the network mask for the 192.168.1.0/24 prefix.

The following diagram modifies the example by moving two bits from the host

 part to the subnet mask to form a smaller subnet one fourth the previous size:

Binary form Dot-decimal notation

IP address 11000000.10101000.00000101.10000010 192.168.5.130

Subnet mask 11111111.11111111.11111111.11000000 255.255.255.192

 Network  prefix 11000000.10101000.00000101.10000000 192.168.5.128

Host part 00000000.00000000.00000000.00000010 0.0.0.2

HereE.g.: If the IP address of pc is 192.168.1.0. Determine the subnet mask to be usedhere.

Page 33: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 33/65

Sol: The binary transformation of 192 is 11000000Total number of networks (subnets) = 2 =2²= 4 networksTotal number of host per network= 2-2=64-2=62 hosts/network Difference between two network=256-192= 64

Valid range of IP:

VLSM

One of the major problems with supporting only a single subnet mask across a given

network number is that once the mask is selected, it locks the organization into a fixed

number of fixed-sized subnets. For example, a Class B subnet that is masked with

255.255.252.0 yields additional 64 subnets with 1024 hosts per subnet. If you need 1028

subnets with some as large as 1000 hosts and some as small as 64 hosts you are out of 

luck. Similar to the IP space separation into A,B, and C classes VLSM permits

organization to use subnets with different number of hosts.

FOR Eg: Addresses need to be planned and assigned carefully because VLSM can add a

higher level of complexity to your network administration. To really understand this

 process of subnetting a previously subnetted address, let's look at a practical scenario.

Assume that you have been tasked by your CIO to redesign your existing Class B subnet

of 172.16.1.0 /25. This 172.16.1.0 /25 scheme already gives your organization more than

500 subnets of 126 hosts each. However, you have been mandated to divide this one

subnetwork into three departmental broadcast domains of 30 hosts each. In addition, you

need to use this same address space for several WAN point-to-point serial links.

Currently, your Class B subnet address of 172.16.1.0 with a subnet mask of 255.255.255.128 leaves you 7 bits for host addresses, or 126 hosts (27 – 2 = 126). Table

3.4 shows your present addressing scheme for subnet 172.16.1.0 /25.

Table 3.4 The Addressing Scheme for Subnet 172.16.1.0 /25

Description Decimal Subnetwork Binary

Page 34: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 34/65

Subnetwork address 172.16.1.0 .00000001.00000000

First available host 172.16.1.1 .00000001.00000001

Second available host 172.16.1.2 .00000001.00000010

Last available host 172.16.1.126 .00000001.01111110

Broadcast address 172.16.1.127 .00000001.01111111

To subnet 172.16.1.0 /25 down to a VLSM to gain four subnets, you need to first writedown the original subnetwork in its binary representation, like so:10101100.00010000.00000001.00000000

 Next, identify the bits that make up the original subnet mask with italics:

10101100.00010000.00000001.00000000

Because you need to borrow some bits from the remaining 7 bits for a VLSM mask,calculate the number you need:

2n = 4 results in

n = 2

So, you need two more bits for your VLSM mask, like so:

1 0 1 0 1 1 0 0.0 0 0 1 0 0 0 0.0 0 0 0 0 0 0 1.0 0 0 0 0 0 0 0

 _____________network___________|______subnet_____|VSM|__hosts__|

 Now that you have 5 bits remaining for the hosts, you can determine the number of available host addresses:

n is the remaining subnet bits, therefore:

n = 5 and 2n – 2 = 30 hosts per subnetwork 

SUPERNETTING

Page 35: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 35/65

A supernet is an Internet Protocol (IP) network that is formed from the combination of 

two or more networks (or subnets) with a common Classless Inter-Domain

Routing (CIDR) routing prefix. The new routing prefix for the combined network 

aggregates the prefixes of the constituent networks. It must not contain other prefixes of 

networks that do not lie in the same routing path. The process of forming a supernet is

often called supernetting , route aggregation, or route summarization. Supernetting within

the Internet serves as a preventative strategy to avoid topological fragmentation of the IP

address space by using a hierarchical allocation system that delegates control of segments

of address space to regional network service providers. This method facilitates regional

route aggregation.

ROUTING PROTOCOLS

Page 36: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 36/65

A routing protocol is a protocol that specifies how routers communicate with each other,disseminating information that enables them to select routes then any two nodes on acomputer network, the choice of the route being done by routing algorithms. Each router 

has a priori knowledge only of networks attached to it directly. A routing protocol sharesthis information first among immediate neighbors, and then throughout the network. Thisway, routers gain knowledge of the topology of the network. For a discussion of theconcepts behind routing protocols, see: Routing.

The term routing protocol may refer specifically to one operating at layer three of theOSI model, which similarly disseminates topology information between routers.

Although there are many types of routing protocols, three major classes are in widespreaduse on IP networks:

Interior gateway routing via link-state routing protocols, such as OSPF and IS-IS• Interior gateway routing via path vector or distance vector protocols, such as RIP,

IGRP and EIGRP• Exterior gateway routing. BGP v4 is the routing protocol used by the public

Internet.

The specific characteristics of routing protocols include

• the manner in which they either prevent routing loops from forming or break themup if they do

• the manner in which they select preferred routes, using information about hop

costs• the time they take to converge• how well they scale up• many other factors• Routing is based on routing tables• Routing is a way of selecting path based of routing tables as it holds all network 

information.• Protocols are set of rules all data can travel within a network.

Routing is of three types:

Static routing• Dynamic routing

• Default routing

Page 37: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 37/65

STATIC ROUTING

Static routing, the alternative to dynamic routing, is the process in which the systemnetwork administrator would manually configure network routers with all the informationnecessary for successful packet forwarding. The administrator constructs the routing tablein every router by putting in the entries for every network that could be a destination.Static routes to network destinations are unchangeable. Static routing is a datacommunication concept describing one way of configuring path selection of routers incomputer networks. It is the type of routing characterized by the absence of communication between routers regarding the current topology of the network. This isachieved by manually adding routes to the routing table. The opposite of static routing isdynamic routing, sometimes also referred to as adaptive routing .

In these systems, routes through a data network are described by fixed paths (statically).These routes are usually entered into the router by the system administrator. An entirenetwork can be configured using static routes, but this type of configuration is not faulttolerant. When there is a change in the network or a failure occurs between two staticallydefined nodes, traffic will not be rerouted. This means that anything that wishes to takean affected path will either have to wait for the failure to be repaired or the static route to be updated by the administrator before restarting its journey. Most requests will time out(ultimately failing) before these repairs can be made. There are, however, times whenstatic routes make sense and can even improve the performance of a network. Some of these include stub networks and default routes

DEFAULT ROUTING

Default route, also known as the gateway of last resort , is the network route used by arouter when no other known route exists for a given IP packet’s destination address. Allthe packets for destinations not known by the router's routing table are sent to the defaultroute. This route generally leads to another router, which treats the packet the same way:If the route is known, the packet will get forwarded to the known route. If not, the packetis forwarded to the default-route of that router which generally leads to another router.And so on. Each router traversal adds a one-hop distance to the route.

Once the router with a known route to a host destination is reached, the router determines

which route is valid by finding the "most specific match". The network with the longestsubnet mask that matches the destination IP address wins.

The default route in IPv4 (in CIDR notation) is 0.0.0.0/0, often called the quad-zero

route. Since the subnet mask given is /0, it effectively specifies no network, and is the"shortest" match possible. A route lookup that doesn't match anything will naturally fall back onto this route. Similarly, in IPv6 the default address is given by ::/0.

Page 38: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 38/65

Routers in an organization generally point the default route towards the router that has aconnection to a network service provider. This way, packets with destinations outside theorganization's local area network (LAN)—typically to the Internet, WAN, or VPN—will be forwarded by the router with the connection to that provider.

Once it is routed outside the network, if that router does not know the route of thedestination, it will forward it to its own Default Route, which is usually a router connected to larger number of networks. Similarly, the packet will progress to internet backbone if still no route is known about the destination IP. It is then considered that thenetwork does not exist, and the packet is discarded.

Host devices in an organization generally refer to the default route as a default gatewaywhich can be, and usually is, a filtration device such as a firewall or Proxy server 

CONFIGURING STATIC AND DYNAMIC ROUTING

Internet work is defined as two or more networks connected with a router or routers.Also recall that routers don't keep track of, or care even the slightest bit about, hosts, butthey are extremely concerned about networks and the best path to access each one.

Logical addressing (IP, for example) is what's used to identify each host on the internetwork. Routers read the network portion of an IP address to figure out where in the Networld a host is and then use a routing table to determine the best path to the network thatthe destination host is located on.

Once that network is located, the packet is sent to the destination network by forwardingthe packet, hop-to-hop, until it reaches the specific router that's directly connected to thedestination host's network. From there, the destination host's unique hardware address isused to get the packet to the host that's supposed to receive it.

It's all about mapsRouters have maps, or at least a form of them. They must have a map of the entireinternetwork to explain to them where each logical network is located, as well as to guidetheir decision in choosing the quickest, most efficient way to get there. This map is calleda routing table, and each routed protocol you use has to have its own map. For instance, if you're running IP, IPX, and AppleTalk on your network, each of your routers will have

three maps—one for each routing protocol—all describing the same physical networks ina different way.

It's kind of a language barrier thing; the reason each protocol has separate routing tablesis because each protocol really is like a different language. Say you've built a gatedcommunity, and in it, you have a street you named Cat Street. Everyone on that block speaks English, and the street sign is in English. Then a Spanish family moves in thatdoesn't speak any English, so you add a sign that reads Avenida Gato. Next, a French

Page 39: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 39/65

family moves in—they don't speak English or Spanish—so you add Le Chat to the sign.You now have three separate signs describing Cat Street in three different ways.

Take a look at Figure A, which has two 2500 routers connected with a serial link.

Figure A

Each router must have all three networks in the routing table in order to send packetsthrough the internet work.

By default, each router will have the directly connected networks in its routing table.

Before we take a look at the routing tables, let's view the configuration used on eachrouter.

Here's the basic configuration for the 2500A router.

Here's the basic configuration for the 2500B router.

The 2500B router had the DCE end of the serial link, so the clock rate command neededto be added. We should now have two networks in each routing table. Let's view eachtable with the show ip route command (or the short form: sh ip route). Here's the 2500Arouter.

And here's the 2500B router.

The 2500A router is directly connected to subnets 32 and 64. The 2500A must have aroute entered for the 96 subnet. The 2500B router is directly connected to the 64 and 96subnets. The 2500B router must have an entry for the 32 subnet.

Configuring static routes

Page 40: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 40/65

Static routes are routes configured and entered into the routing table by the administrator.Typically, in larger networks, creating nothing but static routes would be a gruesome task (if not impossible), so dynamic routing is usually used (examples are RIP and OSPF).However, in smaller networks, static routing can work well; it saves overhead on therouter CPU and bandwidth on the serial links that dynamic routing protocols greedily

consume as fast as my golden retriever will steal and swallow an unattended turkeysandwich!

To configure a static route, use the global configuration command ip route. Since the2500A router must understand how to get to the 96 subnet, let's configure a static routethat describes to the router what to do when it receives a packet with a destination IPnetwork of 192.168.10.96.

The ip route command is broken down as follows:

• · ip route: The command issued to add a route to a routing table•

· 192.168.10.96: The destination network • · 255.255.255.224: The subnet mask used on the network • · 192.168.10.66: Where to send a packet with a destination IP network of 

192.168.10.96

 Notice that the IP routing table now has an entry for the 192.168.10.96 subnet via192.168.10.66, which is the next hop gateway from the 2500A router.

This is working great; we're halfway to finishing our routing tables. The reason we'reonly half done is that the 2500B router still doesn't know how to send packets to the 32

subnet. If a packet is sent from HostA on the 32 subnet over to HostB on the 96 subnet,it'll definitely get to HostB, and HostB will respond by sending a new packet back to theconfigured default gateway. The problem is that 2500B will discard the packet since itdoesn't know how to get to the 32 subnet. So, let's configure 2500B with a route tonetwork 192.168.10.32.

The ip route command is broken down as follows:

• · ip route: The command used to add a static route• · 192.168.10.32: The destination route we want router 2500B to know about• · 255.255.255.224: The mask used in the network • · 192.168.10.65: The next hop router used to get to subnet 32

The routing table for the 2500B router now knows how to get to subnet 32 and packetscan be sent from HostA to HostB and back again.

Configuring default routingSince we have an Internet connection off the 2500B serial 0 interface, we need to add a

Page 41: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 41/65

default route to the routing table of the 2500B router. This is just like adding a staticroute, except wildcards of all zeros (0s) are used instead of a network and mask.

Here is an example of configuring the serial 1 interface on the 2500B router and thensetting up default route. The ISP provided an IP address of 200.43.89.65/30 for the

interface. Since /30 is a block size of 4, the valid hosts are 65 and 66. We can set our nexthop to 66 since we were given 65 for our router’s interface.

The default route command is broken down as follows:

• · ip route: The command used to add a static or default route• · 0.0.0.0: The wildcard used to say “any” network not already in the routing

table• · 0.0.0.0: Wildcard mask to say “any” network mask • · 200.43.89.66: Next hop gateway

If you don't know the next hop gateway for some reason, you can always create thecommand like this:ip route 0.0.0.0 0.0.0.0 s1

This will tell the router to send packets that aren't in the routing table out serial 1. Also,notice that I used the ip classless command. This tells the route not to drop packets thatare destined for a network that's not in the routing table, but to use the default routeinstead. If you don't use the ip classless command, packets like that would be dropped before being sent to the default route. (ip classless is on by default in IOS 12.x.)

Okay, so the routing table on the 2500B router now looks like this.

The S* is a static default route. Notice also that the gateway of last resort is now set aswell. Since a router cannot set a default gateway and since it actually is the defaultgateway for a network, routers use a gateway of last resort instead, this is really a defaultroute.

A couple of tips

• · Routers need current, up-to-date “maps.” If a routing table doesn't have aroute to each network that it's going to be required to send packets to, then packets will be dropped.

• · Troubleshooting a routing table problem is tough. But by using the ping program and Trace route command, you can find exactly where a packet is failingin an internetwork. Each of these commands will be discussed in future articles.

Page 42: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 42/65

COMPARISION BETWEEN STATIC ROUTING,

DYNAMIC ROUTING AND DEFAULT ROUTING

STATIC ROUTING DYNAMIC ROUTING DEFAULT ROUTING

Used for small network.Admin responsible donemanually. Used for bothinternal and externalnetwork.

Based on routing protocols. No information on internalnetwork. Information givenon external network.

 No protocols areresponsible

Protocols are being used for finding the best routes.

Information is sendmanually to externalnetwork.

PROTOCOLSBasically protocols are of two classes:

1. Classful protocols2. Classless protocols

Classfull protocols are that protocol which does not send the subnet information in thenetwork. Classless protocols are that protocol which sends the information of subnetin the network through routing.

TYPES OF PROTOCOLS

There are three types of protocols. They are:

Link state routing protocolDistance vector routing protocolHybrid protocol

Page 43: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 43/65

LINK STATE ROUTING PROTOCOL

Link-state routing protocol is one of the two main classes of routing protocols used in packet switching networks for computer communications, the other major class being thedistance-vector routing protocol. Examples of link-state routing protocols include OSPFand IS-IS.

The link-state protocol is performed by every switching node in the network (i.e. nodesthat are prepared to forward packets; in the Internet, these are called routers). The basicconcept of link-state routing is that every node constructs a map of the connectivity to thenetwork, in the form of a graph, showing which nodes are connected to which other nodes. Each node then independently calculates the next best logical path from it to every possible destination in the network. The collection of best paths will then form the node'srouting table.

Distributing maps

This description covers only the simplest configuration; i.e. one with no areas, so that allnodes do have a map of the entire network. The hierarchical case is somewhat morecomplex; see the various protocol specifications.

As previously mentioned, the first main stage in the link-state algorithm is to give a mapof the network to every node. This is done with several simple subsidiary steps.

Determining the neighbors of each node

First, each node needs to determine what other ports it is connected to, over fully-working links; it does this using a simple reachability protocol which it runs separately

with each of its directly-connected neighbors.

Distributing the information for the map

 Next, each node periodically and in case of connectivity changes makes up a shortmessage, the link-state advertisement , which:

Page 44: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 44/65

• Identifies the node which is producing it.• Identifies all the other nodes to which it is directly connected.• Includes a sequence number , which increases every time the source node makes

up a new version of the message.

This message is then flooded throughout the network. As a necessary precursor, eachnode in the network remembers, for every other node in the network, the sequencenumber of the last link-state message which it received from that node. With that in hand,the method used is simple.

Starting with the node which originally produced the message, it sends a copy to all of itsneighbors. When a link-state advertisement is received at a node, the node looks up thesequence number it has stored for the source of that link-state message. If this message isnewer (i.e. has a higher sequence number), it is saved, and a copy is sent in turn to eachof that node's neighbors.

This procedure rapidly gets a copy of the latest version of each node's link-stateadvertisement to every node in the network.

 Networks running link state algorithms can also be segmented into hierarchies whichlimit the scope of route changes. These features mean that link state algorithms scale better to larger networks.

Creating the map

Finally, with the complete set of link-state advertisements (one from each node in thenetwork) in hand, it is obviously easy to produce the graph for the map of the network.

The algorithm simply iterates over the collection of link-state advertisements; for eachone, it makes links on the map of the network, from the node which sent that message, toall the nodes which that message indicates are neighbors of the sending node.

 No link is considered to have been correctly reported unless the two ends agree; i.e. if onenode reports that it is connected to another, but the other node does not report that it isconnected to the first, there is a problem, and the link is not included on the map.

Notes about this stage

The link-state message giving information about the neighbors is recomputed, and thenflooded throughout the network, whenever there is a change in the connectivity betweenthe node and its neighbors, e.g. when a link fails. Any such change will be detected bythe reachability protocol which each node runs with its neighbors.

Page 45: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 45/65

Calculating the routing table

As initially mentioned, the second main stage in the link-state algorithm is to producerouting tables, by inspecting the maps. This is again done with several steps.

Calculating the shortest paths

Each node independently runs an algorithm over the map to determine the shortest pathfrom itself to every other node in the network; generally some variant of Dijkstra'salgorithm is used. This is based around a link cost across each path which includesavailable bandwidth among other things.

Basically, a node maintains two data structures: a tree containing nodes which are "done",and a list of candidates. The algorithm starts with both structures empty; it then adds tothe first one the node itself. The algorithm then repetitively:

• Adds to the second (candidate) list all nodes which are connected to the node justadded to the tree (excepting of course any nodes which are already in either thetree or the candidate list).

• Of the nodes in the candidate list, moves to the tree (attaching it to the appropriateneighbor node already there) the one which is the closest to any of the nodesalready in the tree.

• Repeat as long as there aren't any nodes left in the candidate list. (When there arenone, all the nodes in the network will have been added to the tree.)

This procedure ends with the tree containing all the nodes in the network, with the nodeon which the algorithm is running as the root of the tree. The shortest path from that nodeto any other node is indicated by the list of nodes one traverses to get from the root of thetree, to the desired node in the tree.

Filling the routing table

With the shortest paths in hand, filling in the routing table is trivial.

For any given destination node, the best path for that destination is the node which is thefirst step from the root node, down the branch in the shortest-path tree which leads

toward the desired destination node.

To create the routing table, it is only necessary to walk the tree, remembering the identityof the node at the head of each branch, and filling in the routing table entry for each nodeone comes across with that identity.

Page 46: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 46/65

Optimizations to the algorithm

The algorithm described above was made as simple as possible, to aid in ease of understanding. In practice, there are a number of optimizations which are used.

Most importantly, whenever a change in the connectivity map happens, it is necessary torecompute the shortest-path tree, and then recreate the routing table. Work by BBNTechnologies discovered how to recomputed only that part of the tree which could have been affected by a given change in the map.

Also, the routing table would normally be filled in as the shortest-path tree is computed,instead of making it a separate operation.

Failure modes

If all the nodes are not working from exactly the same map, routing loops can form.

(These are situations in which, in the simplest form, two neighboring nodes each think the other is the best path to a given destination. Any packet headed to that destinationarriving at either node will loop between the two, hence the name. Routing loopsinvolving more than two nodes are also possible.)The reason is fairly simple: since eachnode computes its shortest-path tree and its routing table without interacting in any waywith any other nodes, then if two nodes start with different maps, it is easy to havescenarios in which routing loops are created.

HYBRID PROTOCOL

In hybrid protocol characteristics of both link state routing and default routing is present.EIRP protocol is being used in hybrid protocol

Page 47: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 47/65

DISTANCE VECTOR ROUTING PROTOCOL

In computer communication theory relating to packet-switched networks, a distance-

vector routing protocol is one of the two major classes of routing protocols, the other major class being the link-state protocol. A distance-vector routing protocol uses theBellman-Ford algorithm to calculate paths.

A distance-vector routing protocol requires that a router informs its neighbors of topologychanges periodically and, in some cases, when a change is detected in the topology of a

network. Compared to link-state protocols, which require a router to inform all the nodesin a network of topology changes, distance-vector routing protocols have lesscomputational complexity and message overhead. Distance Vector means that Routersare advertised as vector of distance and direction. 'Direction' is represented by next hopaddress and exit interface, whereas 'Distance' uses metrics such as hop count.

Routers using distance vector protocol do not have knowledge of the entire path to adestination. Instead DV uses two methods:

1. Direction in which or interface to which a packet should be forwarded.2. Distance from its destination.

Examples of distance-vector routing protocols include Routing Information ProtocolVersion 1 & 2, RIPv1 and RIPv2 and IGRP. EGP and BGP are not pure distance-vector routing protocols because a distance-vector protocol calculates routes based only on link costs whereas in BGP, for example, the local route preference value takes priority over the link cost.

Method 

The methods used to calculate the best path for a network are different between differentrouting protocols but the fundamental features of distance-vector algorithms are the same

across all DV based protocols.

Distance Vector means that Routers are advertised as vector of distance and Direction.Direction is simply next hop address and exit interface and Distance means such as hopcount.

Routers using distance vector protocol do not have knowledge of the entire path to adestination. Instead DV uses two methods:

Page 48: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 48/65

1. Direction in which or interface to which a packet should be forwarded.2. Distance from its destination.

As the name suggests the DV protocol is based on calculating the direction and distanceto any link in a network. The cost of reaching a destination is calculated using various

route metrics. RIP uses the hop count of the destination whereas IGRP takes into accountother information such as node delay and available bandwidth.

Updates are performed periodically in a distance-vector protocol where all or part of arouter's routing table is sent to all its neighbors that are configured to use the samedistance-vector routing protocol. RIP supports cross-platform distance vector routingwhereas IGRP is a Cisco Systems proprietary distance vector routing protocol. Once arouter has this information it is able to amend its own routing table to reflect the changesand then inform its neighbors of the changes. This process has been described as ‘routing by rumor’ because routers are relying on the information they receive from other routersand cannot determine if the information is actually valid and true. There are a number of 

features which can be used to help with instability and inaccurate routing information.

Limitations

Count-to-infinity problem

The Bellman-Ford algorithm does not prevent routing loops from happening and suffersfrom the count-to-infinity problem. The core of the count-to-infinity problem is that if A tells B that it has a path somewhere, there is no way for B to know if the path has B asa part of it. To see the problem clearly, imagine a subnet connected like as A-B-C-D-E-F,and let the metric between the routers be "number of jumps". Now suppose that A goes

down (out of order). In the vector-update-process B notices that the route to A, whichwas distance 1, is down - B does not receive the vector update from A. The problem is, Balso gets an update from C, and C is still not aware of the fact that A is down - so it tellsB that A is only two jumps from C (C to B to A) , which is false. This slowly propagatesthrough the network until it reaches infinity (in which case the algorithm corrects itself,due to the "Relax property" of Bellman Ford).

Partial solutions

RIP uses Split Horizon with Poison Reverse technique to reduce the chance of formingloops and uses a maximum number of hops to counter the 'count-to-infinity' problem.

These measures avoid the formation of routing loops in some, but not all, cases. Theaddition of a hold time (refusing route updates for a few minutes after a route retraction)avoids loop formation in virtually all cases, but causes a significant increase inconvergence times.

A number of loop-free distance vector protocols, such as EIGRP and DSDV, have beendeveloped. These avoid loop formation in all cases, but suffer from increased complexity,

Page 49: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 49/65

and their deployment has been slowed down by the success of link-state routing protocolssuch as OSPF.

Example

In this network we have 4 routers A, B, C, and D:

We shall mark the current time (or iteration) in the algorithm with T, and shall begin (attime 0, or T=0) by creating distance matrices for each router to its immediate neighbors.As we build the routing tables below, the shortest path is highlighted with the color green, a new shortest path is highlighted with the color yellow.

T=0

from

A

via

A

via

B

via

C

via

D

to A

to B 3

to C 23to D

from

B

via

A

via

B

via

C

via

D

to A 3

to B

to C 2to D

from

C

via

A

via

B

via

C

via

D

to A 23

to B 2

to Cto D 5

from

D

via

A

via

B

via

C

via

D

to A

to B

to C 5to D

At this point, all the routers (A,B,C,D) have new "shortest-paths" for their DV (the list of distances that are from them to another router via a neighbor). They each broadcast thisnew DV to all their neighbors: A to B and C, B to C and A, C to A, B, and D, and D to C.As each of these neighbors receives this information, they now recalculate the shortest path using it.

For example: A receives a DV from C that tells A there is a path via C to D, with adistance (or cost) of 5. Since the current "shortest-path" to C is 23, then A knows it has a path to D that costs 23+5=28. As there are no other shorter paths that A knows about, it

 puts this as its current estimate for the shortest-path from itself (A) to D, via C.

T=1

from

A

via

A

via

B

via

C

via

D

to A

to B 3 25

to C 5 23

to D 28

from

B

via

A

via

B

via

C

via

D

to A 3 25

to B

to C 26 2

to D 7

from

C

via

A

via

B

via

C

via

D

to A 23 5

to B 26 2

to C

to D 5

from

D

via

A

via

B

via

C

via

D

to A 28

to B 7

to C 5

to D

Page 50: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 50/65

Again, all the routers have gained in the last iteration (at T=1) new "shortest-paths", sothey all broadcast their DVs to their neighbors; This prompts each neighbor to re-calculate their shortest distances again.

For instance: A receives a DV from B that tells A there is a path via B to D, with a

distance (or cost) of 7. Since the current "shortest-path" to B is 3, then A knows it has a path to D that costs 7+3=10. This path to D of length 10 (via B) is shorter than theexisting "shortest-path" to D of length 28 (via C), so it becomes the new "shortest-path"to D.

T=2

from

A

via

A

via

B

via

C

via

D

to A

to B 3 25

to C 5 23

to D 10 28

from

B

via

A

via

B

via

C

via

D

to A 3 7

to B

to C 8 2

to D 31 7

from

C

via

A

via

B

via

C

via

D

to A 23 5 33

to B 26 2 12

to C

to D 33 9 5

from

D

via

A

via

B

via

C

via

D

to A 10

to B 7

to C 5

to D

This time, only routers A and D have new shortest-paths for their DVs. So they broadcasttheir new DVs to their neighbors: A broadcasts to B and C, and D broadcasts to C. Thiscauses each of the neighbors receiving the new DVs to re-calculate their shortest paths.However, since the information from the DVs doesn't yield any shorter paths than theyalready have in their routing tables, then there are no changes to the routing tables.

T=3

from

A

via

A

via

B

via

C

via

D

to A

to B 3 25

to C 5 23

to D 10 28

from

B

via

A

via

B

via

C

via

D

to A 3 7

to B

to C 8 2

to D 31 7

from

C

via

A

via

B

via

C

via

D

to A 23 5 15

to B 26 2 12

to C

to D 33 9 5

from

D

via

A

via

B

via

C

via

D

to A 10

to B 7

to C 5

to D

 None of the routers have any new shortest-paths to broadcast. Therefore, none of therouters receive any new information that might change their routing tables. So thealgorithm comes to a stop.

SWITCHES

1. Can be of two types:1. Manageable switches2. Nonmanagable switches

2. Switches can be of multicast or unicast but cannot be of broadcast

Page 51: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 51/65

3. It is a hardware device.4. It works fastly in comparison with hubs.5. Less B.W. is required in switches. It breaks collision domain i.e. breaks the area

where collision occurs.6. It has 100 ports.

7. There are three types:• Layer 3

• Layer 2

• LAN

Page 52: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 52/65

LINUX

LINUXIn1984 The GNU Project and the Free Software Foundation Creates open source version of 

UNIX utilities Creates the General Public License (GPL) Software license enforcing open

source principles.

Linux is a number system. It is a multitasking and multilevel operating system. Here

simultaneously many users can work on it. It is open source operating system i.e. its source

code is open to all without any cost. Source code is made on ‘C’ language. It is friendly to

Page 53: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 53/65

users. Linux is protocol based. Linux is a Unix-like based computer operating system. It has

 been ported to a vast variety of computer architectures. TCP can be applied on Linux. So, it

is more secure than any other operating system. It contains collection of multiple programs of 

‘C’. It is graphical supportable

In 1991: Linus Torvald Creates open source, UNIX-like kernel, released under the GPLPorts

some GNU utilities, solicits assistance online and Today Linux kernel + GNU utilities =

complete, open source, UNIX-like operating system Packaged for targeted audiences

as distributions

There are some Linux principle :

• Everything is a file (including hardware)

• Small, single-purpose programs

• Ability to chain programs together to perform complex tasks

• Avoid captive user interfaces

• Configuration data stored in text

SOME BASICS OF LINUX: Two types of login screens: virtual consoles (text-based) andgraphical logins (called display managers)Login using login name and password each user has a home directory for personal file

storage A typical Linux system will run six virtual consoles and one graphical console Server 

systems often have only virtual consoles Desktops and workstations typically have both

Switch among virtual consoles by typing: Ctrl-Alt-F[1-6]Access the graphical console by

typing Ctrl-Alt-F7.

 

Linux architecture

Page 54: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 54/65

Page 55: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 55/65

Types of users:

There are two types of users in Linux. They are

Administrator users

 Normal users

Administrator users are given full authority. Normal users are not given that much fullauthority.

Various Basic commands of Linux:

1. How to set password in Linux:# Passwd (enter) New UNIX password: ***** (enter)

Password username to give password (enter)#system-config-(tab) (enter)#system-config-root password (enter)#hostname (enter)

2. How to create users:#useadd username (enter)Password username (enter)

 

3. #history to show the history of the commands which are being used

#history 10 to show last 10 commands being used

4. #clear   used to clear the screen

5. userdel username to del any user 

6. Copy command:#cp source file name destination file name

7. Move command:#mv source file name destination file name

8. # rm file name to remove any file

9. # rm Directory name to remove any directory

10. Help Command:

man command name

what is command name

Page 56: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 56/65

info command name

command-name command—help

11. scp source file name destination file name for transferring of file

12. ssh destination address to bring in remote

13. Find Command:

find dir-name -name file-name

find /etc -name passwd

14. init 6 used to reboot the window

15. #ls all Linux file system are being shown here

16. #free to show memory size

LINUX FILE SYSTEM

Page 57: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 57/65

root is represented by forward /

home all users come over here

etc system configuration file used for configuring servers

 proc system generated process

dev used for connection of different devices

mnt used for moving the content of pen drive to any place

How TO Install Linux:

Page 58: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 58/65

After that we have to follow certain instruction.

SOME IMPORTANT DIRECTORIES

• Home Directories: /root,/home/username

• User Executables: /bin, /usr/bin, /usr/local/bin

• System Executables: /sbin, /usr/sbin, /usr/local/sbin

• Other Mountpoints: /media, /mnt

• Configuration: /etc

• Temporary Files: /tmp

• Kernels and Bootloader: /boot

• Server Data: /var, /srv

System Information: /proc, /sys• Shared Libraries: /lib, /usr/lib, /usr/local/lib

 

Users, Groups and Permissions

Page 59: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 59/65

• Every user is assigned a unique User ID number (UID)o UID 0 identifies root

• Users' names and UIDs are stored in /etc/passwd

• Users are assigned a home directory and a program that is run when they log in(usually a shell)

Users cannot read, write or execute each others' files without permission. Users areassigned to groupsEach group is assigned a unique Group ID number ( gid ). GIDs are storedin /etc/groupEach user is given their own private group. Can be added to other groups

for additional access.All users in a group can share files that belong to the group.

Four symbols are used when displaying permissions:o r: permission to read a file or list a directory's contents

o w: permission to write to a file or create and remove files from a directory

o x: permission to execute a program or change into a directory and do a long

listing of the directory

o -: no permission (in place of the r, w, or x)Eg: File permissions may be viewed using ls -l

$ ls -l /bin/login

-rwxr-xr-x 1 root root 19080 Apr 1 18:26 /bin/login

Changing File Ownership:

Only root can change a file's owner. Only root or the owner can change a file's groupOwnership is changed with chown:

• chown [-R] user_name file|directory 

Group-Ownership is changed with chgrp:

• chgrp [-R] group_name file|directory 

Using the bash Shell

Type Tab to complete command lines

Examples:$ xte<Tab> 

$ xterm 

$ ls myf<Tab> 

$ ls myfile.txt

Use history command to see list of "remembered" commands. Use the up and down keys toscroll through previous commands.Type Ctrl-r to search for a command in command history.

(reverse-i-search)`':To recall last argument from previous command:Esc,. (the escape key followed by a period)Alt-. (hold down the alt key while pressing the period)

Command Editing Tricks:

Page 60: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 60/65

Ctrl-a moves to beginning of lineCtrl-e moves to end of lineCtrl-u deletes to beginning of lineCtrl-k deletes to end of lineCtrl-arrow moves left or right by word

Scripting Basics

• Shell scripts are text files that contain a series of commands or statements to beexecuted.

o Shell scripts are useful for Automating commonly used commands.

Performing system administration and troubleshooting. Creating simpleapplications. Manipulation of text or files.

o

Step 1: Use such as vi to create a text file containing commands

First line contains the magic shebang sequence: #!#!/bin/bash

Comment your scripts!Comments start with a #

Step 2: Make the script executable:$ chmod u+x myscript.sh

To execute the new script:Place the script file in a directory in the executable path -OR-Specify the absolute or relative path to the script on the command line

  VIM: An advanced text editor

Keystroke behavior is dependent upon vim's "mode"Three main modes:Command Mode (default): Move cursor, cut/paste text, change modeInsert Mode: Modify textEx Mode: Save, quit, etcEsc exits current mode

EscEsc always returns to command mode

Basic System Configuration Tools Network interfaces are named sequentially: eth0, eth1, etc

Multiple addresses can be assigned to a device with aliases

Aliases are labeled eth0:1, eth0:2, etc.

Aliases are treated like separate interfacesView interface configuration with ifconfig [ethX ]

Enable interface with ifup ethX 

Disable interface with ifdown ethX 

Device configuration is stored in text files

Page 61: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 61/65

/etc/sysconfig/network-scripts/ifcfg-eth X 

Complete list of options in /usr/share/doc/initscripts-*/sysconfig.txt

Dynamic Configuration Static Configuration

DEVICE=eth X 

HWADDR=0:02:8A:A6:30:45BOOTPROTO=dhcpONBOOT=yesType=Ethernet

DEVICE=eth X 

HWADDR=0:02:8A:A6:30:45IPADDR=192.168.0.254 NETMASK=255.255.255.0GATEWAY=192.168.2.254ONBOOT=yesType=Ethernet

Global Settings in /etc/sysconfig/network

o Many may be provided by DHCP. GATEWAY can be overridden in ifcfg file

 NETWORKING=yesHOSTNAME=server1.example.comGATEWAY=192.168.2.254

Finding and Processing Files• locate foo

o Search for files with "foo" in the name or path

• locate -r '\.foo$'

o Regex search for files ending in ".foo"

• Useful optionso -i performs a case-insensitive search

o -n X lists only the first X matches

Find Example:

• find -name snow.png

o Search for files named snow.png

• find -iname snow.png

o Case-insensitive search for files named snow.png, Snow.png,

SNOW.PNG, etc• find -user joe -group joe

o Search for files owned by the user  joe and the group joe

scp: Secure File Transfer

Secure replacement for rcp• Layered on top of ssh

o scp  source destination

o Remote files can be specified using:

[user@]host:/path/to/file

Page 62: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 62/65

o Use -r to enable recursion

o Use -p to preserve times and permissions

o Use -C to compress datastream

User management tools

o Graphical tools: system-config-users

o Command-line:

o useradd

o usermod

o userdel [-r]

Inodes and Directories

ESSENTIAL TOOLS:

The Yum Package Management Tool

Page 63: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 63/65

FTP SERVER 

Step 1: yum install vsftpd*

Step 2: service vsftpd restart

Step 3: mkdir -p /var/ftp/pub/name of directory to create a directory

Step 4: cd /var/ftp/pub/name of directory/ (enter)

Step 5: CLIENT:#ftp ip address of server #Name aunonymous (enter)# ls#cd pub# ls# cd name of directory# ls

# get name of file

CLIENT:

web browser address:- ftp:/address of server/pub/directory name/name of file

TELNET

Step 1: yum install telnet*

Step 2: vim /etc/xinetd.d/telnet (enter) to configure the file of telnet

Step 3: chkconfig telnet on (enter)

Step 4: telnet ip address of destination

Login: Name of the others user Password: Of the user of other 

Page 64: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 64/65

Page 65: stuti(2)

8/8/2019 stuti(2)

http://slidepdf.com/reader/full/stuti2 65/65

CONCLUSION

Some areas to explore:RHEL includes several languages

o Compiled Languages

C, C++, Java, Ada, Assembly, FORTRAN 77o Interpreted Languages

Bash, Perl, Python, PHP, Ruby, Lisp/Scheme

o Programmers' Editors vi/vim, emacs/xemacs, the Eclipse IDE

o Lots more!

The primary difference between Linux and many other popular contemporary operating

systems is that the Linux kernel and other components are free and open source software.

Linux is not the only such operating system, although it is by far the most widely

used. Some free and open source software licenses are based on the principle of copyleft,

a kind of reciprocity: any work derived from a copyleft piece of software must also be

copyleft itself.

Linux based distributions are intended by developers for interoperability with other operating systems and established computing standards. Linux systems adhere

to POSIX, SUS, ISO, and ANSI standards where possible, although to date only one

Linux distribution has been POSIX.1 certified, Linux-FT.