Date post: | 26-Dec-2015 |
Category: |
Documents |
Upload: | joleen-burns |
View: | 222 times |
Download: | 1 times |
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Chabot CollegeChabot College
ELEC 99.08ELEC 99.08IP Routing Protocol Highlights
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
IP Routing Protocol TopicsIP Routing Protocol Topics• Routing tables
• How routes are learned
• Default routes
• Metrics
• Administrative Distance
• Distance Vector / Link State
• RIP / IGRP
• Commands
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing TableRouting Table
• Stored in RAM• Basis for all path selection decisions• Includes
destination network address - next hop pairs
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Table ExampleRouting Table Examplehayward#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP D - EIGRP, EX - EIGRP external, O - OSPF N1 - OSPF NSSA external type 1, N2 - OSPF NSSA E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, * - candidate default
Gateway of last resort is not set
R 192.168.4.0/24 [120/1] via 10.3.0.2, 00:00:07, Serial0 10.0.0.0/16 is subnetted, 3 subnetsC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Routing Table ExampleRouting Table Examplehayward#show ip route
R 192.168.4.0/24 [120/1] via 10.3.0.2, 00:00:07, Serial0 10.0.0.0/16 is subnetted, 3 subnetsC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0
Destination Network Address Next Hop
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
How routes are learnedHow routes are learned1. Interface configuration in the config file.
Defines directly connected networks even when no dynamic routing is configured:
hayward#show ip route
10.0.0.0/16 is subnettedC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0C 192.168.3.0/24 is directly connected, Ethernet0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
How routes are learnedHow routes are learned
When dynamic routing is running, directly connected networks are listed in the routing table along with others:
hayward#show ip routeR 192.168.4.0/24 [120/1] via 10.3.0.2, 00:00:07, Serial0 10.0.0.0/16 is subnetted, 3 subnetsC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
How routes are learnedHow routes are learned
2. Static routes entered manually in the router config file.
hayward#show ip routeR 192.168.4.0/24 [120/1] via 10.3.0.2, 00:00:07, Serial0 10.0.0.0/16 is subnetted, 3 subnetsC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
How routes are learnedHow routes are learned
3. Routes learned from a dynamic routing protocol (e.g. RIP, IGRP, OSPF).
hayward#show ip routeR 192.168.4.0/24 [120/1] via 10.3.0.2, 00:00:07, Serial0 10.0.0.0/16 is subnetted, 3 subnetsC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
How routes are learnedHow routes are learned4. Default route set manually.
Shown with *
Also: gateway of last resort
oakland#show ip route Gateway of last resort is 10.2.0.1 to network 0.0.0.0
10.0.0.0/16 is subnetted, 2 subnetsC 10.2.0.0 is directly connected, Serial1R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:18, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:18, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0R* 0.0.0.0/0 [1/0] via 10.2.0.1
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Static Routes - Why?Static Routes - Why?• Security
– RIP may reveal too much of your network to others.A static route limits what you “show”.
• Backup routes– A static route can be a backup to be used automatically
if a dynamic route goes down
• Bandwidth conservation– Dynamic routing uses network bandwidth; static routes
do not. – Static routes are sufficient for stub networks
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Stub NetworksStub Networks• Only one path in & out of the network;
no path selection decision:Only one path to this “stub” network
Here, there are path selection decisions.Dynamic routing needed.
A static route to the stub net
will do.
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Default Routes - the ProblemDefault Routes - the Problem• For each packet, routing are decisions based on
the routing table rules. • What happens to a packet if has a destination
that is not included in the routing table?
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Default Routes - the ProblemDefault Routes - the Problem• What happens to a packet sent to 209.33.45.177• It is dropped because there is no entry for that
network in the routing table:
oak#show ip routeGateway of last resort is not set
R 192.168.4.0/24 [120/1] via 10.3.0.2, 00:00:07, Serial0 10.0.0.0/16 is subnetted, 3 subnetsC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Default Routes - the ProblemDefault Routes - the Problem• But the routing table can’t hold entries for every
network, including all those on the Internet!• So we need a route for internet traffic - the
default.
If packet has a destination not on our network,try sending it here
Gateway
Our Network
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Default Routes - TermsDefault Routes - Terms• default route
(through)• default gateway
(also known as)• gateway of last resort
(to)• default network
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
MetricMetric• Specifies the cost of a route• Dynamic routing protocol chooses the route with
the lowest cost• Metrics differ, depending on routing protocol:
Protocol Metric RIP Hop Count
(# routers packet must pass through) IGRP Default: Bandwidth, Delay
Optionally include: [Load, Reliability]
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Administrative DistanceAdministrative Distance• Specifies the trustworthiness of a route source• 0 - 255 Lower values = more trustworthy• The IOS chooses the route with lowest distance:
Route Source Default Distance Connected interface 0 Static Route 1 EIGRP Summary Route 5 External BGP 20 Internal EIGRP 90 IGRP 100 OSPF 110 IS-IS 115 RIP 120 EGP 140 Internal BGP 200 Unknown 255
IOS ignores these routes
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Distance Vector
– Each router knows: • Direction (vector)• Distance (hops)
– Example. Destination is:• out S0• 3 hops away
– Does not know exact map to destination.
3 hops
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Distance Vector
– To reach Joe’s office:Go out middle door & pass through 3 buildings.At each building, you’ll be told which door to exit
– Which office could be Joe’s?
3
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Distance Vector
– To reach Joe’s office:Go out middle door & pass through 3 buildings.At each building, you’ll be told which door to exit
– Which office could be Joe’s?
3 2
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Distance Vector
– To reach Joe’s office:Go out middle door & pass through 3 buildings.At each building, you’ll be told which door to exit
– Which office could be Joe’s?
3 2
1
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Distance Vector
– To reach Joe’s office:Go out middle door & pass through 3 buildings.At each building, you’ll be told which door to exit
– Which office could be Joe’s?
3 2
1 0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Distance Vector
– To reach Joe’s office:Go out middle door & pass through 3 buildings.At each building, you’ll be told which door to exit
– Which office could be Joe’s?
3 2
1 0 Joe
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Link State
– Each router knows:• Overall map of network• Shortest path to destination
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Link State
– To reach Joe’s office:Follow Campus Map.Take shortest path.
Joe
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Distance Vector Updates (RIP example)
– Each router gossips to its direct neighbor.– Gossip is sent every 30 seconds.– Takes time to pass the gossip to the end of the line.– When all routers have received the gossip they are “converged”. Until then,
the routers posses conflicting knowledge.
A tells B
A B C D E F
B tells C C tells D D tells E E tells F
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Distance Vector vs Link StateDistance Vector vs Link State• Link State
– Each router sends information about its links to all other routers.– Changes in network topology trigger these link state
advertisements.– Each router then develops a full map of the network.
A tells all other routers when it learns of a change in the network
A B C D E F
When any other router detects a change, it also tells everyone.
Down
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
RIPRIP• Distance-Vector• Updates: every 30 seconds • Metric: Hops • Default administrative distance: 120• Convergence: slow• Versions 1 & 2
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
IGRPIGRP• Distance-Vector• Updates: every 90 seconds • Metric: bandwidth & delay (defaults)
Can also include load, reliability • Default administrative distance: 100• Convergence: faster than RIP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
Configuring Dynamic RoutingConfiguring Dynamic Routing1.Specify the routing protocol.
– Ordinarily, all routers must run the same protocol.
2.Specify all directly connected networks on which the router will send and receive route updates (also called advertisements).– Network are specified by major network numbers, not
subnets. Example - here the network is 10.0.0.0:
10.2.0.2/16 10.3.0.1/16
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Configuring RIP
oak(config)#router ripoak(config-router)#network 10.0.0.0oak(config-router)#network 192.168.3.0oak(config-router)#^Z
Enables RIP routing
Sets RIP to send/receive updates on these directly connected networks
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Configuring RIP version 2 - same as RIP but
– adds version 2 statement
– version should be the same for all routers
oak(config)#router ripoak(config-router)#version 2oak(config-router)#network 10.0.0.0oak(config-router)#network 192.168.4.0oak(config-router)#^Z
Enables RIP routing Sets RIP version 2
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Configuring IGRP - same as RIP, but
– includes an autonomous system number
– AS must be same for all routers
oak(config)#router igrp 40oak(config-router)#network 10.0.0.0oak(config-router)#network 192.168.3.0oak(config-router)#^Z
Enables IGRP routing Autonomous System #
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Configuring a static route - outgoing interface
fre(config)#ip route 192.168.1.0 255.255.255.0 s0fre(config)#^Z
Destination network & mask
Route to network via this outgoing interface
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Configuring a static route - next hop
fre(config)#ip route 192.168.1.0 255.255.255.0 s0fre(config)#ip route 192.168.1.0 255.255.255.0 10.1.0.2fre(config)#^Z
Destination network & mask
Route to network via this next hop address.
Use this format to improve clarity of routing tables.
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
ComandsComands• Specifying next hop
– It is the ip address of nearest interface of the neighbor router along the route.
– From Router B, this is the next hop to LAN A:
LAN
D
LAN
C
LAN
A
B
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
ComandsComands• From Router B, what is the next hop to
– the 192.168.3.0 net?– 10.2.0.2
19
2.1
68
.1.0
Ne
t
B 19
2.1
68
.3.0
Ne
t
19
2.1
68
.4.0
Ne
t
10
.1.0
.1
10
.1.0
.2
10
.2.0
.1
10
.2.0
.2
10
.3.0
.1
10
.3.0
.2
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
ComandsComands• From Router B, what is the next hop to
– the 192.168.4.0 net?– 10.2.0.2
19
2.1
68
.1.0
Ne
t
B 19
2.1
68
.3.0
Ne
t
19
2.1
68
.4.0
Ne
t
10
.1.0
.1
10
.1.0
.2
10
.2.0
.1
10
.2.0
.2
10
.3.0
.1
10
.3.0
.2
– The next hop is always on the neighbor router!
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
ComandsComands• From Router B, what are the only two possible next hop addreses?
– 10.1.0.1
19
2.1
68
.1.0
Ne
t
B 19
2.1
68
.3.0
Ne
t
19
2.1
68
.4.0
Ne
t
10
.1.0
.1
10
.1.0
.2
10
.2.0
.1
10
.2.0
.2
10
.3.0
.1
10
.3.0
.2
– 10.2.0.2
10
.1.0
.1
10
.2.0
.2
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Static route - administrative distance parameter• Optional
oak(config)#ip route 10.1.0.0 255.255.0.0 s0 121oak(config)#^Z
Administrative Distance
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Static route - administrative distance• If unspecified, default distance is 0
for outgoing interface format.• These routes will show as S but will be listed as directly connected in the routing table.
oak(config)#ip route 10.1.0.0 255.255.0.0 s0
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Static route - administrative distance• If unspecified, default distance is 1
for next hop format.• These routes will show as S (static) in the routing table.
oak(config)#ip route 10.1.0.0 255.255.0.0 10.3.0.1
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Configuring a default route (default network)
method 1 - set a default route to the wildcard network & subnet of 0.0.0.0 0.0.0.0
hay(config)#ip route 0.0.0.0 0.0.0.0 192.168.0.1hay(config)#^Z
Wildcard network & mask
Route to default network via this “next hop” address -
the address of the direct neighbor interface.See http://www.cisco.com/warp/public/105/default.html
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
oakland#show ip route Gateway of last resort is 10.2.0.1 to network 0.0.0.0
10.0.0.0/16 is subnetted, 2 subnetsC 10.2.0.0 is directly connected, Serial1R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:18, Serial1R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:18, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0R* 0.0.0.0/0 [1/0] via 10.2.0.1
CommandsCommands• method 1 - RIP will automatically redistribute the default route to
the wildcard network & subnet of 0.0.0.0 0.0.0.0 to other routers:
Dis
trib
uted
fro
m h
ayw
ard
to o
akla
nd b
y R
IP
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Configuring a default route (default network)
method 2: (presented in the curriculum)
ip default-network xxx.xxx.xxx.xxx
hay(config)#ip default-network 192.168.0.0 hay(config)#^Z
Send default traffic here
See http://www.cisco.com/warp/public/105/default.html
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Default network must be
– defined on each routeror
– redistributed by RIP to other routers
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• Redistribution methods:
– 0.0.0.0: • With IOS Version 12.0, RIP automatically distributes a route to 0.0.0.0 to other routers.• With IOS Version 12.1 or later, you must add the
default-information originate command:
hay(config)#router riphay(config-router)#default-information originate
hay(config)#router riphay(config-router)#redistribute static
– ip default-network: To force RIP to redistribute the default route, you must add the redistribute static command:
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• show ip route• displays routing table
oakland#show ip route Gateway of last resort is 10.2.0.1 to network 192.168.1.0
R 192.168.4.0/24 [120/1] via 10.3.0.2, 00:00:11, Serial0 10.0.0.0/16 is subnetted, 3 subnetsC 10.2.0.0 is directly connected, Serial1C 10.3.0.0 is directly connected, Serial0R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:18, Serial1R* 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:18, Serial1S 192.168.2.0/24 [1/0] via 10.2.0.1C 192.168.3.0/24 is directly connected, Ethernet0
RouteSource
[Administrative Distance/Metric]
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• show ip protocols
oak(config)#show ip protocols
Routing Protocol is "rip" Sending updates every 30 seconds, next due in 2 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Routing for Networks: 10.0.0.0 192.168.4.0
Update Distance: (default is 120)
CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY
CommandsCommands• show ip interfaces• interface detail
oak(config)#show ip interfaces
Ethernet0 is up, line protocol is up Internet address is 192.195.78.24, subnetmask 255.255.255.240 Broadcast address is 255.255.255.255 Address determined by non-volatile memory MTU is 1500 bytes Helper address is not set Secondary address 131.192.115.2, subnet mask 255.255.255.0 Directed broadcast forwarding is enabled Outgoing access list is not set Inbound access list is not set Proxy ARP is enabled Split horizon is enabled