八宝书库 > 文学其他电子书 > 路由器基本知识及应用实例(DOC格式) >

第5部分

路由器基本知识及应用实例(DOC格式)-第5部分

小说: 路由器基本知识及应用实例(DOC格式) 字数: 每页4000字

按键盘上方向键 ← 或 → 可快速上下翻页,按键盘上的 Enter 键可回到本书目录页,按键盘上方向键 ↑ 可回到本页顶部!
————未阅读完?加入书签已便下次继续阅读!



配置ISIS链路状态尺度

任务
命令

为特定接口设置尺度(或开销)
isis metric default…metric {level…1 | level…2 }

设置通告hello间隔

任务
命令

指定Cisco系统在接口上发送hello包之间的时间长度(秒)
isis hello…interval seconds {level…1 | level…2 }

设置hello乘数

任务
命令

设置hello乘数
isis hello…multiplier multiplier {level…1 | level…2}

指定接口环路类型

任务
命令

为特定接口上的邻居配置期望的邻居类型
isis circuit…type {level…1 | level…2 | level…2…only}

为接口分配密钥

任务
命令

为特定接口配置验证密钥
isis password password {level…1 | level…2}


配置混合ISIS参数
产生默认路由

任务
命令

强制产生到ISIS路由选择域的默认路由
default…information originate 'route…map map…name'

指定系统类型

任务
命令

配置系统类型(区域或主干路由器)
is…type {level…1 | level…2 | level…2…only }

汇总地址范围

任务
命令

为给定级别建立汇总地址
summary…address address mask {level…1 | level…1…2 | level…2 }

设置超载位

任务
命令

设置超载位
set…overload…bit


监视ISIS

任务
命令
第一步
显示ISIS链路状态数据库
show isis database 'level…1''level…2''l1''l2''detail''lspid'
第二步
显示路由器进行全SPF计算的频度和原因
shoe isis spf…log 



配置静态路由

任务
命令

配置静态路由
ip route prefix mask {ip…address | interface…type interface…number 'ip…address'} 'distance' 'name' 'permanent | track number' 'tag tag'


2。2。3 业务配置
2。2。3。1 配置MPLS
1。 搭建和通常一样的网络 (MPLS 需要一个标准的IP连接来建立转发表)
2。 确保路由协议工作正常(OSPF 或 IS…IS)。
3。 在配置模式下,使用 ip cef 命令 (对于分布式的平台,为了更好的性能,可以用 ip cef distributed )。
4。 在配置模式和每个接口中,使用 mpls ip 命令(以前的IOS版本是 tag…switching ip 命令)。
注:  LSR 路由器必须配置 Loopback 接口,并使用32位掩码。
配置案例
Current configuration:

version 12。2

hostname Pomerol

ip cef

!……Enables Cisco Express Forwarding globally。


interface Loopback0
 ip address 10。10。10。3 255。255。255。255
 ip router isis 

!……Assigns an IP address to interface loopback0 
!……and enables IS…IS for IP on the interface。


interface Serial0/0
 encapsulation frame…relay

interface Serial0/0。1 point…to…point
 ip address 10。1。1。6 255。255。255。252
 ip router isis   
 tag…switching ip

!……Enables dynamic Label Switching of 
!……IPv4 packets on an interface。

 frame…relay interface…dlci 301   

interface Serial0/0。2 point…to…point
 ip address 10。1。1。9 255。255。255。252
 ip router isis  
 tag…switching ip
 frame…relay interface…dlci 303   

interface Serial0/0。3 point…to…point
 ip address 10。1。1。21 255。255。255。252
 ip router isis 
 tag…switching ip
 frame…relay interface…dlci 306   

router isis  
 net 49。0001。0000。0000。0003。00
 is…type level…1

ip classless

end


2。2。3。2 配置MPLS TE
1。 利用通常配置搭建你的网络 (这里我们以Frame Relay为例)。注:必须建立一个具有32位掩码的 loopback 接口。这个地址将用于路由协议建立MPLS 网络和TE。这个地址必须在全局的路由表中可达。 
2。 为MPLS网络建立路由协议。协议必须是链路状态协议 (IS…IS 或 OSPF)。在路由协议配置模式下,键入: 
o 对于 IS…IS: 
o      metric…style wide (or metric…style both) 
o      mpls traffic…eng router…id LoopbackN 
     mpls traffic…eng 'level…1 | level…2 |'
o 对于 OSPF: 
o      mpls traffic…eng area X 
     mpls traffic…eng router…id LoopbackN (must have a 255。255。255。255 mask)
3。 开启MPLS TE。在配置模式下键入 ip cef (或 ip cef distributed) 。在每个接口上开启MPLS (tag…switching ip),并键入 mpls traffic…engineering tunnel 开启MPLS TE。
4。 在相应的接口下使用 ip rsvp bandwidth XXX 开启RSVP。 
5。 建立用于TE的隧道。在配置MPLS TE 隧道时,有许多选项,但命令 tunnel mode mpls traffic…eng 是必须的。命令tunnel mpls traffic…eng autoroute announce 则向路由协议宣告隧道的存在。
注: 不要忘记在隧道接口上使用 ip unnumbered loopbackN
配置案例
下面的例子使用显式(explicit…path)路径建立Tunnel:
Current configuration:
 !
 version 12。1
 !
 hostname Pesaro
 !
 ip cef
 mpls traffic…eng tunnels
 !
 interface Loopback0
  ip address 10。10。10。6 255。255。255。255
  ip router isis 
 !
 interface Tunnel158
  ip unnumbered Loopback0
  tunnel destination 10。10。10。4
  tunnel mode mpls traffic…eng
  tunnel mpls traffic…eng autoroute announce
  tunnel mpls traffic…eng priority 2 2
  tunnel mpls traffic…eng bandwidth 158
  tunnel mpls traffic…eng path…option 1 explicit name low
 !
 interface Tunnel159
  ip unnumbered Loopback0
  tunnel destination 10。10。10。4
  tunnel mode mpls traffic…eng
  tunnel mpls traffic…eng autoroute announce
  tunnel mpls traffic…eng priority 4 4
  tunnel mpls traffic…eng bandwidth 159
  tunnel mpls traffic…eng path…option 1 explicit name straight
 !
 interface Serial0/0
  no ip address
  encapsulation frame…relay
 !
 interface Serial0/0。1 point…to…point
  bandwidth 512
  ip address 10。1。1。22 255。255。255。252
  ip router isis 
  tag…switching ip
  mpls traffic…eng tunnels 
  frame…relay interface…dlci 603   
 ip rsvp bandwidth 512 512
 !
 router isis 
  net 49。0001。0000。0000。0006。00
  is…type level…1
  metric…style wide
  mpls traffic…eng router…id Loopback0
  mpls traffic…eng level…1
 !
 !
 ip classless
 !
 ip explicit…path name low enable
  next…address 10。1。1。21 
  next…address 10。1。1。10 
  next…address 10。1。1。1 
  next…address 10。1。1。14 
 !
 ip explicit…path name straight enable
  next…address 10。1。1。21 
  next…address 10。1。1。5 
  next…address 10。1。1。14 
 !
 end

下面的例子使用动态的路径建立Tunnel:
Current configuration:
 !
 version 12。0
 !
 hostname Pescara
 !

 ip cef
 !
 mpls traffic…eng tunnels
 !
 interface Loopback0
  ip address 10。10。10。4 255。255。255。255
  ip router isis 
 !
 interface Tunnel1
  ip unnumbered Loopback0

  tunnel destination 10。10。10。6
  tunnel mode mpls traffic…eng
  tunnel mpls traffic…eng autoroute announce
  tunnel mpls traffic…eng priority 5 5
  tunnel mpls traffic…eng bandwidth 25
  tunnel mpls traffic…eng path…option 2 dynamic
 !
 interface Tunnel3
  ip unnumbered Loopback0

  tunnel destination 10。10。10。6
  tunnel mode mpls traffic…eng
  tunnel mpls traffic…eng autoroute announce
  tunnel mpls traffic…eng priority 6 6
  tunnel mpls traffic…eng bandwidth  69
  tunnel mpls traffic…eng path…option 1 dynamic
 !
 interface Serial0/1
  no ip address
  encapsulation frame…relay
 !
 interface Serial0/1。1 point…to…point
  bandwidth 512
  ip address 10。1。1。14 255。255。255。252

  ip router isis 
  mpls traffic…eng tunnels
  tag…switching ip
  frame…relay interface…dlci 401   
  ip rsvp bandwidth 512 512
 !
 router isis 
  net 49。0001。0000。0000。0004。00
  is…type level…1
  metric…style wide
  mpls traffic…eng router…id Loopback0
  mpls traffic…eng level…1
 !
 end


2。2。3。3 配置MPLS VPN须完成的任务
* 定义 VPN
* 配置 PE 到 PE 的BGP路由协议会话
* 配置 PE 到 CE 的BGP路由协议会话
* 配置 PE 到 CE 的RIP路由协议会话
* 配置 PE 到 CE 的静态路由
* 验证
定义 VPN
在PE路由器上完成以下配置来定义VPN路由:
步骤 
配置命令
作用
1。
Router(config)# ip vrf vrf…name
进入VRF配置模式,定义VPN,并命名VRF。
2。
Router(config…vrf)# rd route…distinguisher
生成路由和转发表
3。
Router(config…vrf)# route…target {import | export | both} route…target…ext…munity
生成VRF的输入和/或输出的路由目标团体(route target munities)
4。
Router(config…vrf)# import map route…map 
(选项) 关联特定的路由图(route map)到 VRF
5。
Router(config…if)# ip vrf forwarding vrf…name 
关联特定接口(子接口)和VRF
配置PE 到 PE BGP路由会话
在营运商的网络中,完成以下任务来配置PE到PE的BGP路由会话:
步骤 
配置命令
作用
1。
Router(config)# router bgp autonomous…system
配置 IBGP 路由进程
2。
Router(config…router)# neighbor {ip…address | peer…group…name} remote…as number
指定对端的邻居的IP地址或IBGP 对等组。
3。
Router(config…router)# neighbor ip…address activate
激活IPv4 address family
配置PE到CE的BGP路由协议
完成以下步骤,配置PE到CE的BGP路由协议:
步骤 
命令
作用
1。
Router(config)# router bgp autonomous…system 
配置一个EBGP路由进程
2。
Router(config…router)# neighbor {ip…address | peer…group…name} remote…as number
指定一个邻居的IP 地址或EBGP对等组
3。
Router(config…router)# neighbor ip…address activate
激活 IPv4 address family。
配置PE到CE的RIP路由协议
完成以下步骤,配置PE到CE的RIP路由协议:
步骤 
配置命令
作用
1。
Router(config)# router rip
开启 RIP。
2。
Router(config…router)# address…family ipv4 'unicast' vrf vrf…name
定义PE到CE之间的RIP协议的参数。
注: 缺省状态下, VRF的auto…summary 和 synchronization处于关闭状态。。
3。
Router(config…router)# network prefix
在PE到CE的链路上开启RIP。
配置PE到CE的静态路由会话
完成以下步骤,配置PE到CE的静态路由会话:
步骤 
配置命令
作用
1。
Router(config)# ip route vrf vrf…name
定义PE到CE的静态路由参数;
2。
Router(config…router)# address…family ipv4 'unicast' vrf vrf…name
在BGP中,定义PE到CE之间的静态路由会话的参数。
注: 缺省状态下, VRF的auto…summary 和 synchronization处于关闭状态。
3。
Router(config…router)# redistribute static
将VRF静态路由注入到VRF的BGP表中;
4。
Router(config…router)# redistribute static connected
将直连端口注入到VRF BGP 表中。
验证VPN 
通过以下命令验证VPN运行:
步骤 
配置命令 
作用
1。
Router# show ip vrf
显示所定义的VRF和接口的集合;
2。
Router# show ip vrf '{brief | detail | interfaces}' vrf…name 
显示所定义的VRF和关联的接口的信息;
3。
Router# show ip route vrf vrf…name 
显示某个VRF的IP路由表;
4。
Router# show ip protocols vrf vrf…name 
显示某个VRF的路由协议信息;
5。
Router# show ip cef vrf vrf…name 
显示某VRF的CEF转发表;
6。
Router# show ip interface interface…number 
显示关联某接口的VRF表;
7。
Router# show ip bgp vpnv4 all 'tags'
显示所有BGP的信息;
8。
Router# show tag…switching forwarding vrf vrf…name 'prefix mask/length''detail'
显示某VRF由本地路由器宣告的标记转发项;
配置案例
以下是一个PE路由器的配置案例。
ip cef distributed ! CEF switching is pre…requisite for label Switching
frame…relay switching

ip vrf vrf1 ! Define VPN Routing instance vrf1
rd 100:1
route…target both 100:1 ! Configure import and export route…targets for vrf1

ip vrf vrf2 ! Define VPN Routing instance vrf2
rd 100:2
route…target both 100:2 ! Configure import and export route…targets for vrf2
route…target import 100:1 ! Configure an additional import route…target for vrf2
import map vrf2_import !

返回目录 上一页 下一页 回到顶部 0 0

你可能喜欢的