Você está na página 1de 68

TRAINING REPORT ON

NETWORKING TECHNOLOGIES
Submitted By:-GAURAV CHANDRA
ABES ENGINEERING COLLEGE

CERTIFICATE

OIL AND NATURAL GAS CORPORATION LIMITED


Corporate Infocom Services, Scope Minar, Laxmi Nagar,
New Delhi- 110092

Date-27/07/2012
This is to certify that Mr. GAURAV CHANDRA , B.Tech (Electronics And
Communication Engineering) student of ABES Engineering College has
successfully completed his industrial training at ONGC,New Delhi from
18/06/2012 to 27/07/2012.
He has done his training on NETWORKING TECHNOLOGIES under
my guidance. I have observed that his work has been excellent and appreciate
his sincere learning. I wish him all the best for his future endeavour.

Brij Lekh Suthar


CE (E&T)
Corporate Infocom Services
ONGC, Delhi

ACKNOWLEDGEMENT
I take this opportunity to express my profound sense of gratitude and
appreciation to all those who helped me throughout the duration of this
training.
First and foremost, I would like to express my thanks to Mr. B.L Suthar
CE (E&T), Corporate Infocom Services, Delhi for providing valueable
guidance and expert supervision for this training.
I am also truly thankful to Mr. Rakesh Arora (Networks) for
encouragement, support and providing necessary input for the training.

CONTENTS
PAGE NO
1.INTRODUCTION TO COMPUTER NETWORKING

2.IP ADDRESSING

15

3.ROUTER

23

4.IP ROUTING

29

5.SWITCHING

41

6.VLAN AND ETHER CHANNEL

47

7.GNS3

52

INTRODUCTION TO COMPUTER
NETWORKING
A computer network, often simply referred to as a network, is a collection of computers and
other hardware components interconnected by communication channels that allow sharing
of resources and information
PROPERTIES OF COMPUTER NETWORKS
Computer networks:

Facilitate communications
Permit sharing of files, data, and other types of information
Share network and computing resources
May be insecure
May interfere with other technologies
May be difficult to set up

The communication technologies used in networks can be subdivide into wired and wireless
technologies
Wired technologies
The order of the following wired technologies is, roughly, from slowest to fastest
transmission speed.

Twisted pair wire is the most widely used medium for telecommunication. Twisted-pair
cabling consist of copper wires that are twisted into pairs. Ordinary telephone wires
consist of two insulated copper wires twisted into pairs. Computer networking cabling
(wired Ethernet as defined by IEEE 802.3) consists of 4 pairs of copper cabling that can
be utilized for both voice and data transmission. The use of two wires twisted together
helps to reduce crosstalk and electromagnetic induction. The transmission speed ranges
from 2 million bits per second to 10 billion bits per second. Twisted pair cabling comes in
two forms: unshielded twisted pair (UTP) and shielded twisted-pair (STP). Each form
comes in several category ratings, designed for use in various scenarios.

Coaxial cable is widely used for cable television systems, office buildings, and other
work-sites for local area networks. The cables consist of copper or aluminum wire
surrounded by an insulating layer (typically a flexible material with a high dielectric

constant), which itself is surrounded by a conductive layer. The insulation helps minimize
interference and distortion. Transmission speed ranges from 200 million bits per second
to more than 500 million bits per second.

An optical fiber is a glass fiber. It uses pulses of light to transmit data. Some advantages
of optical fibers over metal wires are less transmission loss, immunity from
electromagnetic radiation, and very fast transmission speed, up to trillions of bits per
second. One can use different colors of lights to increase the number of messages being
sent over a fiber optic cable.

Wireless technologies

Terrestrial microwave Terrestrial microwave communication uses Earth-based


transmitters and receivers resembling satellite dishes. Terrestrial microwaves are in the
low-gigahertz range, which limits all communications to line-of-sight. Relay stations are
spaced approximately 48 km (30 mi) apart.

Communications satellites The satellites communicate via microwave radio waves,


which are not deflected by the Earth's atmosphere. The satellites are stationed in space,
typically in geosynchronous orbit 35,400 km (22,000 mi) above the equator. These
Earth-orbiting systems are capable of receiving and relaying voice, data, and TV signals.
Infrared communication can transmit signals for small distances, typically no more than
10 meters. In most cases, line-of-sight propagation is used, which limits the physical
positioning of communicating devices

Networks may be classified according to a wide variety of characteristics, such as


communications protocol used, scale, topology, organizational scope and architecture.
On the basis of scale it can classified into
1.Local area network
A local area network (LAN) is a network that connects computers and devices in a limited
geographical area such as home, school, computer laboratory, office building, or closely
positioned group of buildings. Each computer or device on the network is a node. Current
wired LANs are most likely to be based on Ethernet technology, although new standards
like ITU-T G.hn also provide a way to create a wired LAN using existing home wires (coaxial
[12]
cables, phone lines and power lines).
The defining characteristics of LANs, in contrast to WANs (Wide Area Networks), include
their higher data transfer rates, smaller geographic range, and no need for leased
telecommunication lines. Current Ethernet or other IEEE 802.3 LAN technologies operate at
data transfer rates up to 10 Gbit/s.
2.Metropolitan area network

A Metropolitan area network (MAN) is a large computer network that usually spans a city or
a large campus
3.Wide area network
A wide area network (WAN) is a computer network that covers a large geographic area such
as a city, country, or spans even intercontinental distances, using a communications channel
that combines many types of media such as telephone lines, cables, and air waves. A WAN
often uses transmission facilities provided by common carriers, such as telephone
companies. WAN technologies generally function at the lower three layers of the OSI
reference model: the physical layer, the data link layer, and the network layer.
A network topology is the layout of the interconnections of the nodes of a computer network.
Common layouts are:
On the basis of topology computer networks can be classified into:

A bus network: all nodes are connected to a common medium .


A star network: all nodes are connected to a special central node. This is the typical
layout found in a W ireless LAN, where each wireless client connects to the central
Wireless access point.
A ring network: each node is connected to its left and right neighbour node, such that all
nodes are connected and that each node can reach each other node by traversing
nodes left- or rightwards.
A mesh network: each node is connected to an arbitrary number of neighbours in such a
way that there is at least one traversal from any node to any other.
A fully connected network: each node is connected to every other node in the network.

Protocol specifies a common set of rules and signals, the computers on the network
use to communicate. Most networks use Ethernet, but some networks may use IBMs
Token Ring protocol.

Following are some examples of protocols:


Transmission Control Protocol (TCP)
User Datagram Protocol (UDP)
Internet Control Message Protocol (ICMP)
Hypertext Transfer Protocol (HTTP)
Post Office Protocol (POP3)
File Transfer Protocol (FTP)
Internet Message Access Protocol (IMAP)
Bluetooth protocols
Fibre Channel network protocols
Internet Protocol Suite or TCP/IP model or TCP/IP stack
OSI protocols family of information exchange standards developed jointly by
the ISO and the ITU-T
Routing protocols
RTPS protocol, an interoperability protocol
SSH Secure Shell
SMTP Simple Mail Transfer Protocol
Telnet Telephone Network
HTTP Hyper Text Transfer Protocol
HTTPS Secure Hyper Text Transfer Protocol
SFTP Secure File Transfer Protocol
SSL Secure Socket Layer

There are two major types of network architecture:


Peer-to-Peer - In a Peer-to-Peer networking configuration, there is no server,
and computers simply connect with each other in a workgroup to share files,
printers, and Internet access. This is most commonly found in home
configurations, and is only practical for workgroups of a dozen or less computers.

Client/Server In a Client/Server network, there is usually an NT Domain


Controller, which all of the computers log on to. This server can provide various
services, including centrally routed Internet Access, main (including e-mail), file
sharing, and printer access, as well as ensuring security across the network.
This is most commonly found in corporate configurations, where network security
is essential.

Repeaters and hubs


A repeater is an electronic device that receives a signal, cleans it of unnecessary noise,
regenerates it, and retransmits it at a higher power level, or to the other side of an
obstruction, so that the signal can cover longer distances without degradation. In most
twisted pair Ethernet configurations, repeaters are required for cable that runs longer than
100 meters. A repeater with multiple ports is known as a hub. Repeaters work on the
Physical Layer of the OSI model. Repeaters require a small amount of time to regenerate
the signal. This can cause a propagation delay which can affect network communication
when there are several repeaters in a row.

Bridges
A network bridge connects multiple network segments at the data link layer (layer 2) of
the OSI model. Bridges broadcast to all ports except the port on which the broadcast was
received. However, bridges do not promiscuously copy traffic to all ports, as hubs do, but
learn which MAC addresses are reachable through specific ports. Once the bridge
associates a port and an address, it will send traffic for that address to that port only.
Bridges learn the association of ports and addresses by examining the source address of
frames that it sees on various ports. Once a frame arrives through a port, its source address
is stored and the bridge assumes that MAC address is associated with that port. The first
time that a previously unknown destination address is seen, the bridge will forward the frame
to all ports other than the one on which the frame arrived.
Bridges come in three basic types:

Local bridges: Directly connect LANs


Remote bridges: Can be used to create a wide area network (WAN) link between LANs.
Remote bridges, where the connecting link is slower than the end networks, largely have
been replaced with routers.
Wireless bridges: Can be used to join LANs or connect remote stations to LANs.

Switches
A network switch is a device that forwards and filters OSI layer 2 datagrams (chunks of data
communication) between ports (connected cables) based on the MAC addresses in the
packets. A switch is distinct from a hub in that it only forwards the frames to the ports
involved in the communication rather than all ports connected. A switch breaks the collision
domain but represents itself as a broadcast domain. Switches make forwarding decisions of
frames on the basis of MAC addresses. A switch normally has numerous ports, facilitating a
star topology for devices, and cascading additional switches. Some switches are capable of
routing based on Layer 3 addressing or additional logical levels; these are called multi-layer
switches.
Routers
A router is an internetworking device that forwards packets between networks by processing
information found in the datagram or packet (Internet protocol information fromLayer 3 of the
OSI Model). In many situations, this information is processed in conjunction with the routing
table (also known as forwarding table). Routers use routing tables to determine what
interface to forward packets (this can include the "null" also known as the "black hole"
interface because data can go into it, however, no further processing is done for said data).

OSI MODEL
The OSI, or Open System Interconnection, model defines a networking framework for
implementing protocols in seven layers. Control is passed from one layer to the next, starting
at the application layer in one station, and proceeding to the bottom layer, over the channel
to the next station and back up the hierarchy.
Application Layer (Layer 7)
The application layer is the OSI layer closest to the end user, which means that both the OSI
application layer and the user interact directly with the software application. This layer
interacts with software applications that implement a communicating component. Such
application programs fall outside the scope of the OSI model. Application-layer functions
typically include identifying communication partners, determining resource availability, and
synchronizing communication. When identifying communication partners, the application
layer determines the identity and availability of communication partners for an application
with data to transmit. When determining resource availability, the application layer must
decide whether sufficient network or the requested communications exist. In synchronizing
communication, all communication between applications requires cooperation that is
managed by the application layer. Some examples of application-layer implementations also
include:

On OSI stack:
o

FTAM File Transfer and Access Management Protocol

X.400 Mail

o Common Management Information Protocol (CMIP)


On TCP/IP stack:
o

Hypertext Transfer Protocol (HTTP),

File Transfer Protocol (FTP),

Simple Mail Transfer Protocol (SMTP)

Simple Network Management Protocol (SNMP).

Presentation Layer (Layer 6)


The presentation layer establishes context between application-layer entities, in which the
higher-layer entities may use different syntax and semantics if the presentation service
provides a mapping between them. If a mapping is available, presentation service data units
are encapsulated into session protocol data units, and passed down the stack.
This layer provides independence from data representation (e.g., encryption) by translating
between application and network formats. The presentation layer transforms data into the
form that the application accepts. This layer formats and encrypts data to be sent across a
network. It is sometimes called the syntax layer.

Session Layer (Layer 5)


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

Transport Layer (Layer 4)


This layer provides transparent transfer of data between end systems, or hosts, and is
responsible for end-to-end error recovery and flow control. It ensures complete data transfer.
The transport layer provides transparent transfer of data between end users, providing
reliable data transfer services to the upper layers. The transport layer controls the reliability
of a given link through flow control, segmentation/desegmentation, and error control. Some
protocols are state and connection oriented. This means that the transport layer can keep
track of the segments and retransmit those that fail. The transport layer also provides the
acknowledgement of the successful data transmission and sends the next data if no errors
occurred.
OSI defines five classes of connection-mode transport protocols ranging from class 0 (which
is also known as TP0 and provides the least features) to class 4 (TP4, designed for less
reliable networks, similar to the Internet). Class 0 contains no error recovery, and was
designed for use on network layers that provide error-free connections. Class 4 is closest to
TCP, although TCP contains functions, such as the graceful close, which OSI assigns to the
session layer. Also, all OSI TP connection-mode protocol classes provide expedited data
and preservation of record boundaries.
Perhaps an easy way to visualize the transport layer is to compare it with a Post Office,
which deals with the dispatch and classification of mail and parcels sent. Do remember,
however, that a post office manages the outer envelope of mail. Higher layers may have the
equivalent of double envelopes, such as cryptographic presentation services that can be
read by the addressee only. Roughly speaking, tunnelling protocols operate at the transport
layer, such as carrying non-IP protocols such as IBM's SNA or Novell's IPX over an IP
network.
Network Layer (Layer 3)
The network layer provides the functional and procedural means of transferring variable
length data sequences from a source host on one network to a destination host on a
different network (in contrast to the data link layer which connects hosts within the same
network), while maintaining the quality of service requested by the transport layer. The
network layer performs network routing functions, and might also perform fragmentation and
reassembly, and report delivery errors. Routers operate at this layer, sending data
throughout the extended network and making the Internet possible. This is a logical
addressing scheme - values are chosen by the network engineer. The addressing scheme is
not hierarchical.

The network layer may be divided into three sub layers:


1. Subnetwork access - that considers protocols that deal with the interface to
networks, such as X.25;
2. Subnetwork-dependent convergence - when it is necessary to bring the level of a
transit network up to the level of networks on either side
3. Subnetwork-independent convergence - handles transfer across multiple
networks.
A number of layer-management protocols, a function defined in the Management Annex,
ISO 7498/4, belong to the network layer. These include routing protocols, multicast group
management, network-layer information and error, and network-layer address assignment. It
is the function of the payload that makes these belong to the network layer, not the protocol
that carries.

Data Link Layer (Layer 2)


The data link layer provides the functional and procedural means to transfer data between
network entities and to detect and possibly correct errors that may occur in the physical
layer. Originally, this layer was intended for point-to-point and point-to-multipoint media,
characteristic of wide area media in the telephone system. Local area network architecture,
which included broadcast-capable multiaccess media, was developed independently of the
ISO work in IEEE Project 802. IEEE work assumed sublayering and management functions
not required for WAN use. In modern practice, only error detection, not flow control using
sliding window, is present in data link protocols such as Point-to-Point Protocol (PPP), and,
on local area networks, the IEEE 802.2 LLC layer is not used for most protocols on the
Ethernet, and on other local area networks, its flow control and acknowledgment
mechanisms are rarely used. Sliding window flow control and acknowledgment is used at the
transport layer by protocols such as TCP, but is still used in niches where X.25 offers
performance advantages.
Both WAN and LAN services arrange bits, from the physical layer, into logical sequences
called frames. Not all physical layer bits necessarily go into frames, as some of these bits
are purely intended for physical layer functions. For example, every fifth bit of the FDDI bit
stream is not used by the layer
Physical Layer (Layer 1)
The physical layer defines electrical and physical specifications for devices. In particular, it
defines the relationship between a device and a transmission medium, such as a copper
or fibre
optical
cable.
This
includes
the
layout
of pins, voltages, cable specifications, hubs, repeaters, network
adapters, host
bus
adapters (HBA used in storage area networks) and more.
The major functions and services performed by the physical layer are:

Establishment and termination of a connection to a communications medium.


Participation in the process whereby the communication resources are effectively
shared among multiple users. For example, contention resolution and flow control.

Modulation or conversion between the representation of digital data in user


equipment
and
the
corresponding
signals
transmitted
over
a
communications channel. These are signals operating over the physical cabling
(such as copper and optical fibre) or over a radio link.

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

IP ADDRESSING
An Internet Protocol address (IP address) is a numerical label assigned to each device
(e.g., computer, printer) participating in a computer network that uses the Internet Protocol
for communication. An IP address serves two principal functions: host or network interface
identification and location addressing.
32

In IPv4 an address consists of 32 bits which limits the address space to 4294967296 (2 )
possible unique addresses. IPv4 addresses are canonically represented in dot-decimal
notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by
dots, e.g., 172.16.254.1. Each part represents a group of 8 bits (octet) of the address
IP addresses are basically of two types:
1) Static IP address
2) Shared IP address
Thus, using more than one site on an IP address is called a Shared IP address. If a site has
its own IP address, and shares with no one else, it is called a Static IP address.
The first three bits of the most significant octet of an IP address were defined as the class of
the address. Three classes (A, B, and C) were defined for universal unicast addressing

Class

Leading bits Range of first


Network Host ID Number of
in address
octet
ID format format networks
(binary)
(decimal)

A
B

0
10

0127
128191

A
a.b

b.c.d
c.d

110

192223

a.b.c

Number of
addresses per
network
24

2 = 128
2 = 16777216
14
16
2 = 16384 2 = 65536
2 21 =
8
2 = 256
2097152

There are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class
E, while only A, B, and C are commonly used. Each class allows for a range of valid IP
addresses. Below is a listing of these addresses.
Class

Address Range

Supports

Class 1.0.0.1 to 126.255.255.254 Supports 16 million hosts on each of 127 networks.


A
Class 128.1.0.1 to
B
191.255.255.254

Supports 65,000 hosts on each of 16,000 networks.

Class 192.0.1.1 to
C
223.255.254.254

Supports 254 hosts on each of 2 million networks.

Class 224.0.0.0 to

Reserved for multicast groups.

239.255.255.255

Class 240.0.0.0 to
E
254.255.255.254

Reserved for future use, or Research and Development


Purposes.

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


dividing a network into two or more networks is called subnetting

The routing prefix is expressed in CIDR notation(Classless Inter-Domain Routing). It is


written as the first address of a network, followed by a slash character (/), and ending with
the bit-length of the prefix. For example, 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
prefix, and the remaining 8 bits reserved for host addressing
IP networks may be divided into subnetworks in both IPv4 and IPv6. For this purpose, an IP
address is logically recognized as consisting of two parts: the network prefix and the host
identifier, or interface identifier (IPv6).
n

In general the number of available hosts on a subnet is 2 2, where n is the number of bits
used for the host portion of the address.
Default Subnet Mask
For class a it is 255.0.0.0
For class b it is 255.255.0.0
For class c it is 255.255.255.0

Eg.class c subnetting
IP address 192.168.5.130
Subnet mask 255.255.255.0
Network prefix 192.168.5.0
Host part 0.0.0.130
Class a subnetting

IP address 68.1.5.99
Subnet mask 255.0.0.0
Network prefix 68.0.0.0
Host part 0.1.5.99
Class b subnetting
IP address 129.1.5.99
Subnet mask 255.255.0.0
Network prefix 129.1.0.0
Host part 0.0.5.99
Another Eg. of class c subnetting is:IP address 192.168.5.130
Subnet mask 255.255.255.192
Network prefix 192.168.5.128
Host part 0.0.0.2

IPV4
An IP packet consists of a header section and a data section.
Header
The IPv4 packet header consists of 14 fields, of which 13 are required. The 14th field is
optional (red background in table) and aptly named: options. The fields in the header are
packed with the most significant byte first (big endian), and for the diagram and discussion,
the most significant bits are considered to come first (MSB 0 bit numbering). The most
significant bit is numbered 0, so the version field is actually found in the four most significant
bits of the first byte, for example.
bit
offset

03

47

813

14-15

Version

Internet
Header
Length

Differentiated
Services Code
Point

Explicit
Congestion
Notification

1618

1931

Total Length

32

Identification

Time to Live

64

Flags

Protocol

96

Source IP Address

128

Destination IP Address

160

Options ( if Header Length > 5 )

160
or
192+

Data

Fragment Offset

Header checksum

Version
The first header field in an IP packet is the four-bit version field. For IPv4, this has a
value of 4 (hence the name IPv4).
Internet Header Length (IHL)
The second field (4 bits) is the Internet Header Length (IHL), which is the number of
32-bit words in the header. Since an IPv4 header may contain a variable number of
options, this field specifies the size of the header (this also coincides with the offset
to the data). The minimum value for this field is 5 (RFC 791), which is a length of
532 = 160 bits = 20 bytes. Being a 4-bit value, the maximum length is 15 words
(1532 bits) or 480 bits = 60 bytes.
Differentiated Services Code Point (DSCP)
Originally defined as the Type of Service field, this field is now defined by RFC
2474 for Differentiated services (DiffServ). New technologies are emerging that
require real-time data streaming and therefore make use of the DSCP field. An
example is Voice over IP (VoIP), which is used for interactive data voice exchange.
Explicit Congestion Notification (ECN)
This field is defined in RFC 3168 and allows end-to-end notification of network
congestion without dropping packets. ECN is an optional feature that is only used
when both endpoints support it and are willing to use it. It is only effective when
supported by the underlying network.
Total Length

This 16-bit field defines the entire packet (fragment) size, including header and data,
in bytes. The minimum-length packet is 20 bytes (20-byte header + 0 bytes data) and
the maximum is 65,535 bytes the maximum value of a 16-bit word. The largest
datagram that any host is required to be able to reassemble is 576 bytes, but most
modern hosts handle much larger packets. Sometimes subnetworks impose further
restrictions on the packet size, in which case datagrams must be fragmented.
Fragmentation is handled in either the host or router in IPv4.
Identification
This field is an identification field and is primarily used for uniquely identifying
fragments of an original IP datagram. Some experimental work has suggested using
the ID field for other purposes, such as for adding packet-tracing information to help
trace datagrams with spoofed source addresses.
Flags
A three-bit field follows and is used to control or identify fragments. They are (in
order, from high order to low order):

bit 0: Reserved; must be zero.

bit 1: Don't Fragment (DF)

bit 2: More Fragments (MF)

If the DF flag is set, and fragmentation is required to route the packet, then the
packet is dropped. This can be used when sending packets to a host that does not
have sufficient resources to handle fragmentation. It can also be used for Path MTU
Discovery, either automatically by the host IP software, or manually using diagnostic
tools such as ping ortraceroute.
For unfragmented packets, the MF flag is cleared. For fragmented packets, all
fragments except the last have the MF flag set. The last fragment has a non-zero
Fragment Offset field, differentiating it from an unfragmented packet.
Fragment Offset
The fragment offset field, measured in units of eight-byte blocks, is 13 bits long and
specifies the offset of a particular fragment relative to the beginning of the original
unfragmented IP datagram. The first fragment has an offset of zero. This allows a
13

maximum offset of (2

1) 8 = 65,528 bytes, which would exceed the maximum IP

packet length of 65,535 bytes with the header length included (65,528 + 20 = 65,548
bytes).
Time To Live (TTL)
An eight-bit time to live field helps prevent datagrams from persisting (e.g. going in
circles) on an internet. This field limits a datagram's lifetime. It is specified in
seconds, but time intervals less than 1 second are rounded up to 1. In practice, the

field has become a hop countwhen the datagram arrives at a router, the router
decrements the TTL field by one. When the TTL field hits zero, the router discards
the packet and typically sends a ICMP Time Exceeded message to the sender.
The program traceroute uses these ICMP Time Exceeded messages to print the
routers used by packets to go from the source to the destination.
Protocol
This field defines the protocol used in the data portion of the IP datagram.
The Internet Assigned Numbers Authority maintains a list of IP protocol
numbers which was originally defined in RFC 790.
Header Checksum
The 16-bit checksum field is used for error-checking of the header. When a packet
arrives at a router, the router calculates the checksum of the header and compares it
to the checksum field. If the values do not match, the router discards the packet.
Errors in the data field must be handled by the encapsulated protocol.
Both UDP and TCPhave checksum fields.
When a packet arrives at a router, the router decreases the TTL field. Consequently,
the router must calculate a new checksum. RFC 1071 defines the checksum
calculation:
The checksum field is the 16-bit one's complement of the one's complement sum of
all 16-bit words in the header. For purposes of computing the checksum, the value of
the checksum field is zero.
For example, consider Hex 4500003044224000800600008c7c19acae241e2b (20
bytes IP header):
Step 1) 4500 + 0030 + 4422 + 4000 + 8006 + 0000 + 8c7c + 19ac + ae24 + 1e2b =
2BBCF (16-bit sum)
Step 2) 2 + BBCF = BBD1 = 1011101111010001 (1's complement 16-bit sum)
Step 3) ~BBD1 = 0100010000101110 = 442E (1's complement of 1's complement
16-bit sum)
To validate a header's checksum the same algorithm may be used - the checksum of
a header which contains a correct checksum field is a word containing all zeros
(value 0):
2BBCF + 442E = 2FFFD. 2 + FFFD = FFFF. the 1'S of FFFF = 0.
Source address
This field is the IPv4 address of the sender of the packet. Note that this address may
be changed in transit by a network address translation device.
Destination address

This field is the IPv4 address of the receiver of the packet. As with the source
address, this may be changed in transit by a network address translation device.
Options
The options field is not often used. Note that the value in the IHL field must include
enough extra 32-bit words to hold all the options (plus any padding needed to ensure
that the header contains an integral number of 32-bit words). The list of options may
be terminated with an EOL (End of Options List, 0x00) option; this is only necessary
if the end of the options would not otherwise coincide with the end of the header. The
possible options that can be put in the header are as follows:

Size
(bits)

Field

Description

Copied

Set to 1 if the options need to be copied into all fragments of a


fragmented packet.

Option
Class

A general options category. 0 is for "control" options, and 2 is for


"debugging and measurement". 1, and 3 are reserved.

Option
Number

Specifies an option.

Option
Length

Indicates the size of the entire option (including this field). This field
may not exist for simple options.

Option
Data

Variable Option-specific data. This field may not exist for simple options.

If the header length is greater than 5, i.e. it is from 6 to 15, it means that the options field
is present and must be considered.
Copied, Option Class, and Option Number are sometimes referred to as a single eightbit field - the Option Type.
The following two options are discouraged because they create security
concerns: Loose Source and Record Route (LSRR) and Strict Source and Record
Route (SSRR). Many routers block packets containing these options.

Data
The data portion of the packet is not included in the packet checksum. Its contents are
interpreted based on the value of the Protocol header field.

ROUTER
A router is a device that forwards data packets between computer networks, creating an
overlay internetwork. A router is connected to two or more data lines from different networks.
When a data packet comes in on one of the lines, the router reads the address information in
the packet to determine its ultimate destination. Then, using information in its routing
table or routing policy, it directs the packet to the next network on its journey. Routers
perform the "traffic directing" functions on the Internet. A data packet is typically forwarded
from one router to another through the networks that constitute the internetwork until it gets
to its destination node.
Routers may provide connectivity within enterprises, between enterprises and the Internet,
and between internet service providers(ISPs) networks. The largest routers (such as
the Cisco CRS-1 or Juniper T1600) interconnect the various ISPs, or may be used in large
enterprise networks Smaller routers usually provide connectivity for typical home and office
networks.
Access routers, including 'small office/home office' (SOHO) models, are located at customer
sites such as branch offices that do not need hierarchical routing of their own. Typically, they
are optimized for low cost.
Distribution routers aggregate traffic from multiple access routers, either at the same site, or
to collect the data streams from multiple sites to a major enterprise location. Distribution
routers are often responsible for enforcing quality of service across a W AN, so they may
have considerable memory installed, multiple WAN interface connections, and substantial
onboard data processing routines. They may also provide connectivity to groups of file
servers or other external networks.
In enterprises, a core router may provide a "collapsed backbone" interconnecting the
distribution tier routers from multiple buildings of a campus, or large enterprise locations.
They tend to be optimized for high bandwidth.

Set a console password to cisco

Router(config)#line con 0
Router(config-line)#password cisco
Router(config-line)#login

Set a telnet password

Router(config)#line vty 0 4
Router(config-line)#password cisco
Router(config-line)#login

Stop console timing out

Router(config)#line con 0
Router(config-line)#exec-timeout 0 0

Set the enable password to cisco

Router(config)#enable password cisc o

Enable an interface

Router(config-if)#no shutdown

To disable an interface

Router(config-if)#shutdown

Set the clock rate for a router with a DCE cable to 64K

Router(config-if)clock rate 64000

Set the enable secret password to peter.

Router(config)#enable secret peter

This password overrides the enable password


and is encypted within the config file

To add an IP address to a interface

Router(config-if)#ip addr 10.1.1.1 255.255.255.0

To set auxiliary password

Router(config)#line aux 0
Router(config-line)#password cisco
Router(config-line)#login

Setting the Banner


To specify a message-of-the-day (MOTD) banner, use the banner motd global configuration
command. The no form of this command deletes the MOTD banner. When someone
connects to the router, the MOTD banner appears before the login prompt.
Router(config)# banner motd # message #
Setting system clock
The system clock runs from the moment the system starts up and keeps track of the current
date and time based on Coordinated Universal Time (UTC), also known as Greenwich Mean
Time (GMT). The system clock can be set from a number of sources, and in turn can be
used to distribute the current time through various mechanisms to other systems. To
manually set the system clock, use one of the formats of the clock set EXEC command.
clock set hh:mm:ss day month yyyy
clock set hh:mm:ss month day yyyy
in the following example ,the system clock is manually set to 1:32 pm on May 12 2012
Router# clock set 13:32:00 12 May 2012

Hardware Components
There are 7 major internal components of a router:
o
o
o
o
o
o
o

CPU
NVRAM
DRAM
Flash
ROM
Console
Interfaces

CPU
The CPU performs functions just as it does in a normal PC. It executes commands given by
the IOS using other hardware components. High-end routers may contain multiple
processors or extra slots to add more CPUs later.
NVRAM
Nonvolatile RAM is used to store the startup configuration files. This type of RAM does not
lose its content when the router is restarted or powered off.
DRAM
Random Access Memory; this component is dynamic. Meaning, its content changes
constantly. The main role of the RAM is to: hold the ARP cache, Store routing tables, hold
fast-switching cache, performs packet buffering, and hold queues. It also provides temporary
memory for the configuration file of the router while the router is powered on. However, the
RAM loses content when router is restarted or powered off. This component is upgradeable
Flash
Flash memory is very important because it saves you if you screw up the operating system
configuration. It holds the Cisco IOS image file, as well as backups. This flash memory is
classified as an EEPROM. The flash ROM is upgradeable in most Cisco routers.
ROM
The ROM performs the same operations as a BIOS. It holds information about the systems
hardware components and runs POST when the router first starts up. This component can
be upgraded by "unplugging" the chip and installing a new one.
Console
The console consists of the physical plugs and jacks on the router. The purpose of the
console is to provide access for configurations.
Interfaces
The interfaces provide connectivity to LAN, WAN, and Console/Aux. They can be RJ-45
jacks soldered onto the motherboard, transceiver modules, or card modules. Cisco routers,
especially the higher-end models, can be configured in many different ways. They can use a
combination of transceivers, card modules and onboard interfaces.

Cisco Router IOS


The Cisco Internetwork Operating System (IOS) is the kernel of Cisco routers and
most switches. It is the basic, indispensable part of an operating system that allocates
resources and manages things such as low-level hardware interfaces and security.
These are some important things that the Cisco router IOS software is responsible
for:

Carrying network protocols and functions


Connecting high-speed traffic between devices
Adding security to control access and stop unauthorized network use
Providing scalability for ease of network growth and redundancy
Supplying network reliability for connecting to network resources

Connecting to a Cisco Router

We can connect to a Cisco router to configure it, verify its configuration, and check
statistics. There are following different ways to do this :

Console Port : usually an RJ-45 (8-pin modular) connection located at the back of
the routerby default, there may or may not be a password set. The new ISR routers
use cisco as the username and cisco as the password by default.

Auxiliary Port : same thing as a console port, so it follows that it can be used
as one. But an auxiliary port also allows to configure modem commands so that a
modem can be connected to the router. This is an important feature as it lets dial up
a remote router and attach to the auxiliary port if the router is down and we need to
configure it out-of-band (meaning from outside of the network).

Telnet : it is a terminal emulation program that acts as though its a dumb terminal.
We can use Telnet to connect to any active interface on a router, such as an
Ethernet or serial port. It is an is in-band way to connect to a Cisco router, through
the program Telnet. (In-band means configuring the router through the network, the
opposite of out-of-band.)

CISCO 7600 SERIES


FEATURES

Chassis ranges: 3-slot (240Gbit/s), 4-slot ( 320Gbit/s ), 6-slot ( 480Gbit/s), 9-slot


(720Gbit/s) and 13-slot (720Gbit/s).
Up to 256 Gbit/s switching fabric capacity and up to 30 Mpps forwarding performance
Interface breadth: Scaling from DS0 to OC-48/STM-16; 10 Mbit/s Ethernet to 10 Gigabit
Ethernet
Support for Cisco 7200/7500 Port Adapters via FlexWAN module
IP/MPLS features : MPLS VPN, Class-Based W eighted Fair Queuing/ Low Latency
Queuing (CBWFQ/LLQ), W eighted random early detection (WRED), hierarchical traffic
shaping, and Quality of Service
Ethernet subscriber services: 32,000 PPPoE subscribers, 16,000 L2TP tunnels and
16,000 SSG subscribers per MWAM module

CISCO 7200 SERIES


FEATURES
1.Up to 400-kpps processing capability Provides high-performance routing and processing
performance
2.Maximum connectivity options Meets a variety of topology requirements with the widest
range of port densities and interface options
3.Breadth of services Supports QoS, security, MPLS, broadband, multiservice, and
management features for next-generation networks
4.Investment protection Low initial investment with upgrade and redeployment capability

CISCO 2500 SERIES


The Cisco 2500 series of routers are a series of 19" rack mount access routers typically
used to connect Ethernet or token ringnetworks via ISDN or leased serial connections
(i.e. Frame Relay, T1 etc.). The routers are based on a Motorola 68EC030 CISC processor.
This line of routers is no longer sold or supported by Cisco Systems. These are also known
as modular routers.
SPECIFICATIONS

CPU: Motorola 68EC030 20 MHz


RAM: Up to 16 MB
Flash: 4, 8 or 16 MB
Power consumption: 40 W
Dimensions: 4.44 44.45 26.82 cm (standard 19-inch rackmount - 1RU)
Weight: 4.5 kg
Power supplies: 110/240 V AC or 48 V DC
Supported interfaces: Ethernet (10 Mbit/s), Token Ring (16 Mbit/s), ISDN BRI (128
kbit/s), Sync Serial (2 Mbit/s), Async Serial.
Bandwidth: 4400 packets-per-second (using CEF)
Typical throughput: 2.2 Mbit/s (64-byte packets) 6-8 Mbit (1500-byte packets)

The modular routers had 3 interface slots available - 2 Synchronous Serial and 1 ISDN. The
ISDN modules were keyed so as not to be inserted into a Synchronous WAN module slot.
The following modules were available:

2-wire, switched 56-kbit/s DSU/CSU (RJ11)


4-wire, 56/64-kbit/s DSU/CSU (RJ48S)
Fractional T1/T1 DSU/CSU (RJ48C)
Five-in-one synchronous serial (DB60) (Supported five signalling types - EIA/TIA-232,
EIA/TIA-449, V.35, X.21 and EIA-530).
ISDN BRI (S/T) (RJ45)
ISDN with integrated NT1 device (U) (RJ45)

IP ROUTING
Routing is the process of selecting paths in a network along which to send network traffic
Static Routing
Static routing occurs when you manually add routes in each routers routing table. There are
pros and cons to static routing, but thats true for all routing processes.
Static routing has the following benefits:
There is no overhead on the router CPU, which means you could possibly buy a
cheaper router than you would use if you were using dynamic routing.
There is no bandwidth usage between routers, which means you could possibly save
money on WAN links.
It adds security because the administrator can choose to allow routing access to
certain networks only.
Static routing has the following disadvantages:
The administrator must really understand the internetwork and how each router is
connected in order to configure routes correctly.
If a network is added to the internetwork, the administrator has to add a route to it on
all routersby hand.
Its not feasible in large networks because maintaining it would be a full-time job in
itself.

Command syntax used to add a static route to a routing table:


ip route [destination_network] [mask] [next-hop_address or
exitinterface] [administrative_distance] [permanent]
This list describes each command in the string:
ip route The command used to create the static route.
destination_network The network youre placing in the routing table.
mask The subnet mask being used on the network.
next-hop_address The address of the next-hop router that will receive the packet and
forward it to the remote network. This is the IP address of a
router interface thats on a directly connected network. You must be able to ping the router
interface before you can successfully add the route.
If you type in the wrong next-hop address or the interface to that router is down, the static
route will show up in the routers configuration but not
in the routing table.
exitinterface Used in place of the next-hop address if you want, and shows up as a directly
connected route.
administrative_distance By default, static routes have an administrative distance of 1 (or
even 0 if you use an exit interface instead of a next-hop
address). You can change the default value by adding an administrative weight at the end of
the command. Ill talk a lot more about this subject
later in the chapter when we get to the section on dynamic routing.
permanent If the interface is shut down or the router cant communicate to the next-hop
router, the route will automatically be discarded from the
routing table by default. Choosing the permanent option keeps the entry in the routing table
no matter what happens

Default Routing
We use default routing to send packets with a remote destination network not in the routing
table to the next-hop router. One should only use default routing on stub networksthose
with only one exit path out of the network.
Normally, if a specific route to a particular network does not exist, a router will drop all traffic
destined to that network. A default route, or gateway of last resort, allows traffic to be
forwarded, even without a specific route to a particular network.
The default route is identified by all zeros in both the network and subnet
mask (0.0.0.0 0.0.0.0). It is the least specific route possible, and thus will
only be used if a more specific route does not exist (hence gateway of last
resort).
To configure a default route:
Router(config)# ip route 0.0.0.0 0.0.0.0 172.17.1.2
It is possible to specify an entire default network on a Cisco device:
Router(config)# ip default-network 172.20.0.0
The default route in Internet Protocol Version 4 (IPv4) is designated as the zeroaddress 0.0.0.0/0 in CIDR notation, often called the quad-zero route. The subnet mask is
given as /0, which effectively specifies all networks, and is the shortest match possible. A
route lookup that does not match any other route, falls back to this route. Similarly, in IPv6,
the default route is specified by ::/0
Dynamic Routing
Dynamic routing is when protocols are used to find networks and update routing tables on
routers.Dynamic routing protocols are supported by software applications running on the
routing device (the router) which dynamically learn network destinations and how to get to
them and also advertise those destinations to other routers. This advertisement function
allows all the routers to learn about all the destination networks that exist and how to to
those networks.
A router using dynamic routing will 'learn' the routes to all networks that are directly
connected to the device. Next, the router will learn routes from other routers that run the
same routing protocol (RIP, RIP2, EIGRP, OSPF, IS-IS, BGP etc). Each router will then sort
through it's list of routes and select one or more 'best' routes for each network destination
the router knows or has learned.
Dynamic routing protocols will then distribute this 'best route' information to other routers
running the same routing protocol, thereby extending the information on what networks exist
and can be reached. This gives dynamic routing protocols the ability to adapt to logical
network topology changes, equipment failures or network outages 'on the fly'.

Administrative Distances
The administrative distance (AD) is used to rate the trustworthiness of routing information
received on a router from a neighbor router. An administrative distance is an integer from 0
to 255, where 0 is the most trusted and 255 means no traffic will be passed via this route.
If a router receives two updates listing the same remote network, the first thing the router
checks is the AD. If one of the advertised routes has a lower AD than the other, then the
route with the lowest AD will be placed in the routing table.
If both advertised routes to the same network have the same AD, then routing protocol
metrics (such as hop count or bandwidth of the lines) will be used to find the best path to the
remote network. The advertised route with the lowest metric will be placed in the routing
table. But if both advertised routes have the same AD as well as the same metrics, then the
routing protocol will load-balance to the remote network (which means that it sends packets
down each link).
Route Source
Default AD
Connected interface 0
Static route
1
EIGRP
90
IGRP
100
OSPF
110
RIP
120
External EIGRP
170
Unknown
255 (This route will never be used.)

Routing Protocols
There are three classes of routing protocols:
Distance vector The distance-vector protocols in use today find the best path to a remote
network by judging distance. For example, in the case of RIP routing, each time a packet
goes through a router, thats called a hop. The route with the least number of hops to the
network is determined to be the best route. The vector indicates the direction to the remote
network. Both RIP and IGRP are distance-vector routing protocols. They periodically send
the entire routing table to directly connected neighbors.
Link state In link-state protocols, also called shortest-path-first protocols, the routers each
create three separate tables. One of these tables keeps track of directly attached neighbors,
one determines the topology of the entire internetwork, and one is used as the routing table.
Linkstate routers know more about the internetwork than any distance-vector routing
protocol. OSPF is an IP routing protocol that is completely link state. Link-state protocols
send updates containing the state of their own links to all other directly connected routers on
the network, which is then propagated to their neighbors.
Hybrid Hybrid protocols use aspects of both distance vector and link statefor example,
EIGRP.

Distance-Vector Routing Protocols


The distance-vector routing algorithm passes complete routing table contents to neighboring
routers, which then combine the received routing table
entries with their own routing tables to complete the routers routing table. This is called
routing by rumor because a router receiving an update from

a neighbor router believes the information about remote networks without actually finding out
for itself.
RIP uses only hop count to determine the best path to a network. If RIP finds more than one
link with the same hop count to the same remote
network, it will automatically perform a round-robin load balancing. RIP can perform load
balancing for up to six equal-cost links (four by default).
Routing Loops
Distance-vector routing protocols keep track of any changes to the internetwork by
broadcasting periodic routing updates out all active interfaces.
This broadcast includes the complete routing table. This works just fine, but its expensive in
terms of CPU processing and link bandwidth. And if a network outage happens, real
problems can occur. Plus, the slow convergence of distance-vector routing protocols can
result in inconsistent routing tables and routing loops.
Maximum Hop Count
The routing loop problem just described can create an issue called counting to infinity, and
its caused by gossip (broadcasts) and wrong information being communicated and
propagated throughout the internetwork. Without some form of intervention, the hop count
increases indefinitely each time a packet passes through a router.
One way of solving this problem is to define a maximum hop count. RIP permits a hop count
of up to 15, so anything that requires 16 hops is deemed unreachable. In other words, after a
loop of 15 hops, Network 5 will be considered down. Thus, the maximum hop count will
control how long it takes for a routing table entry to become invalid or questionable.
Split Horizon
Another solution to the routing loop problem is called split horizon. This reduces incorrect
routing information and routing overhead in a distance vector
network by enforcing the rule that routing information cannot be sent back in the direction
from which it was received.
In other words, the routing protocol differentiates which interface a network route was
learned on, and once this is determined, it wont advertise the route back out that same
interface. This would have prevented Router A from sending the update information it
received from Router B back to Router B.
Route Poisoning
Another way to avoid problems caused by inconsistent updates and stop network loops is
route poisoning. For example, when Network 5 goes down, Router E initiates route
poisoning by advertising Network 5 with a hop count of 16, or unreachable (sometimes
referred to as infinite).
This poisoning of the route to Network 5 keeps Router C from being susceptible to incorrect
updates about the route to Network 5. When Router C receives a route poisoning from
Router E, it sends an update, called a poison reverse, back to Router E. This ensures that all
routers on the segment have received the poisoned route information.
Holddowns
A holddown prevents regular update messages from reinstating a route that is going up and
down (called flapping). Typically, this happens on a serial link thats losing connectivity and

then coming back up. If there wasnt a way to stabilize this, the network would never
converge and that one flapping interface could bring the entire network down!
Holddowns prevent routes from changing too rapidly by allowing time for either the downed
route to come back up or the network to stabilize somewhat before changing to the next best
route. These also tell routers to restrict, for a specific time period, changes that might affect
recently removed routes. This prevents inoperative routes from being prematurely restored
to other routers tables.

Routing Information Protocol (RIP)


Routing Information Protocol (RIP) is a true distance-vector routing protocol. RIP sends the
complete routing table out to all active interfaces every 30 seconds. RIP only uses hop count
to determine the best way to a remote network, but it has a maximum allowable hop count of
15 by default, meaning that 16 is deemed unreachable. RIP works well in small networks,
but its inefficient on large networks with slow WAN links or on networks
with a large number of routers installed.
RIP version 1 uses only classful routing, which means that all devices in the network must
use the same subnet mask. This is because RIP version 1 doesnt send updates with subnet
mask information in tow. RIP version 2 provides something called prefix routing and does
send subnet mask information with the route updates. This is called classless routing.
RIP Timers
RIP uses four different kinds of timers to regulate its performance:
Route update timer Sets the interval (typically 30 seconds) between periodic routing
updates in which the router sends a complete copy of its
routing table out to all neighbors.
Route invalid timer Determines the length of time that must elapse (180 seconds) before a
router determines that a route has become invalid. It will come to this conclusion if it hasnt
heard any updates about a particular route for that period. When that happens, the router will
send out updates to all its neighbors letting them know that the route is invalid.
Holddown timer This sets the amount of time during which routing information is
suppressed. Routes will enter into the holddown state when an update packet is received
that indicates the route is unreachable. This continues either until an update packet is
received with a better metric, the original route comes back up, or the holddown timer
expires. The default is 180 seconds.
Route flush timer Sets the time between a route becoming invalid and its removal from the
routing table (240 seconds). Before its removed from the table, the router notifies its
neighbors of that routes impending demise. The value of the route invalid timer must be less
than that of the route flush timer. This gives the router enough time to tell its neighbors about
the invalid route before the local routing table is updated.
Differences between RIPv1 and RIPv2
RIPv1
Distance vector
Maximum hop count of 15
Classful
Broadcast based
No support for VLSM
No authentication

RIPv2
Distance vector
Maximum hop count of 15
Classless
Uses multicast 224.0.0.9
Supports VLSM networks
Allows for MD5 authentication

No support for discontiguous networks

Supports discontiguous networks

EIGRP
Enhanced Interior Gateway Routing Protocol (EIGRP) is a proprietary Cisco protocol that
runs on Cisco routers.
Enhanced IGRP (EIGRP) is a classless, enhanced distance-vector protocol that uses the
concept of an autonomous system to describe the set of contiguous routers that run the
same routing protocol and share routing information. EIGRP includes the subnet mask in its
route updates because it is considered classless
EIGRP is sometimes referred to as a hybrid routing protocol because it has characteristics of
both distance-vector and link-state protocols.
There are a number of powerful features that make EIGRP a real standout from other
protocols. The main ones are listed here:
Support for IP and IPv6 (and some other useless routed protocols) via protocoldependent modules
Considered classless (same as RIPv2 and OSPF)
Support for VLSM/CIDR
Support for summaries and discontiguous networks
Efficient neighbor discovery
Communication via Reliable Transport Protocol (RTP)
Best path selection via Diffusing Update Algorithm (DUAL)
One of the most interesting features of EIGRP is that it provides routing support for multiple
Network layer protocols: IP, IPX, AppleTalk, and now IPv6.
Feasible distance (FD) This is the best metric among all paths to a remote network,
including the metric to the neighbor that is advertising that remote network. The route with
the lowest FD is the route that you will find in the routing table because it is considered the
best path. The metric of a feasible distance is the metric reported by the neighbor (called
reported or advertised distance) plus the metric to the neighbour reporting the route.
Reported/advertised distance (AD) This is the metric of a remote network, as reported by
a neighbor. It is also the routing table metric of the neighbor and is the same as the second
number in parentheses as displayed in the topology table, the first number being the feasible
distance.
Neighbor table Each router keeps state information about adjacent neighbors. When a
newly discovered neighbor is learned, the address and interface of the neighbor are
recorded, and this information is held in the neighbor table, stored in RAM. There is one
neighbor table for each protocol-dependent module. Sequence numbers are used to match
acknowledgments with update packets. The last sequence number received from the
neighbor is recorded so that out-of-order packets can be detected.
Topology table The topology table is populated by the protocol-dependent modules and
acted upon by the Diffusing Update Algorithm (DUAL). It contains all destinations advertised

by neighboring routers, holding each destination address and a list of neighbors that have
advertised the destination. For each neighbor, the advertised metric (distance), which comes
only from the neighbors routing table, is recorded as well as the FD. If the neighbor is
advertising this destination, it must be using the route to forward packets.
Feasible successor A feasible successor is a path whose advertised distance is less than
the feasible distance of the current successor, and it is considered a backup route. EIGRP
will keep up to 16 feasible successors in the topology table. Only the one with the best
metric (the successor) is copied and placed in the routing table. The show ip eigrp topology
command will display all the EIGRP feasible successor routes known to a router.
Successor A successor route (think successful!) is the best route to a remote network. A
successor route is used by EIGRP to forward traffic to a destination and is stored in the
routing table. It is backed up by a feasible successor route that is stored in the topology
tableif one is available.
EIGRP uses a proprietary protocol called Reliable Transport Protocol (RTP) to manage the
communication of messages between EIGRP speaking routers.
EIGRP uses Diffusing Update Algorithm (DUAL) for selecting and maintaining the best path
to each remote network. This algorithm allows for the following:
Backup route determination if one is available
Support of VLSMs
Dynamic route recoveries
Queries for an alternate route if no feasible successor route can be found

OSPF
Open Shortest Path First (OSPF) is an open standard routing protocol thats been
implemented by a wide variety of network vendors, including
Cisco.
Open Shortest Path First (OSPF) is an adaptive routing protocol for Internet Protocol (IP)
networks. It uses a link state routing algorithm and falls into the group of interior routing
protocols, operating within a single autonomous system
In OSPF ,first a shortest path tree is constructed, and then the routing table is populated with
the resulting best paths. OSPF converges quickly, although perhaps not as quickly as
EIGRP, and it supports multiple, equal-cost routes to the same destination. Like EIGRP, it
does support both IP and IPv6 routed protocols.
OSPF provides the following features:
Consists of areas and autonomous systems
Minimizes routing update traffic
Allows scalability
Supports VLSM/CIDR
Has unlimited hop count
Allows multi-vendor deployment (open standard)

OSPF TERMINOLOGY
Link A link is a network or router interface assigned to any given network. When an interface
is added to the OSPF process, its considered by OSPF to be a link. This link, or interface,
will have state information associated with it (up or down) as well as one or more IP
addresses.
Router ID The Router ID (RID) is an IP address used to identify the router. Cisco chooses
the Router ID by using the highest IP address of all configured loopback interfaces. If no
loopback interfaces are configured with addresses, OSPF will choose the highest IP address
of all active physical interfaces.
Neighbor Neighbors are two or more routers that have an interface on a common network,
such as two routers connected on a point-to-point serial link.
Adjacency An adjacency is a relationship between two OSPF routers that permits the direct
exchange of route updates. OSPF is really picky about sharing routing informationunlike
EIGRP, which directly shares routes with all of its neighbors. Instead, OSPF directly shares
routes only with neighbors that have also established adjacencies. And not all neighbors will
become adjacentthis depends upon both the type of network and the configuration of the
routers.
Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and
maintains neighbor relationships. Hello packets and Link State Advertisements (LSAs) build
and maintain the topological database. Hello packets are addressed to multicast address
224.0.0.5.
Neighborship database The neighborship database is a list of all OSPF routers for which
Hello packets have been seen. A variety of details, including the Router ID and state, are
maintained on each router in the neighborship database.
Topological database The topological database contains information from all of the Link
State Advertisement packets that have been received for an area. The router uses the

information from the topology database as input into the Dijkstra algorithm that computes the
shortest path to every network.
Link State Advertisement A Link State Advertisement (LSA) is an OSPF data packet
containing link-state and routing information thats shared among OSPF routers. There are
different types of LSA packets, and Ill go into these shortly. An OSPF router will exchange
LSA packets only with routers to which it has established adjacencies.
Designated router A designated router (DR) is elected whenever OSPF routers are
connected to the same multi-access network. Cisco likes to call these broadcast networks,
but really, they are networks that have multiple recipients. Try not to confuse multi-access
with multipoint, which can be easy to do sometimes.
A prime example is an Ethernet LAN. To minimize the number of adjacencies formed, a DR
is chosen (elected) to disseminate/receive routing information to/from the remaining routers
on the broadcast network or link. This ensures that their topology tables are synchronized.
All routers on the shared network will establish adjacencies with the DR and backup
designated router (BDR)Ill define this next. The election is won by the router with the
highest priority, and the highest Router ID is used as a tiebreaker if the priority of more than
one router turns out to be the same.
Backup designated router A backup designated router (BDR) is a hot standby for the DR
on multi-access links (remember that Cisco sometimes likes to call these broadcast
networks). The BDR receives all routing updates from OSPF adjacent routers but doesnt
flood LSA updates.
OSPF areas An OSPF area is a grouping of contiguous networks and routers. All routers in
the same area share a common Area ID.Because a router can be a member of more than
one area at a time, the Area ID is associated with specific interfaces on the router. This
would allow some interfaces to belong to area 1 while the remaining interfaces can belong to
area 0. All of the routers within the same area have the same topology table. When
configuring OSPF, youve got to remember that there must be an area 0 and that this is
typically considered the backbone area. Areas also play a role in establishing a hierarchical
network organizationsomething that really enhances the scalability of OSPF!
Broadcast (multi-access) Broadcast (multi-access) networks such as Ethernet allow
multiple devices to connect to (or access) the same network as well as provide a broadcast
ability in which a single packet is delivered to all nodes on the network. In OSPF, a DR and a
BDR must be elected for each broadcast multi-access network.
Non-broadcast multi-access Non-broadcast multi-access (NBMA) networks are types such
as Frame Relay, X.25, and Asynchronous Transfer Mode (ATM). These networks allow for
multi-access but have no broadcast ability like Ethernet. So, NBMA networks require special
OSPF configuration to function properly and neighbor relationships must be defined.
AREA TYPES
An OSPF domain is divided into areas that are labelled with 32-bit area identifiers. The area
identifiers are commonly, but not always, written in the dot-decimal notation of an IPv4
address. However, they are not IP addresses and may duplicate, without conflict, any IPv4
address. While most OSPF implementations will right-justify an area number written in a
format other than dotted decimal format (e.g., area 1). Most implementations expand area 1
to the area identifier 0.0.0.1, but some have been known to expand it as 1.0.0.0.
Areas are logical groupings of hosts and networks, including their routers having interfaces
connected to any of the included networks. Each area maintains a separate link state
database whose information may be summarized towards the rest of the network by the
connecting router. Thus, the topology of an area is unknown outside of the area. This
reduces the amount of routing traffic between parts of an autonomous system.

Several special area types are defined.


Backbone area The backbone area (also known as area 0 or area 0.0.0.0) forms the core of
an OSPF network. All other areas are connected to it, and inter-area routing happens via
routers connected to the backbone area and to their own associated areas. It is the logical
and physical structure for the 'OSPF domain' and is attached to all nonzero areas in the
OSPF domain. The backbone area is responsible for distributing routing information between
non-backbone areas. The backbone must be contiguous, but it does not need to be
physically contiguous; backbone connectivity can be established and maintained through the
configuration of virtual links. All OSPF areas must connect to the backbone area. This
connection, however, can be through a virtual link. For example, assume area 0.0.0.1 has a
physical connection to area 0.0.0.0. Further assume that area 0.0.0.2 has no direct
connection to the backbone, but this area does have a connection to area 0.0.0.1. Area
0.0.0.2 can use a virtual link through the transit area 0.0.0.1 to reach the backbone. To be a
transit area, an area has to have the transit attribute, so it cannot be stubby in any way.
Stub area
A stub area is an area which does not receive route advertisements external to the
autonomous system (AS) and routing from within the area is based entirely on a default
route. A Stub Area simulation shows how an ABR deletes type 4, 5 LSAs from internal
routers, sends them a default route of 0.0.0.0 and turns itself into a default gateway. This
reduces LSDB and routing table size for internal routers.
Modifications to the basic concept of stub areas exist in the not-so-stubby area (NSSA). In
addition, several other proprietary variations have been implemented by systems vendors,
such as the totally stubby area (TSA) and the NSSA not so stubby area, both an extension in
Cisco Systems routing equipment.
Transit area
A transit area is an area with two or more OSPF border routers and is used to pass network
traffic from one adjacent area to another. The transit area does not originate this traffic and
is not the destination of such traffic.
DR and BDR Elections
DR and BDR election is accomplished via the Hello protocol. Hello packets are exchanged
via IP multicast packets on each segment. However,only segments that are broadcast and
non-broadcast multi-access networks (such as Ethernet and Frame Relay) will perform DR
and BDR elections. Point-to-point links, like a serial WAN for example, will not have a
DR/BDR election process.On a broadcast or non-broadcast multi-access network, the router
with the highest OSPF priority on a segment will become the DR for that segment. This
priority is shown with the show ip ospf interface command and is set to 1 by default. If all
routers have the default priority set, the router with the highest Router ID (RID) will win.
A designated router (DR) is the router interface elected among all routers on a particular
multiaccess network segment, generally assumed to be broadcast multi access. A DR
Election Simulation visualizes the basic neighbor discovery process (Hello), flooding
(224.0.0.6), DR election (priority, RID). Special techniques, often vendor-dependent, may be
needed to support the DR function on nonbroadcast multiaccess (NBMA) media. It is usually
wise to configure the individual virtual circuits of a NBMA subnet as individual point-to-point
lines; the techniques used are implementation-dependent.

Do not confuse the DR with an OSPF router type. A given physical router can have some
interfaces that are designated (DR), others that are backup designated (BDR), and others
that are non-designated. If no router is DR or BDR on a given subnet, the DR is first elected,
and then a second election is held if there is more than one BDR. (A DR Election Detail
Simulation shows a step-by-step DR election example: How neighbor list, neighbor state,
DR, and BDR are changed when receiving Hello) The DR is elected based on the following
default criteria:

If the priority setting on an OSPF router is set to 0, that means it can NEVER become a
DR or BDR (Backup Designated Router).
When a DR fails and the BDR takes over, there is another election to see who becomes
the replacement BDR.
The router sending the Hello packets with the highest priority wins the election.
If two or more routers tie with the highest priority setting, the router sending the Hello
with the highest RID (Router ID) wins. NOTE: a RID is the highest logical (loopback) IP
address configured on a router, if no logical/loopback IP address is set then the Router
uses the highest IP address configured on its active interfaces. (e.g. 192.168.0.1 would
be higher than 10.1.1.2).
Usually the router with the second highest priority number becomes the BDR.
The priority values range between 0 - 255, with a higher value increasing its chances of
becoming DR or BDR.
IF a HIGHER priority OSPF router comes online AFTER the election has taken place, it
will not become DR or BDR until (at least) the DR and BDR fail.
If the current DR 'goes down' the current BDR becomes the new DR and a new election
takes place to find another BDR. If the new DR then 'goes down' and the original DR is
now available, still previously chosen BDR will become DR.

DR's exist for the purpose of reducing network traffic by providing a source for routing
updates. The DR maintains a complete topology table of the network and sends the updates
to the other routers via multicast. All routers in a multi-access network segment will form a
slave/master relationship with the DR. They will form adjacencies with the DR and BDR only.
Every time a router sends an update, it sends it to the DR and BDR on the multicast address
224.0.0.6. The DR will then send the update out to all other routers in the area, to the
multicast address 224.0.0.5. This way all the routers do not have to constantly update each
other, and can rather get all their updates from a single source. The use of multicasting
further reduces the network load. DRs and BDRs are always setup/elected on OSPF
broadcast networks. DR's can also be elected on NBMA (Non-Broadcast Multi-Access)
networks such as Frame Relay or ATM. DRs or BDRs are not elected on point-to-point links
(such as a point-to-point WAN connection) because the two routers on either sides of the
link must become fully adjacent and the bandwidth between them cannot be further
optimized. DR LSDB Synch Simulation shows how DR and non-DR routers evolve from 2way to full adjacency relationships by exchanging DD, Request, and Update.

Backup designated router


A backup designated router (BDR) is a router that becomes the designated router if the
current designated router has a problem or fails. The BDR is the OSPF router with second
highest priority at the time of the last election.

OSPF Configuration
The two basic elements for OSPF configuration are:
X Enabling OSPF
X Configuring OSPF areas
The command for activating OSPF routing process is:
Lab_A(config)#router ospf ?
<1-65535> A value in the range 1-65,535 identifies the OSPF process ID
For configuring OSPF areas:
Lab_A#config t
Lab_A(config)#router ospf 1
Lab_A(config)#network 10.0.0.0 0.255.255.255 area 0
Here 10.0.0.0 is the network number and 0.255.255.255 is the wildcard mask. The
combination is useful for identifying the interfaces that OSPF will operate on.

SWITCHING
Basic concepts of Switching
Switches are layer 2 devices that can link up four, six, eight or even more networks.
Switches are the only devices that allow for microsegmentation.

Cut-through switches run faster because when a packet comes in, it forwards it right
after looking at the destination address only.

A store-and-forward switch inspects the entire packet before forwarding. Most


switches cannot stop broadcast traffic.

Switches are considered dedicated data link device because they are close to a 100
% of the bandwidth.

While bridging does its most of its work by software, switches use ASICS hardware
to handle most of its work. A switch can be thought of as a multi-port bridge.

Layer 2 switching breaks up collision domains making a flatter network than an


ordinary 10baseT network

Store-and-forward
The entire frame is received before any forwarding takes place. The destination and/or the
source addresses are read and filters are applied before the frame is forwarded. Latency
occurs while the frame is being received; the latency is greater with larger frames because
the entire frame takes longer to read. Error detection is high because of the time available to
the switch to check for errors while waiting for the entire frame to be received. This method
discards frames smaller than 64 bytes (runts) and frames larger than 1518 bytes (giants).
Cut-Through
The switch reads the destination address before receiving the entire frame. The frame is
then forwarded before the entire frame arrives. This mode decreases the latency of the

transmission and has poor error detection. This method has two forms, Fast-forward and
fragment-free.
Fast-forward switching
Fast-forward switching offers the lowest level of latency by immediately forwarding a packet
after receiving the destination address. Because fast-forward switching does not check for
errors, there may be times when frames are relayed with errors. Although this occurs
infrequently and the destination network adapter discards the fault frame upon receipt. In
networks with high collision rates, this can negatively affect available bandwidth.
Fragment Free Switching
Use the fragment-free option to reduce the number of collisions frames forwarded with
errors. In fast-forward mode, latency is measured from the first bit received to the first bit
transmitted, or first in, first out (FIFO). Fragment-free switching filters out collision fragments,
which are the majority of packets errors, before forwarding begins. In a properly functioning
network, collision fragments must be smaller than 64 bytes.
Anything greater than 64 bytes is a valid packet and is usually received without error.
Fragment-free switching waits until the received packet has been determined not to be a
collision fragment before forwarding the packet. In fragment-free, latency is measured as
FIFO.
Advantages of switching:
Bandwidth---LAN switches provide excellent performance for individual users by
allocating dedicated bandwidth to each switch port (for example, each network
segment). This technique is known as microsegmenting.

VLANs---LAN switches can group individual ports into logical switched workgroups
called VLANs, thereby restricting the broadcast domain to designated VLAN member
ports. VLANs are also known as switched domains and autonomous switching
domains. Communication between VLANs requires a router.

Disadvantages of switching:
Not as good as a router in limiting Broadcasts.

Communication b/w VLAN's need interVLAN routing [Router], but these days there
are a number of Multilayer switches available in the market.

Handling Multicast packets needs quite a bit of configuration & proper designing.

Spanning-Tree Protocol
Spanning-Tree Protocol is a link management protocol that provides path redundancy while
preventing undesirable loops in the network. For an Ethernet network to function properly,
only one active path can exist between two stations.
Multiple active paths between stations cause loops in the network. If a loop exists in the
network topology, the potential exists for duplication of messages. When loops occur,some
switches see stations appear on both sides of the switch. This condition confuses the
forwarding algorithm and allows duplicate frames to be forwarded. To provide path
redundancy, Spanning-Tree Protocol defines a tree that spans all switches in an extended
network. Spanning-Tree Protocol forces certain redundant data paths into a standby
(blocked) state. If one network segment in the Spanning-Tree Protocol becomes
unreachable, or if Spanning-Tree Protocol costs change, the spanning-tree algorithm

reconfigures the spanning-tree topology and re-establishes the link by activating the standby
path.
Election of the Root Switch
All switches in an extended LAN participating in Spanning-Tree Protocol gather information
on other switches in the network through an exchange of data messages. These messages
are bridge protocol data units (BPDUs). This exchange of messages results in the following:
The election of a unique root switch for the stable spanning-tree network topology.
The election of a designated switch for every switched LAN segment.
The removal of loops in the switched network by placing redundant switch ports in a
backup state.
The Spanning-Tree Protocol root switch is the logical centre of the spanning-tree topology in
a switched network. All paths that are not needed to reach the root switch from anywhere in
the switched network are placed in Spanning-Tree Protocol backup mode.
BPDUs contain information about the transmitting switch and its ports, including switch and
port Media Access Control (MAC) addresses, switch priority, port priority, and port cost. The
Spanning-Tree Protocol uses this information to elect the root switch and root port for the
switched network, as well as the root port and designated port for each switched segment.

Figure : BPDUs Enabling a Stable Spanning-Tree Protocol Topology


Bridge Protocol Data Units
The stable active topology of a switched network is determined by the following:
The unique switch identifier (MAC address) associated with each switch.

The path cost to the root associated with each switch port.

The port identifier (MAC address) associated with each switch port.

Each configuration BPDU contains the following minimal information:


The unique identifier of the switch that the transmitting switch believes to be the root
switch.

The cost of the path to the root from the transmitting port.

The identifier of the transmitting port.

The switch sends configuration BPDUs to communicate and compute the spanning-tree
topology. A MAC frame conveying a BPDU sends the switch group address to the
destination address field. All switches connected to the LAN on which the frame is
transmitted receive the BPDU. BPDUs are not directly forwarded by the switch, but the

information contained in the frame can be used to calculate a BPDU by the receiving switch,
and, if the topology changes, instigate a BPDU transmission.
A BPDU exchange results in the following:
One switch is elected as the root switch.

The shortest distance to the root switch is calculated for each switch.

A designated switch is selected. This is the switch closest to the root switch through
which frames will be forwarded to the root.

A port for each switch is selected. This is the port providing the best path from the
switch to the root switch.

Ports included in the Spanning-Tree Protocol are selected

Spanning-Tree Protocol Port States


Propagation delays can occur when protocol information is passed through a
switched LAN. As a result, topology changes can take place at different times and at
different places in a switched network. When a switch port transitions directly from
non-participation in the stable topology to the forwarding state, it can create
temporary data loops. Ports must wait for new topology information to propagate
through the switched LAN before starting to forward frames. They must also allow
the frame lifetime to expire for frames that have been forwarded using the old
topology
Each port on a switch using Spanning-Tree Protocol exists in one of the following five states:
Blocking
Listening

Learning

Forwarding

Disabled

A port moves through these five states as follows:


From initialization to blocking

From blocking to listening or to disabled

From listening to learning or to disabled

From learning to forwarding or to disabled

From forwarding to disabled

Figure : Spanning-Tree Protocol Port States

You can modify each port state by using management software. When Spanning-Tree
Protocol is enabled, every switch in the network goes through the blocking state and the
transitory states of listening and learning at power up. If properly configured, the ports then
stabilize to the forwarding or blocking state. When the spanning-tree algorithm determines
that a port should be placed in the forwarding state, the following occurs:
The port is put into the listening state while it waits for protocol information that
suggests it should go to the blocking state.

The port waits for the expiration of a protocol timer that moves the port to the
learning state.

In the learning state, the port continues to block frame forwarding as it learns station
location information for the forwarding database.

The expiration of a protocol timer moves the port to the forwarding state, where both
learning and forwarding are enabled.

Blocking State
A port in the blocking state does not participate in frame forwarding, as shown in
Figure C-5. After initialization, a BPDU is sent to each port in the switch. A switch
initially assumes it is the root until it exchanges BPDUs with other switches. This
exchange establishes which switch in the network is really the root. If only one
switch resides in the network, no exchange occurs, the forward delay timer expires,
and the ports move to the listening state. A switch always enters the blocking state
following switch initialization.
A port in the blocking state performs as follows:
Discards frames received from the attached segment.

Discards frames switched from another port for forwarding.

Does not incorporate station location into its address database. (There is no learning
at this point, so there is no address database update.)

Receives BPDUs and directs them to the system module.

Does not transmit BPDUs received from the system module.

Receives and responds to network management messages.

Listening State
The listening state is the first transitional state a port enters after the blocking state, when
Spanning-Tree Protocol determines that the port should participate in frame forwarding.
Learning is disabled in the listening state.
A port in the listening state performs as follows:

Discards frames received from the attached segment.


Discards frames switched from another port for forwarding.
Does not incorporate station location into its address database. (There is no
learning at this point, so there is no address database update.)
Receives BPDUs and directs them to the system module.
Processes BPDUs received from the system module.
Receives and responds to network management messages.

Learning State
A port in the learning state is preparing to participate in frame forwarding. This is the second
transitional state through which a port moves in anticipation of frame forwarding. The port
enters the learning state from the listening state through the operation of Spanning-Tree
Protocol. A port in the learning state performs as follows:
Discards frames received from the attached segment.
Discards frames switched from another port for forwarding.
Incorporates station location into its address database.
Receives BPDUs and directs them to the system module.
Receives, processes, and transmits BPDUs received from the system module.
Receives and responds to network management messages.
Forwarding State
A port in the forwarding state forwards frames, as shown in Figure C-5. The port enters the
forwarding state from the learning state through the operation of Spanning-Tree Protocol. A
port in the forwarding state performs as follows:
Forwards frames received from the attached segment.
Forwards frames switched from another port for forwarding.
Incorporates station location information into its address database.
Receives BPDUs and directs them to the system module.
Processes BPDUs received from the system module.
Receives and responds to network management messages.

Virtual Network and Ether channel


A Local Area Network (LAN) was originally defined as a network of computers located within
the same area. Today, Local Area Networks are defined as a single broadcast domain. This
means that if a user broadcasts information on his/her LAN, the broadcast will be received
by every other user on the LAN. Broadcasts are prevented from leaving a LAN by using a
router. The disadvantage of this method is routers usually take more time to process
incoming data compared to a bridge or a switch. More importantly, the formation of
broadcast domains depends on the physical connection of the devices in the network. Virtual
Local Area Networks (VLAN's) were developed as an alternative solution to using routers to
contain broadcast traffic. The workstations, hubs, and repeaters together form a LAN
segment. A LAN segment is also known as a collision domain since collisions remain within
the segment. The area within which broadcasts and multicasts are confined is called a
broadcast domain or LAN. Thus a LAN can consist of one or more LAN segments. Defining
broadcast and collision domains in a LAN depends on how the workstations, hubs, switches,
and routers are physically connected together. This means that everyone on a LAN must be
located in the same area.
VLAN's allow a network manager to logically segment a LAN into different broadcast
domains . Since this is a logical segmentation and not a physical one, workstations do not
have to be physically located together. Users on different floors of the same building, or even
in different buildings can now belong to the same LAN.
VLAN's also allow broadcast domains to be defined without using routers. Bridging software
is used instead to define which workstations are to be included in the broadcast domain.
Routers would only have to be used to communicate between two VLAN's.
VLAN's offer a number of advantages over traditional LAN's. They are: 1) Performance In
networks where traffic consists of a high percentage of broadcasts and multicasts, VLAN's
can reduce the need to send such traffic to unnecessary destinations. For example, in a
broadcast domain consisting of 10 users, if the broadcast traffic is intended only for 5 of the
users, then placing those 5 users on a separate VLAN can reduce traffic Compared to
switches, routers require more processing of incoming traffic. 2) Formation of Virtual
Workgroups Nowadays, it is common to find cross-functional product development teams
with members from different departments such as marketing, sales, accounting, and
research. These workgroups are usually formed for a short period of time. During this period,
communication between members of the workgroup will be high. To contain broadcasts and
multicasts within the workgroup, a VLAN can be set up for them. With VLAN's it is easier to
place members of a workgroup together. Without VLAN's, the only way this would be
possible is to physically move all the members of the workgroup closer together. 3)
Simplified Administration Seventy percent of network costs are a result of adds, moves, and
changes of users in the network. Every time a user is moved in a LAN, recabling, new
station addressing, and reconfiguration of hubs and routers becomes necessary. Some of
these tasks can be simplified with the use of VLAN's. If a user is moved within a VLAN,
reconfiguration of routers is unnecessary. In addition, depending on the type of VLAN, other
administrative work can be reduced or eliminated. However the full power of VLAN's will only

really be felt when good management tools are created which can allow network managers
to drag and drop users into different VLAN's or to set up aliases.
4) Security Periodically, sensitive data may be broadcast on a network. In such cases,
placing only those users who can have access to that data on a VLAN can reduce the
chances of an outsider gaining access to the data. VLAN's can also be used to control
broadcast domains, set up firewalls, restrict access, and inform the network manager of an
intrusion.
Types of VLAN's
1) Membership by Port Membership in a VLAN can be defined based on the ports that
belong to the VLAN. For example, in a bridge with four ports, ports 1, 2, and 4 belong to
VLAN 1 and port 3 belongs to VLAN 2.
2) Membership by MAC Address Here, membership in a VLAN is based on the MAC
address of the workstation. The switch tracks the MAC addresses which belong to each
VLAN. Since MAC addresses form a part of the workstation's network interface card, when a
workstation is moved, no reconfiguration is needed to allow the workstation to remain in the
same VLAN. This is unlike Layer 1 VLAN's where membership tables must be reconfigured.
MAC address
1534657987368
1267276378839
3457882782008
2363738300380

VLAN
1
2
2
1

3) Membership by IP Subnet Address Membership is based on the Layer 3 header. The


network IP subnet address can be used to classify VLAN membership.
IP Subnet
23.2.24
26.21.35

VLAN
1
2

Types of Connections
Devices on a VLAN can be connected in three ways based on whether the connected
devices are VLAN-aware or VLAN-unaware. Recall that a VLAN-aware device is one which
understands VLAN memberships (i.e. which users belong to a VLAN) and VLAN formats.
1) Trunk Link All the devices connected to a trunk link, including workstations, must be
VLAN-aware. All frames on a trunk link must have a special header attached. These special
frames are called tagged frames.
2) Access Link An access link connects a VLAN-unaware device to the port of a VLANaware bridge. All frames on access links must be implicitly tagged (untagged). The VLANunaware device can be a LAN segment with VLAN-unaware workstations or it can be a
number of LAN segments containing VLAN-unaware devices (legacy LAN).

i)

Static Entries Static information is added, modified, and deleted by management


only. Entries are not automatically removed after some time (ageing), but must be
explicitly removed by management. There are two types of static entries:
a) Static Filtering Entries: which specify for every port whether frames to be sent
to a specific MAC address or group address and on a specific VLAN should be
forwarded or discarded, or should follow the dynamic entry, and
b) Static Registration Entries: which specify whether frames to be sent to a
specific VLAN are to be tagged or untagged and which ports are registered for
that VLAN.

ii)

Dynamic Entries Dynamic entries are learned by the bridge and cannot be
created or updated by management. The learning process observes the port from
which a frame, with a given source address and VLAN ID (VID), is received, and
updates the filtering database. The entry is updated only if all the following three
conditions are satisfied: a) This port allows learning, b) The source address is a
workstation address and not a group address, and c) There is space available in
the database.

Ether Channel
EtherChannel is a port link aggregation technology or port-channel architecture used
primarily on Cisco switches. It allows grouping several physical Ethernet links to create one
logical Ethernet link for the purpose of providing fault-tolerance and high-speed links
between switches, routers and servers. An EtherChannel can be created from between two
and eight active Fast, Gigabit or 10-Gigabit Ethernet ports, with an additional one to eight
inactive (failover) ports which become active as the other active ports fail. EtherChannel is
primarily used in the backbone network, but can also be used to connect end user machines.

Benefits: Using the maximum of 8 active ports a total bandwidth of 800 Mbit/s, 8 Gbit/s or
80 Gbit/s is possible depending on port speed. This assumes there is a traffic mixture, as
those speeds do not apply to a single application only. It can be used with Ethernet running
on twisted pair wiring, single-mode and multimode fibre. Because EtherChannel takes
advantage of existing wiring it makes it very scalable. It can be used at all levels of the
network to create higher bandwidth links as the traffic needs of the network increase. All
Cisco switches have the ability to support EtherChannel. When an EtherChannel is
configured all adapters that are part of the channel share the same Layer 2 (MAC) address.
This makes the EtherChannel transparent to network applications and users because they
only see the one logical connection; they have no knowledge of the individual links.
EtherChannel aggregates the traffic across all the available active ports in the channel. The
port is selected using a Cisco-proprietary hash algorithm, based on source or destination
MAC addresses, IP addresses or TCP and UDP port numbers. The hash function gives a
number between 0 and 7, and the following table shows how the 8 numbers are distributed
among the 2 to 8 physical ports. In the hypothesis of real random hash algorithm, 2, 4 or 8

ports configurations lead to fair load-balancing, whereas other configurations lead to unfair
load-balancing. Fault-tolerance is another key aspect of EtherChannel. Should a link fail, the
EtherChannel technology will automatically redistribute traffic across the remaining links.
This automatic recovery takes less than one second and is transparent to network
applications and the end user. This makes it very resilient and desirable for mission-critical
applications.
Spanning tree protocol can be used with an EtherChannel. STP treats all the links as a
single one and BPDUs are only sent down one of the links. Without the use of an
EtherChannel, STP would effectively shut down any redundant links between switches until
one connection goes down. This is where an EtherChannel is most desirable; it allows full
use of all available links between two devices.
EtherChannel can be also configured as VLAN trunks. If any single link of an EtherChannel
is configured as a VLAN trunk, the entire EtherChannel will act as a VLAN trunk. Cisco ISL,
VTP and IEEE 802.1Q are compatible with EtherChannel.
Limitations:
A limitation of EtherChannel is that all the physical ports in the aggregation group must
reside on the same switch. Avaya's SMLT protocol removes this limitation by allowing the
physical ports to be split between two switches in a triangle configuration or 4 or more
switches in a mesh configuration. Cisco's Virtual Switching System allows the creation of a
Multichassis EtherChannel (MEC) similar to the DMLT protocol allowing ports to be
aggregated towards different physical chassis that conform a single "virtual switch" entity.
Components: EtherChannel is made up of the following key elements:

Intel PRO/1000 MT Server Adapter that supports EtherChannel


Ethernet links EtherChannel works over links defined by the IEEE 802.3
standard, including all sub-standards. All links in a single EtherChannel must be the
same speed.
Compatible hardware The entire line of Cisco Catalyst switches as well as Cisco
IOS software-based routers support EtherChannel. Configuring an EtherChannel
between a switch and a computer would either require special network interface
cards (NICs) such as the model pictured here, or support built into the operating
system. FreeBSD, for example, supports EtherChannel via LACP on standard NICs.
Multiple EtherChannel per device are supported; the number depends on the type of
equipment. Catalyst 6500 and 6000 switches support a maximum of 64
EtherChannel.
Configuration An EtherChannel must be configured using the Cisco IOS on
switches and router, and using specific drivers when connecting a server. There are
two main ways an EtherChannel can be set up. The first is by manually issuing a
command on each port of the device that is part of the EtherChannel. This must be

done for the corresponding ports on both sides of the EtherChannel. The second
way is using Cisco Port Aggregation Protocol for the automated aggregation of
Ethernet ports.

GNS3 is a graphical network simulator that allows simulation of complex


networks.
To provide complete and accurate simulations, GNS3 is strongly linked
with:

Dynamips, a Cisco IOS emulator.


Dynagen, a text-based front end for Dynamips.
Qemu, a generic and open source machine emulator and virtualizer.
VirtualBox, a free and powerful virtualization software.

GNS3 is an excellent complementary tool to real labs for network


engineers, administrators and people wanting to study for certifications
such as Cisco CCNA, CCNP, CCIP and CCIE as well as Juniper JNCIA,
JNCIS and JNCIE.
It can also be used to experiment features of Cisco IOS, Juniper JunOS or
to check configurations that need to be deployed later on real routers.
Thanks to VirtualBox integration, now even system engineers and
administrators can take advantage of GNS3 to make labs and study for
Redhat (RHCE, RHCT), Microsoft (MSCE, MSCA), Novell (CLP) and many
other vendor certifications.
This project is an open source, free program that may be used on multiple
operating systems, including Windows, Linux, and MacOS X.
Features overview

Design of high quality and complex network topologies.


Emulation of many Cisco IOS router platforms, IPS, PIX and ASA
firewalls, JunOS.
Simulation of simple Ethernet, ATM and Frame Relay switches.
Connection of the simulated network to the real world!
Packet capture using Wireshark.

INSTALLING GNS3
Step 1 Download GNS3
The easiest way to install GNS3 in a Windows environment is to download the all-in-one version.
The file is a little under 16 MB in size and will take less than a minute to download on a DSL or
cable connection. Dial-up connections will take somewhat longer.
Step 2 Install GNS3

Find the file you download and


double-click on it to begin installing GNS3.
The GNS3 Setup Wizard will begin. Everything else is a matter of clicking on next or agree buttons.
GNS3 depends on several other programs to operate. Those dependencies include WinPCAP,
Dynamips and Qemu and these components along with GNS3 are all chosen by default
for installation. The default location to install GNS3 is also chosen for you.
Moreover note that if needed, WinPcap Setup Wizard will be launched for you to install it,
this dependency is required for GNS3 to communicate with real networks through a physical
network internal controller. The installation for WinPcap will begin. However, if you have a
previous version of WinPcap on your computer, the wizard will ask to remove the older version
and will then install the newer version.
You have now completed the installation of GNS3. Click the Start button,All Programs, GNS3, and
then choose GNS3 out of the list of applications installed. Youll see the main GNS3 window. Well
discuss its panes in a later step, but first we have to configure the location for a Cisco IOS.

Step 3 Defining Cisco IOS files

As mentioned earlier, you must


provide your own Cisco IOS to use with GNS3 due to licensing issues. GNS3 is meant to be used in
a lab environment for testing and learning. Once you have obtained your own copy of a Cisco IOS
for one of the supported platforms, you are ready to continue.
platforms are Cisco
Supported
7200, 3600 series (3620, 3640 and 3660), 3700 series (3725, 3745) and 2600 series (2610 to
2650XM, 2691).
On the Edit menu, choose IOS image and hypervisors. Then under the IOS Images tab, click and
then find your Cisco IOS file and click Open. The file will appear as your Image file. Next, click the
drop-down arrow next toPlatform and choose the platform that corresponds to your IOS file.
Now click the drop-down arrow next to Model and choose the model corresponding to your
IOS file. For now, well accept the default values that remain. However, there is a very important
value called the IDLE PC value that we will want to include. Well get to that later. Click the
Savebutton and then the Close button. This will return you to the default GNS3 window. Its
time to create our very first simple topology.

First Network Topology

R1, R2, R3,R6: Routers respectively

Configuring The routers


CISCO Router Models:
Various CISCO Router Models are:

Cisco 7600 Series Routers


Cisco 7200 Series Routers
Cisco 3900 Series Integrated Services Router
Cisco 3800 Series Integrated Services Router
Cisco 2900 Series Integrated Services Router
Cisco 2800 Series Integrated Services Router
Cisco 1900 Series Integrated Services Router

Cisco Router IOS


Cisco IOS (originally Internetwork Operating System) is software used
on most Cisco Systems routers and current Cisco network switches.
(Earlier switches ran CatOS.) IOS is a package of routing,
switching,
internetworking
and telecommunications functions
integrated into a multitasking operating system.
The IOS command line interface provides a fixed set of multipleword commands. The set available is determined by the "mode"
and the privilege level of the current user. "Global configuration
mode" provides commands to change the system's configuration, and
"interface configuration mode" provides commands to change the
configuration of a specific interface. All commands are assigned a
privilege level, from 0 to 15, and can only be accessed by users with
the necessary privilege. Through the CLI, the commands available to
each privilege level can be defined.
These are some important things that the Cisco
software is responsible for:

router IOS

Carrying network protocols and functions


Connecting high-speed traffic between devices
Adding security to control access and stop unauthorized network
use
Providing scalability for ease of network growth and redundancy

Cisco Router Hostname Setup

Cisco Router Auxiliary, Console and Telnet


Passwords
Setup
There are five passwords used to secure your Cisco routers: console,
auxiliary, telnet (VTY), enable password, and enable secret.

Cisco Router Auxiliary Password


Setup
To configure the auxiliary password, go into global configuration mode
and type line aux ?.You can see here that you only get a choice of 00.
Router#config t
Enter configuration commands, one per line. End with
CNTL/Z.
//Router(config)#line aux ?
//<0-0> First Line number
Router(config)#line aux 0
Router(config-line)#password admin(admin is the password)
Router(config-line)#login

Cisco Router Console Password Setup


To set the console password, use the line console 0 command.
Router(config-line)#line console ?
% Unrecognized command
Router(config-line)#exit
Router(config)#line console ?
<0-0> First Line number
Router(config)#line console 0
Router(config-line)# password admin1
Router(config-line)# login

Cisco Router Telnet Password Setup


To set the user-mode password for Telnet access into the router, use
the line vty command. Routers that arent running the Enterprise
edition of the Cisco IOS default to five VTY lines, 0 through 4. But
if you have the Enterprise edition, youll have significantly more. The
best way to find out how many lines you have is to use that question
mark
Router(config-line)#line vty 0 ?
<1-4> Last Line Number

Router(config-line)#line vty 0 4
Router(config-line)# password admin2
Router(config-line)# login

Cisco Router Configuration Commands


Requirement

Cisco Command

Set a console password


to cisco

Router(config)#line con 0
Router(config-line)#password cisco
Router(config-line)#login

Set a telnet password

Router(config)#line vty 0 4
Router(config-line)#password cisco
Router(config-line)#login

Stop console timing out

Router(config)#line con 0
Router(config-line)#exec-timeout 0 0

Set the enable


password to cisco

Router(config)#enable password cisco

Set the enable


secret password to
peter.
This password overrides
the enable password
and is encypted within the
config file
Enable an interface

Router(config)#enable secret peter


Router(config)->router(configif)=command #interface fastethernet
0/0

To disable an interface

Router(config-if)#shutdown

To add an IP address
to a interface

Router(config-if)#ip addr 10.1.1.1


255.255.255.0

Router(config-if)#no shutdown

Cisco Router Show Commands


View version information

show version

View current
configuration
(DRAM)

show running-config

View startup configuration show startup-config


(NVRAM)
Show IOS file and
flash space

show flash

show log
Shows all logs that the
router has in its
memory
Cisco Router Basic Operations

Enable

Enter privileged mode

Return to user mode


from privileged

Disable

Exit Router

Logout or exit or quit

Recall last command

up arrow or <Ctrl-P>

Recall next command

down arrow or <Ctrl-N>

Suspend or abort

<Shift> and

Refresh screen output

<Ctrl-R>

Complete Command

TAB

<Ctrl> and 6 then x

Setting Up Banners on Cisco


Router
There are four types of banners available in Cisco
Routers:
exec process creation banner
incoming terminal line banner
login banner
message of the day banner
Router(config)#banner ?
LINE c banner-text c, where c is a delimiting character
exec Set EXEC process creation banner
incoming Set incoming terminal line banner
login Set login banner
motd Set Message of the Day banner

Message of the day (MOTD) is the most extensively used banner. It


gives a message to every person dialing into or connecting to the router
via Telnet or auxiliary port, or even through a console port as seen here:
Router(config)#banner motd ?
LINE c banner-text c, where c is a delimiting character
Router(config)#banner motd #
Enter TEXT message. End with the character #.
$ Type your motd banner here.
#
Router(config)#^Z
Router#
00:25:12: %SYS-5-CONFIG_I: Configured from console by
console
Router#exit
Router con0 is now available
Press RETURN to get started.

For example, a banner can be set on one line as


shown:
Router(config)#banner motd x Unauthorized access
prohibited! x

Set the time on a Cisco router


manually
Setting the internal clock in a Cisco router allows timestamping of
logging information which makes troubleshooting much easier. If you
do not have an NTP server running, you can set the time manually with
a simple command.
To set the time, use this command in enable mode (not configuration
mode):
Router# clock set 22:10:35 June 20 2012

The time is in 24 hour mode. To see the information about the clock
settings, use:
Router# show clock detail 22:56:07.136 PDT Wed Jun 20 2012
Time source is user configuration

This will show the current date and time and the source of the
time configuration (in this case showing that the time was manually set).

Configuration of the interface of the Cisco


Routers

The f0/0 denotes the interface of the router,Where f denotes fast


Ethernet.
Firstly each interface is assigned an ip address along with a
subnet mask
The command that facilitates the desired is :
Raveena(config-line)#int f0/0
Raveena(config-if)#ip addr 10.1.1.1 255.255.255.0
Lastly the command no shutdown, changes the state of the router to
up.
Raveena(config-if)#no shutdown

The communication between interfaces


This calls for the use of the very famous and useful command called the
ping command .
Ping is a computer network administration utility used to test the reachability of
a host on an Internet Protocol (IP) network and to measure the round-trip time for
messages sent from the originating host to a destination computer
So we begin by pinging the router itself , to see whether its up or
not. The following screenshot depicts the command and its
aftereffect

.
When pinging to the other node r2 in the same network i.e connected to
the same interface the delivery ratio was 0.8

Você também pode gostar