Chabot College ELEC 99.08 IP Routing Protocol Highlights CISCO NETWORKING ACADEMY IP Routing Protocol Topics • • • • • • • • Routing tables How routes are learned Default routes Metrics Administrative Distance Distance Vector /

Download Report

Transcript Chabot College ELEC 99.08 IP Routing Protocol Highlights CISCO NETWORKING ACADEMY IP Routing Protocol Topics • • • • • • • • Routing tables How routes are learned Default routes Metrics Administrative Distance Distance Vector /

Chabot College

ELEC 99.08

IP Routing Protocol Highlights

CISCO NETWORKING ACADEMY

IP Routing Protocol Topics

• Routing tables • How routes are learned • Default routes • Metrics • Administrative Distance • Distance Vector / Link State • RIP / IGRP • Commands

CISCO NETWORKING ACADEMY

Routing Table

• Stored in RAM • Basis for all path selection decisions • Includes destination network address next hop pairs

CISCO NETWORKING ACADEMY

Routing Table Example

hayward#show ip route Codes: C - connected, S - static, I - IGRP, 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, * R - RIP - 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 subnets C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

Routing Table Example

hayward#show ip route

Destination Network Address Next Hop

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 subnets C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 R 10.1.0.0

[120/1] via 10.2.0.1

, 00:00:10, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1

, 00:00:10, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

How routes are learned

1. 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 subnetted C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

How routes are learned

When dynamic routing is running, directly connected networks are listed in the routing table along with others:

hayward#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 subnets C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

How routes are learned

2. Static routes config file.

entered manually in the router

hayward#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 subnets C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

How routes are learned

3. Routes learned from a dynamic protocol (e.g. RIP, IGRP, OSPF).

routing

hayward#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 subnets C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

How routes are learned

4. 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 subnets C 10.2.0.0 is directly connected, Serial1 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:18, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:18, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 R* 0.0.0.0/0 [1/0] via 10.2.0.1

CISCO NETWORKING ACADEMY

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 ACADEMY

Stub Networks

• Only one path in & out of the network; no path selection decision: Only one path to this “stub” network A static route to the stub net will do.

CISCO NETWORKING ACADEMY

Here, there are path selection decisions.

Dynamic routing needed.

Default 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 ACADEMY

Default 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 route 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 subnets C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:10, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:10, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

Default 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.

Gateway Our Network If packet has a destination not on our network, try sending it here

CISCO NETWORKING ACADEMY

Default Routes - Terms

• default route (through) • default gateway (also known as) • gateway of last resort (to) • default network

CISCO NETWORKING ACADEMY

Metric

• Specifies the cost of a route • Dynamic routing protocol chooses the route with the lowest cost • Metrics differ, depending on routing protocol:

Protocol

RIP IGRP

Metric

Hop Count (# routers packet must pass through) Default: Bandwidth, Delay Optionally include: [Load, Reliability]

CISCO NETWORKING ACADEMY

Administrative Distance

• Specifies the trustworthiness of a route source • 0 - 255 Lower values = more trustworthy • The IOS chooses the route with lowest distance: IOS ignores these routes

Route Source

Connected interface Static Route EIGRP Summary Route External BGP Internal EIGRP IGRP OSPF IS-IS RIP EGP Internal BGP Unknown

Default Distance

0 1 5 20 90 100 110 115 120 140 200 255

CISCO NETWORKING ACADEMY

Distance 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 ACADEMY

Distance 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 ACADEMY

Distance 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 ACADEMY

Distance 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 ACADEMY

Distance 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 ACADEMY

Distance 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 ACADEMY

Distance Vector vs Link State

• Link State – Each router knows: • Overall map of network • Shortest path to destination

CISCO NETWORKING ACADEMY

Distance Vector vs Link State

• Link State – To reach Joe’s office: Follow Campus Map.

Take shortest path.

Joe

CISCO NETWORKING ACADEMY

A

Distance 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 B tells C C tells D D tells E E tells F B C D E F

CISCO NETWORKING ACADEMY

Distance 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.

Down

A tells all other routers when it learns of a change in the network A B C D E When any other router detects a change, it also tells everyone.

F

CISCO NETWORKING ACADEMY

RIP

• Distance-Vector • Updates: every 30 seconds • Metric: Hops • Default administrative distance: 120 • Convergence: slow • Versions 1 & 2

CISCO NETWORKING ACADEMY

IGRP

• 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 ACADEMY

Configuring Dynamic Routing

1. 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 ACADEMY

Commands

• Configuring RIP Sets RIP to send/receive updates on these directly connected networks Enables RIP routing

oak(config)#router rip oak(config-router)#network 10.0.0.0

oak(config-router)#network 192.168.3.0

oak(config-router)#^Z CISCO NETWORKING ACADEMY

Commands

• Configuring RIP version 2 - same as RIP but – adds version 2 statement – version should be the same for all routers Enables RIP routing Sets RIP version 2

oak(config)#router rip oak(config-router)#version 2 oak(config-router)#network 10.0.0.0

oak(config-router)#network 192.168.4.0

oak(config-router)#^Z CISCO NETWORKING ACADEMY

Commands

• Configuring IGRP - same as RIP, but – includes an autonomous system number – AS must be same for all routers Enables IGRP routing Autonomous System #

oak(config)#router igrp 40 oak(config-router)#network 10.0.0.0

oak(config-router)#network 192.168.3.0

oak(config-router)#^Z CISCO NETWORKING ACADEMY

Commands

• Configuring a static route - outgoing interface Route to network via this outgoing interface Destination network & mask

fre(config)#ip route 192.168.1.0 255.255.255.0 s0 fre(config)#^Z CISCO NETWORKING ACADEMY

Commands

• Configuring a static route - next hop Destination network & mask

fre(config)#ip route 192.168.1.0 255.255.255.0 s0 fre(config)#ip route 192.168.1.0 255.255.255.0 10.1.0.2

fre(config)#^Z

Route to network via this next hop address.

Use this format to improve clarity of routing tables.

CISCO NETWORKING ACADEMY

Comands

• 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: B

CISCO NETWORKING ACADEMY

Comands

• From Router B, what is the next hop to – the 192.168.3.0 net?

– 10.2.0.2

B

CISCO NETWORKING ACADEMY

Comands

• From Router B, what is the next hop to – the 192.168.4.0 net?

– 10.2.0.2

– The next hop is always on the neighbor router!

B

CISCO NETWORKING ACADEMY

Comands

• From Router B, what are the only two possible next hop – 10.1.0.1

addreses?

– 10.2.0.2

B

CISCO NETWORKING ACADEMY

Commands

• Static route administrative distance parameter • Optional

oak(config)#ip route 10.1.0.0 255.255.0.0 s0 121 oak(config)#^Z

Administrative Distance

CISCO NETWORKING ACADEMY

Commands

• 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 ACADEMY

Commands

• 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 ACADEMY

Commands

• 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

Wildcard network & mask

hay(config)#ip route 0.0.0.0 0.0.0.0 192.168.0.1

hay(config)#^Z

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 ACADEMY

Commands

• 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 :

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 subnets C 10.2.0.0 is directly connected, Serial1 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:18, Serial1 R 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:18, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 R* 0.0.0.0/0 [1/0] via 10.2.0.1

CISCO NETWORKING ACADEMY

Commands

• Configuring a default route (default network) method 2: (presented in the curriculum) ip default-network xxx.xxx.xxx.xxx

Send default traffic here

hay(config)#ip default-network 192.168.0.0 hay(config)#^Z See http://www.cisco.com/warp/public/105/default.html

CISCO NETWORKING ACADEMY

Commands

• Default network must be – defined on each router or – redistributed by RIP to other routers

CISCO NETWORKING ACADEMY

Commands

• 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 rip hay(config-router)#default-information originate

– ip default-network: To force RIP to redistribute the default route, you must add the redistribute static command:

hay(config)#router rip hay(config-router)#redistribute static CISCO NETWORKING ACADEMY

Commands

• show ip route • displays routing table [Administrative Distance/Metric]

oakland#show ip route Gateway of last resort is 10.2.0.1 to network 192.168.1.0

Route Source

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 subnets C 10.2.0.0 is directly connected, Serial1 C 10.3.0.0 is directly connected, Serial0 R 10.1.0.0 [120/1] via 10.2.0.1, 00:00:18, Serial1 R* 192.168.1.0/24 [120/2] via 10.2.0.1, 00:00:18, Serial1 S 192.168.2.0/24 [1/0] via 10.2.0.1

C 192.168.3.0/24 is directly connected, Ethernet0 CISCO NETWORKING ACADEMY

Commands

• 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 ACADEMY

Commands

• 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 CISCO NETWORKING ACADEMY

Commands

• debug ip rip • Displays rip updates as they are received & sent by router • Temporary troubleshooting only must not be left on!

• Turn off with • no debug ip rip or no debug all

CISCO NETWORKING ACADEMY