友情提示:如果本网页打开太慢或显示不完整,请尝试鼠标右键“刷新”本网页!
第三电子书 返回本书目录 加入书签 我的书架 我的书签 TXT全本下载 『收藏到我的浏览器』

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

快捷操作: 按键盘上方向键 ← 或 → 可快速上下翻页 按键盘上的 Enter 键可回到本书目录页 按键盘上方向键 ↑ 可回到本页顶部! 如果本书没有阅读完,想下次继续接着阅读,可使用上方 "收藏到我的浏览器" 功能 和 "加入书签" 功能!

  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 ! Configure import route…map for vrf2

interface lo0
ip address 10。13。0。13 255。255。255。255

interface atm9/0/0 ! Backbone link to another Provider router

interface atm9/0/0。1 tag…switching
ip unnumbered loopback0
no ip directed…broadcast
tag…switching atm vpi 2…5
tag…switching ip
interface atm5/0
no ip address
no ip directed…broadcast
atm clock INTERNAL
no atm ilmi…keepalive
interface Ethernet1/0
ip address 3。3。3。5 255。255。0。0
no ip directed…broadcast
no ip mroute…cache
no keepalive
interface Ethernet5/0/1 ! Set up Ethernet interface as VRF link to a CE router
ip vrf forwarding vrf1
ip address 10。20。0。13 255。255。255。0

interface hssi 10/1/0
hssi internal…clock
encaps fr
frame…relay intf…type dce
frame…relay lmi…type ansi

interface hssi 10/1/0。16 point…to…point
ip vrf forwarding vrf2
ip address 10。20。1。13 255。255。255。0
frame…relay interface…dlci 16 ! Set up Frame Relay PVC subinterface as link to another
! ! CE router
router bgp 1 ! Configure BGP sessions
no synchronization
no bgp default ipv4…activate ! Deactivate default IPv4 advertisements
neighbor 10。15。0。15 remote…as 1 ! Define IBGP session with another PE
neighbor 10。15。0。15 update…source lo0

address…family vpnv4 unicast ! Activate PE exchange of VPNv4 NLRI
neighbor 10。15。0。15 activate
exit…address…family

address…family ipv4 unicast vrf vrf1 ! Define BGP PE…CE session for vrf1
redistribute static
redistribute connected
neighbor 10。20。0。60 remote…as 65535
neighbor 10。20。0。60 activate
no auto…summary
exit…address…family

address…family ipv4 unicast vrf vrf2 ! Define BGP PE…CE session for vrf2
redistribute static
redistribute connected
neighbor 10。20。1。11 remote…as 65535
neighbor 10。20。1。11 update…source h10/1/0。16
neighbor 10。20。1。11 activate
no auto…summary
exit…address…family

! Define a VRF static route
ip route vrf vrf1 12。0。0。0 255。0。0。0 e5/0/1 10。20。0。60

route…map vrf2_import permit 10 ! Define import route…map for vrf2。

2。2。4 日常维护
2。2。4。1 密码的恢复
恢复密码的请按如下步骤进行:
1。 用控制线连接终端机(或PC)和路由器的控制口。 
使用下面配置: 
o 9600 baud rate 
o No parity 
o 8 data bits 
o 1 stop bit 
o No flow control 

2。 如果还可以访问路由器; 用 show version 察看系统配置信息,并记录配置寄存器的地址,一般情况下,该地址为 0x2102 或 0x102。 
3。 如果不能够访问寄存器(因为没有登陆口令),则可以先假设配置寄存器的地址是0x2102,即使不对,也不会有什么问题。 
4。 按电源键关闭路由器,然后再打开。
5。 打开路由器电源60秒内,在仿真终端上使用Break Sequence 的组合键(ctrl…break),使路由器进入ROMMON。 
6。 在rommon 1》提示符后键入confreg 0x2142 使路由器从Flash启动,跳过 startup…configuration(密码就存在这里)
7。 在rommon 2》 提示符后渐入reset。 
8。 当系统询问:〃Would you like to enter the initial configuration dialog?'yes/no'〃, 键入 no 。
9。 在Router》提示符后键入enable。 
10。 键入configure memory 或者copy startup…config running…config ,将NVRAM 的内容拷贝到内存中。
特别注意: 不要键入 copy running…config startup…config 或者 write 命令,这会将路由器的配置清除。 
11。 键入 configure terminal 重新配置口令。 
12。 键入 enable secret  配置 enable secret 口令;例如: 
hostname(config)#enable secret cisco

13。 对应该正常开启的端口使用no shutdown 命令。 
14。 键入config…register 0x2102 (这个地址应该是在第二步中记录的地址) 
15。 使用Ctrl…z 或键入 end 离开配置模式 
16。 键入 write memory 或 copy running…config startup…config,保存配置。 
密码恢复过程示例 
Router》enable
Password:
Password:
Password:
% Bad secrets

Router》show version
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600…I…M); Version 12。3(3a); RELEASE SOFTWARE (fc2)
Copyright (c) 1986…2003 by cisco Systems; Inc。
piled Wed 15…Oct…03 02:21 by phanguye
Image text…base: 0x80008088; data…base: 0x80C524F8

ROM: System Bootstrap; Version 11。3(2)XA4; RELEASE SOFTWARE (fc1)

Router uptime is 3 minutes
System returned to ROM by abort at PC 0x802D0B60
System image file is 〃flash:c2600…i…mz。123…3a。bin〃〃

cisco 2611 (MPC860) processor (revision 0x202) with 26624K/6144K bytes of memory。
Processor board ID JAB031202NK (3878188963)
M860 processor: part number 0; mask 49
Bridging software。
X。25 software; Version 3。0。0。
Basic Rate ISDN software; Version 1。1。
2 Ethernet/IEEE 802。3 interface(s)
2 Serial(sync/async) network interface(s)
1 ISDN Basic Rate interface(s)
32K bytes of non…volatile configuration memory。
8192K bytes of processor board System flash partition 1 (Read/Write)
8192K bytes of processor board System flash partition 2 (Read/Write)

Configuration register is 0x2102

Router》



!……The router was just powercycled and during bootup a


!……break sequence was sent to the router。




*** System received an abort due to Break Key ***

signal= 0x3; code= 0x500; context= 0x813ac158
PC = 0x802d0b60; Vector = 0x500; SP = 0x80006030
rommon 1 》 confreg 0x2142

You must reset or power cycle for new config to take effect

rommon 2 》 reset

System Bootstrap; Version 11。3(2)XA4; RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems; Inc。
TAC:Home:S
返回目录 上一页 下一页 回到顶部 1 1
快捷操作: 按键盘上方向键 ← 或 → 可快速上下翻页 按键盘上的 Enter 键可回到本书目录页 按键盘上方向键 ↑ 可回到本页顶部!
温馨提示: 温看小说的同时发表评论,说出自己的看法和其它小伙伴们分享也不错哦!发表书评还可以获得积分和经验奖励,认真写原创书评 被采纳为精评可以获得大量金币、积分和经验奖励哦!