0% found this document useful (0 votes)
19 views29 pages

Tema 6 IP Routing

The document provides an overview of IP routing and the functions of routers, including their components and how they determine the best path for packet forwarding. It explains the use of routing tables, the differences between routers and multilayer switches, and the importance of routing protocols in dynamic routing. Additionally, it covers configuration commands for routers and the verification of interface settings and routing tables.

Uploaded by

redesespoch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views29 pages

Tema 6 IP Routing

The document provides an overview of IP routing and the functions of routers, including their components and how they determine the best path for packet forwarding. It explains the use of routing tables, the differences between routers and multilayer switches, and the importance of routing protocols in dynamic routing. Additionally, it covers configuration commands for routers and the verification of interface settings and routing tables.

Uploaded by

redesespoch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

REDES DE COMUNICACIONES

Tema 6. Enrutamiento IP

Alberto Arellano A. Ing. Msc.


[email protected]
CCNA – CCNP - CCSP
What is a Router?

Leonard Kleinrock and the first IMP.

 A router is a specialized computer



It sends packets over the data network
 It is responsible for interconnecting networks by selecting the best
path for a packet to travel and forwarding packets to their destination
 The first router (ARPANET):

IMP (Interface Message Processor)

Honeywell 516 minicomputer - August 30, 1969
Router Components

 Regardless of their function, size or complexity, all router models are essentially
computers and require:

Operating systems (OS)

Central processing units (CPU)

Random-access memory (RAM)

Read-only memory (ROM)
 Routers also have special memory that includes Flash and nonvolatile random-
access memory (NVRAM).
Multilayer Switches

 Routers and multilayer switches both perform routing


(connecting networks)
 Routers may have different types of interfaces
(Ethernet, serial) generally supporting both LANs and
WANs
 Multilayer switches will only have Ethernet interfaces
and generally used only within a LAN
 Routers may include features not found on a
multilayer switch, such as firewall feature sets, NAT,
etc.
Router Functions
 Routers connect multiple networks.
 Routers typically have multiple interfaces, each on a different IP
network.
Best Path
Decision
 The primary responsibility of a router is to direct packets by:

Determine the best path to send packets

Forward packets toward their destination
Best Path
Decision
192.168.1.10/24
Source Destination
192.168.1.10 192.168.3.22

192.168.3.22/24
192.168.2.0/24

192.168.1.0/24 192.168.3.0/24

C 192.168.1.0/24 is directly connected, FastEthernet0/0


C 192.168.2.0/24 is directly connected, Serial0/0/0
S 192.168.3.0/24 [1/0] via 192.168.2.2

S 192.168.1.0/24 [1/0] via 192.168.2.1


C 192.168.2.0/24 is directly connected, Serial0/0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
 Routers use routing tables to determine the best path to send
packets.
 Routers encapsulate the packet (in the proper layer 2 frame) and
forward it to the interface indicated in routing table.
Best Path
Decision
 Routing tables can be populated with network learned via:

Directly connected networks (required)

Manually with static routes

Dynamically with routing protocols
Best Path Decisions
 The router uses its routing table to determine the best
path to forward the packet.

When the router receives a packet, it examines its
destination IP address and searches for the best
network address match in the routing table.

The routing table entries also includes the interface
to be used to forward the packet.

Once a match is found, the router encapsulates the IP
packet into the data link frame of the outgoing or exit
interface.

The packet is then forwarded toward its destination.
Name the Device

Router# configure terminal


Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# hostname R1
R1(config)#

Router# configure terminal


Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# hostname R2
R2(config)#
Save the Configuration

R1# copy running-config startup-config


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

running-config  RAM
startup-config  NVRAM
Configure Interfaces

R1(config)# interface gigabitethernet 0/0


R1(config-if)# description Link to LAN 1
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
*Jan 30 22:04:47.551: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed
state to down
*Jan 30 22:04:50.899: %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed
state to up
*Jan 30 22:04:51.899: %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/0, changed state to up
R1(config)#
Configure Interfaces

R1(config)# interface gigabitethernet 0/1


R1(config-if)# description Link to LAN 2
R1(config-if)# ip address 192.168.11.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
*Jan 30 22:06:02.543: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed
state to down
*Jan 30 22:06:05.899: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed
state to up
*Jan 30 22:06:06.899: %LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/1, changed state to up
R1(config)#
Configure Interfaces

R1(config)# interface serial 0/0/0


R1(config-if)# description Link to R2
R1(config-if)# ip address 209.165.200.225 255.255.255.252
R1(config-if)# clockrate 128000
R1(config-if)# no shutdown
R1(config-if)# exit
*Jan 30 23:01:17.323: %LINK-3-UPDOWN: Interface Serial0/0/0, changed state
to down ! Will be down until other side has been configured
R1(config)#
Configure Interfaces - R2
R2(config)#interface gigabitethernet 0/0
R2(config-if)#description Link to LAN 3
R2(config-if)#ip address 10.1.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
R2(config)#interface gigabitethernet 0/1
R2(config-if)#description Link to LAN 4
R2(config-if)#ip address 10.1.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
R2(config)#interface serial 0/0/0
R2(config-if)#description Link to R1
R2(config-if)#ip address 209.165.200.226 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
Verify Interface Settings
 The following commands are used to verify the operation and configuration of an
interface:

show ip interface brief – Displays a summary for all interfaces including the
IPv4 address of the interface as well as the current operational status.

show ip route – Displays the contents of the IPv4 routing table.

show running-config interface interface-id – Displays the commands
configured on the specified interface.
 The following commands can be used to gather more detailed interface information:

show interfaces – Displays interface information and packet flow counts.

show ip interface – Displays the IPv4 related information for all interfaces on a
router.
Verify Routing
Table
Verify Routing
Table
Routing
Decisions
 The primary function of a router is
to determine the best path to send
packets.
 A routing table search results in
one of three path determinations:

Directly connected network
– Forward to the packet's
destination IP address
(recipient of the packet)

Remote network – Forward
to next hop router as per the
routing table

No route determined – If no
specific route, use default
route or summary route. If no
route, drop packet.
Best Path

Which path is
my “best path”?
RIP’s metric is hop count
OSPF’s metric is bandwidth
EIGRP is bandwidth + delay
?

 Router’s determine best-path to a network:



Depends on the routing protocol

A protocol used to between routers to determine “best path”
 Routing protocols use their own rules and metrics.
 A metric:

Quantitative value used to measure the distance to a given route.
 Best path:

Path with the lowest metric.
Administrative Distance
AD represents the “trustworthiness” of the route source - the lower
the AD, the more trustworthy the source of the route
If multiple paths to a destination are configured on a router, the path
installed in the routing table is the one with the lowest Administrative
Distance (AD):

Only a directly connected


route can have an AD of 0
The Routing
Table
 The routing table of a router stores information about:

Directly connected networks: Obtained from the active router
interfaces.

Remote networks:
 Statically configured
 Dynamically learned
 A routing table is a data file in RAM
 The routing table contains next hop associations for remote networks
Routing Table Sources
 show ip route command can be used
to display the IPv4 routing table.
 Sources of the routing table entries
are identified by a code:

L - Local Route interfaces

C - Directly connected interfaces

S - Static routes

R – Learned dynamically from
another router using the RIP
routing protocol.

D – Learned dynamically from
another router using the EIGRP
routing protocol.

O – Learned dynamically from
another router using the OSPF
routing protocol.
Network Routing Entries
 Details for the route to the remote
network 10.1.1.0:

Route source – how the route
was learned

Destination network – address of
the remote network

Administrative distance –
trustworthiness of the route

Metric – value assigned to reach
the remote network; lower the
better

Next-hop – the IPv4 address of
the next router to forward the
packet to

Route timestamp – how much
time has passed since the route
was learned

Outgoing interface – exit
interface to forward packet out of
Directly Connected
Interfaces
 A new router without any
configured interfaces will have
an empty routing table.
 Before the interface state is
considered up/up and added to
the IPv4 routing table, the
interface must:

Be assigned a valid IPv4 or
IPv6 address

Be activated with the no
shutdown command

Receive a carrier signal from
another device such as a
router, switch, or host.
 When the interface is up, the
network of that interface is
added to the routing table as a
directly connected route.
Static Routes
 Static routes are manually
configured and define an explicit
path between two networking
devices.
 If the network topology changes,
static routes must manually be
reconfigured.
 Benefits of static routes include:

Improved security

Resource efficiency – less
bandwidth usage and no
CPU cycles are used to
calculate and communicate
routes
Static Routes

Recommended best practice: Always use a next-hop address


Dynamic Routing
 Dynamic routing protocols are used by routers to share
information about the reachability and status of remote
networks.
Routing protocols

You might also like