RIP

advertisement
RIP version 1
Routing Protocols and Concepts – Chapter 5
1
计算机10级章节测试安排
ƒ Module 5 章节测试,
–周六(4月13日)上午5:00—下周二(4月16日)晚上11:00
–跨度:3×24=96+18小时
–每章考试时间60分钟
–英文、中文考试同时激活,只能选一种,建议英文
–自己选择时间进入考试系统完成测试
–过期不补
2
Overview
ƒ The first protocol used was Routing Information Protocol
(RIP). RIP still enjoys popularity because of its simplicity
and widespread support.
ƒ Understanding RIP is important to your networking studies
for two reasons.
–First, RIP is still in use today.
–Second, familiarity with many of the fundamental concepts of RIP
will help you to compare RIP with other protocols. Understanding
how RIP operates and its implementation will make learning other
routing protocols easier.
3
Objectives
ƒ
Describe the functions, characteristics, and operation of
the RIPv1 protocol.
ƒ
Configure a device for using RIPv1.
ƒ
Verify proper RIPv1 operation.
ƒ
Describe how RIPv1 performs automatic summarization.
ƒ
Configure, verify, and troubleshoot default routes
propagated in a routed network implementing RIPv1.
ƒ
Use recommended techniques to solve problems related to
RIPv1
4
Context Index
ƒ 5.1 RIPv1: Distance Vector, Classful Routing Protocol
ƒ 5.2 Basic RIPv1 Configuration
ƒ 5.3 Verification and Troubleshooting
ƒ 5.4 Automatic Summarization
ƒ 5.5 Default Route and RIPv1
ƒ 5.6 RIPv1 Configuration Labs
5
5.1 RIPv1: Distance Vector,
Classful Routing Protocol
6
5.1.1 Background and Perspective
ƒ RIP is the oldest of the distance vector routing protocols.
ƒ RIP is not a protocol “on the way out.” 即将被淘汰
ƒ In fact, an IPv6 form of RIP called RIPng (next
generation) is now available.
7
5.1.1 Background and Perspective
ƒ Turn to 5.1.1 flash
8
Background and
Perspective
z Charles Hedrick wrote RFC 1058 in 1988, in which he documented
the existing protocol and specified some improvements.
z RFC 1058 can be found at http://www.ietf.org/rfc/rfc1058.txt
RIPv1 Characteristics and Message Format
z RIP characteristics:
y Distance Vector or Link State?
y Distance vector routing protocol.
y Metric?
y Hop count
y Maximum Hop count?
y Greater than 15 are considered unreachable.
y Routing table updates are broadcasted every…?
y 30 seconds. (RIPv2 uses multicasts)
y their complete routing tables
RIPv1 Characteristics and Message Format
z The data portion of a RIP message is encapsulated into a UDP
segment, with both source and destination port numbers set to 520.
5.1.2 RIPv1 Characteristics and Message Format
ƒ RIP header - divided
into 3 fields
– Command field
– Version field
– Must be zero
ƒ Route Entry - composed
of 3 fields
– Address family identifier
– IP address
– Metric
12
IP Address Classes and Classful Routing
No subnet
mask
z RIPv1:
y Classful routing protocol.
y Does not send subnet mask in update.
IP Address Classes and Classful Routing
Routing Table
172.30.2.1/24
?
Network-add/mask
RIP Update
network-add
/16
z R2 receives an RIP update with a network address.
z R2 adds the network address and mask to the routing table.
z A router either uses the subnet mask: (discussed later)
y Local interface or
y Default classful subnet mask
z Because of this limitation, RIPv1 networks cannot be discontiguous, nor can
they implement VLSM. RIPv1 网络不能为不连续网络,也不能使用 VLSM。
5.1.3 RIP Operation
ƒ RIP uses 2 message types:
–Request message
•This is sent out on startup by each RIP enabled interface
•Requests all RIP enabled neighbors to send their complete
routing tables
–Response message
•Message sent to requesting router containing routing table
ƒ 5.1.3.1 flash
ƒ 讨论距离矢量路由协议更新算法
15
5.2 Basic RIPv1 Configuration
16
5.2.1 Basic RIPv1 Configuration
ƒ A typical topology suitable for
use by RIPv1 includes:
–-Three router set up
–-No PCs attached to LANs
–-Use of 5 different IP subnets
ƒ 5.2.1:配置路由器接口的 IP 地址
17
5.2.1 Basic RIPv1 Configuration
ƒ 实验室真实设备互联
ƒ 具体情况具体分析
18
RIPv1 Scenario A 3
2
1
4
5
z RIPv1 is a classful or classless routing protocol?
y Classful
z How many classful networks are there and of what class?
y 5 Class C network addresses.
z We will see that the class of the network is used by RIPv1 to determine the
subnet mask.
Enabling RIP: router rip Command (don’t do this yet)
R1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# router ?
bgp
Border Gateway Protocol (BGP)
egp
Exterior Gateway Protocol (EGP)
eigrp
Enhanced Interior Gateway Routing Protocol (EIGRP)
igrp
Interior Gateway Routing Protocol (IGRP)
isis
ISO IS-IS
iso-igrp IGRP for OSI networks
mobile
Mobile routes
odr
On Demand stub Routes
ospf
Open Shortest Path First (OSPF)
rip
Routing Information Protocol (RIP)
R1(config)# router rip
R1(config-router)#
z What routing protocols does this router support? (PT is limited)
z Configure RIP…
Enabling RIP: router rip Command (don’t do this yet)
R1# conf t
R1(config)# router rip
R1(config-router)# network 192.168.1.0
R1(config-router)# network 192.168.2.0
R1(config-router)# exit
R1(config)# no router rip
z no router rip
y To remove the RIP routing process from a device
y Stops the RIP process
y Erases all existing RIP configuration commands.
Specifying Networks
Router(config-router)# network
directly-connected-classfulnetwork-address
z To enable RIP routing for a network, use the network command in
router configuration mode
z Enter the classful network address for each directly connected
network.
Specifying Networks
R1(config)# router rip
R1(config-router)# network 192.168.1.0
R1(config-router)# network 192.168.2.0
RIP Update
z The network command performs the following functions:
y Enables RIP on all interfaces that belong to a specific network.
y Associated interfaces will now both send and receive RIP
updates.
y Advertises the specified network in RIP routing updates sent to
other routers every 30 seconds (no mask).
Specifying Networks
Only directly connected classful network
addresses!
R1(config)# router rip
R1(config-router)# network 192.168.1.0
R1(config-router)# network 192.168.2.0
R2(config)# router
R2(config-router)#
R2(config-router)#
R2(config-router)#
rip
network 192.168.2.0
network 192.168.3.0
network 192.168.4.0
R3(config)# router rip
R3(config-router)# network 192.168.4.0
R3(config-router)# network 192.168.5.0
z Configure RIP for all three routers
z What happens if you enter a subnet or host IP address? (Try it)
y IOS automatically converts it to a classful network address.
y For example, if you enter the command network 192.168.1.32, the
router will convert it to network 192.168.1.0.
5.2.3 Specifying Networks
ƒ The network command is configured on all three routers for the directly
connected networks. Notice that only classful networks were entered.
ƒ Notice that the IOS does not give an error message. Instead, the IOS
corrects the input and enters the classful network address.
–R3(config)#router rip
–R3(config-router)#network 192.168.4.0
–R3(config-router)#network 192.168.5.1
–验证
–R3#show running-config
–router rip
–network 192.168.4.0
–network 192.168.5.0
25
Only directly connected classful network
addresses!
5.1.4 Administrative Distance
z RIP’s default administrative distance is 120
z check the administrative distance using the command:
y show ip route
y show ip protocols
z Other command #show ip route 192.168.6.2
Administrative Distance
R3# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, R = RIP
<some output omitted>
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
R
R
R
C
C
R3#
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.4.0/24
192.168.5.0/24
[120/2] via
[120/1] via
[120/1] via
is directly
is directly
192.168.4.2, 00:00:13, Serial0/0/1
192.168.4.2, 00:00:25, Serial0/0/1
192.168.4.2, 00:00:25, Serial0/0/1
connected, Serial0/0/1
connected, FastEthernet0/0
z What is the administrative distance of a network route learned via
RIP?
y 120
Administrative Distance
R3# show ip protocols
<output omitted>
Routing Protocol is “rip”
Routing Information Sources:
Gateway
Distance
192.168.6.2
120
Distance: (default is 120)
Last Update
00:00:10
z Where is the administrative distance displayed using this command?
5.2.3. 在网络上配置 RIP 路由
ƒ 5.2.3:在网络上配置 RIP 路由
ƒ 结果见5.3.4 为 RIP 配置被动接口
ƒ 直接完成演示
30
5.3 Verification and Troubleshooting
31
5.3.1 Verifying RIP: show ip route
Powerful Troubleshooting Commands:
ƒ show ip interface brief
–Remember, before you configure any routing - whether static or dynamic make
sure all necessary interfaces are "up" and "up" with the show ip interface brief
command.
ƒ show ip route
ƒ show ip protocols
ƒ show running-config
ƒ debug ip rip
32
Verifying RIP: show ip route Command
R1# show ip route
<output omitted>
R
192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:23, Serial0/0/0
5.3.2 Verifying RIP: show ip protocols
z The show ip protocols command displays the routing protocol that is
currently configured on the router. This output can be used to verify
most RIP parameters to confirm that:
y RIP routing is configured
y The correct interfaces send and receive RIP updates
y The router advertises the correct networks
y RIP neighbors are sending updates
z Detail to 5.3.2 flash button 7
Examine and discuss the show ip protocols Command
Verifying RIP: show ip protocols Command
z Verifies that RIP routing is configured and running on
Router R2
z At least one active interface with an associated network
command is needed before RIP routing will start.
Verifying RIP: show ip protocols Command
z These are the timers that show when the next
round of updates will be sent out from this
router—23 seconds from now, in the example.
Verifying RIP: show ip protocols Command
z This information relates to filtering updates and
redistributing routes, if configured on this router.
z Filtering and redistribution are both CCNP-level
topics.
Verifying RIP: show ip protocols Command
z Information about which RIP version is
currently configured and which interfaces are
participating in RIP updates.
Verifying RIP: show ip protocols Command
z Router R2 is currently summarizing at the classful network
boundary
z By default, will use up to four equal-cost routes to loadbalance.
z Automatic summarization is discussed later in this chapter.
Verifying RIP: show ip protocols Command
z Classful networks configured with the network
command are listed next.
z These are the networks that R2 will include in its
RIP updates. (with other learned routes)
Verifying RIP: show ip protocols Command
z
z
z
z
RIP neighbors
Gateway: Next-hop IP address of the neighbor that is sending R2
updates.
Distance is the AD that R2 uses for updates sent by this neighbor.
Last Update is the seconds since the last update was received
from this neighbor.
5.3.3 Verifying RIP: debug ip rip
z R2# undebug all(关闭所有debug进程)
z Detail to 5.3.2 flash button 6 good
Use debug ip rip to view RIP updates that are sent
and received…
z The debug command is a useful tool to help diagnose and resolve
networking problems, providing real-time, continuous information.
RIP: received v1 update from 192.168.2.1 on Serial0/0/0
192.168.1.0 in 1 hops
z Assuming all routers have converged, why were no other routes
from R1’s routing table sent to R2?
z Split horizon rule.
y R1 is will not advertise networks back to R2 that were learned
from R2.
RIP: received v1 update from 192.168.4.1 on Serial0/0/1
192.168.5.0 in 1 hops
RIP: sending v1 update to
(192.168.3.1)
RIP: build update entries
network 192.168.1.0
network 192.168.2.0
network 192.168.4.0
network 192.168.5.0
255.255.255.255 via FastEthernet0/0
metric
metric
metric
metric
2
1
1
2
Learned via
RIP from R1
Learned via
RIP from R3
Directly
Connected
RIP: sending v1 update to
(192.168.4.2)
RIP: build update entries
network 192.168.1.0
network 192.168.2.0
network 192.168.3.0
Directly
Connected
Learned via
RIP from R1
255.255.255.255 via Serial0/0/1
metric 2
metric 1
metric 1
RIP: sending v1 update to
(192.168.2.2)
RIP: build update entries
network 192.168.3.0
network 192.168.4.0
network 192.168.5.0
255.255.255.255 via Serial0/0/0
metric 1
metric 1
metric 2
R2# undebug all
All possible debugging has been turned off
Directly
Connected
Learned via
RIP from R3
5.3.4 Passive Interfaces
Got Router?
z Does R2 need to send RIP updates out Fa 0/0?
z No, there is no RIP router or any router.
y Bandwidth is wasted transporting unnecessary updates.
y All devices on the LAN must process the RIPv1 update up to the
transport layer.
y Security risk
5.3.4 Passive interface
ƒ
Unnecessary RIP Updates Impact Network
1. Bandwidth is wasted transporting unnecessary updates. Because RIP
updates are broadcast, switches will forward the updates out all ports.
2. All devices on the LAN must process the update up to the Transport layers,
where the receiving device will discard the update.
3. Advertising updates on a broadcast network is a security risk. RIP updates
can be intercepted with packet sniffing software. Routing updates can be
modified and sent back to the router, corrupting the routing table with false
metrics that misdirect traffic.
ƒ
Passive interface used to prevent a router from sending updates through
an interface.
ƒ
Example:
Router(config-router)# passive-interface interface-type interface-number
ƒ
This command stops routing updates out the specified interface.
However, the network that the specified interface belongs to will still be
advertised in routing updates that are sent out other interfaces.
ƒ
停止从指定接口发送发送路由更新,但是,从其他接口发出的路由更新中
仍将通告指定接口所属的网络。
51
Passive Interfaces
思考:R2:no network 192.168.3.0与pass-int fa0/0
Router(config-router)# passive-interface interface-type interfacenumber
z What about using on R2:
R2(Config-router)# no network 192.168.3.0
y R2 would not advertise this LAN as a route in updates sent to R1
and R3.
z Correct solution is to use the passive-interface command
Passive Interfaces – Use it on R2…
R2(config)# router rip
R2(config-router)# passive-interface FastEthernet 0/0
X
Passive Interfaces
R2# show ip protocols
<output omitted>
Interface
Send
Recv
Triggered RIP Key-chain
Serial0/0/0
1
1 2
FastEthernet 0/0 no longer
Serial0/0/1
1
1 2
included
Automatic network summarization is in effect
Routing for Networks:
192.168.2.0
LAN network still included in
192.168.3.0
RIP updates that are sent
192.168.4.0
Passive Interface(s):
FastEthernet 0/0 is a passive interface
FastEthernet0/0
Routing Information Sources:
Gateway
Distance
Last Update
192.168.2.1
120
00:00:27
192.168.4.1
120
00:00:23
Distance: (default is 120)
5.4 Automatic Summarization
55
5.4.1 Modified Topology: Scenario B
ƒ Modified Topology
56
Modified Topology: Scenario B
192.168.4.0/24
172.30.0.0/16
192.168.5.0/24
.10
z Where is the separation of classful networks?
z Summarizing several routes into a single route is known as route
summarization or route aggregation.
z Fewer routes = smaller routing tables = faster lookups
z Some routing protocols, such as RIP, automatically summarize
routes on certain routers.
Modified Topology: Scenario B
192.168.4.0/24
172.30.0.0/16
192.168.5.0/24
z What are the classful z How is 172.30.0.0/16
network subnetted?
networks?
y 172.30.1.0/24
y 172.30.0.0/16
y 172.30.2.0/24
y 192.168.4.0/24
y 172.30.3.0/24
y 192.168.5.0/24
z Is 192.168.4.0/24
subnetted?
y 192.168.4.8/30.
5.4.1 Modified Topology: Scenario B
ƒ Configuration
59
5.4.1 Modified Topology: Scenario B
ƒ Configuration note
ƒ R1 and R2 is technically incorrect since RIPv1 sends the
classful network address in its updates and not the subnet.
ƒ Therefore, the IOS changed the configuration to reflect the
correct, classful configuration, as can be seen with the
show run output.
ƒ 注: 在评估和认证考试中,在 network 命令中输入子网地址
(而不是有类网络地址)将被判错。
60
5.4.2 Boundary routers and Automatic Summarization
ƒ Boundary Routers:R2 has interfaces in more than one major classful
network. This makes R2 a boundary router in RIP
ƒ RIP automatically summarizes classful networks
ƒ Boundary routers summarize RIP subnets from one major network to another.
ƒ 因为边界路由器总结从一个主网到另一个主网的 RIP 子网,所以当从
R2 的 Serial 0/0/1 接口发送更新时,有关 172.30.1.0、172.30.2.0 和
172.30.3.0 网络的更新将自动总结到 172.30.0.0。
61
Boundary Routers and Automatic Summarization
z RIP is a classful routing protocol that automatically summarizes
classful networks across major network boundaries.
z Does R2 have interfaces on more than one major classful network?
y Yes, 172.30.0.0 and 192.168.4.0
z This makes R2 a boundary router in RIP.
z Boundary routers summarize RIP subnets from one major network to the
other:
y 172.30.1.0, 172.30.2.0, and 172.30.3.0 networks automatically
summarized into 172.30.0.0 when sent out R2’s Serial 0/0/1 interface.
Processing RIP Updates
R2# show ip route
172.30.0.0/24 is subnetted, 3 subnets
R
172.30.1.0 [120/1] via 172.30.2.1, 00:00:18, Serial0/0/0
C
172.30.2.0 is directly connected, Serial0/0/0
C
172.30.3.0 is directly connected, FastEthernet0/0
192.168.4.0/30 is subnetted, 1 subnets
C
192.168.4.8 is directly connected, Serial0/0/1
R
192.168.5.0/24 [120/1] via 192.168.4.10, 00:00:16, Serial0/0/1
z Do Classful routing protocols such as RIPv1 include the subnet
mask in the routing update.
y No.
z So how does a router running RIPv1 determine what subnet mask it
should apply to a route when adding it to the routing table?
5.4.3 Rules for Processing RIPv1 Updates
Routing Update and Interface
Same Classful Major Network
Different Classful Major Network
Routing Update Subnet Mask
Use mask of interface
Use default classful mask
z The following two rules govern RIPv1 updates:
y If a routing update and the interface on which it is received
belong to the same major network, the subnet mask of the
interface is applied to the network in the routing update.
y If a routing update and the interface on which it is received
belong to different major networks, the classful subnet mask
of the network is applied to the network in the routing update..
5.4.3 Processing RIP Updates
ƒ
以下两条规则控制着 RIPv1 更新:
– 如果某条路由更新及其接收接口属于
相同的主网,则在路由更新中对该网
络应用该接口的子网掩码。
– 如果某条路由更新及其接收接口属于
不同的主网,则在路由更新中对该网
络应用网络的有类子网掩码。
ƒ
ƒ
Detail to 5.4.3 示例
说明 next
66
Example of RIPv1 Processing Updates
R2# debug ip rip (selected output)
RIP: received v1 update from 172.30.2.1 on Serial0/0/0
172.30.1.0 in 1 hops
R2# show ip route (selected output)
172.30.0.0/24 is subnetted, 3 subnets
R
172.30.1.0 [120/1] via 172.30.2.1, 00:00:18, Serial0/0/0
z Same classful network as the
incoming update.
z Update: 172.30.1.0 in 1 hops
z Interface received:
y Serial 0/0/0 - 172.30.2.2/24
z Same classful network address
(172.30.0.)
z Applies subnet mask of its S0/0/0
interface, /24.
z The 172.30.1.0 /24 subnet was
added to the routing table.
172.30.2.2/24
172.30.1.0
R2# debug ip rip
RIP protocol debugging is on
RIP: sending v1 update to 255.255.255.255 via Serial0/0/0 (172.30.2.2)
RIP: build update entries
network 172.30.3.0 metric 1
network 192.168.4.0 metric 1
network 192.168.5.0 metric 2
RIP: sending v1 update to 255.255.255.255 via Serial0/0/1 (192.168.4.9)
RIP: build update entries
network 172.30.0.0 metric 1
Sending RIP Updates
192.168.4.0/24
192.168.5.0/24
Sending RIP Updates
172.30.3.0
192.168.4.0
192.168.5.0
172.30.0.0
Determining the mask and network address
z Receiving an Update: Determining subnet mask for routing table
y What is the major classful network address of the receiving interface?
y What is the major classful network address of the network in the routing
update?
y Are they the same major classful network address?
y Yes: Apply subnet mask of the receiving interface for this network
address in the routing table.
y No: Apply classful subnet mask for this network address in the
routing table.
z Sending an Update: Determining whether or not to summarize route sent
y What is the major classful network address of the sending interface?
y What is the major classful network address of the network in the routing
update?
y Are they the same major classful network address?
y Yes: Send subnet network address
y No: Send summary address – the classful network address
Verifying Routing Updates
R1# show ip route
<output omitted>
Gateway of last resort is not set
172.30.0.0/24 is subnetted, 3 subnets
C
172.30.1.0 is directly connected, FastEthernet0/0
C
172.30.2.0 is directly connected, Serial0/0/0
R
172.30.3.0 [120/1] via 172.30.2.2, 00:00:17, Serial0/0/0
R
192.168.4.0/24 [120/1] via 172.30.2.2, 00:00:17, Serial0/0/0
R
192.168.5.0/24 [120/2] via 172.30.2.2, 00:00:17, Serial0/0/0
R3# show ip route
<output omitted>
Gateway of last resort is not set
R
172.30.0.0/16 [120/1] via 192.168.4.9, 00:00:15, Serial0/0/1
192.168.4.0/30 is subnetted, 1 subnets
C
192.168.4.8 is directly connected, Serial0/0/1
C
192.168.5.0/24 is directly connected, FastEthernet0/0
5.4.4 Sending RIP Updates
ƒ RIP uses automatic
summarization to reduce
the size of a routing table.
ƒ 当发送更新时,边界路由器
R2 会在更新中包含网络地址
和相关度量。对于更新中的
路由条目而言,如果发往的
主网与其所属的主网不同,
则路由条目中的网络地址将
总结为有类网络地址(或称
主网地址)。如 R2 对
192.168.4.0 和 192.168.5.0
所执行的操作。R2 会将这些
有类网络发送到 R1。
ƒ 同样在 R2 通过 Serial0/0/1
发往 R3 的路由更新中,R2
只会发送总结为有类网络地
址 172.30.0.0 的路由。
ƒ Detail 课本解释
72
5.4.5 Advantages and Disadvantage of
Automatic Summarization
ƒ RIP is a classful routing protocol that automatically summarizes
classful networks across major network boundaries.
ƒ 有类路由协议,如RIPv1,不允许你改变自动汇总这一行为;
ƒ 但是无类路由协议,如RIPv2,允许关闭自动汇总。
73
5.4.5 Advantages and Disadvantage of
Automatic Summarization
Advantages:
ƒ The size of routing updates is reduced
ƒ Single routes are used to represent multiple routes which results in
faster lookup in the routing table.
74
5.4.5 Advantages and Disadvantage of
Automatic Summarization
Disadvantage:
ƒ Does not support discontiguous networks
ƒ R1 和 R3 实质上是 172.30.0.0/16 的边界路由器,因为它们被另一个主网
209.165.200.0/24 隔离开来。由于两组 172.30.0.0/24 子网被至少一个其它主网
分隔,因此便生成不连续网络。172.30.0.0/16 是一个不连续网络。
75
5.4.5 Advantages and Disadvantage of
Automatic Summarization
Discontiguous Topologies do not Converge with RIPv1:flash 5.4.5.3
ƒ A router will only advertise major network addresses out interfaces that do not belong to
the advertised route.
ƒ RIPv1 配置是正确的,但它却无法确定不连续拓扑结构中的所有网络。原因是:
路由器只会将主网地址通告从不属于所通告路由的接口发出。
ƒ 结果:由于在路由更新中不包含子网掩码,所以 RIPv1 无法通告特定路
由信息来让路由器为 172.30.0.0/24 子网提供正确的路由。
76
Disadvantage of Automatic Summarization
172.30.0.0/16
172.30.0.0/16
z Discontiguous network, two or more subnets separated by at least
one other major network.
z 172.30.0.0/16 is a discontiguous network.
Discontiguous Networks Do Not Converge with RIPv1
R1(config)# router rip
R1(config-router)# network 172.30.0.0
R1(config-router)# network 209.165.200.0
R2(config)# router rip
R2(config-router)# network 10.0.0.0
R2(config-router)# network 209.165.200.0
R3(config)# router rip
R3(config-router)# network 172.30.0.0
R3(config-router)# network 209.165.200.0
z RIPv1 configuration is correct, but it is unable to determine all the
networks in this discontiguous topology.
Discontiguous Networks Do Not Converge with RIPv1
172.30.0.0
172.30.0.0
172.30.0.0/16
172.30.0.0/16
z What routing update will be sent by R1 and R3?
y 172.30.0.0 major network address, a summary route to R2.
Discontiguous Networks Do Not Converge with RIPv1
R1# show ip route
C
C
172.30.0.0/24 is subnetted, 3 subnets
172.30.1.0 is directly connected, FastEthernet0/0
172.30.2.0 is directly connected, FastEthernet0/1
R3# show ip route
C
C
172.30.0.0/24 is subnetted, 3 subnets
172.30.100.0 is directly connected, FastEthernet0/0
172.30.200.0 is directly connected, FastEthernet0/1
z What 172.30.0.0 networks/subnets do you expect to see in R1’s routing table?
z What 172.30.0.0 networks/subnets do you expect to see in R3’s routing table?
z Note: The book/curriculum mistakenly has the following routes for R1 and R3
(Book: Figure 5-15 and 5-17). These routes are NOT in the routing tables.
R1: R 172.30.0.0 [120/2] via 209.165.200.230, 00:00:26, Serial0/0/0
R3: R 172.30.0.0 [120/2] via 209.165.200.233, 00:00:22, Serial0/0/1
Discontiguous Networks Do Not Converge with RIPv1
R2# show ip route
R
172.30.0.0/16 [120/1] via 209.165.200.234, 00:00:14, Serial0/0/1
[120/1] via 209.165.200.229, 00:00:19, Serial0/0/0
R2# show ip route
R
172.30.0.0/16 [120/1] via 209.165.200.234, 00:00:14, Serial0/0/1
[120/1] via 209.165.200.229, 00:00:19, Serial0/0/0
172.30.0.0/16
z
z
172.30.0.0/16
R2 has two equal-cost paths to the 172.30.0.0 network.
What will R2 do when it receives traffic for a host on a 172.30.0.0 network ie. 172.30.200.10?
y R2 will load-balance traffic destined for any subnet of 172.30.0.0.
y This means that R1 will get half of the traffic and R3 will get the other half of the traffic,
whether or not the destination of the traffic is for one of their LANs.
Discontiguous Networks Do Not Converge with RIPv1
R2# show ip route
R
172.30.0.0/16 [120/1] via 209.165.200.234, 00:00:14, Serial0/0/1
[120/1] via 209.165.200.229, 00:00:19, Serial0/0/0
z Classful routing protocols do not support discontiguous networks because
they do not include the subnet mask in the routing update.
z Classless routing protocols (RIPv2, EIGRP, OSPF, IS-IS, BGP) do support
discontiguous networks.
LAB 5.4.5:RIP 中的自动路由总结
84
5.5 Default Route and RIPv1
85
5.5.1 Modified Topology: Scenario C
ƒ Modified Topology: Scenario C
ƒ Adding Internet Access to the Topology
ƒ 连接到 ISP 的客户路由器不需要 Internet 上所有路由的完整列表。这些路
由器上配置一条默认路由
86
5.5.1 Modified Topology: Scenario C
87
5.5.2 Propagating the Default Route in RIPv1
ƒ 缺省路由在动态路由中的传播 意义5.5.2 detail very good
–要在 RIP 路由域中为所有其它网络提供 Internet 连接,需要将默认静态路由通
告给使用该动态路由协议的其它所有路由器。您可以在 R1 上配置指向 R2 的静态
默认路由,但这种方法没有扩展性。每次向 RIP 路由域添加一台路由器,您都必
须另外配置一条静态默认路由。为什么不让路由协议帮您做这些工作呢?
ƒ Default-information originate command
–This command is used to specify that the router is to originate default
information, by propagating the static default route in RIP update.
–指定该路由器为默认信息的来源,由该路由器在 RIP 更新中传播静态默认路由
88
Propagating the Default Route in RIPv1
R1# show ip route
<output omitted>
Gateway of last resort is not set
172.30.0.0/24 is subnetted, 3 subnets
C
172.30.1.0 is directly connected, FastEthernet0/0
C
172.30.2.0 is directly connected, Serial0/0/0
R
172.30.3.0 [120/1] via 172.30.2.2, 00:00:05, Serial0/0/0
z Can configure static default route on every router but:
y inefficient
y does not react to topology changes
z In many routing protocols, including RIP, you can use the defaultinformation originate command in router configuration mode to specify
that this router is to originate default information, by propagating the
static default route in RIP updates.
Propagating the Default Route in RIPv1
R2(config)# router rip
R2(config-router)# default-information originate
R2(config-router)# end
R2# debug ip rip
RIP: sending v1 update to 255.255.255.255 via Serial0/0/0
(172.30.2.2)
RIP: build update entries
subnet 0.0.0.0 metric 1
subnet 172.30.3.0 metric 1
Propagating the Default Route in RIPv1
R1# show ip route
<output omitted>
* - candidate default, U - per-user static route, o - ODR
Gateway of last resort is 172.30.2.2 to network 0.0.0.0
172.30.0.0/24 is subnetted, 3 subnets
C
172.30.2.0 is directly connected, Serial0/0/0
R
172.30.3.0 [120/1] via 172.30.2.2, 00:00:16, Serial0/0/0
C
172.30.1.0 is directly connected, FastEthernet0/0
R*
0.0.0.0/0 [120/1] via 172.30.2.2, 00:00:16, Serial0/0/0
z The static default route on R2 has been propagated to R1 in a RIP update.
z R1 has connectivity to the LAN on R3 and any destination on the Internet.
5.6 RIPv1 Configuration Labs
92
实验室分组完成
ƒ PK5.3模拟
ƒ 实验室实现、测试
–实验 5.6.1:基本 RIP 配置(场景A、B、C)
–实验 5.6.2:RIP 配置练习(单独场景)
ƒ 排错,看懂
–实验 5.6.3:RIP 故障排除
93
实验5.6.1 基本RIP配置
94
实验5.6.1 基本RIP配置
95
实验5.6.1 基本RIP配置
ƒ 在将末节网络连接到中央总部路由器或 ISP 的大多数公司中,场景 C 是一种非常典
型的配置
–通常,公司会在本地网络内运行动态路由协议,但没必要在公司网关路由器和 ISP 之间
运行动态路由协议
–但使用指向 ISP 的默认路由来接入 Internet
–对 R3 而言,更为重要的是配置一条指向 R2 的有关 172.30.0.0/16 的静态路由。
96
实验5.6.2 :RIP 配置练习
ƒ 需要在 ISP 路由器上为目的 RFC 1918 地址属于 BRANCH LAN、HQ
LAN 以及 BRANCH 与 HQ 路由器之间链路的所有流量配置静态路由。
–ISP(config)# ip route 10.10.2.0 255.255.254.0 Serial0/0/1
–ISP(config)# ip route 192.168.1.0 255.255.255.0 Serial0/0/1
97
Summary
ƒ RIP characteristics include:
Classful, distance vector routing protocol
Metric is Hop Count
Does not support VLSM or discontiguous subnets
Updates every 30 seconds
ƒ Rip messages are encapsulated in a UDP segment with
source and destination ports of 520
98
Summary: Commands used by RIP
Command
Command’s purpose
Rtr(config)#router rip
Enables RIP routing process
Rtr(config-router)#network
Associates a network with a RIP routing process
Rtr#debug ip rip
used to view real time RIP routing updates
Rtr(config-router)#passive-interface fa0/0
Prevent RIP updates from going out an interface
Rtr(config-router)#default-information originate
Used by RIP to propagate default routes
Rtr#show ip protocols
Used to display timers used by RIP
99
Quiz
ƒ3
ƒ 6 discontiguous networks good
ƒ 10 show ip protocols
100
101
Download