You are on page 1of 60

OSI( Open System Interconnection) Reference Model

An abstract description for layered communications and


computer network protocol design.
It divides network architecture into seven layers.



1. APPLICATION layer
The user uses application layer to send the data.
The protocols at this layer are:
FTP
HTTP
SMTP
TELNET
2. PRESENTATION layer
Presentation layer takes the data from application layer
and present in different formats for securing reason.
The services offered at this layer are
Compression Decompression
Coding Decoding
Encryption - Decryption
3. SESSION layer
-Opening, Maintenance, and Closure of sessions between
devices or applications.
- Managing Simplex, Half-Duplex, and Full-Duplex modes
-Keeping data separate for different applications

4. TRANSPORT layer
End to end connectivity during a session b/w two application is done
by the transport layer. It also decides the type of connection like TCP
or UDP i.e. Connection Oriented or Connection less.
Services included:
Sequencing
Flow ctrl, error detection & correction
acknowledging packet receipt during Connection-Oriented transfers

Transport layer info + data is called SEGMENT.
5. NETWORK layer
Logical addressing is done at the network layer .
Network identification
Routing / network navigation
Breaking up broadcast domains
Two types of protocols are present:


- ROUTED protocols: they always carry the data along with them
- ROUTING protocol: they identify the path for routed protocol to
carry the data
At this layer ROUTERS & LAYER 3 switches forms packets.
6. DATA-LINK layer
Physical / Hardware / MAC identification
Framing data for transmission onto the local network
segment
Breaking up collision domains
CRC (Cyclic Redundancy Check) error notification (not
correction)
SWITCH is used.
WAN protocols used at this layer are PPP,HDLC,FP,X.25
etc.
Here error checking CRC bits are added to the packets
DLL info+ packets --> frames

7.PHYSICAL layer
Takes care of physical connectivity i.e. connector, cable etc. here
Frames are converted to bits (1s & 0s).
The devices like hubs, repeaters, cables & connectors are used at
this layer.



TCP/IP MODEL
TCP and IP were developed by a Department of
Defense (DOD) research project to connect a number
different networks designed by different vendors into
a network of networks (the "Internet").
TCP/IP is composed of layers:
IP - is responsible for moving packet of data from
node to node based on a four byte destination
address (the IP number).
TCP - is responsible for verifying the correct delivery
of data from client to server AND adds support to
detect errors or lost data and to trigger
retransmission until the data is correctly and
completely received.

SIMPLEX: Communication that occurs in ONE
DIRECTION only.(e.g. RADIO)

HALF DUPLEX: Communication in BOTH DIRECTION,
but only ONE DIRECTION at a time. (WALKIE
TALKIE)

FULL DUPLEX: Allows communication in both
directions simultaneously.
(e.g. TELEPHONE, CELL PHONES )



Broadcast Domain:

Collision Domain:

Port Numbers/Address
There are 65,535 application ports in both TCP and UDP
flavors.
Ports below 1024 are called the well known ports
1 to 254 are used by public applications
From 255 to 1023 are used by proprietary (saleable)
applications.
FTP (TCP - port 21)
Telnet (UDP - port 23)
SMTP (TCP - port 25)
DNS (UDP - port 53)
HTTP (TCP - port 80)
HTTPS(TCP - port 443)
TCP And UDP Ports
TCP
21 :FTP
22 :SSH
23 :Telnet
25 :SMTP
53 :DNS
80 :HTTP
110 : POP3
443 :HTTS
UDP
53 :DNS Client
69 :TFTP
I P Addressing
Now a days IPv4 is followed. It is a 32-bit addressing scheme.
32bits are divided into 4 octets of 8 bits each.
i.e. 8.8.8.8. i.e. (1s & 0s)-(1s & 0s)-(1s & 0s)-(1s & 0s).
(binary format). The IP address is maximum of 255 & min of 0.
In future IPv6 is expected. It is 128 bit scheme.
IP addresses are classified into different classes.
Class A 0 - 126
Class B 128 - 191
Class C 192 - 223
Class D 224 - 239 (Multicasting)
Class E 240 - 255(Reserved)

8-8-8-8
M.S.O Most Significant Octet considering MSO




Hence 0 & 127 cannot be used for adressing so actual range will be
1 to 126.
All IP addresses are divided into two.
1.Network ID
2.Host ID
in class a address there is 1 network ID & 3 host ID position i.e.
N-H-H-H..
Class A N-H-H-H
Class B N-N-H-H
Class C N-N-N-H

Network Ids are represented by 1s & host ids are by 0s.


Router is an internetworking component, that
connects networks which are at different
geographical locations.
Interfaces on a Router
1. Ethernet It is a LAN interface. Some of the models have an
RJ45 port for 10baseT or 10/100. And some other have a 15 pin
female connector AUI (Attachment Unit Interface).
2. Serial It is a 60 pin female WAN interface for leased
line
3. BRI/PRI It is a RJ45 WAN interface for ISDN
4. Async It is a 37 pin female connector for dial ups.
5. Console It is a RJ45 Connector used to configure the
Router for the first time.
6. Auxiliary RJ45 Connector for remote access
administration.

Routers
Modular Fixed
Modular Routers
These type of routers have up gradable slots, and the number
of ports can be increased just by adding cards in the slots.
Fixed Routers
These types of routers have fixed number of ports.
Cisco Routers Series
Cisco 800, 1700, 1800, 2600, 2800, 3200,
3600, 3700, 3800, 7200, 7300, 7500, 10000,
10700, 12000.

Fixed Modular
800,.1700 2600,.., 12000
1750 & 1751 exceptionally are Modular Routers.
Boot ROM : It stores the mini IOS (Internet work Operating
System) image (RX Boot) with extremely limited capabilities and
POST routines and core level OS for maintenance.
FLASH : It is an EPROM chip that holds most of the IOS
Image. It maintains everything when router is turned off.
RAM : RAM holds running IOS configurations and
provides caching. RAM is a volatile memory and looses its
information when router is turned off. The configuration present
in RAM is called Running configuration.
NVRAM : It is a re-write able memory area that holds routers
configuration file. NVRAM retains the information when ever
router is rebooted. Once configuration is saved, it will be saved in
NVRAM and this configuration is called Startup Configuration.

Configuration of a Router
Router for the first time is configured through the CONSOLE
port.COM port of a PC is connected to the console port of router with
a console cable by using a transceiver. Router is accessible by a tool.
In windows, it is called HYPER TEMINAL. As soon as the router is
powered on and accessed, the following things happen,
POST
BOOT STRAP
FLASH
NVRAM
Setup Mode
ROM (mini IOS)
If IOS is Corrupted
In Setup mode, there will be a message,
Would You Like To Enter The Initial Configuration [Y/N] :
If Y then, initial configuration starts.
If N would you like to terminate the auto installation?
Press RETURN to get startedYou will land on the default
prompt of the Router ROUTER >.

Router>_
Working Modes Of a Router
1. User Mode (Default mode)
2. Privilege or Administrative Mode
3. Global Configuration Mode
4. Interface Configuration Mode
5. Line Configuration Mode
6. Router Mode
7. Sub-Interface Mode
USER MODE
Router> is the user mode, I,e the default prompt. It
means that when ever a router boots successfully it
lands into the user mode. Router cannot be
configured from this mode, but it is used for just
monitoring purpose. Router> en
Router #
PREVILEGE MODE
Router# it is the administrating mode, we can check
whether the settings and configurations made have been
implemented or not. Eg. Router # Sh int e0. If it is new
router all the interfaces are by default shut down, so the
message will be, Ethernet 0 is administratively down,
line protocol is down.
Router# Config t
Router (Config)#
Global Configuration Mode
As the name indicates, it is a global configuration mode
I,e. we can configure any interface from this mode, just
by entering into the interface mode.
The Clock Command
The clock command is used to set the clock of Router.
Syntax.
Router# clock set hh:mm:ss Day of week Month Year
E.g.
Router#clock set 16:35:00 1 April 2003
Note* This is the only configuration which can be done from
privilege mode,every other configuration should be done at global
configuration mode only.
Some of the important show commands in privilege
mode
Router# sh clock

sh int (interface name eg e0)

Sh history
Sh memory
Sh running-config


Sh startup-config
To save configuration from RAM TO NVRAM
Router#Copy Running-config Startup-config (or)
Router#Write Memory
To configure Hostname (or) Identification of
Router over the network.
Router#conf t
Router(config)#Hostname R_2503
Router(config)#^Z
To configure Logging banner.
Router#conf t
Router(config)#Banner Motd #
Enter text message.#
Router(config)#^Z
Router Password Configuration
1. Previlege Password
2. Virtual Terminal Password
3. Console Password
4. Auxillary Password

Previlege PASSWORDS
Enable Password Enable Secret
Enable Password:- It is global command restricts access to
the previlege mode, the password is in clear text.
Router(config)#Enable password 123
Enable Secret:-Here the password is in encrypted form.
Router(config)#Enable secret cisco
Virtual Terminal Password
It establishes a login password on incoming Telnet
sessions.
Router#conf t
Router(config)#Line vty 0 4
Router(config-line)#Login
Router(config-line)#password cisco
Router(config-line)#^Z
Console Password
It establishes a login password on the console terminal.
Router#conf t
Router(config)#Line Console 0
Router(config-line)#Login
Router(config-line)#Password cisco
Router(config-line)#^Z

Auxillary Password
It establishes a login password to remote administration.
Router#conf t
Router(config)#Line Aux 0
Router(config-line)#Login
Router(config-line)#Password cisco
Router(config-line)#^Z

ETHERNET
Router(config)#Interface Ethernet 0
Router(config-if)#Ip Address 200.150.1.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#^Z
Router#Show Int E0

SERIAL
Router(config)#Interface Serial 0
Router(config-if)#Ip Address 150.10.1.1 255.255.0.0
Router(config)#clock rate 64000
Router(Config-if)# bandwidth 64
Router(config-if)#No shutdown
Router(config-if)#^Z


The CDP
Its a Cisco's proprietary protocol called the Cisco Discovery
Protocol, that gives you a summary of all the directly connected
Cisco devices. CDP is a L2 protocol, that discovers neighbor
regardless of which protocol suite they are running. When a
cisco device boots up, the CDP is loaded by default, but can be
disabled at interface level.
* The CDP is limited to the immediate neighbors only
The summary includes Device Identifier(eg. Switch configured
name or domain name), Port Identifier (eg. Ethernet 0 and serial
0.), Capabilities list (eg. The device can act as a sourcr route
bridge as well as a router), Platform (eg. Cisco 2600).
CDP (Ciscos Discovery Protocol)
Using CDP
Router# sh cdp neighbor (shows neighboring devices)
To disable CDP.,
Router(config)#no cdp run
Router(config)#int s0
Router(config-if)#no cdp enable
Router# sh cdp entry 192.168.10.1 (shows detailed
information about this perticular neighbor.)
Router# sh cdp interface(shows the details of the interface
of the local decive.)
Router# sh cdp traffic (shows the packet sent, received,
lost etc.)
Backup & Restoring Routers IOS Image
Using TFTP
(Trivial File Transfer Protocol)
TFTP Server allows you to take backup, upload and save your IOS
Image and current configuration on it. TFTP is a software program
of 1.3Mb. This should be installed on that TFTP server i.e.,
(Personnel Computer).
C:\Program files\cisco systems\cisco TFTP
* Note: Always while taking Backup or Restoration TFTP
software should execute on that particular computer.
Backup Sources :
1. Through Telnet Session.
2. Through Console Session.
3. Through Auxillary Port (Remote Session)
Backup of IOS Image
Router#Copy Flash:(Press Tab key) Tftp
Address or name of the remote host [ ]? (Ip address of tftp)
Destination file name [ ] ? (Press enter key or a name)

Backup of Configuration
Router#Copy Startup-config Tftp
Address or name of the remote host [ ]? (Ip address of tftp)
Destination file name [ ] ? (Give a name)

Routing
The term routing is used for taking a packet from one device and sending it
through the network to another device on a different network.



To be able to route packets, a router must know, at a minimum, the
following:

Destination address
Possible routes to all remote networks
The best route to each remote network
Routing is of three types.

Static
Dynamic and
Default

When the destination is known, static and dynamic routing is done.
For unknown destinations, default routing is employed.
In dynamic routing, the path is fixed by the protocol. The paths
will be changing depending on the length of the path. Always the shortest
path is preferred. Static routing is done by the users. These paths are stored
in the routing table.
Static Routing

In static routing, a system administrator sets up a
manual route when there is only one route to get to a
network.
Routing table
no CPU overhead
requires deeper understanding
no network bandwidth
new routes must be added manually
administrator oversight of security
only workable on small networks
Default Routing

Router(config)#ip route DA (S/N mask next) (next hop address)
Router(config)# ip route 0.0.0.0 0.0.0.0 s1
R1 R2
10.0
30.0
20.0
Unknown packets
Routing table
Nat
Drop
192.168.10.0
192.168.20.0
0.0.0.0 0.0.0.0
Routing Table
30.0
Dynamic Routing

It is a type of routing where routing protocols( eg. RIP and IGRP) are used
between routers to determine the path and maintain routing table. Once
the path is determined a router can route a routed protocol (IP). Dynamic
routing uses broad casts and multicasts to communicate with other routers.
The routing metric helps routers find the best path to each network
They are two types :
IGP (Interior Gateway Protocol) & EGP (Exterior Gateway Protocol)

Interior Gateway Protocol
A set of routing protocol that are used to exchange information within
an Autonomous system. Eg:- RIP ,EIGRP,OSPF

Exterior Gateway Protocol
A set of routing protocol that are used to exchange routing information
between Autonomous systems. Eg :-BGP (Border Gateway Protocol)
.

Interior Gateway Protocol
it classified into three :

Distance Vector
Hybrid Routing
Link State
Distance Vector: the distance vector approach determines the direction and
the distance to any link in the internet work. When the topology in a distance
vector routing protocol changes, routing table updates in the router must
occur. This update process proceeds step-by-step router to router. Eg. RIP and
IGRP. -(Routing By Roomer)

Link State : it recreates the exact topology of the entire network(atleast the
partion of the network where the router is situated).(Triggerd Update) Eg .
OSPF.

Hybrid Routing : it combines aspects of the link state and the distance
vector algorithm.


IGP

Rip - Routing Information Protocol
RIP v2 - version 2
IGRP - Interior Gateway Routing Protocol
EIGRP - Enhanced IGRP
OSPF - Open Shortest Path First
IS-IS - Intermediate System to Intermediate system
Functions of IGP

Learning Routing Information
Notifying any failed route
Adding next best route, if one fail

Administratative Distance

It is the feature used by router to select the best path when there are two
or more different router to the same destination from two different routing
protocols. Administrative distance defines the reliability of the routing protocol

Each routing protocol have an AD value

Directly connected - 0
Static route - 1
BGP - 20
EIGRP - 90
IGRP - 100
OSPF - 110
IS-IS - 115
RIP - 120
External EIGRP - 170
Unknown - 255 (this route will never be used
EIGRP
OSPF
RIP
RIP
Autonomous system
Metric Value

It is used to compare routes learned by single routing protocol. The route
with the lowest metric value will become the best path
R1 R2
Hope count used in RIP
Routing by rumor :
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.

Functions of a distance vector routing protocol.
Identification of source of information
Discovering routes
Select the best route
Maintain Route information
Distance Vector Protocols
RIP
RIP v2
IGRP
Distance Vector
RIP is a routing protocol based on the Bellman-Ford (or
distance vector) algorithm. This algorithm has been used for routing
computations in computer networks since the early days of the ARPANET. RIP
uses one of a class of routing algorithms known as Distance Vector algorithms.
The earliest description of this class of algorithms known to the author is in
Ford and Fulkerson . Because of this, they are sometimes known as Ford-
Fulkerson algorithms. The term Bellman-Ford is also used, and derives from
the fact that the formulation is based on Bellman's equation.

Rip use hop count to determine the best path to a remote
network. but it has maximum allowable hope count of 15. 16 is deemed
unreachable. Rip works well in small networks.

Rip send the complete routing table out to all active interface
every 30 seconds . Rip v1 uses only classfull routing ,which mean that all
devices in the network must use the same subnet mask
RIP
Routing Information Protocol

Rip Timer

Route update timer : The router sends a complete copy of its routing table
out to all neighbors. By default each Rip router transmits full updates every
30 seconds

Route Invalid Timer : Next 180 sec there had no updates then it invalid
(6 updates)

Hold down Timer : After 180 sec with out receiving an updates on router.
Rip would designate the route as belong down by giving it value of
16 unreachable

Route Flush Timer : Once 240 seconds pass without an update (8 updates) .
Rip would remove the entry from its routing table

Autonomous Systems
An autonomous system is a collection of networks under a
common administrative domain. IGPs operate within an
autonomous system where as EGP connects different autonomous
systems.
Every autonomous system has a distinct number.The
Internet Assigned Numbers Authority (IANA) is responsible for
allocating this number. Eg. Autonomous system 100.
We can use any number unless the organization plans for
an EGP.
IGRP
Interior Gateway Routing Protocol

IGRP is a cisco proprietary distance vector routing protocol .IGRP has a
maximum hope count of 255 with default of 100.This is helpful in large
network.
IGRP uses bandwidth and delay of the line by default as a metric for
determine the best route to an internetwork.This is called a composite metric

The Interior Gateway Routing Protocol (IGRP) is a routing protocol that was
developed in the mid-1980s by Cisco Systems,that time RIP is most popular

You might also like