routerccieacademy.com.pk/data/ccna routing.pdf · 1 router a network device that forwards packets...

126
1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each incoming packet and decide how to forward it. The destination address in the packets determines which line (interface) outgoing packets are directed to. In large-scale enterprise routers, the current traffic load, congestion, line costs and other factors determine which line to forward to. A device that forwards data packets along networks, A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP’s network. Routers are located at gateways, the places where two or more networks connect. Routers use headers and forwarding tables to determine the best path for forwarding the packets, and they use protocols such as Internet Control Message Protocol (ICMP) to communicate with each other and configure the best route between any two hosts Very little filtering of data is done through routers. 1. perform routing Means to make communication possible between two different networks using a device called router. For ex One side IP is 10.0.0.0 and other network is 11.0.0.0 2. Chose the shortest path first a c b d

Upload: others

Post on 18-Mar-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

1

Router

A network device that forwards packets from one network to another, Based on internal routing tables, routers read each incoming packet and decide how to forward it. The destination address in the packets determines which line (interface) outgoing packets are directed to. In large-scale enterprise routers, the current traffic load, congestion, line costs and other factors determine which line to forward to.

A device that forwards data packets along networks, A router is connected to at least two networks, commonly two LANs or WANs or a LAN and its ISP’s network. Routers are located at gateways, the places where two or more networks connect. Routers use headers and forwarding tables to determine the best path for forwarding the packets, and they use protocols such as Internet Control Message Protocol (ICMP) to communicate with each other and configure the best route between any two hosts

Very little filtering of data is done through routers.

1. perform routing Means to make communication possible between two different networks using a device called router. For ex

One side IP is 10.0.0.0 and other network is 11.0.0.0

2. Chose the shortest path first

a c

b d

Page 2: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

2

If send file router a to router b so it select shortest path

But if we want send in other path then we must increase the bandwidth

Router Interface Serial & Ethernet or Fast Ethernet

Serial we use for Wide Area

Ethernet we you in local Area

Ethernet 10 mb (in 2500 S Router)

fast Ethernet 100 mb (in 2600 and 2800 S Router)

Serial

s0/0 s0/0

DCE DTE

Female cable Male Cable

Clock Rate always we define in DCE Side

DCE :- Data Communication equipment

DTE:- Date terminal equipment

V.35 DTE and DCE Cables

Page 3: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

3

V.35 cables for back-to-back connections between routers.

Smart Serial Cable (1700, 1800, 2600, 2800)

USB-to-Serial Connector for Laptops

Using the Tab Key to Complete Commands

When you are entering a command, you can use the Tab key to complete the command. Enter the first few characters of a command and press the Tab key. If the characters are unique to the command, the rest of the command is entered in for you. This is helpful if you are unsure about the spelling of a command.

Router#sh tab key = Router#show

Using the Question Mark for Help

The following output shows you how using the question mark can help you work through a command and all its parameters.

Page 4: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

4

Router#? Lists all commands available in the current command mode

Router#c? Lists all the possible choices that start with the letter c

clear clock

Router#cl? Lists all the possible choices that start with the letters cl

clear clock

Router#clock Tells you that more parameters need to be entered

% Incomplete Command

Router#clock ? Shows all subcommands for this command (in this case, Set, which sets

the time and date) Set

Router#clock set 19:50:00 14 Pressing the Enter key confirms the time and date configured.

July 2007 ? Enter

Router# No error message/Incomplete command message means the command

was entered successfully.

Page 5: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

5

ROUTER COMPONENTS RAM Random-Access Memory similar to the function as RAM in PCs. This is where the IOS runs its processes. It also contains the running configuration, routing and other tables as well as packet buffers.

ROM

This Read-Only Memory stores a older 'lite' IOS used to boot the router for the very first time, or when the

Flash memory is erased or corrupted. FLASH

This piece of 'flash-able' memory stores the IOS image, the operating system of the router.

NVRAM

In contradiction to normal RAM, Non-Volatile Random-Access Memory is a special type of memory that doesn't lose its content when the router's power is turned off. It stores the startup configuration and the configuration register.

Config register

The NVRAM has a special location that contains the 16-bit configuration register. Every time the router boots it

reads this value. The config-register value is a hexadecimal value ranging from from 0x0000 to 0xFFFF and can be set byusing the config-register command. The most important portion of the configuration register to understand

for the exam is the boot field (bit 0 through 3, hexadecimal range 0x0000-0x000F). The boot field value is used to

specify from which location the IOS image should be loaded or bypassed even during startup.

Boot field Meaning

0x0 The router will enter ROM monitor mode

and remain at the system bootstrap

prompt.

0x1 The IOS image stored in ROM will be

loaded.

0x2-0xF The router will boot as normal and load

the default IOS image stored in Flash and

enables boot system commands.

The remaining 12 bits of the configuration register are used for various functions such as enabling/disabling the

Break function, setting the Console line speed, bypassing NVRAM, and controlling the broadcast address. To change

the configuration register you have to enter be in global configuration mode. Use the command configure terminal

often abbreviated to conf t in privileged EXEC mode to enter global config mode. You can enter privileged EXEC

mode using the enable command. When you enter the correct password the prompt will change to Router# (where

"Router" is the hostname of the router).

Page 6: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

Once you are in global config mode use the following Router(config)#config-register 0x2102 where 0x2102 is an example of a config-register value.

6 command to change configuration register value:

You can view the current configuration setting by using the Router#show version command. The last line of the output will display the current value and if it is different, the value after reboot:

Configuration register is 0x2142 (will be 0x2102 at next reload)

Router Mode

1. User EXEC mode Limited to basic monitoring commands

2. Privileged EXEC mode Provides access to all other router commands

3. Global Configuration mode Commands that affect the entire system

4. Specific Configuration modes Commands that affect interfaces/processes only

5. Setup mode Interactive configuration dialog

1. User EXEC mode R1>

2. Privileged EXEC mode R1#

3. Global configuration mode R1(config)#

4. Specific configuration mode R1( config-if)#

Router Mode

Router(config-subif)# Subinterface mode

Router(config-line)# Line mode

Router(config-router)# Router configuration mode

Router Commands

Show Running Config (Show All Configuration)

Bhai>enable

Page 7: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

7

Bhai#show running-config

!

end

Bhai# Show Startup-config (Show All Configuration )

Bhai>enable

Bhai#show startup-config

!

end

Bhai#

Difference between running-config & startup-config

The statup-config is the configuration that is loaded when the router boots or powers up.

The runnning-config is the current configuration in the router. It may have been modified since the last boot and so might be different.

Having these two provides a nice safety feature. Changes can be made to the running-config and if something badly goes wrong, you can restart the router and get back to the configuration without the changes. Data & Time Setting

Bhai#clock set 01:12:12 21 March 2009 How to Check Date & Time Bhai#show clock

01:12:17.977 UTC Sat Mar 21 2009

Setting the Clock Time Zone

Router(Config)# clock timezone GMT +5 Sets the time zone for

display purposes. Based on

Router(config)#clock Timezone GMT coordinated universal time.

Page 8: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

8 Host Name

Router>

Router>enable

Router#configure terminal

Router(config)#hostname Bhai

Bhai(config)# For Restart Router

R1#Reload For Comments (and Router Mood)

! Comments

Router#undebug all

All possible debugging has been turned off How to Copy Router1#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router1#write memory

Building configuration...

[OK]

What’s the difference between copy running-config startup-config and Write Memory On a Cisco Switch or Router?

The difference is that the write memory command is being discontinued. It is being replaced by the copy command and is the one you should use on the cisco tests. This command on some routers such as 831, 871, 3002, 2950, 2600 however it appears that as of IOS 12 it will be gone.

Clock Rate:-

This command simply sets the Serial interface clock rate in BPS (bits per second). It is only applicable on a serial interface. In most instances the service provider sets this speed, you need just match it. This has nothing to do with bandwidth per se. The bandwidth is preset by the service provider. Clock rate just allows the routers or DCE equipment to communicate properly.

The clock rate interface command has been enhanced for the synchronous serial port adapters.

Page 9: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

9 The clock rate command is used mostly when you need to connect two routers with a cable and are not using a real T1.

Normally the Telco provides a clock signal (DCE side) which the router (DTE) locks on to when it is

receiving or transmitting. If you don't have a Telco you need to provide your own clock. You then get to choose the clock rate.

Bandwidth

In computer networks, bandwidth is often used as a synonym for data transfer rate - the amount of data that can be carried from one Router to another in a given time period (usually a second). This kind of bandwidth is usually expressed in bits (of data) per second (bps). Occasionally, it's expressed as bytes per second (Bps).

it should be remembered that a real communications path usually consists of a succession of links, each with its own bandwidth. If one of these is much slower than the rest, it is said to be a bandwidth bottleneck.

Point to Point Protocol (PPP)

PPP runs at the Data link layer (ISO layer 2), providing symmetric, peer-to-peer connections utilizing encapsulation, transmission and link management services for the upper layer network protocols. Modems, routers and even workstations utilize PPP for various serial connections.

Metric

Metrics are cost values used by routers to determine the best path to a destination network. Several factors

help dynamic routing protocols decide which is the preferred or shortest path to a particular destination.

If a router learns two different paths for the same network from the same routing protocol, it has to decide which route is better

and will be placed in the routing table. Metric is a measure used to decide which route is better (lower number is better). Each

routing protocol uses its own metric. For example, RIP uses hop counts as a metric, while OSPF uses cost.

Administrative distance

A network can use more than one routing protocol, and routers on the network can learn about a route from multiple sources. Routers need to find a way to select a better path. Administrative distance number is used by routers to find out which route is better (lower number is better). For example, if the same route is learned from RIP and EIGRP, a Cisco router chooses EIGRP route and stores the route in the routing table. This is because EIGRP routes have, by default, an administrative distance of 90, while RIP route have a higher administrative distance of 120.

Page 10: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

10

How to Assign IP Addresses

Page 11: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

11

How to Assign IP Addresses on Routers

On Router One

Router>enable

Router#configure terminal

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 11.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#exit

Router#copy running-config startup-config

Router#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 11.0.0.1 YES manual up up

Serial0/0 10.0.0.1 YES manual down down

Serial0/1 unassigned YES manual administratively down down

Page 12: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

12

ON Router Two

Router>enable

Router#configure terminal

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.2 255.0.0.0

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 12.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#exit

Router#copy running-config startup-config

Router#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 12.0.0.1 YES manual up up

Serial0/0 10.0.0.2 YES manual up up

Serial0/1 unassigned YES manual administratively down down

Page 13: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

13

How to Assign IP Addresses on Computer (Packet Tracer)

Page 14: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

14

How to Assign IP Addresses

Page 15: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

15

ON Router One

Router>enable

Router#configure terminal

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface serial 0/1

Router(config-if)#ip address 13.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#exit

Page 16: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

16

Router#copy running-config startup-config

Router#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES manual administratively down down

Serial0/0 10.0.0.1 YES manual down down

Serial0/1 13.0.0.1 YES manual down down

ON Router Two

Router2>enable

Router2#configure terminal

Router2(config)#interface serial 0/0

Router2(config-if)#ip address 10.0.0.2 255.0.0.0

Router2(config-if)#bandwidth 64

Router2(config-if)#encapsulation ppp

Router2(config-if)#no shutdown

Page 17: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

17

Router2(config-if)#exit

Router2(config)#interface serial 0/1

Router2(config-if)#ip address 11.0.0.1 255.0.0.0

Router2(config-if)#clock rate 64000

Router2(config-if)#bandwidth 64

Router2(config-if)#encapsulation ppp

Router2(config-if)#no shutdown

Router2(config-if)#exit

Router2(config)#interface fastEthernet 0/0

Router2(config-if)#ip address 15.0.0.2 255.0.0.0

Router2(config-if)#no shutdown

Router2(config-if)#exit

Router2(config)#exit

Router2#copy running-config startup-config

Router2#show ip interface brief

Interface IP-Address OK? Method Status Protocol

Page 18: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

18

FastEthernet0/0 15.0.0.2 YES manual up up

Serial0/0 10.0.0.2 YES manual up up

Serial0/1 11.0.0.1 YES manual down down

ON Router Three

Router3>enable

Router3#configure terminal

Router3(config)#interface serial 0/0

Router3(config-if)#ip address 12.0.0.2 255.0.0.0

Router3(config-if)#clock rate 64000

Router3(config-if)#bandwidth 64

Router3(config-if)#encapsulation ppp

Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#interface serial 0/1

Router3(config-if)#ip address 13.0.0.2 255.0.0.0

Router3(config-if)#bandwidth 64

Page 19: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

Router3(config-if)#encapsulation ppp

Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#interface fastEthernet 0/0

Router3(config-if)#ip address 14.0.0.2

255.0.0.0 Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#exit

Router3#copy running-config startup-config

Router3#show ip interface brief

Interface IP-Address OK? Method Status

FastEthernet0/0 14.0.0.2 YES manual up

Serial0/0 12.0.0.2 YES manual down

Serial0/1 13.0.0.2 YES manual up

ON Router Four

19

Protocol

up

down

up

Page 20: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

20

Router4>enable

Router4#configure terminal

Router4(config)#interface serial 0/0

Router4(config-if)#ip address 12.0.0.1 255.0.0.0

Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown

Router4(config-if)#exit

Router4(config)#interface serial 0/1

Router4(config-if)#ip address 11.0.0.2 255.0.0.0

Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown

Router4(config-if)#exit

Router4(config)#exit

Router4#copy running-config startup-config

Router4#show ip interface brief

Page 21: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

21

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES manual administratively down down

Serial0/0 12.0.0.1 YES manual up up

Serial0/1 11.0.0.2 YES manual up up

Assigning a Local Host Name to an IP Address

PING with Router Name

Page 22: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

22

First of all Double Click on that Computer Which Have IP Address is 12.0.0.2

Change the Display Name as Following

Page 23: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

23

After that try to ping if you ping with name it is not possible but if you ping with IP address is Possible

Router#ping 12.0.0.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 47/59/63 ms Router#ping BHAI

Page 24: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

24

Translating "BHAI"...domain server (255.255.255.255)

% Unrecognized host or address or protocol not running.

Router#

If you want to ping with Name then

Router#conf t

Router(config)#ip host BHAI 12.0.0.2

Router(config)#exit Router#ping BHAI

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/62 ms Router#

Router(config)#ip host BHAI 12.0.0.2 Assigns a host name to the IP address. After this

assignment, you can use the host name rather than an IP

address when trying to Telnet or ping to that

Address.

Router#ping BHAI Both commands execute the same objective: sending a

ping to address 12.0.0.2.

Router#ping 12.0.0.2

Page 25: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

25

After Reading this chapter you would be able to describe

Routing

Routing rules

Types of routing

Static Routing

Routing Protocols

Routed Protocols

IGP

EGP

Distance Vector

Link State

Enhanced Distance Vector A process of transferring a packet from one network to another is called routing. Routing Rules 1. If the destination is in the same subnet or network then a device directly forwards a packet to destination. Note:- ARP request is used to find out destination Mac-address. 2. If the destination is not in the same subnet or network then a device directly forwards a packet to default gateway. Note:- ARP request is used to find out default gateway Mac-address

Static Default Dynamic

Routing On Cisco Devices

Routing

Routing Types

Page 26: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

In static routing we define route manually with appropriate next-hop. In static routing we always define indirectly connected network. Advantages Easy to implement Less CPU-overload less bandwidth consumption Disadvantages Not scale-able

It is used on stub router or network. A stub router has only one entry or exit point. It can be used to reduce the size of routing table Limitation it can cause of loop in the network.

In dynamic routing we use routing protocol. They dynamically learn about route & do send route information to the neighbor’s routers.

They are those protocol which have capabilities to send data from one device to another device. Like IP,IPX, Apple Talk

IGP EGP

Static Routing

Default Routing

Dynamic Routing

Routed Protocols

Routing Protocol Types

Page 27: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

They are those protocols which are designed to work within AS. IGP Types Distance Vector Link State Enhanced DV (Hybrid) AS (Autonomous System) A collection of router managed by single Organization..

They are designed to work over AS. BGP is only EGP Protocol. Note EGP was a protocol itself in past

A Distance Vector routing protocol selects the route based on distance that is called hop count. Hop Count When a packet across a router that is called one hop. A Distance Vector routing protocol select that route which provides a network at least hop. Examples:- RIP, IGRP.

As name tells us link state a link state routing protocol sends update based in the state of link. When a link comes up & goes down it sends update. It sends update with a sequence number. 0x80000001 goes till 0xFFFFFFFF. Examples:- OSPF,IS-IS.

Interior Gateway Protocol

Exterior Gateway Protocol

Distance Vector

Distance Vector

Page 28: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

EIGRP is an Enhanced DV routing protocol based in distance vector algorithm. & sends incremental update like link state i.e. some people called it hybrid. But Cisco called it Enhanced DV.

STATIC Routing

Static routing is not really a protocol, simply the process of manually entering routes into the routing table via a configuration file that is loaded when the routing device starts up. As an alternative, these routes can be entered by a network administrator who configures the routes. Since these routes don't change after they are configured (unless a human changes them) they are called 'static' routes. Static Routing occurs when you manually add router in each router’s routing table. Static Routing has the following Benefits:

There is no overhead on the router CPU, which means you could possibly buy a cheaper router then 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 link. 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 routers correctly. If a network is added to the internetwork, the administrator has to add a route to it on all routers by hand. It’s not feasible in large networks because maintaining it would be a full time job in itself.

Default Routing We use default routing to send packets with a remote destination network not in the routing table to the next-hop router. You should only use default routing on stub networks-those with only one exit path out of the network. If you tried to put a default route on router R3, packets wouldn’t be forwarded to the correct networks because they have more then one interface routing to other routers. You can easily create loops with default routing, so be careful! By using a default router, you can just create one static route entry instead; this sure is easier then typing in all those router!

Enhance Interior Gateway Routing Protocol

Page 29: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

Config t ip route 0.0.0.0 0.0.0.0 192.168.1.1 An interface can be used as an alternative to and IP address. To use serial0/0 for destinations not in the routing table, use: Ip route 0.0.0.0 0.0.0.0 serial 0/0

Page 30: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

26

DYNAMIC

Dynamic routing protocols are software applications that dynamically discover network destinations and how to get to them. A router will 'learn' routes to all directly connected networks first. It will then learn routes from other routers that run the same routing protocol. The router will then sort through its list of routes and select one or more 'best' routes for each network destination it knows or has learned. Dynamic 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'.

Static Routing

DCE S/0 11.0.0.1 11.0.0.2 S/0 DTE

E/0 10.0.0.2 12.0.0.2 E/0

On DCE Router Ethernet Serial 0 Define Clock Rate 64000

On Both Routers Ethernet Serial 0 Define encapsulation ppp

On Both Routers Ethernet Serial 0 Define IP Route

Page 31: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

27

Static Routing

On Router One

Router>enable

Router#configure terminal

Router(config)#hostname Router1

Router1(config)#interface s0 Router1(config-

if)#ip address 11.0.0.1 255.0.0.0

Router1(config-if)#no shutdown

Router1(config-if)#clock rate 64000

Router1(config-if)#encapsulation

ppp Router1(config-if)#exit

Router1(config)#ip route 12.0.0.0 255.0.0.0 11.0.0.2

Router1(config)#interface e0

Router1(config-if)#ip address 10.0.0.2 255.0.0.0

Router1(config-if)#no shutdown

Router1(config-if)#exit

Router1#

After That Go to Router 2

Router>enable Router#configure

terminal

Router(config)#hostname Router2

Router2(config)#interface s0

Router2(config-if)#ip address 11.0.0.2 255.0.0.0

Router2(config-if)#no shutdown

Router2(config-if)#encapsulation ppp

Page 32: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

28

Router2(config-if)#exit

Router2(config)#ip route 10.0.0.0 255.0.0.0 11.0.0.1

Router2(config)#interface e0

Router2(config-if)#ip address 12.0.0.2 255.0.0.0

Router2(config-if)#no shutdown

Router2(config-if)#exit

Router2#

Wait Few Second than

Router2#show ip route

C 11.0.0.0 is directly connected, Serial0

S 10.0.0.0 [1/0] via 11.0.0.1

C 12.0.0.0 is directly connected, Ethernet0

Router2#ping 10.0.0.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4

ms Router2#ping 11.0.0.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 11.0.0.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Page 33: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

29

Router2#

Go To Router One

Router1#show ip route

S 12.0.0.0 [1/0] via 11.0.0.2

C 10.0.0.0 is directly connected, Ethernet0

C 11.0.0.0 is directly connected, Serial0

Router1#ping 12.0.0.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Page 34: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

30

Static Routing With 4 Routers

Page 35: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

31

Static Routing With 4 Routers

ON Router One

Router>enable

Router#configure terminal

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface serial 0/1

Router(config-if)#ip address 13.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Page 36: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

32

Router(config)#exit

Router#copy running-config startup-config

Router#

Router#conf t

Router(config)#ip route 12.0.0.0 255.0.0.0 13.0.0.2

Router(config)#ip route 11.0.0.0 255.0.0.0 10.0.0.2

Router(config)#ip route 15.0.0.0 255.0.0.0 10.0.0.2

Router(config)#ip route 14.0.0.0 255.0.0.0 13.0.0.2

Router(config)#exit

Page 37: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

33

ON Router Two

Router2>enable

Router2#configure terminal

Router2(config)#interface serial 0/0

Router2(config-if)#ip address 10.0.0.2 255.0.0.0

Router2(config-if)#bandwidth 64

Router2(config-if)#encapsulation ppp

Router2(config-if)#no shutdown

Router2(config-if)#exit

Router2(config)#interface serial 0/1

Router2(config-if)#ip address 11.0.0.1 255.0.0.0

Router2(config-if)#clock rate 64000

Router2(config-if)#bandwidth 64

Router2(config-if)#encapsulation ppp

Router2(config-if)#no shutdown

Router2(config-if)#exit

Router2(config)#interface fastEthernet 0/0

Router2(config-if)#ip address 15.0.0.2 255.0.0.0

Router2(config-if)#no shutdown

Router2(config-if)#exit

Page 38: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

34

Router2(config)#exit

Router2#copy running-config startup-config

Router2#conf t

Router2(config)#ip route 12.0.0.0 255.0.0.0 11.0.0.2

Router2(config)#ip route 13.0.0.0 255.0.0.0 10.0.0.1

Router2(config)#ip route 14.0.0.0 255.0.0.0 10.0.0.1

Router2(config)#exit

ON Router Three

Router3>enable

Router3#configure terminal

Router3(config)#interface serial 0/0

Router3(config-if)#ip address 12.0.0.2 255.0.0.0

Router3(config-if)#clock rate 64000

Router3(config-if)#bandwidth 64

Router3(config-if)#encapsulation ppp

Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#interface serial 0/1

Page 39: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

35

Router3(config-if)#ip address 13.0.0.2 255.0.0.0

Router3(config-if)#bandwidth 64

Router3(config-if)#encapsulation ppp

Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#interface fastEthernet 0/0

Router3(config-if)#ip address 14.0.0.2 255.0.0.0

Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#exit

Router3#copy running-config startup-config

Router#conf t

Router3(config)#ip route 10.0.0.0 255.0.0.0 13.0.0.1

Router3(config)#ip route 11.0.0.0 255.0.0.0 12.0.0.1

Router3(config)#ip route 15.0.0.0 255.0.0.0 12.0.0.1

Router3(config)#exit

Page 40: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

36

ON Router Four

Router4>enable

Router4#configure terminal

Router4(config)#interface serial 0/0

Router4(config-if)#ip address 12.0.0.1 255.0.0.0

Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown

Router4(config-if)#exit

Router4(config)#interface serial 0/1

Router4(config-if)#ip address 11.0.0.2 255.0.0.0

Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown

Router4(config-if)#exit

Router4(config)#exit

Router4#copy running-config startup-config

Router4#conf t

Page 41: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

37

Router4(config)#ip route 10.0.0.0 255.0.0.0 11.0.0.1

Router4(config)#ip route 13.0.0.0 255.0.0.0 12.0.0.2

Router4(config)#ip route 14.0.0.0 255.0.0.0 12.0.0.2

Router4(config)#ip route 15.0.0.0 255.0.0.0 11.0.0.1

Router4(config)#exit

Static Routing With Hope Count

Page 42: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

38

Static Routing With Hope Count

ON Router One

Router>enable

Router#configure terminal

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface serial 0/1

Router(config-if)#ip address 13.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#exit

Router#copy running-config startup-config

Page 43: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

39

Router>enable

Router#conf t

Router(config)#ip route 11.0.0.0 255.0.0.0 10.0.0.2 1

Router(config)#ip route 11.0.0.0 255.0.0.0 13.0.0.2 2

Router(config)#ip route 12.0.0.0 255.0.0.0 13.0.0.2 1

Router(config)#ip route 12.0.0.0 255.0.0.0 10.0.0.2 2

Router(config)#ip route 15.0.0.0 255.0.0.0 10.0.0.2 1

Router(config)#ip route 15.0.0.0 255.0.0.0 13.0.0.2 3

Router(config)#ip route 14.0.0.0 255.0.0.0 13.0.0.2 1

Router(config)#ip route 14.0.0.0 255.0.0.0 10.0.0.2 3

Router(config)#exit

Router#copy running-config startup-config

Router#show ip route

Page 44: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

40

ON Router Two

Router2>enable

Router2#configure terminal

Router2(config)#interface serial 0/0

Router2(config-if)#ip address 10.0.0.2 255.0.0.0

Router2(config-if)#bandwidth 64

Router2(config-if)#encapsulation ppp

Router2(config-if)#no shutdown

Router2(config-if)#exit

Router2(config)#interface serial 0/1

Router2(config-if)#ip address 11.0.0.1 255.0.0.0

Router2(config-if)#clock rate 64000

Router2(config-if)#bandwidth 64

Router2(config-if)#encapsulation ppp

Router2(config-if)#no shutdown

Router2(config-if)#exit

Router2(config)#interface fastEthernet 0/0

Router2(config-if)#ip address 15.0.0.2 255.0.0.0

Router2(config-if)#no shutdown

Page 45: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

41

Router2(config-if)#exit

Router2(config)#exit

Router2#copy running-config startup-config

Router2>enable

Router2#conf t

Router2(config)#ip route 13.0.0.0 255.0.0.0 10.0.0.1 1

Router2(config)#ip route 13.0.0.0 255.0.0.0 11.0.0.2 2

Router2(config)#ip route 12.0.0.0 255.0.0.0 11.0.0.2 1

Router2(config)#ip route 12.0.0.0 255.0.0.0 10.0.0.1 2

Router2(config)#ip route 14.0.0.0 255.0.0.0 10.0.0.1 2

Router2(config)#ip route 14.0.0.0 255.0.0.0 11.0.0.2 2

Router2(config)#exit

Router2#copy running-config s

Router2#show ip route

Page 46: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

42

ON Router Three

Router3>enable

Router3#configure terminal

Router3(config)#interface serial 0/0

Router3(config-if)#ip address 12.0.0.2 255.0.0.0

Router3(config-if)#clock rate 64000

Router3(config-if)#bandwidth 64

Router3(config-if)#encapsulation ppp

Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#interface serial 0/1

Router3(config-if)#ip address 13.0.0.2 255.0.0.0

Router3(config-if)#bandwidth 64

Router3(config-if)#encapsulation ppp

Router3(config-if)#no shutdown

Router3(config-if)#exit

Router3(config)#interface fastEthernet 0/0

Router3(config-if)#ip address 14.0.0.2 255.0.0.0

Router3(config-if)#no shutdown

Page 47: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

43

Router3(config-if)#exit

Router3(config)#exit

Router3#copy running-config startup-config

Router3>enable

Router3#conf t

Router3(config)#ip route 10.0.0.0 255.0.0.0 13.0.0.1 1

Router3(config)#ip route 10.0.0.0 255.0.0.0 12.0.0.1 2

Router3(config)#ip route 11.0.0.0 255.0.0.0 12.0.0.1 1

Router3(config)#ip route 11.0.0.0 255.0.0.0 13.0.0.1 2

Router3(config)#ip route 15.0.0.0 255.0.0.0 13.0.0.1 2

Router3(config)#ip route 15.0.0.0 255.0.0.0 12.0.0.1 2

Router3(config)#exit

Router3#copy running-config startup-config

Router3#show ip route

Page 48: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

44

ON Router Four

Router4>enable

Router4#configure terminal

Router4(config)#interface serial 0/0

Router4(config-if)#ip address 12.0.0.1 255.0.0.0

Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown

Router4(config-if)#exit

Router4(config)#interface serial 0/1

Router4(config-if)#ip address 11.0.0.2 255.0.0.0

Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown

Router4(config-if)#end

Router4#copy running-config startup-config

Router4>enable

Router4#conf t

Router4(config)#ip route 10.0.0.0 255.0.0.0 11.0.0.1 1

Router4(config)#ip route 10.0.0.0 255.0.0.0 12.0.0.2 2

Router4(config)#ip route 13.0.0.0 255.0.0.0 12.0.0.2 1

Page 49: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

45

Router4(config)#ip route 13.0.0.0 255.0.0.0 11.0.0.1 2

Router4(config)#ip route 15.0.0.0 255.0.0.0 11.0.0.1 1

Router4(config)#ip route 15.0.0.0 255.0.0.0 12.0.0.2 3

Router4(config)#ip route 14.0.0.0 255.0.0.0 12.0.0.0 1

Router4(config)#ip route 14.0.0.0 255.0.0.0 11.0.0.1 3

Router4(config)#exit

Router4#copy running-config startup-config

Router4#show ip route

Static Routing With Interface

Page 50: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

46

ON Router ONE

Router1#show ip route

C 10.0.0.0/8 is directly connected, Serial0/0

C 13.0.0.0/8 is directly connected, Serial0/1

Router1#conf t

Router1(config)#ip route 14.0.0.0 255.0.0.0 Serial 0/1

Router1(config)#ip route 15.0.0.0 255.0.0.0 serial 0/0

Router1(config)#ip route 11.0.0.0 255.0.0.0 serial 0/0

Router1(config)#ip route 12.0.0.0 255.0.0.0 serial 0/1

Router1#show ip route

C 10.0.0.0/8 is directly connected, Serial0/0

S 11.0.0.0/8 is directly connected, Serial0/0 S

12.0.0.0/8 is directly connected, Serial0/1 C

13.0.0.0/8 is directly connected, Serial0/1 S

14.0.0.0/8 is directly connected, Serial0/1 S

15.0.0.0/8 is directly connected, Serial0/0

ON Router TWO

Router2>enable

Router2#conf t Router2(config)#ip route

12.0.0.0 255.0.0.0 serial 0/1 Router2(config)#ip route

13.0.0.0 255.0.0.0 serial 0/0 Router2(config)#ip route

14.0.0.0 255.0.0.0 serial 0/0 Router2#show ip route

C 10.0.0.0/8 is directly connected, Serial0/0

C 11.0.0.0/8 is directly connected, Serial0/1

S 12.0.0.0/8 is directly connected, Serial0/1 S

13.0.0.0/8 is directly connected, Serial0/0 S

14.0.0.0/8 is directly connected, Serial0/0

Page 51: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

47

C 15.0.0.0/8 is directly connected, FastEthernet0/0

ON Router Three

Router3>enable

Router3#conf t

Router3(config)#ip route 10.0.0.0 255.0.0.0 serial 0/0

Router3(config)#no ip route 10.0.0.0 255.0.0.0 serial

0/0 Router3(config)#ip route 10.0.0.0 255.0.0.0 serial

0/1 Router3(config)#ip route 15.0.0.0 255.0.0.0 serial

0/1 Router3(config)#ip route 11.0.0.0 255.0.0.0 serial

0/0 Router3#show ip route

S 10.0.0.0/8 is directly connected, Serial0/1 S

11.0.0.0/8 is directly connected, Serial0/0 C

12.0.0.0/8 is directly connected, Serial0/0 C

13.0.0.0/8 is directly connected, Serial0/1

C 14.0.0.0/8 is directly connected, FastEthernet0/0

S 15.0.0.0/8 is directly connected, Serial0/1

ON Router Four

Router4>enable

Router4#conf t

Router4(config)#ip route 10.0.0.0 255.0.0.0 serial 0/1

Router4(config)#ip route 15.0.0.0 255.0.0.0 serial 0/1

Router4(config)#ip route 14.0.0.0 255.0.0.0 serial 0/0

Router4(config)#ip route 13.0.0.0 255.0.0.0 serial 0/0

Router4#show ip route

S 10.0.0.0/8 is directly connected, Serial0/1

C 11.0.0.0/8 is directly connected, Serial0/1

C 12.0.0.0/8 is directly connected, Serial0/0

Page 52: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

48

S 13.0.0.0/8 is directly connected, Serial0/0

S 14.0.0.0/8 is directly connected, Serial0/0

S 15.0.0.0/8 is directly connected, Serial0/1

Page 53: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

49

Default Routing any IP address with deflate gateway

Page 54: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

50

On Router ONE

Router>enable

Router#conf t

Router(config)#hostname Router1

Router1(config)#interface serial 0/0

Router1(config-if)#ip address 10.0.0.1 255.0.0.0

Router1(config-if)#encapsulation ppp

Router1(config-if)#bandwidth 64

Router1(config-if)#clock rate 64000

Router1(config-if)#no shutdown

Router1(config-if)#exit

Router1(config)#interface fastEthernet 0/0

Router1(config-if)#ip address 11.0.0.1 255.0.0.0

Router1(config-if)#no shutdown

Router1(config-if)#exit

Router1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2

Router1(config)#exit

Page 55: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

51

Router1#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1

- OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1

- OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter

area * - candidate default, U - per-user static route, o - ODR

P - Periodic downloaded static route

Gateway of last resort is 10.0.0.2 to network 0.0.0.0

C 10.0.0.0/8 is directly connected, Serial0/0

C 11.0.0.0/8 is directly connected, FastEthernet0/0

S* 0.0.0.0/0 [1/0] via 10.0.0.2

Router1#

Page 56: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

52

ON Router TWO

Router>enable

Router#conf t

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.2 255.0.0.0

Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 12.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.1

Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Page 57: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

53

Router#

Router# show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter

area * - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is 10.0.0.1 to network 0.0.0.0

C 10.0.0.0/8 is directly connected, Serial0/0

C 12.0.0.0/8 is directly connected, FastEthernet0/0

S* 0.0.0.0/0 [1/0] via 10.0.0.1

Router#

Default Routing any IP address With Interface

Page 58: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

54

If you don't know the next hop gateway for some reason, you can always create the

Command like this:

ip route 0.0.0.0 0.0.0.0 s1

ON Router ONE

Router>enable

Router#conf t

Router(config)#hostname Router1

Page 59: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

55

Router1(config)#interface serial 0/0

Router1(config-if)#ip address 10.0.0.1 255.0.0.0

Router1(config-if)#encapsulation ppp

Router1(config-if)#bandwidth 64

Router1(config-if)#clock rate 64000

Router1(config-if)#no shutdown

Router1(config-if)#exit

Router1(config)#interface fastEthernet 0/0

Router1(config-if)#ip address 11.0.0.1 255.0.0.0

Router1(config-if)#no shutdown

Router1(config-if)#exit

Router1(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0

Router1(config)#exit

Router1#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router1#

Page 60: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

56

Router1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1

- OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1

- OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter

area * - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

C 10.0.0.0/8 is directly connected, Serial0/0

C 11.0.0.0/8 is directly connected, FastEthernet0/0

S* 0.0.0.0/0 is directly connected, Serial0/0

Router1#

ON Router TWO

Router>enable

Router#conf t

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.2 255.0.0.0

Page 61: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

57

Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 12.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0

Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router#

Router#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

Page 62: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

58

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter

area * - candidate default, U - per-user static route, o - ODR

P - Periodic downloaded static route

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

C 10.0.0.0/8 is directly connected, Serial0/0

C 12.0.0.0/8 is directly connected, FastEthernet0/0

S* 0.0.0.0/0 is directly connected, Serial0/0

Router#

How to Finish following Message on Router

Translating "CTTC"...domain server (255.255.255.255)

Ctrl+Shift+6

How to off Following Message on Router

Page 63: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

59 Translating "CTTC"...domain server (255.255.255.255)

First of all on Router you must assign IP Address both Serial port and FastEthernet0/0

After that write ping with any name

Router#ping CTTC

Translating "CTTC"...domain server (255.255.255.255)

% Unrecognized host or address, or protocol not running.

Router#conf t

Router(config)#no ip domain-lookup

Router(config)#exit

Router#ping CTTC

Translating "CTTC"

% unrecognized host or address, or protocol not running.

Router1(config)#no ip domain-lookup Turns off name resolution on unrecognized

commands (spelling mistakes).

Page 64: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

60

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 routers has lower AD then 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 hope count or bandwidth or 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 advertise routes have the same AD as well as the same metrics, then routing protocol will load-balance to the remote network (which means that it send packets down each link).

The following table gives the default administrative distances used by Cisco routers.

Protocol Administrative distance

Directly connected route 0

Static route out an interface 0

Static route to next-hop address 1

EIGRP summary route 5

External BGP 20

Internal EIGRP 90

IGRP 100

OSPF 110

IS-IS 115

RIP 120

EGP 140

ODR 160

Page 65: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

61

External EIGRP 170

Internal BGP 200

Unknown 255

Page 66: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

62

Routing Protocols

1. IGP (Interior Gateway Routing Protocol) 2. EGP (Exterior Gateway Routing Protocol)

IGP (CCNA) EGP (CCNP)

Used with the autonomous system Used between 2 autonomous system

Some examples of IGP are: Some examples of EGP are:

RIP (Routing Information Protocol) BGP (Border gateway routing Protocol)

IGRP(Interior Gateway Routing Protocol) ISIS(Intermediate system to intermediate system)

EIGRP (Enhanced Interior Gateway Routing Protocol)

OSPF(Open Shortest Path First)

Routing protocols technique

Basically there are three types of routing protocols technique.

1. Distance- vector examples are (RIP, IGRP) 2. Link -state examples are (OSPF, BGP, EGP) 3. Hybrid examples are (IS-IS, EIGRP)

Distance-Vector Routing Protocols

This type of routing protocol requires that each router simply inform its neighbors of its routing table. For each network path, the receiving routers pick the neighbor advertising the lowest cost, then add this entry into its routing table for re-advertisement.

Distance Vector protocols reviewer best path on how far it is. Distance can be hops or a combination of metrics calculated to represent a distance value. The IP Distance Vector routing protocols still in use today are: Routing Information Protocol (RIP v1 and v2) and Interior Gateway Routing Protocol

Page 67: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

63 Distance-vector routing protocols are simple and efficient in small networks, and require little. Its note two things one distance and direction (vector)

Link-state Routing Protocols

A Link-state routing is a concept used in routing of packet-switched networks in computer communications. Link-state routing works by having the routers tell every router on the network about its closest neighbors. The entire routing table is not distributed from any router, only the part of the table containing its neighbors. It is decision on state of link e.g. up down congestion

· It uses the link state algorithm (LSA) to advertise the routing information from routers. · Routers keep communicating with neighbors at latest state. Problem with link-state

· It requires more processing power to communicate with each other.

· It requires more memory to store LSA and topological database.

Hybrid routing

Hybrid Routing, commonly referred to as balanced-hybrid routing, is a combination of distance-vector routing, which works by sharing its knowledge of the entire network with its neighbors and link-state routing which works by having the routers tell every router on the network about its closest neighbors.

· It uses a combination of both balance and hybrid routing. · It uses distance -vector technique for more accurate metrics to determine the best path. · It reports routing information when change occurs in topology - link-state. Link sate and distance vector mixture it is more link sate

Page 68: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

64 RIP

The Routing Information Protocol is an open standard based Distance-Vector routing protocol. It comes on two versions RIP v.1 and RIP v.2.

Followings are some important features of RIP:

RIP supports Bellman and Ford algorithm. RIP v.1 uses hop count as a metric while RIP v2 routing protocol metric is also hop count. The maximum hop counts for both are 15. RIP v.1 features the use of broadcast updates while RIP v.2 features the use of multicast routing updates. RIP v.1 is a classful routing protocol while RIP v.2 is a classless routing protocol that supports VLSM. The administrative distance of RIP is 120. RIP supports equal metric load balancing.

FEATURE RIP

Distance Vector Yes

Developed By IEEE (ITEF)

Used Algorithm Bellmen Ford

Routing Table Advertisement Method Broadcast Complete Routing Table

Classful / Classless Classful

Authentication method No authentication

No username no password when update

Update Time 30 seconds

Flush Time 230 Seconds

Path Decision(Metric value calculations) Number of Hop Counts

Metric Formula Hop Count

Max Hop Count Supported 15

Convergence Slow

Page 69: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

65

path load balancing Six equal path

By default 4 equal path

If we Run RIP Protocol there is Equal Distance Between Four Router

then it is use for Load Balancing.

VLSM(Variable Length Subnet Mask) Only Rip V2 support

Triggered updates Support Only standard RIP V2

Emergence update

Invalid Path marking for path(starting of hold down If update is not received for 180 seconds mark invalid and puts

timer) hold down timer. If the till 240 seconds any update is not received

the route is removed from routing table

Administrative Distance 120

Scalability No

Max 15 Hope Count

AS No Does not exist

RIP Routing Metric

RIP uses a single routing metric (hop count) to calculate the distance between the source and a destination network. Each hop in a path from source to destination is assigned a hop count value, which is typically 1. When a router receives a routing update that contains a new or changed destination network

Page 70: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

66 entry, the router adds 1 to the metric value indicated in the update and enters the network in the routing table. The IP address of the sender is used

as the next hop Metric

Indicates how many internetwork hops (routers) have been traversed in the trip to the destination. This value is between 1 and 15 for a valid route, or 16 for an unreachable

RIP TIMERS

TIMER DEFAULT CONTROLS

Update 30 sec. Interval between route update advertisements

Hold-Down 90 sec. Period a route is withdrawn from the table to prevent a routing loop.

Timeout 180 sec. Interval a route should stay 'live' in the routing table. This counter is reset every time the router hears an update for this route.

Flush 120 sec. How long to wait to delete a route after it has timed out.

Flash out Time : Delete from routing table

Update time : Route update time

Hold time : e.g. (RIP) if Router not update received tell 180

Second then router is Marks invalid and Hold down

Timer will be started.

Page 71: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

67

Router Rip (Routing Information Protocol) Protocol

Version 1

Page 72: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

68

On Router One

Router>enable

Router#conf ter

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.1

255.0.0.0 Router(config-if)#encapsulation ppp

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64 Router(config-

if)#no shutdown Router(config-if)#exit

Router(config)#interface serial 0/1

Router(config-if)#ip address 13.0.0.1

255.0.0.0 Router(config-if)#clock rate 64000

Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64 Router(config-

if)#no shutdown Router(config-if)#exit

Router#show ip interface brief

Router#conf ter Router(config)#router rip Router(config-router)#network 10.0.0.0 Router(config-router)#network 13.0.0.0 Router(config-router)#exit

Router#show ip route

C 10.0.0.0/8 is directly connected, Serial0/0

R 11.0.0.0/8 [120/1] via 10.0.0.2, 00:00:10, Serial0/0

R 12.0.0.0/8 [120/1] via 13.0.0.2, 00:00:03, Serial0/1

C 13.0.0.0/8 is directly connected, Serial0/1

R 14.0.0.0/8 [120/1] via 13.0.0.2, 00:00:03, Serial0/1

Page 73: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

69

R 15.0.0.0/8 [120/1] via 10.0.0.2, 00:00:10, Serial0/0

Router#show ip protocols Routing Protocol is "rip"

On Router Two

Router>enable Router#conf ter Router(config)#interface serial 0/0 Router(config-if)#ip address 10.0.0.2 255.0.0.0 Router(config-if)#encapsulation ppp Router(config-if)#bandwidth 64 Router(config-if)#no shutdown Router(config-if)#exit

Router(config)#interface serial 0/1 Router(config-if)#ip address 11.0.0.1 255.0.0.0 Router(config-if)#clock rate 64000 Router(config-if)#bandwidth 64 Router(config-if)#encapsulation ppp Router(config-if)#no shutdown Router(config-if)#exit

Router(config)#interface fastEthernet 0/0 Router(config-if)#ip address 15.0.0.2 255.0.0.0 Router(config-if)#no shutdown Router#show ip interface brief

Router#conf ter Router(config)#router rip Router(config-router)#network 11.0.0.0 Router(config-router)#network 10.0.0.0 Router(config-router)#network 15.0.0.0

Page 74: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

70 Router(config-router)#exit Router#show ip route C 10.0.0.0/8 is directly connected, Serial0/0 C

11.0.0.0/8 is directly connected, Serial0/1

R 12.0.0.0/8 [120/1] via 11.0.0.2, 00:00:06, Serial0/1 R

13.0.0.0/8 [120/1] via 10.0.0.1, 00:00:21, Serial0/0 R

14.0.0.0/8 [120/2] via 10.0.0.1, 00:00:21, Serial0/0

[120/2] via 11.0.0.2, 00:00:06, Serial0/1

C 15.0.0.0/8 is directly connected, FastEthernet0/0

Router#show ip protocols Routing Protocol is "rip"

On Router Three

Router>enable

Router#conf ter

Router(config)#interface serial 0/0

Router(config-if)#ip address 12.0.0.2

255.0.0.0 Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64 Router(config-

if)#encapsulation ppp Router(config-if)#no

shutdown Router(config-if)#exit

Router(config)#interface serial 0/1

Router(config-if)#ip address 13.0.0.2

255.0.0.0 Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64 Router(config-

if)#no shutdown

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 14.0.0.2 255.0.0.0

Page 75: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

71 Router(config-if)#no shutdown

Router#show ip interface brief

Router#conf ter Router(config)#router rip Router(config-router)#network 13.0.0.0 Router(config-router)#network 12.0.0.0 Router(config-router)#network 14.0.0.0 Router(config-router)#exit Router(config)#exit

Router#show ip route

R 10.0.0.0/8 [120/1] via 13.0.0.1, 00:00:00, Serial0/1

R 11.0.0.0/8 [120/1] via 12.0.0.1, 00:00:15, Serial0/0

C 12.0.0.0/8 is directly connected, Serial0/0

C 13.0.0.0/8 is directly connected, Serial0/1

C 14.0.0.0/8 is directly connected, FastEthernet0/0

R 15.0.0.0/8 [120/2] via 13.0.0.1, 00:00:00, Serial0/1

[120/2] via 12.0.0.1, 00:00:15, Serial0/0 Router#ping 15.0.0.1

Router#show ip protocols Routing Protocol is "rip"

On Router Four

Router4>enable

Router4#configure terminal

Router4(config)#interface serial 0/0

Router4(config-if)#ip address 12.0.0.1

255.0.0.0 Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown Router4(config-

if)#exit

Page 76: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

72 Router4(config)#interface serial 0/1

Router4(config-if)#ip address 11.0.0.2

255.0.0.0 Router4(config-if)#bandwidth 64

Router4(config-if)#encapsulation ppp

Router4(config-if)#no shutdown Router4(config-

if)#exit

Router4(config)#exit Router4#copy running-config startup-config

Router(config)#router rip Router(config-router)#network 12.0.0.0 Router(config-router)#network 11.0.0.0 Router(config-router)#exit Router(config)#exit

Router#show ip route R 10.0.0.0/8 [120/1] via 11.0.0.1, 00:00:11, Serial0/1 C

11.0.0.0/8 is directly connected, Serial0/1

C 12.0.0.0/8 is directly connected, Serial0/0 R 13.0.0.0/8 [120/1] via 12.0.0.2, 00:00:01, Serial0/0 R

14.0.0.0/8 [120/1] via 12.0.0.2, 00:00:01, Serial0/0 R

15.0.0.0/8 [120/1] via 11.0.0.1, 00:00:11, Serial0/1

Router#show ip protocols Routing Protocol is "rip"

RIP debug

Router#debug ip rip RIP protocol debugging is on

Page 77: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

73 Router#no debug ip rip RIP protocol debugging is off

The Debug IP RIP Command

The debug ip rip command sends routing updates as they are sent and received on the router to the console session. If you are telnetted into the router, you’ll need to use the terminal monitor command to be able to receive the output form the debug commands.

R1# debug ip rip RIPprotocol debugging is on R1#no debug ip rip RIP protocol debugging is off

R1# terminal monitor

How we check Broadcasting in RIP

R1# debug ip rip

RIP protocol debugging is on Router1#RIP: sending v1 update to 255.255.255.255 via Serial0/0 (10.0.0.1)

RIP: build update entries

network 12.0.0.0 metric 2

network 13.0.0.0 metric 1

network 14.0.0.0 metric 2

RIP: sending v1 update to 255.255.255.255 via Serial0/1 (13.0.0.1) RIP: build update entries

network 10.0.0.0 metric 1

network 11.0.0.0 metric 2

network 15.0.0.0 metric 2

That 255.255.255.255 shown broadcasting

Changes timers in RIP Router#show ip protocols

Routing Protocol is "rip"

Page 78: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

74 Sending updates every 30 seconds, next due in 20 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Router#conf t

Router(config-router)#timers basic 60 120 190 300

Router(config-router)#exit

Router(config)#exit

Router#show ip protocols

Routing Protocol is "rip"

Sending updates every 60 seconds, next due in 8 seconds

Invalid after 120 seconds, hold down 190, flushed after 300

Router(config-router)#timers basic 30 90 180 270 360 Changes timers in RIP:

30 = Update timer (in seconds)

90 = Invalid timer (in seconds)

180 = Hold-down timer (in seconds)

270 = Flush timer (in seconds)

Router#show ip rip database Displays contents of the RIP Database

Router#show ip eigrp neighbors detail Displays a detailed neighbor table.

Passive

You can use the passive-interface command to control the advertisement of routing information. The command enables the suppression of routing updates over some interfaces while it allows updates to be exchanged normally over other interfaces.

This command prevents RIP update broadcasts from being sent out a specified interface, yet that same interface can still receive RIP updates.

There are two commands

Passive-interface default

This command will stop RIP update form being propagate out all interfaces

Passive-interface serial 0/0

This Command will stop RIP update from being propagated out serial interface 0/0

Configuration:-

Page 79: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

75 First on debug and check from all serial interface send and received updates

ON Router ONE

Router1>enable Router1#debug ip rip

RIP protocol debugging is on

Router1#RIP: sending v1 update to 255.255.255.255 via Serial0/1 (13.0.0.1)

RIP: build update entries

network 10.0.0.0 metric 1

network 11.0.0.0 metric 2

network 15.0.0.0 metric 2

RIP: sending v1 update to 255.255.255.255 via Serial0/0 (10.0.0.1)

RIP: build update entries

network 12.0.0.0 metric 2

network 13.0.0.0 metric 1

network 14.0.0.0 metric 2

RIP: received v1 update from 10.0.0.2 on Serial0/0

11.0.0.0 in 1 hops

12.0.0.0 in 2 hops

15.0.0.0 in 1 hops

RIP: received v1 update from 13.0.0.2 on Serial0/1

11.0.0.0 in 2 hops

12.0.0.0 in 1 hops

14.0.0.0 in 1 hops

Router1#no debug ip rip RIP protocol debugging is off

Default Passive

Router1#conf t

Router1(config)#router rip Router1(config-router)#passive-interface default

Router1(config-router)#exit

Page 80: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

76 Router1(config)#exit

Router1#debug ip rip

RIP protocol debugging is on

Router1#RIP: received v1 update from 13.0.0.2 on Serial0/1

11.0.0.0 in 2 hops

12.0.0.0 in 1 hops

14.0.0.0 in 1 hops

RIP: received v1 update from 10.0.0.2 on Serial0/0

11.0.0.0 in 1 hops

12.0.0.0 in 2 hops

15.0.0.0 in 1 hops

RIP: received v1 update from 13.0.0.2 on Serial0/1

11.0.0.0 in 2 hops

12.0.0.0 in 1 hops

14.0.0.0 in 1 hops

RIP: received v1 update from 10.0.0.2 on Serial0/0

11.0.0.0 in 1 hops

12.0.0.0 in 2 hops

15.0.0.0 in 1 hops

Router1#no debug ip rip RIP protocol debugging is off

How to finish Default Passive

Router1#conf t

Router1(config)#router rip Router1(config-router)#no passive-interface default Router1(config-router)#exit

Router1(config)#exit

Router1#debug ip rip

Page 81: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

77

RIP protocol debugging is on Router1#RIP: received v1 update from 13.0.0.2 on Serial0/1

11.0.0.0 in 2 hops

12.0.0.0 in 1 hops

14.0.0.0 in 1 hops

RIP: received v1 update from 10.0.0.2 on Serial0/0

11.0.0.0 in 1 hops

12.0.0.0 in 2 hops

15.0.0.0 in 1 hops

RIP: sending v1 update to 255.255.255.255 via Serial0/1 (13.0.0.1)

RIP: build update entries

network 10.0.0.0 metric 1

network 11.0.0.0 metric 2

network 15.0.0.0 metric 2

RIP: sending v1 update to 255.255.255.255 via Serial0/0 (10.0.0.1)

RIP: build update entries

network 12.0.0.0 metric 2

network 13.0.0.0 metric 1

network 14.0.0.0 metric 2

Router1#no debug ip rip

RIP protocol debugging is off

Passive interface

Router1#conf t Router1(config)#router rip

Router1(config-router)#passive-interface serial 0/1

Router1(config-router)#exit

Router1(config)#exit

Router1#debug ip rip

Page 82: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

78 RIP protocol debugging is on

Router1#RIP: sending v1 update to 255.255.255.255 via Serial0/0 (10.0.0.1)

RIP: build update entries

network 12.0.0.0 metric 2

network 13.0.0.0 metric 1

network 14.0.0.0 metric 2

RIP: received v1 update from 10.0.0.2 on Serial0/0

11.0.0.0 in 1 hops

12.0.0.0 in 2 hops

15.0.0.0 in 1 hops

RIP: received v1 update from 13.0.0.2 on Serial0/1

11.0.0.0 in 2 hops

12.0.0.0 in 1 hops

14.0.0.0 in 1 hops

RIP: sending v1 update to 255.255.255.255 via Serial0/0 (10.0.0.1)

RIP: build update entries

network 12.0.0.0 metric 2

network 13.0.0.0 metric 1

network 14.0.0.0 metric 2

Router1#no debug ip rip RIP protocol debugging is off

How to Finish Passive interface

Router1#conf t Router1(config)#router rip Router1(config-router)#no passive-interface serial 0/1 Router1(config-router)#exit Router1(config)#exit

Router1#debug ip rip RIP protocol debugging is on

Page 83: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

79

Router1#RIP: sending v1 update to 255.255.255.255 via Serial0/1 (13.0.0.1) RIP: build update entries

network 10.0.0.0 metric 1

network 11.0.0.0 metric 2

network 15.0.0.0 metric 2

RIP: sending v1 update to 255.255.255.255 via Serial0/0 (10.0.0.1)

RIP: build update entries

network 12.0.0.0 metric 2

network 13.0.0.0 metric 1

network 14.0.0.0 metric 2

RIP: received v1 update from 10.0.0.2 on Serial0/0

11.0.0.0 in 1 hops

12.0.0.0 in 2 hops

15.0.0.0 in 1 hops

RIP: received v1 update from 13.0.0.2 on Serial0/1

11.0.0.0 in 2 hops

12.0.0.0 in 1 hops

14.0.0.0 in 1 hops

Router1#no debug ip rip RIP protocol debugging is off

Page 84: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

80 Auto-summarization

Auto-summarization only works when routes are from a differerent classful network than the interface it's received on. So if everything in your

network is 10.0.0.0/8 addresses, you won't see much difference (exception = redistribution). But when you see a route come in that's

172.16.1.0, even though you have a /24 mask on the interface, auto-summarization will change that to a /16 in your routing table. No auto-summary, obviously, will stop that procedure.

So looking from a router’s perspective auto-summary is just a mechanism for a router to summaries routes to itself, from routing advertisements about different classful network(s). When auto-summary is configured in RIPv1 and 2 the router will assume the subnet

mask, per class rules (A, B, C). With a no auto-summary configured the router will assume subnet masks based on the incoming interface’s mask, thus its a valid command. Also, with regards to RIPv1 advertisements, the auto-summary command has no effect.

Difference between rip v1 rip v2

RIP V1-----> Classful routing protocol. RIP V2-----> Classless routing protocol

RIP V1------> Subnet masks are NOT included in the routing update. RIP V2------> Subnet masks are included in the routing update.

Here are some of the metrics used to determine the better route:

Bandwidth: Maximum throughput speed in bits-per-second.

Cost: A arbitrary value assigned by the administrator for the crossing and intersection of networks.

Delay (latency): A group of factors such as congestion or distance.

Hop Count: The number of routers a packet passes through to reach its destination.

Load: The measure of traffic that flows through a router.

MTUs (maximum transmission unit): The largest message size allowed on all routes to the destination.

Reliability: A value representing the amount of downtime for a network.

Ticks: A measurement of delay, based on the clock in a personal computer, where one tick is 1/18 of a second. It's used as part of the metric in IPX (Novell) RIP.

Page 85: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

81

Router Rip (Routing Information Protocol)

Version 2

Page 86: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

82 First Assign IP Address All Routers

On Router ONE

Router1>enable Router1#show ip interface brief Router1#show ip route Router1#conf t

Router1(config)#router rip

Router1(config-router)#version 2

Router1(config-router)#network 10.0.0.0

Router1(config-router)#network 13.0.0.0

Router1(config-router)#no auto-summary

Router1(config-router)#exit

Router1(config)#exit

Router1#copy running-config startup-

config Destination filename [startup-

config]? Building configuration...

[OK] Router1#

ON Router TWO

Router2>enable Router2#conf t

Router2(config)#router rip

Router2(config-router)#version 2

Router2(config-router)#network

10.0.0.0 Router2(config-

router)#network 15.0.0.0

Router2(config-router)#network

11.0.0.0 Router2(config-router)#no

auto-summary Router2(config-

router)#exit Router2(config)#exit

Router2#copy running-config startup-config

Page 87: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

83 Destination filename [startup-config]? Building configuration... [OK] Router2#

ON Router Three

Router3>enable Router3#conf t

Router3(config)#router rip

Router3(config-router)#version 2

Router3(config-router)#network 12.0.0.0

Router3(config-router)#network 13.0.0.0

Router3(config-router)#network 14.0.0.0

Router3(config-router)#no auto-summary

Router3(config-router)#exit

Router3(config)#exit

Router3#copy running-config s

Destination filename [startup-

config]? Building configuration...

[OK] Router3#

NO Router Four

Router4>enable Router4#conf t

Router4(config)#router rip

Router4(config-router)#version 2

Router4(config-router)#network 12.0.0.0

Router4(config-router)#network 11.0.0.0

Router4(config-router)#no auto-summary

Router4(config-router)#exit

Page 88: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

84 Router4(config)#exit Router4#copy running-config startup-

config Destination filename [startup-

config]? Building configuration...

[OK] Router4#

Router4#show ip protocols Routing Protocol is "rip"

Router4#show ip route

Page 89: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

85

FEATURE RIP IGRP

Distance Vector Yes Yes

Developed By IEEE (ITEF) Cisco Proprietary

Used Algorithm Bellmen Ford Bellmen Ford

Routing Table Advertisement Broadcast Complete Routing Table Broadcast Routing Algorithm

Method

Classful / Classless Classful Classful

Authentication method No authentication No Authentication

No username no password when update

Update Time 30 seconds 90 seconds

Flush Time 230 Seconds 630 Seconds

Path Decision(Metric value Number of Hop Counts Bandwidth and delay (optionally reliability,load and

calculations) MTU(Maximum Transmission Unit ) can be used for

metric computation) constant K1 - K2

Metric Formula Hop Count [k1*bandwidth+{K2*bandwidth)/(256-load)+k3*delay

Max Hop Count Supported 15 Default 100

Max Supported (255)

Convergence Slow Slow

path load balancing Six equal path Six unequal cost path

By default 4 equal path Default is 4

If we Run RIP Protocol there is Equal Distance Between Four

Router then it is use for Load

Balancing.

VLSM(Variable Length Subnet Only Rip V2 support

Mask)

Triggered updates Support Only standard RIP V2 Yes

Emergence update

Invalid Path marking for If update is not received for 180 270 seconds hold down timer 280 and removes after 630

path(starting of hold down seconds mark invalid and puts

hold down timer. If the till 240

Page 90: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

86 timer) seconds any update is not

received the route is removed

from routing table

Administrative Distance 120 100

Scalability No Yes

Max 15 Hope Count

AS No Does not exist We use it but no need to register it

One is reg one is not reg on internet

Public and private is called reg and not reg

Page 91: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

87

Routed Protocol: A routed protocol is a protocol by which data can be routed. Routed protocol are IP, AppleTalk, and IPX. In this kind of protocols we require an addressing scheme and subnetting. Addressing scheme will be used to determine the network

to which a host belongs and to identifying that host on that particular network.

Routing Protocols: A routing protocol specifies how routers communicate with each other, disseminating information that enables them to

select routes between any two nodes on a computer network. Routing algorithms determine the specific choice of

route. Each router has a priori knowledge only of networks attached to it directly.

Page 92: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

88 Hybrid (EIGRP)

Enhanced Interior Gateway Routing Protocol (EIGRP) or Enhanced IGRP is a Cisco proprietary routing protocol utilizing the Diffusing Update Algorithm (DUAL). EIGRP is a hybrid protocol as it incorporates features of a

Distance Vector routing protocol and features of a Link State routing protocol. EIGRP is often used in Cisco-based networks running multiple network-layer protocols.

EIGRP can redistribute its routes (and metrics) into other routing protocols and accepts redistribution from other routing protocols as well.

Internal AD 90 External AD 170

Multicast Rapid Convergence Fast (Fast convergence) Reduce bandwidth usage less bandwidth Support subnetting (Classless) Uses Dual Algo difusing update algo Low usage of network recourses during normal operation “Hello packet Less Ram Less Process use” Only hello packets in normal operation.

Only partial updates are broadcasted and only when changes in topology are detected

EIGRP does not use periodic (interrupted) broadcasts

Byfault supports classful route summarization Support multiple protocol like IP and IPX

Maintains neighbor table (Neighbors recorded (IP and interface of neighbor)

Dynamically forms neighbor relationships

Maintain topology table contains all the destination routes

Contains all destinations advertised by all neighboring routers

Chooses best successor (route) for destination from topology table and create a routing table Successor are the entries kept in the routing table and that is primary path for the destination

Best Path = sum of best advertised metric from all neighbors and the link cost to the best neighbor

Feasible successor are the backup route they are kept in topology table but identified at the same time when successor are identification.

Supports both equal and unequal path load balancing

Metric includes bandwidth and delay by default

If router is not affected by topology does not re-calculation.

Metrics It is always necessary to discuss what a routing protocol uses for its metrics. In this case, EIGRP can use:

1. Bandwidth 2. Delay 3. Reliability 4. Load

Hello messages are used for neighbor discovery and neighbor recovery. If a hello message is not received within the

Hello Multicast

configured interval, all neighbor entries are removed from the routing table and feasible successor routes re utilized

Page 93: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

89

Bandwidth [107 / Minimum bandwidth in the

path] Bandwidth = 10000000/1544=6476

Delay: sums of delays (in tens of

microseconds) 20000+20000=40000

40000/10=4000 (Divide by 10 because delay in usec) Metric

= (107 / Minimum bandwidth) + (sum of delays) * 256

4000+6476*256=2681856

Page 94: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

90

Autonomous System:-

On the Internet, an autonomous system (AS) is the unit of router policy, either a single network or a group of networks that is controlled

by a common network administrator (or group of administrators) on behalf of a single administrative entity (such as a university, a business enterprise, or a business division). An autonomous system is also sometimes referred to as a routing domain. An autonomous system is assigned a globally unique number, sometimes called an Autonomous System Number (ASN).

EIGRP uses autonomous system number to-indentify the collection of routers that share route information. Only routers that have the same autonomous system number share routers. In large networks, you can easily end up with really complicated topology and router tables.

Autonomous System = 1 to 65535

Wildcard Mask

You will often come across Wildcard masks, particularly if you work with OSPF and/or Cisco routers. The use of wildcard masks is most prevalent when building Access Control Lists (ACLs) on Cisco routers. ACLs are filters and make use of wildcard masks to define the scope of the address filter. Although ACL wildcard masks are used with other protocols, we will concentrate on IP here.

Let us first take a simple example. We may want to filter a sub-network 10.1.1.0 which has a Class C mask (24-bit) 255.255.255.0. The ACL will require the scope of the addresses to be defined by a wildcard mask which, in this example is 0.0.0.255. This means that the 'Don't care bits' are represented by binary 1's whilst the 'Do care bits' are represented by binary 0's. You will note that this is the exact opposite to subnet masks!

A wildcard mask is basically a mask of bits that indicates which parts of an IP address can assume

any value. In the Cisco IOS, they are used in several places, for example: To indicate the size of a network or subnet for some routing protocols, such as OSPF. To indicate what IP addresses should be permitted or denied in access control lists (ACLs). Quite often, a wildcard mask can basically be thought of as a subnet mask, with ones and zeros inverted;

for example, a wildcard mask of 0.0.0.255 corresponds to a subnet mask of 255.255.255.0. A wildcard

mask is usually used in combination with an IP address. For example, in a standard ACL, a statement like

the following: access-list 10 permit 10.0.3.0 0.0.0.255

Page 95: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

91 List of Wildcard Mask

Slash Netmask Wildcard Mask

/30 255.255.255.252 0.0.0.3

/29 255.255.255.248 0.0.0.7

/28 255.255.255.240 0.0.0.15

/27 255.255.255.224 0.0.0.31

/26 255.255.255.192 0.0.0.63

/25 255.255.255.128 0.0.0.127

/24 255.255.255.0 0.0.0.255

/23 255.255.254.0 0.0.1.255

/22 255.255.252.0 0.0.3.255

/21 255.255.248.0 0.0.7.255

/20 255.255.240.0 0.0.15.255

/19 255.255.224.0 0.0.31.255

/18 255.255.192.0 0.0.63.255

Page 96: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

92

/17 255.255.128.0 0.0.127.255

/16 255.255.0.0 0.0.255.255

/15 255.254.0.0 0.1.255.255

/14 255.252.0.0 0.3.255.255

/13 255.248.0.0 0.7.255.255

/12 255.240.0.0 0.15.255.255

/11 255.224.0.0 0.31.255.255

/10 255.192.0.0 0.63.255.255

/9 255.128.0.0 0.127.255.255

/8 255.0.0.0 0.255.255.255

/7 254.0.0.0 1.255.255.255

/6 252.0.0.0 3.255.255.255

/5 248.0.0.0 7.255.255.255

/4 240.0.0.0 15.255.255.255

Page 97: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

93

/3 224.0.0.0 31.255.255.255

/2 192.0.0.0 63.255.255.255

/1 128.0.0.0 127.255.255.255

Page 98: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

94

EIGRP (Enhanced Interior Gateway Routing Protocol)

Page 99: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

95

On Router One

Router>enable

Router#conf t

Router(config)#router eigrp 1 Router(config-router)#network 10.0.0.0 0.255.255.255 Router(config-router)#network 13.0.0.0 0.255.255.255 Router(config-router)#exit Router(config)#exit

Router#show ip route

Router#ping 15.0.0.1

Router#show ip protocols

Routing Protocol is "eigrp 1 "

Router#show ip eigrp neighbors

IP-EIGRP neighbors for process 1

H Address Interface Hold Uptime SRTT RTO Q Seq

(sec) (ms) Cnt Num

0 10.0.0.2 Ser0/0 14 00:04:01 40 1000 0 14

1 13.0.0.2 Ser0/1 13 00:03:09 40 1000 0 13

Router#show ip eigrp topology

On Router Two

Router>enable Router#conf Router#conf terminal Router(config)#router eigrp 1

Page 100: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

96 Router(config-router)#network 10.0.0.0 0.255.255.255

Router(config-router)#network 11.0.0.0 0.255.255.255

Router(config-router)#network 15.0.0.0 0.255.255.255

Router(config-router)#exit

Router(config)#exit

Router#show ip route

Router#show ip interface brief

Router#show ip protocols Routing Protocol is "eigrp 1 " Router#show ip eigrp neighbors

Page 101: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

97

On Router Three

Router#conf t

Router(config)#router eigrp 1

Router(config-router)#network 12.0.0.0 0.255.255.255

Router(config-router)#network 13.0.0.0 0.255.255.255

Router(config-router)#network 14.0.0.0 0.255.255.255

Router(config-router)#exit

Router(config)#exit

Router#show ip route

On Router Four

Router>enable Router#conf t Router(config)#router eigrp 1 Router(config-router)#network 11.0.0.0 0.255.255.255 Router(config-router)#network 11.0.0.0 0.255.255.255 Router(config-router)#network 12.0.0.0 0.255.255.255 Router(config-router)#exit Router(config)#exit

Router#show ip interface brief

Router#show ip route

Router#show ip eigrp neighbors

Router#show ip eigrp topology

Note: - Show ip eigrp topology is shown all possible Routes

Best in Routing Table

Page 102: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

98

How to one Debug in Eigrp

On Router One

Router1#debug eigrp packets EIGRP: Received HELLO on Serial0/1 nbr 13.0.0.2

AS 1, Flags 0x0, Seq 9/0 idbQ 0/0 EIGRP: Sending HELLO on Serial0/1

AS 1, Flags 0x0, Seq 11/0 idbQ 0/0 iidbQ un/rely 0/0

EIGRP: Sending HELLO on Serial0/0

AS 1, Flags 0x0, Seq 11/0 idbQ 0/0 iidbQ un/rely 0/0

EIGRP: Received HELLO on Serial0/0 nbr 10.0.0.2

AS 1, Flags 0x0, Seq 11/0 idbQ 0/0 EIGRP: Received HELLO on Serial0/1 nbr 13.0.0.2

AS 1, Flags 0x0, Seq 9/0 idbQ 0/0

How to Off Debug in EIGRP

Router1# no debug eigrp packets

Page 103: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

99

Link State Protocol (OSPF)

The OSPF (Open Shortest Path First) protocol is one of a family of IP Routing protocols, and is an Interior Gateway Protocol (IGP) for the Internet, used to distribute IP routing information throughout a single Autonomous System (AS) in an IP network.

The OSPF protocol is a link-state routing protocol, which means that the routers exchange topology information

with their nearest neighbors.

Route Packets within the same autonomous system AD110 Update time 40 sec Open Standard developed by IETF (Internet Engineering Task Force) revision 1 and revision 2. Uses SPF Algorithm (SPF) uses topology and routing database Complicated to implement and manage Uses link state Algo (LSA) Classless protocol. Multicast the packets as a 224.0.0.5 Uses Dijkstra’ s Algo Routing domain can be divided in to multiple areas Must have one area called as area 0 All the areas must connect to area 0 Topology database contains LSA from all routers in same area. Uses hierarchical methods that allow dividing Single AS into small areas and does inter-area routing. Create shortest path database from the topology database. Metric link are called cost in OSPF Recalculation is occurred within the area (if link is disturbed only single area is affected) Path decision Metric value calculation = cost (bandwidth) Support sub-netting (Classless)

Conduction Election between Routers and chooses Area 0 (Central Area), Area 1 (Border Router) and

then chooses Designated (elected) Port, Backup designated port and loop back.

Page 104: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

100

OSPF (Open Shortest Path First)

Page 105: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

101

What is Area?

An OSPF network can be divided into sub-domains called areas. An area is a logical collection of

OSPF networks, routers, and links that have the same area identification. A router within an

area must maintain a topological database for the area to which it belongs. The router doesn't

have detailed information about network topology outside of its area, thereby reducing the size

of its database.

Area Border Routers

Routers that belong to more than one area are called area border routers. They maintain a separate topological database for each area to which they are connected.

Page 106: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

102

Router ID

The highest IP address of the active physical interface of the router is Router ID.

If logical interface is configured, the highest IP address of the logical interface is Router ID

Router Types

In OSPF depending upon the network design and configuration, we have different types of routers.

Internal Routers are routers whose interfaces all belong to the same area. These routers have

a single Link State Database.

Area Border Routers (ABR) It connects one or more areas to the backbone area and has at least one interface that belongs to the backbone, Backbone Router Area 0 routers

Autonomous System Boundary Router (ASBR) Router participating in OSPF and other

protocols (like RIP, EIGRP and BGP)

OSPF maintains three tables :

1) Neighbor Table: it contains information about the directly connected ospf neighbors forming the adjacency.

2) Database table: it contains information about the entire view of the topology with respect to each router.

3) Routing information Table: it contains information about the best path calculated by the

shortest path first algorithm in the database table.

Page 107: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

103

On Router One

Router#

Router#conf t

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.1

255.0.0.0 Router(config-if)#encapsulation ppp

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown Router(config-

if)#exit Router(config)#interface serial 0/1

Router(config-if)#ip address 13.0.0.1

255.0.0.0 Router(config-if)#clock rate 64000

Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown Router(config-

if)#exit Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router#

Router#

Router#conf t

Router(config)#router ospf 1

Page 108: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

104

Router(config-router)#network 10.0.0.0 0.0.0.255 area 0

Router(config-router)#network 13.0.0.0 0.0.0.255 area 0

Router(config-router)#exit

Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router#

On Router Two

Router>

Router>enable

Router#conf t

Router(config)#interface serial 0/0

Router(config-if)#ip address 10.0.0.2 255.0.0.0

Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface serial 0/1

Router(config-if)#ip address 11.0.0.1 255.0.0.0

Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#exit

Page 109: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

105

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 15.0.0.2 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#exit

Router#copy running-config s

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router#

Router#

Router#conf t

Router(config)#router ospf 1 Router(config-

router)#network 11.0.0.0 0.0.0.255 area 0

Router(config-router)#network 10.0.0.0 0.0.0.255 area 0

Router(config-router)#network 15.0.0.0 0.0.0.255 area 0

Router(config-router)#exit

Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router#

Page 110: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

106

On Router Three

Router>

Router>enable

Router#conf t

Router(config)#interface serial 0/0

Router(config-if)#ip address 12.0.0.2

255.0.0.0 Router(config-if)#clock rate 64000

Router(config-if)#bandwidth 64

Router(config-if)#encapsulation ppp

Router(config-if)#no shutdown Router(config-

if)#exit

Router(config)#interface serial 0/1

Router(config-if)#ip address 13.0.0.2

255.0.0.0 Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip address 14.0.0.2

255.0.0.0 Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Page 111: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

107

Router#

Router>enable

Router#conf t

Router(config)#router ospf 1

Router(config-router)#network 12.0.0.0 0.0.0.255 area 0

Router(config-router)#network 13.0.0.0 0.0.0.255 area 0

Router(config-router)#network 14.0.0.0 0.0.0.255 area 0

Router(config-router)#exit

Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

show ip ospf interface

show ip ospf neighbor

show ip ospf database

On Router Four

Router>

Router>enable

Router#conf t

Router(config)#interface serial 0/0

Router(config-if)#ip address 12.0.0.1

255.0.0.0 Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown Router(config-

if)#exit Router(config)#interface serial 0/1

Page 112: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

108

Router(config-if)#ip address 11.0.0.2

255.0.0.0 Router(config-if)#encapsulation ppp

Router(config-if)#bandwidth 64

Router(config-if)#no shutdown Router(config-

if)#exit

Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router#

Router#conf t

Router(config)#router ospf 1

Router(config-router)#network 11.0.0.0 0.0.0.255 area 0

Router(config-router)#network 12.0.0.0 0.0.0.255 area 0

Router(config-router)#exit Router(config)#exit

Router#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

Router#show ip protocols

Routing Protocol is "ospf 1"

Outgoing update filter list for all interfaces is not

set Incoming update filter list for all interfaces is

not set Router ID 12.0.0.1

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Page 113: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

109

Maximum path: 4

Routing for Networks:

11.0.0.0 0.0.0.255 area 0

12.0.0.0 0.0.0.255 area 0

Routing Information Sources:

Gateway Distance Last Update

11.0.0.1 110 00:00:00

12.0.0.2 110 00:00:00

Distance: (default is 110)

Page 114: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

110

ACCESS CONTROL LIST

ACL is a set of rules which will allow or deny the specific traffic moving through the router.

It a Layer 3 security which controls the flow of traffic from one router to another. It is also called as Packet Filtering Firewall.

The access-list number range is 1-99

Can block a network, Host and Subnet

Two way communication is stopped

All services are blocked

Implemented closest to the destination

Filtering is done based on only source IP

address

The Access-list number range is 100-199

Can block a Network, Host, Subnet and

Service

One way communication is stopped

Selected services can be blocked

Implemented closest to the source

Checks source, destination, protocol, port

Number

Page 115: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

111

Access-List Rules

Works in Sequential order. All deny statements have to be given first (preferable most cases) There should be at least one permit statement (mandatory)

An implicit deny blocks all traffic by default when there is no match (an

invisible statement).

Can have on access-list per interface per direction. (i.e.) Two access-list per interface, one is inbound direction and one in outbound direction.

Any time a new entry is added to the access-list, it will be placed at the bottom of the list.

Using a text editor for access lists is highly suggested. You cannot remove one line from an access list.

Extended Access List

TASK: Configure the Appropriate router as per the rules given below

1. Deny the users on LAN 192.168.2.0 should not access 192.168.1.3 HTTP service 2. Deny the users on LAN 192.168.3.0 should not access 192.1681.4 FTP service 3. Deny the users on LAN 192.168.3.1 should not access 192.168.1.3 HTTP service

4. Deny the users on LAN 192.168.2.0 should not get DNS service from DNS

server 192.168.1.4

5. Deny the users from the host between 192.168.3.2 and 192.168.1.2 should not be able to send ICMP (ping /Trace) messages

6. Remaining hosts and services should be permitted

NOTE: The Above ACL rules should not affect the other communication

Page 116: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

112

IP

TCP UDP ICMP

HTTP

DNS

PING

TELNET

TFTP

TRACEROUTE

SMTP

SNTP

FTP

SNMP

DHCP

Operators: eq (equal to)

neg (not equal to)

lt (less than)

gt (greater than)

Page 117: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

113

Network Address Translation

Nat is the method of Translation of private IP address into public IP address. In order to communicate with internet we must have registered public IP address.

Address translation was originally developed to solve two problems:

To handle a shortage of IPv4 address

Hide network addressing schemes

Private Addresses Range

There are certain addresses in each class of IP address that are reserved for private Networks. Theses addresses are called private addresses.

Class A 10.0.0.0 To 10.255.255.255

Class B 172.16.0.0 To 172.31.255.255

Class C 192.168.0.0 To 192.168.255.255

Types of NAT

Static NAT

Dynamic NAT Port Address Translation (PAT)

Static NAT Dynamic NAT

(One to One Mapping (One to One Mapping Automatically)

Which are done manually

By the administrator)

192.168.1.1 50.1.1.1 192.168.1.1 50.1.1.1

192.168.1.2 50.1.1.2 192.168.1.2 50.1.1.2

192.168.1.3 50.1.1.3 192.168.1.3 50.1.1.3

192.168.1.4 50.1.1.4 192.168.1.4 50.1.1.4

Page 118: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

114

PAT

(Thousands of Private addresses can go to One Public IP address)

192.168.1.1 50.1.1.1

192.168.1.2 50.1.1.2

192.168.1.3 50.1.1.3

192.168.1.4 50.1.1.3

Static NAT

One to one mapping done Manually For every private IP needs on registered IP address (One : One)

Page 119: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

115

Dynamic NAT

Dynamic network address translation (Dynamic NAT) is a technique in which multiple public

Internet Protocol (IP) addresses are mapped and used with an internal or private IP address.

It allows a user to connect a local computer, server or networking device to an external

network or Internet group with an unregistered private IP address that has a group of

available public IP addresses.

LAB:

TASK:

Configure Dynamic NAT and make sure that the inside LAN users 192.168.1.0/24 get translated to public IP with the range of 50.1.1.1-50.1.1.200/24

Page 120: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

116

Port Address Translation

Port Address Translation (PAT) {also known as Network Address Port Translator (NAPT)}.

Port Address Translation (PAT), is an extension to network address translation (NAT) that

permits multiple devices on a local area network (LAN) to be mapped to a single public IP

address. The goal of PAT is to conserve IP addresses.

Port Address Translation is also called porting, port overloading, port-level multiplexed NAT and

single address NAT.

LAB:

Page 121: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

117

Troubleshooting Connectivity

1) Serial is up, line protocol is up a. Connectivity is fine.

2) Serial is down, line protocol is down a. Remote device turned off b. Remote port is in shutdown state c. Interface on the remote router has to be configured d. Problem with connectivity

3) Serial is administratively down, line protocol is down a. Local port is shutdown state b. No shutdown has to be given on the local router interace.

4) Serial is up, line protocol is down a. Encapsulation mismatch b. Clock rate command not given on serial interface (only applies is lab scenario) c. If using PPP, then authentication mismatch

WAN PROTOCOLS and Connection

HDLC PPP

Higher Level Data Link Control Protocol Point to Point Protocol

Cisco Proprietary Standard Protocol and different vendor Router

as well cisco router

No Support Authentication, Compression and Supports Authentication, Compression and

Error correction Error correction

Default on serial Links Change to PPP

Page 122: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

118

PPP Authentication

PAP CHAP

Password Authentication Protocol Challenge Handshake Authentication Protocol

PAP provides a simple method for a remote After the PPP link establishment phase is

node to establish its identity using a two-way complete, the local router sends a unique

handshake “challenge” message to the remote node.

PPP is done only upon initial link The remote node responds with a value (MD5)

establishment

PAP is not a strong authentication protocol The local router checks the response against its

own calculation of the expected hash value.

Password are sent across the link in clear text If the values match, the authentication is

acknowledged. Otherwise, the connection is

terminated immediately.

Page 123: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

119

PAP Configuration

(Password authentication protocol)

R1(config)#username R2 password cisco123

R1(config)#int s0/0/0

R1(config-if)#encapsulation ppp

Page 124: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

120

R1(config-if)#ppp authentication pap

R1(config-if)#ppp pap sent-username R1 password cisco123

R1(config-if)#end

R2(config)#username R1 password cisco123

R2(config)#int s0/0/0

R2(config-if)#encapsulation ppp

R2(config-if)#ppp authentication ppp

R2(config-if)#ppp pap sent-username R2 password cisco123

R2(config-if)#end

CHAP Configuration on R1/R2

(Challenge handshake authentication protocol)

Page 125: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

121

R1(config)#int s0/0/0 R1(config-

if)#encapsulation ppp R1(config-

if)#ppp authentication chap

R1(config-if)#exit

R1(config)#username R2 password cisco123

R2(config)#int s0/0/0 R2(config-

if)#encapsulation ppp R2(config-

if)#ppp authentication chap

R2(config-if)#exit

R2(config)#username R1 password cisco123

BGP

Routing Protocol Exterior Routing Protocol Routing between AS Routing protocol of internet ISPs Very – 2 Big Organizations can use BGP Having two or more internet connections Multi Homing

Page 126: Routerccieacademy.com.pk/data/CCNA Routing.pdf · 1 Router A network device that forwards packets from one network to another, Based on internal routing tables, routers read each

122