目录
IS-IS实验8:IS-IS 路由引入
IS-IS 网络能够引入其他路由协议的路由和其他 IS-IS 协议进程的路由。默认情况下,IS-IS 总是以 level-2 路由类型引入外部路由。但是,通过手动配置,也可以以 level-1 路由类型引入外部路由。IS-IS 协议在引入外部路由时,可以手动配置引入路由的开销值,并可以使用 route-policy 对引入的路由进行过滤。
基本配置
R1:
undo ter mo
sys
sysname R1
user-interface console 0
idle-timeout 0 0
int g0/0/1
ip add 192.168.14.1 24
int g0/0/0
ip add 192.168.12.1 24
q
R2:
undo ter mo
sys
sysname R2
user-interface console 0
idle-timeout 0 0
int g0/0/0
ip add 192.168.12.2 24
int g0/0/1
ip add 192.168.23.2 24
q
R3:
undo ter mo
sys
sysname R3
user-interface console 0
idle-timeout 0 0
int loop 0
ip add 3.3.3.3 24
int g0/0/1
ip add 192.168.23.3 24
q
R4:
undo ter mo
sys
sysname R4
user-interface console 0
idle-timeout 0 0
int loop 0
ip add 4.4.4.4 24
int loop 1
ip add 44.44.44.44 24
int g0/0/0
ip add 192.168.14.4 24
q
配置 OSPF IS-IS协议,R3环回口通过引入的方向,放到IS-IS协议中
R1:
ospf router-id 1.1.1.1
area 0
net 192.168.14.1 0.0.0.0
q
isis
network-entity 10.0000.0000.0001.00
is-name R1
is-level level-1
int g0/0/0
isis enable
q
R2:
isis
network-entity 10.0000.0000.0002.00
is-name R2
int g0/0/0
isis enable
isis circuit-level level-1
int g0/0/1
isis enable
isis circuit-level level-2
q
R3:
isis
network-entity 20.0000.0000.0003.00
is-name R3
is-level level-2
int g0/0/1
isis enable
q
R4:
ospf router-id 4.4.4.4
area 0
net 192.168.14.4 0.0.0.0
net 4.4.4.4 0.0.0.0
net 44.44.44.44 0.0.0.0
q
========
引入外部直连路由
R3:
isis
import-route direct
<R3>display isis route
默认,IS-IS 以Level-2 路由类型来引入外部路由,被引入路由的IntCost 、ExtCost 值均为 0,开销类型为External
在R2 上查看IS-IS路由表
在路由表中,显示为 74
对于 External 类型的 cost ,在 IP 路由表中的 cost 值的计算方法为,64+ IS-IS 路由表中的 IntCost+ IS-IS 路由表中的 ExtCost.
External 的cost 计算方法:
64+ Incost +ExtCost= 64+10+0=74
R1可以ping 通 R3
<R1>ping 3.3.3.3
引入外部OSPF路由
在R1 上以cost 类型为 Internal 的方式将OSPF协议引入到IS-IS中,引入时InCost 改为 30, 引入时改为 level-1
R1:
isis
import-route ospf 1 level-1 cost-type internal cost 30
R2 上查看 IS-IS 路由表
R2上能看到引入的路由
========
使用route-policy 控制路由的引入
只要求R4 的 4.4.4.4 引入IS-IS
R1:
acl 2000
rule permit source 4.4.4.0 0.0.0.255
route-policy 10 permit node 1
if-match acl 2000
isis
import-route ospf 1 route-policy 10 level-1 cost-type internal cost 30
在R2上查看一下,只有 4.4.4.4 引入了
========
为了让 R4 与 R3 的环回口可以相互 ping 通,在 R1 上通过OSPF 下放默认路由
R1:
ospf
default-route-advertise
检测连通性
R4:
ping -a 4.4.4.4 3.3.3.3