Book Ccna
Book Ccna
Cisco
Special Thanks to
Mr. Raj Bhanushali (CCNA Trainer)
CCNA-ROUTING
TABLE OF CONTENTS
BASICS OF NETWORKING
IP ADDRESSING
ROUTER CONFIGURATION
IP ROUTING
SWITCHING
ACCESS CONTROL LIST
IOS MANAGEMENT
WAN
IPv6
What is Networking?
Networking is a connection of 2 or more devices WITH THE SAME
RANGE OF IP ADDRESS UNDER COMMON PROTOCOL.
Types of Networks :
- LAN [Local Area Network] : A local-area network (LAN) is a computer network that
spans a relatively small area. Most often, a LAN is confined to a single room, building or group of
buildings, however, one LAN can be connected to other LANs over any distance via telephone lines and
radio waves.
- WAN [Wide Area Network] : A computer network that spans a relatively large
geographical area. Typically, a WAN consists of two or more local-area networks (LANs). Computers
connected to a wide-area network are often connected through public networks, such as the telephone
system. They can also be connected through leased lines or satellites.
- GAN [Global Area Network] : A global area network (GAN) refers to a network
composed of different interconnected networks that cover an unlimited geographical area. The term is
loosely synonymous with Internet, which is considered a global area network.
NETWORK TOPOLOGIES :
- BUS
- RING
- STAR
- MESH
- HYBRID
BUS Topology :
Bus topology is a network type in where every computer and network device is connected to single cable.
1. It is cost effective.
4. It is easy to understand.
2. If network traffic is heavy or nodes are more the performance of the network decreases.
1. Transmitting network is not affected by high traffic or by adding more nodes, as only the nodes having
3. Easy to troubleshoot.
5. Only that node is affected which has failed rest of the nodes can work smoothly.
2. Expensive to use.
3. If the hub is affected then the whole network is stopped because all the nodes depend on the hub.
1. Partial Mesh Topology : In this topology some of the systems are connected in the same fashion as mesh
topology but some devices are only connected to two or three devices.
2. Full Mesh Topology : Each and every nodes or devices are connected to each other.
1. Fully connected.
2. Not flexible.
2. It is robust.
2. Effective.
4. Flexible.
1. Complex in design.
2. Costly.
Twisted Pair Cable:
Twisted pair cabling is a type of wiring in which two conductors of a single circuit are twisted
together for the purposes of canceling outelectromagnetic interference (EMI) from external
sources; for instance, electromagnetic radiation from unshielded twisted pair (UTP) cables,
and crosstalk between neighboring pairs. It was invented by Alexander Graham Bell.
UTP vs STP
Twisted pair cables are widely used in transmitting information, especially across great distances. The
twist in the wire cancels out any magnetic interference that may develop in the wiring. There are two
common types of twisted pair cabling, STP and UTP. The S stands for Shielded, the U stands for
Unshielded, and the TP stands for twisted pair for both. STP simply has additional shielding material that
is used to cancel any external interference that may be introduced at any point in the path of the cable.
UTP cables have no protection against such interference and its performance is often degraded in its
presence. Using STP cables ensure that you get the maximum bandwidth from your cabling even if the
external condition is less than ideal.
The biggest drawback to using STP cables is the higher cost. The shielding is an additional material that
goes into every meter of the cable, thereby raising its total cost. The shielding also makes the cable
heavier and a bit more difficult to bend or manipulate in any way. This is not a big issue but something
that users should know when choosing between STP and UTP. In terms of usage, UTP is the more
prevalent and popular cabling that is used in most homes, offices, and even in large scale businesses due
to its lower cost.
STP is commonly used by large scale companies in high-end applications that require the maximum
bandwidth. STP cables are also used in outdoor environments where the cables are exposed to
the element sand man made structures and equipment that may introduce additional interference.
Good examples of this would be the telephone/internet cables that run from your home, to the junction
box, down to the establishments of your provider or ISP. For most common uses, it does not really matter
whether you use STP or UTP as both would probably perform well. UTP is the more logical choice as it
is cheaper and much easier to find in the majority of computer equipment retailers.
Straight Cable:
You usually use straight cable to connect different type of devices. This type of cable will be used most of
the time and can be used to:
1) Connect a computer to a switch/hub's normal port.
2) Connect a computer to a cable/DSL modem's LAN port.
3) Connect a router's WAN port to a cable/DSL modem's LAN port.
4) Connect a router's LAN port to a switch/hub's uplink port. (normally used for expanding network)
5) Connect 2 switches/hubs with one of the switch/hub using an uplink port and the other one using
normal port.
Crossover Cable:
Sometimes you will use crossover cable, it's usually used to connect same type of devices. A
crossover cable can be used to:
1) Connect 2 computers directly.
2) Connect a router's LAN port to a switch/hub's normal port. (normally used for expanding
network)
3) Connect 2 switches/hubs by using normal port in both switches/hubs.
Rollover cable:
Rollover cable (also known as Cisco console cable or a Yostcable) is a type of null-
modem cable that is often used to connect a computer terminal to a router's console port.
Thiscable is typically flat (and has a light blue color) to help distinguish it from other types of
network cabling.
OSI MODEL
The Open Systems Interconnection model (OSI model) is a conceptual model that
characterizes and standardizes thecommunication functions of a telecommunication or
computing system without regard to their underlying internal structure and technology. Its goal is
the interoperability of diverse communication systems with standard protocols. The model
partitions a communication system into abstraction layers. The original version of the model
defined seven layers.
A layer serves the layer above it and is served by the layer below it. For example, a layer that
provides error-free communications across a network provides the path needed by applications
above it, while it calls the next lower layer to send and receive packets that comprise the contents
of that path. Two instances at the same layer are visualized as connected by
a horizontal connection in that layer.
The model is a product of the Open Systems Interconnection project at the International
Organization for Standardization (ISO), maintained by the identification ISO/IEC 7498-1.
The Open Systems Interconnect (OSI) model has seven layers. This article describes and explains
them, beginning with the 'lowest' in the hierarchy (the physical) and proceeding to the 'highest' (the
application). The layers are stacked this way:
7. Application
6. Presentation
5. Session
4. Transport
3. Network
2. Data Link
1. Physical
Functions of Different Layers :
Application, Presentation, Session Telnet, HTTP, FTP, SMTP, POP3, Firewall, Intrusion Detection System
(Layers 5-7) VoIP, SNMP
Data Link Layer Ethernet, HDLC, Frame Relay, PPP SWITCHES, DSL Modem, Cable
Modem
The speed for TCP is slower than UDP. UDP is faster because there is no error-
checking for packets.
TCP is suited for applications that require UDP is suitable for applications that need
high reliability, and transmission time is fast, efficient transmission, such as games.
relatively less critical.
TCP does Flow Control. TCP requires three UDP does not have an option for flow control.
packets to set up a socket connection, before
any user data can be sent. TCP handles
reliability and congestion control.
What is DNS?
The Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services,
or any resource connected to the Internet or a private network. It associates various information
with domain names assigned to each of the participating entities.
Most prominently, it translates more readily memorized domain names/website names to the numerical IP
addresses needed for the purpose of locating and identifying computer services and devices with the
underlying network protocols.
By providing a worldwide, distributed directory service, the Domain Name System is an essential
component of the functionality of the Internet.
What is a node?
A network can consist of two or more computers directly connected by some physical medium such as
coaxial cable or optical fiber. Such a physical medium is called as Links and the computer it connects is
called as Nodes.
Understand IP Addresses
An IP address is an address used in order to uniquely identify a device on an IP
network. The address is made up of 32 binary bits, which can be divisible into a
network portion and host portion with the help of a subnet mask. The 32 binary
bits are broken into four octets (1 octet = 8 bits)
An IP address has two parts. The first part of an IP address is used as a network
address, the last part as a host address. If you take the example 192.168.123.132
and divide it into these two parts you get the following:
The second item, which is required for TCP/IP to work, is the subnet mask. The subnet mask is used
by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network.
In TCP/IP, the parts of the IP address that are used as the network and host addresses are not fixed,
so the network and host addresses above cannot be determined unless you have more information.
This information is supplied in another 32-bit number called a subnet mask.
A Subnet mask helps you know which portion of the address identifies the network and which portion of
the address identifies the node. Class A, B, and C networks have default masks, also known as natural
masks, as shown here:
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
Network classes:
Internet addresses are allocated by the InterNIC, the organization that administers the Internet. These IP
addresses are divided into classes. The most common of these are classes A, B, and C. Classes D and E
exist, but are not generally used by end users. Each of the address classes has a different default subnet
mask. You can identify the class of an IP address by looking at its first octet. Following are the ranges of
Class A, B, and C Internet addresses, each with an example address:
Class A networks use a default subnet mask of 255.0.0.0 and have 0-127 as their first octet. The address
10.52.36.11 is a class A address. Its first octet is 10, which is between 1 and 126, inclusive.
Class B networks use a default subnet mask of 255.255.0.0 and have 128-191 as their first octet. The
address 172.16.52.63 is a class B address. Its first octet is 172, which is between 128 and 191, inclusive.
Class C networks use a default subnet mask of 255.255.255.0 and have 192-223 as their first octet. The
address 192.168.123.132 is a class C address. Its first octet is 192, which is between 192 and 223,
inclusive.
In some scenarios, the default subnet mask values do not fit the needs of the organization, because of the
physical topology of the network, or because the numbers of networks (or hosts) do not fit within the
default subnet mask restrictions. The next section explains how networks can be divided using subnet
masks.
* 127 is used as loop back address for testing purposes.
Private Address/Free:
SUBNET MASK’s:
/8 = 255.0.0.0
/9 = 255.128. 0.0
/10 = 255.192.0.0
/11 = 255.224.0.0
/12 = 255.240.0.0
/13 = 255.248.0.0
/14 = 255.252.0.0
/15 = 255.254.0.0
/16 = 255.255.0.0
/17 = 255.255.128.0
/18 = 255.255.192.0
/19 = 255.255.224. 0
/20 = 255.255.240. 0
/21 = 255.255.248. 0
/22 = 255.255.252. 0
/23 = 255.255.254. 0
/24 = 255.255.255. 0
/25 = 255.255.255.128
/26 = 255.255.255.192
/27 = 255.255.255.224
/28 = 255.255.255.240
/29 = 255.255.255.248
/30 = 255.255.255.252
/31 = 255.255.255.254
/32 = 255.255.255.255
SUBNETTING
Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C
network. If you do not subnet, you are only able to use one network from your Class A, B, or C network,
which is unrealistic.
Each data link on a network must have a unique network ID, with every node on that link being a member
of the same network. If you break a major network (Class A, B, or C) into smaller subnetworks, it allows
you to create a network of interconnecting subnetworks. Each data link on this network would then have a
unique network/subnetwork ID. Any device, or gateway, that connects n networks/subnetworks
has n distinct IP addresses, one for each network / subnetwork that it interconnects.
EXAMPLE :
A system administrator who is allocated a block of IP addresses may be administering networks that are
not organized in a way that easily fits these addresses. For example, you have a wide area network with
150 hosts on three networks (in different cities) that are connected by a TCP/IP router. Each of these three
networks has 50 hosts. You are allocated the class C network 192.168.123.0. (For illustration, this address
is actually from a range that is not allocated on the Internet.) This means that you can use the addresses
192.168.123.1 to 192.168.123.254 for your 150 hosts.
Two addresses that cannot be used in your example are 192.168.123.0 and 192.168.123.255 because
binary addresses with a host portion of all ones and all zeros are invalid. The zero address is invalid
because it is used to specify a network without specifying a host. The 255 address (in binary notation, a
host address of all ones) is used to broadcast a message to every host on a network. Just remember that
the first and last address in any network or subnet cannot be assigned to any individual host.
You should now be able to give IP addresses to 254 hosts. This works fine if all 150 computers are on a
single network. However, your 150 computers are on three separate physical networks. Instead of
requesting more address blocks for each network, you divide your network into subnets that enable you to
use one block of addresses on multiple physical networks.
The advantages associated with Subnetting a network are summarized below:
- Through subnetting, you can reduce network traffic and thereby improve network performance. You
only allow traffic that should move to another network (subnet) to pass through the router and to the other
subnet.
- Troubleshooting network issues is also simpler when dealing with subnets than it is in one large
network.
Types of Subnetting:
Default gateways:
If a TCP/IP computer needs to communicate with a host on another network, it will usually
communicate through a device called a router. In TCP/IP terms, a router that is specified on a
host, which links the host's subnet to other networks, is called a default gateway. This section
explains how TCP/IP determines whether or not to send packets to its default gateway to reach
another computer or device on the network.
BASICS OF ROUTER
CONFIGURATION
What is a Router?
Router is a device which connects to different networks with the help of
routing and routing protocols. It also breaks up large layer 3 broadcast
domain.
A Router is a networking device that forwards data packets between computer networks. 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 reaches its destination node.
A router is connected to two or more data lines from different networks (as opposed to a network switch,
which connects data lines from one single network). 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.
This creates an overlay internetwork.
Router Memories
ROM : ROM is read-only memory available on a router's processor board. The initial bootstrap
software that runs on a Cisco router is usually stored in ROM. ROM also maintains instructions
for Power-on Self Test (POST) diagnostics. For ROM Software upgrades, the pluggable chips on
the motherboard should be replaced.
RAM : RAM is a volatile data storage type of memory in which stored information is lost with
power off. RAM stands for random access memory where the word random refers that stored
data can be accessed in any order. RAM can be SRAM or DRAM. DRAM is used in more
applications for the simplicity of its structure and lower cost.
RAM is used at run time for executable operating system code, and its subsystems, routing
tables, caches, running configuration, packets, and so forth.
RAM Provides temporary memory for the router configuration file of the router while the
router is powered on.
NVRAM : NVRAM stands for non-volatile random access memory and is used to describe
any type of RAM that stored data is not lost by power turned off. NVRAM is used for writable
permanent storage of the startup configuration in CISCO routers.
NVRAM is used to store the Startup Configuration File. This is the configuration file that
IOS reads when the router boots up. It is extremely fast memory and retains its content when the
router is restarted.
Flash : Flash memory is a non-volatile memory storage that doesn’t lose the information by
turning the power off. Flash memories exist in many forms in routers, internal flash, external
flash card or even USB flash cards.
Flash is used for permanent storage of a full Cisco IOS software image in compressed form. In
Juniper routers Flash stores the JUNOS image and the configuration files.
There is an AUX port which allows to configure the router remotely.
Configuration Mode : In this mode, we config the routers. Also known as global configuration
mode. #configure terminal or #conf t.
To change the hostname, we have to be enter in configuration mode and enter the
command.
#hostname R1
Note : To come back to privileged mode from config mode we have to just type #exit and
we will be automatically thrown back to that mode.We can also use (Ctrl+z) to end up.
# show running- config : Shows you the running configuration on that router.
# show startup-config : Shows you the NVRAM content.
#copy running-config startup-config : To save the config.
#wr : Is used to save the configuration as well.
#show ip interface brief: Shows all ip details.
#no ip domain lookup: For not getting stuck on any miss or corrupt entry or spelling mistake.
IP ROUTING
IP Routing is an umbrella term for the set of protocols that determine the path that data
follows in order to travel across multiple networks from its source to its destination. Data is
routed from its source to its destination through a series of routers, and across multiple networks.
The IP Routing protocols enable routers to build up a forwarding table that correlates final
destinations with next hop addresses.
1. Static Routing
2. Dynamic Routing
3. Default Routing
1. Static Routing
Static routing is a form of routing that occurs when a router uses a manually-
configured routing entry.
Whenever you're doing static routing, just go to the router and define the unknown routes of the
router.
For eg. if R1 has 2 unkown networks 30.0.0.0 & 40.0.0.0 then,
#ip route 30.0.0.0 255.0.0.0 20.0.0.2
#ip route 40.0.0.0 255.0.0.0 20.0.0.2
Here, 20.0.0.2 is the next hop ip address.. we calculate the next hop from the router from which
we are pinging the other network. In this case the R1 router. To simplify it, imagine the other
unknown network is some room 3 doors away. To reach there, we have to cross the door of the
room we are in.. that means, the next hop is the door ie the next ip address.
Note : You can also assign serial interface like s0/0 for static routing.
#ip add 30.0.0.0 255.0.0.0 serial0/0
Static Routing is basically done on smaller networks. Manually assigning the routes is a
hectic task when the network is big. Thus, dynamic routing is used by users to simplify the
task.
2. Dynamic Routing :
Distance Vector : RIP , RIPv2, IGRP.
Link State : OSPF & IS-IS.
Hybrid : EIGRP.
Distance Vector
Metric is needed to calculate the best path towards the destination =
minimum hop count.
Maximum Hop Count on rip is 15. IGRP is 256 but by default its
100.
Split Horizon - It will not allow the packet to be sent from the same
interface.
Route Poisoning - Destination Router will send a fake update saying
this is the max hop count to the source router.
Holdown Timers - Destination Router will wait for a defined timer.
RIP and RIPv2 :
RIP RIPv2
RIP is the Routing Information Protocol. RIPv2 is Routing Information Protocol
version 2.
Sends Periodic Update and also sends complete table Sends Periodic Update and Complete Table (30secs)
(30 secs).
Broadcast while update and advertise. Multicast while update and advertise with 224.0.0.9
It has only 1 table that is the routing table. It has only 1 table ie routing table.
Hold Timer : 180 with elapse 60 secs. Hold Timer : 180 with elapse 60 secs.
NO AUTHENTICATION AUTHENTICATION
NOTE : In any routing protocol, if there is an equal metric for a particular
destination, the routing protocol will do load balancing.
It is packet based load balancing on CISCO Routers by default.