Sie sind auf Seite 1von 26

Part 2

Chapter 2
Static Routing

Prof Dr Hesham Arafat

What the router does 1


Ethernet frame received from PC1 through port Fa0/0
Destination MAC address is routers address

29 May 201

What the router does 2


Strip off frame header and trailer (decapsulate)
Read destination IP address 192.168.4.9

29 May 201

What the router does 3


Logical AND with IP address 192.168.4.9 and subnet
mask 255.255.255.0 (/24) gives destination network
address 192.168.4.0

29 May 201

What the router does 4


Look in routing table for network address 192.168.4.0
Route found via 192.168.3.2 through S0/0

29 May 201

What the router does 5


S0/0 connects to a WAN link using PPP
Encapsulate packet in PPP frame
Send frame out through S0/0

29 May 201

No route found
If the destination network is not in the routing table:
Use a default route if one exists
Otherwise drop the packet and send an ICMP (Internet
Control Message Protocol ) destination unreachable
message to the source host.

29 May 201

Show ip route
List of codes

List of routes
29 May 201

Routing table
Directly connected

Network and mask

Exit port

C
C

192.168.1.0/24 is directly connected, FastEthernet0/0


192.168.2.0/24 is directly connected, Serial0/0

S
R

192.168.3.0/24 [1/0] via 192.168.2.2


192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

29 May 201

Routing table
Static route

Network and mask

C
C

192.168.1.0/24 is directly connected, FastEthernet0/0


192.168.2.0/24 is directly connected, Serial0/0

192.168.3.0/24 [1/0] via 192.168.2.2

192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

Administrative
distance and metric
29 May 201

Address of next
hop router

Routing table
Dynamic route, RIP
C
C
S
R

Exit port
Network and mask

192.168.1.0/24 is directly connected, FastEthernet0/0


192.168.2.0/24 is directly connected, Serial0/0
192.168.3.0/24 [1/0] via 192.168.2.2
192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

Administrative
distance and metric
29 May 201

Address of next
hop router

Time since
last update

Static routes

Dynamic routes

Entered by administrator
Time consuming,
different for each router
Must be updated if
routes change
Little processing
No bandwidth used

Learned from other


routers
Start the protocol then it
runs by itself
Automatically updates
when routes change
More processing
Uses bandwidth

Routing protocols
Interior, used
within an
organisations
networks
Distance vector
RIP
(IGRP)
EIGRP

Exterior, used
between different
organisations
networks
Link state
OSPF
IS-IS

BGP

Routing Table Principles


1. Every router makes its decision alone, based on the
information it has in its own routing table.
2. The fact that one router has certain information in its
routing table does not mean that other routers have the
same information.
3. Routing information about a path from one network to
another does not provide routing information about the
reverse, or return, path.

Metrics
A routing protocol may learn of several possible routes
to a destination.
It uses metrics to pick the best route.
RIP uses hop count as its only metric.
OSPF uses cost based on bandwidth.
EIGRP uses bandwidth and delay and can use load
and reliability as well.

Metrics
RIP uses hop count. It picks this
route as the best.

OSPF uses cost based on


bandwidth. It picks this route as the
best.

Administrative distance
Is the measure used by Cisco routers to select the best path when there
are two or more different routes to the same destination from two different
routing protocols
There may be more than one routing protocol running. There may also be
static routes.
Static routes have administrative distance 1 or 0 by default.
RIP routes have administrative distance 120
OSPF routes have administrative distance 110
The route with the lowest administrative distance goes in the routing table

CDP show commands


Show cdp neighbors command
-Displays the following information:
Neighbor device ID
Local interface
Holdtime value, in seconds
Neighbor device capability code
Neighbor hardware platform
Neighbor remote port ID
Show cdp neighbors detail command
-Useful in determining if an IP address configuration error

Purpose of a static route


A manually configured route used when routing from a network
to a stub network

Stub network

Static route
networks
Default route

Topology & Routing table

General Role of the Router


Connections of a Router for WAN
-A router has a DB-60 port that can support 5 different cabling
standards

Connections of a Router for Ethernet


-2 types of connectors can be used: Straight through and

Cross-over
Straight through used to connect:
-Switch-to-Router, Switch-to-PC, Router-to-Server, Hub-toPC, Hub-to-Server
Cross-over used to connect:
-Switch-to-Switch, PC-to-PC, Switch-to-Hub, Hub-to-Hub,
Router-to-Router

Examining Router Interfaces


-Show IP route command used to view routing table

-Show Interfaces command used to show status of an


interface
-Show IP Interface brief command used to show a portion of
the interface information
-Show running-config command used to show configuration
file in RAM

IP route command
To configure a static route use the following command: ip route
Example:
-Router(config)# ip route network-address subnet-mask {ipaddress | exit-interface }

Configuring routes to 2 or more remote networks


Use the following commands for R1
-R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2
-R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2

Ethernet interfaces and ARP


If

a static route is configured on an Ethernet


link
-If the packet is sent to the next-hop router then
the destination MAC address will be the
address of the next hops Ethernet interface
This is found by the router consulting the
ARP table.
If an entry isnt found then an ARP
request will be sent out

Static Routes with Exit Interfaces


IP route command
To configure a static route use the following command: ip route
Example:
-Router(config)# ip route network-address subnet-mask {ipaddress | exit-interface }

Das könnte Ihnen auch gefallen