第五章:管理Cisco IOS软件
5.1 路由器的启动顺序和验证
没有Cisco IOS,Cisco路由器就无法运行。每天Cisco路由器都有一个定位和加载IOS的预定义启动顺序。
5.1.1 路由器加电启动顺序的阶段
路由器的初始化是通过加载引导程序(boot-strap)、操作系统和一个配置文件来进行的。如果路由器找不到配置文件,它将进入设置模式。
Cisco IOS软件启动例程的目的是为了启动路由器的所有操作。路由器根据配置连接用户网络时,必须提供可靠的性能。为了达到这个目的,启动例程必须完成以下几个内容:
1. 确定路由器加载了ROM。
2. 找到并加载用于路由器操作系统的Cisco IOS软件映像。
3. 找到并应用包括协议功能和接口地址的配置语句。
更多信息:POST
一个Cisco路由器加电时,执行加电自检(POST)。在自检过程中,路由器执行ROM中的诊断程序,检查所有的硬件模块。这些诊断程序检查CPU、内存和网络接口的基本操作。检验硬件功能后,路由器进行软件初始化。
5.1.2 定位和加载Cisco IOS软件
Cisco IOS软件启动的默认来源取决于硬件平台。但是路由器通常会去查看存放在NVRAM中的boot system命令。
配置寄存器中的设置允许以下这些选择:
• 可以通过指定全局配置模式下的boot system命令,按后退顺序输入路由器所使用的来源。当路由器重启后,它会在必要时按顺序使用这些命令。
• 如果NVRAM总没有设置路由器可用的boot system命令,系统将缺省使用闪存(flash memory)中保存的Cisco IOS软件。
• 如果闪存flash为空,路由器接下来尝试使用TFTP从网络上加载IOS软件映像。此时,路由器使用配置寄存器的值构建一个文件名,该文件名可以用来引导一个存储在网络服务器上的缺省系统映像。
• 如果TFTP服务器无效,路由器将装载存储在ROM下的受限版本的Cisco IOS软件映像。
5.1.3 使用boot system命令
可以输入多个boot system命令来指定引导Cisco IOS软件的后退顺序。下例子中显示的boot system命令指定Cisco IOS软件映像首先从闪存中加载,其次是从网络服务器加载,最后是从ROM加载。
!
boot-start-marker
boot system flash unzip-c2691-advsecurityk9-mz.124-11.T2.bin
boot system tftp IOS-image 10.1.1.1
boot system flash rom
boot-end-marker
!
1,从闪存引导
从闪存引导包括从可电擦除可编程只读存储器EEPROM中加载一个系统映像。优点是存储在闪存中的信息不易受到网络故障的攻击,而那些完了过故障会从TFTP服务器加载系统映像时发生。
Router(config)#boot system flash IOS-image
2,从网络服务器引导
在闪存损坏的情况下,系统映像可以通过指定从TFTP服务器加载的方式提供一个备份。上面例子是指定从IP地址为10.1.1.1的TFTP服务器加载映像文件IOS-image。
3,从ROM引导
如果前两种方法加载系统映像失败,那么从ROM引导是软件中最后一个引导程序选项。但是,ROM中的系统映像是Cisco IOS软件的一个子集,这个子集缺少完整 Cisco IOS软件所拥有的协议、特性和配置。
5.1.4 配置寄存器
路由器加载Cisco IOS软件时,寻找Cisco IOS软件映像的顺序取决于配置寄存器中设置的引导字段。
更改配置寄存器的引导字段:
Router(config)#config-register ?
<0x0-0xffff> Config register number
Router(config)#config-register 0x2102
Router(config)#
配置寄存器的设置是让路由器为引导系统选项检查保存在NVRAM中的启动文件。配置寄存器是NVRAM中的一个16位寄存器。配置寄存器的低四位是引导字段。
0x2100 使用ROM监视器模式
0x2101 根据不同平台自动从ROM引导受限的IOS或启动闪存中第一个映像。
0x2102~0x210f 检查NVRAM中的boot system命令。如果没有,路由器将尝试从闪存中的第一个文件启动。
5.1.5 排除IOS启动故障
如果路由器无法正确启动,可能有几方面出了问题:
• 配置文件丢失或者 boot system语句不对。
• 不正确的配置寄存器值。
• 闪存映像损坏。
• 硬件故障。
路由器启动时,它会在启动配置文件中查找boot system语句。该boot system语句可以强制路由器从其他映像中启动,而不是闪存中的IOS。要识别出启动映像源,输入show version命令并查看标识映像启动源的行:
Router#sh version
Cisco IOS Software, 7200 Software (C7200-ADVIPSERVICESK9-M), Version 12.4(9)T1, RELEASE
SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Wed 30-Aug-06 20:48 by prod_rel_team
ROM: ROMMON Emulation Microcode
BOOTLDR: 7200 Software (C7200-ADVIPSERVICESK9-M), Version 12.4(9)T1, RELEASE SOFTWARE (fc2)
Router uptime is 31 minutes
System returned to ROM by unknown reload cause - suspect boot_data[BOOT_COUNT] 0x0,
BOOT_COUNT 0, BOOTDATA 19
System image file is "tftp://255.255.255.255/unknown"
5.2 管理Cisco文件系统
Cisco互联网络设备运行时使用多个不同的文件,包括IOS映像和配置文件。系统网络能平稳可靠运行的网络管理员必须小心地管理这些文件,确保使用合适的版本并执行必需的备份。
5.2.3 使用TFTP管理配置文件
在TFTP服务器上备份启动配置:
Router#copy startup-config tftp:
Address or name of remote host []? 10.1.1.1
5.2.6 使用ROMmon管理IOS映像
如果闪存中的Cisco IOS软件映像已经被删除或者损坏,你也许需要从ROM监视器模式(ROMmon)下恢复 Cisco IOS软件映像。在很多的Cisco硬件系统结构中,ROMmon模式是通过提示符 rommon>来辨认。
这个过程的第一步是确认为什么 Cisco IOS软件映像没有从闪存中加载。这个问题可能是由于映像文件的丢失或损坏,或者闪存损坏造成的。可以通过命令dir flash:检查内存。
如果找到了一个看起来有效的映像,那么尝试从该映像进行引导。可以使用命令boot flash:来执行这个引导尝试。例如:
rommon> boot flash:c2600-is-mz.121-5
如果路由器完全启动了,你需要检查几个条款,因为需要确定为什么路由器启动进入了ROMmon模式,而不是直接使用闪存中的IOS软件。
• 首先,使用show version命令检查配置寄存器值。确保其配置为默认启动顺序。
• 如果配置寄存器值正确,使用show startup-config命令,该命令可以显示是否有一个boot system命令指示路由器使用Cisco IOS软件进入ROMmon。
如果路由器不能很好地从该映像启动,或者根本没有Cisco IOS映像,你需要下载一个新的Cisco IOS软件映像。要恢复 Cisco IOS软件文件,既可以通过控制台使用Xmodem恢复映像,也可以在ROMmon模式下使用TFTP下载映像。
在ROMmon下使用Xmodem下载Cisco IOS软件
恢复 Cisco IOS软件映像时,可以使用9600bitps的缺省控制台速率。你可以将波特率更改到115200bps来加速下载。可以在ROMmon模式下使用confreg命令更改控制台速率。在输入confreg命令之后,路由器将提示一系列可以修改的参数,当提示“change console baud rate? y/n[n]:”时,选择y将提示选择新的速率。在更改了控制台速率之后,重启路由器进入ROMmon模式。9600bps的终端会话被终止,一个新的会话以115200bps开始来匹配控制台速率。
你可以在ROMmon模式下使用xmodem命令从PC恢复 Cisco IOS软件映像。Xmodem命令的格式如下:
rommon>xmodem -c image_file_name
命令格式中的参数-c指示xmodem进程使用CRC检查下载过程中的错误。
现在需要从终端仿真器上开始Xmodem传输。在超级终端中,选择Transfer>Send。然后,在“发送文件”弹出窗口中指定映像文件的名称和位置。选择Xmodem协议,开始传输。
在传输结束后,将显示一个消息表是闪存已经被清除。该消息后紧跟着“Download Complete!”消息。在重新启动路由器之前,需要将控制台速率重新设置回 9600bps,将配置寄存器重新设置回 0x2102。
在重启路由器时,你需要结束 115200bps的终端会话,并开始一个9600bps的会话。
5.2.7 环境变量
也可以从一个TFTP会话恢复 Cisco IOS软件。在ROMmon模式下使用TFTP下载映像是将Cisco IOS软件映像恢复到路由器的一个最快捷的方法。可以通过设置环境变量和使用tftpdnld命令来执行该进程。
因为ROMmon模式的功能有限,在引导过程中没有加载配置文件。因此,路由器没有IP或接口配置。环境变量提供了一个最小化配置来允许从TFTP下载Cisco IOS软件映像。ROMmon模式下的TFTP传输仅仅工作在第一个LAN端口上,所以为该接口设置了一组简单的IP参数。设置一个ROMmon环境变量,你要输入变量名称,然后是等号(=),接着是该变量的值(变量名=值)。例如要设置IP地址为10.1.1.1,可在ROMmon提示符下输入 IP_ADDRESS=10.1.1.1。
注释:所有的环境变量名都是大小写敏感的。
使用tftpdnld所需的最少变量如下:
• IP_ADDRESS
• IP_SUBNET_MASK
• DEFALUT_GATEWAY
• TFTP_SERVER
• TFTP_FILE 服务器上的Cisco IOS软件文件名
要检查ROMmon环境变量,可以使用set命令。
例如:
rommon>set
IP_ADDRESS=10.0.0.1
IP_SUBNET_MASK=255.255.255.0
DEFAULT_GATEWAY=10.0.0.254
TFTP_SERVER=192.168.1.1
TFTP_FILE=GAD/IOS_image/c2600-i-mz.121-5
一旦为Cisco IOS软件的下载设定了变量,就可以输入tftpdnld命令。不带任何参数,ROMmon回显这些变量,随后显示一个确认提示和警告该进程将清除闪存。
当新的映像被写入闪存并且出现 ROMmon提示符后,你可以输入reset命令或 i来重启路由器。此时,路由器将从闪存中的Cisco IOS软件映像引导。
5.2.8 检验文件系统
可以使用几个命令来检验文件系统:
Router#show version
Router#show flash:
2009/05/04
2009/05/01
双机双引擎冗余配置这回事
Cisco双机双引擎解析:
双机冗余备份使用的协议有Cisco的HSRP和标准的VRRP,具体配置都很简单。
双引擎配置使用的是RPR和SSO:
4500系列:
Catalyst 4500 series switches allow a redundant supervisor engine to take over if the active supervisor engine fails. In software, supervisor engine redundancy is enabled by running the redundant supervisor engine in route processor redundancy (RPR) or stateful switchover (SSO) operating mode.
With supervisor engine redundancy enabled, if the active supervisor engine fails or if a manual
switchover is performed, the redundant supervisor engine becomes the active supervisor engine. The redundant supervisor engine has been automatically initialized with the startup configuration of the active supervisor engine, shortening the switchover time (30 seconds or longer in RPR mode, depending on the configuration; subseconds in SSO mode).
When power is first applied to a switch, the supervisor engine that boots first becomes the active
supervisor engine and remains active until a switchover occurs.
A switchover will occur when one or more of the following events take place:
1,The active supervisor engine fails (due to either hardware or software function) or is removed.
2,A user forces a switchover.
3,A user reloads the active supervisor engine.
Supervisor Engine Redundancy Guidelines and Restrictions:
1,The Catalyst 4507R switch and the 4510R switch are the only Catalyst 4500 series switches that support supervisor engine redundancy.
2,The Catalyst 4510R switch supports the WS-X4516 supervisor engine only. The Catalyst 4507R supports supervisor engines WS-X4013+, WS-X4515, and WS-X4516.
3,Redundancy requires both supervisor engines in the chassis to be of the same supervisor engine model and to use the same Cisco IOS software image.
4,Router ports are not supported when SSO redundancy mode is configured.
5,When you use the WS-X4013+ and WS-X4515 supervisor engines in RPR or SSO mode, only the Gig1/1 and Gig2/1 Gigabit Ethernet interfaces are available, but the Gig1/2 and Gig2/2 uplink ports are unavailable.
6,When the WS-X4516 active and redundant supervisor engines are installed in the same chassis, the four uplink ports (Gig1/1, Gig2/1, Gig 1/2, and Gig2/2) are available.
7,The active and redundant supervisor engines in the chassis must be in slots 1 and 2.
8,Supervisor engine redundancy does not provide supervisor engine load balancing.
9,The Cisco Express Forwarding (CEF) table is cleared on a switchover. As a result, routed traffic is interrupted until route tables reconverge. This reconvergence time is minimal because the SSO feature reduces the supervisor engine redundancy switchover time from 30+ seconds to subseconds, so Layer 3 also has a faster failover time if the switch is configured for SSO.
10,Static IP routes are maintained across a switchover because they are configured from entries in the configuration file.
11,Information about Layer 3 dynamic states that is maintained on the active supervisor engine is not synchronized to the redundant supervisor engine and is lost on switchover.
12,If you are running (or upgrading to) Release 12.2(20)EWA or Release 12.2(25)EW and are using a single supervisor engine in a redundant chassis (Catalyst 4507R or Catalyst 4510R series switch), and you intend to use routed ports, do one of the following:
-Use SVI’s instead of routed ports.
-Change the redundancy mode from SSO to RPR.
Configuring Supervisor Engine Redundancy:
Switch(config)# redundancy
Switch(config-red)# mode {sso rpr}
Switch# show running-config
Switch# show redundancy [clients counters history states]
Switch(config-red)# mode {sso rpr}--->Configures SSO or RPR. When this command is entered, the redundant supervisor engine is reloaded and begins to work in SSO or RPR mode.
Switch> enable
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# redundancy
Switch(config-red)# mode sso
Switch(config-red)# end
Switch# show redundancy
This example shows how to display redundancy facility state information:
Switch# show redundancy states
Synchronizing the Supervisor Engine Configurations:
Switch(config)# redundancy
Switch(config-red)# main-cpu ---Enters main-cpu configuration submode.
Switch(config-r-mc)# auto-sync {startup-config config-register bootvar standard}
Switch(config-r-mc)# end
Switch# copy running-config startup-config
In SSO mode, the running-config is always synchronized.
This example shows how to reenable the default automatic synchronization feature using the auto-sync standard command to synchronize the startup-config and config-register configuration of the active supervisor engine with the redundant supervisor engine. Updates for the boot variables are automatic and cannot be disabled.
Switch(config)# redundancy
Switch(config-red)# main-cpu
Switch(config-r-mc)# [no] auto-sync standard
Switch(config-r-mc)# end
Switch# copy running-config startup-config
Performing a Manual Switchover: 手动切换引擎
Switch# show redundancy
Switch# redundancy force-switchover
Be aware of these usage guidelines:
1,To force a switchover, the redundant supervisor engine must be in a standby hot state. You can verify the state with the show redundancy command. If the state is not standby hot, the
redundancy force-switchover command will not execute.
2,Use the redundancy force-switchover command, rather than the reload command, to initiate a switchover. The redundancy force-switchover command will first check that the redundant
supervisor engine is in the correct state. If you issue the reload command and the status is not
standby hot, the reload command will reset the current supervisor engine only.
6500系列: Supervisor Engine 720
The redundant supervisor engines must be the same type with the same model PFC and MSFC.
During the startup of the standby MSFC, image version information is exchanged between MSFCs and one of the following occurs:
1,If the image version information matches and both MSFCs are configured as SSO or have the default (SSO) configuration, the system runs in SSO mode.
2,If the image version information does not match or if one of the MSFCs is configured for route processor redundancy (RPR), the system runs in RPR mode.
In NSF/SSO mode, one MSFC is active and the other MSFC is in a hot-standby mode. The hot-standby MSFC maintains a constant readiness state by receiving state information from the active MSFC. At any given moment, the standby MSFC may be called on by the supervisor engine to take over the responsibilities held by the active MSFC. The supervisor engine monitors the active MSFC and if the MSFC does not respond, the supervisor engine declares the MSFC as lost or down and proceeds to reset the MSFC. The standby MSFC has the up-to-date state information necessary to resume processing (the standby MSFC is fully initialized, but the VLANs are kept in an administrative down state until a switchover occurs).
With NSF, the switching modules and switch fabric continue to forward packets while the MSFC switchover is in progress.
Note :
High availability on the supervisor engine operates independent of the MSFC high-availability feature. However, you must enable high availability on the supervisor engine must be enabled to ensure the correct operation of the MSFC SSO feature.
If you run the MSFC in SSO mode and fail to run the high-availability feature on the supervisor engine, any switchover that may occur will result in a nonstateful switchover and the standby MSFC will reset itself and reload at the time of the switchover. This reset/reload of the standby MSFC occurs because there is insufficient state information on the supervisor engine to support a stateful switchover of the MSFC. This reset/reload of the standby MSFC interrupts service.
RPR is a cold standby mode. When a switchover occurs, the standby MSFC must go completely through its initialization. RPR mode is used primarily for the fast software upgrade (FSU). In RPR mode, the startup configuration is synchronized to the standby MSFC, however, it is not processed in any way until the switchover occurs. The running configuration is not synchronized to the standby MSFC.
When the active MSFC boots completely, no state information is exchanged between the MSFCs. If the active MSFC fails, the standby MSFC processes its startup configuration file and begins its initialization.
If there is an image compatibility problem, the active MSFC boots fully, but the standby MSFC suspends its startup before processing the startup configuration file. If the active MSFC fails, a switchover is triggered and the suspended standby MSFC begins to initialize and become the active MSFC.
Configuration Guidelines and Restrictions :
1, During a switchover, there will be traffic loss for traffic that is routed by the MSFC. NSF only applies to traffic that is hardware switched by modules and the switch fabric. New flows are not allowed until the switchover is complete.
2, In cases where the MSFC has failed and is unable to notify the supervisor engine of the failure, the supervisor engine may take 30 to 40 seconds before it realizes that the MSFC has failed and a switchover is triggered. If the supervisor engine receives the failure notification, the switchover is triggered immediately.
3, The Frame Relay, ATM, and PPP protocols that are not supported in SSO mode.
4, Standby supervisor engine/MSFC insertion—With NSF/SSO redundancy, you can hot swap the standby supervisor engine/MSFC for maintenance. When you hot insert the standby MSFC, the active MSFC detects the presence of the standby MSFC and starts to drive the standby MSFC state transition to hot-standby. When you remove the standby MSFC, the synchronization between the active and standby MSFC is stopped, any pending updates to the standby MSFC are discarded, and the system enters simplex mode. The standby MSFC state is displayed by entering the show redundancy states command.
Configuring SSO
SSO is the default mode. By default, even if you do not configure the system explicitly as SSO, the system comes up in SSO mode. However, we recommend that you explicitly configure SSO mode.
Router(config)# redundancy
Router(config-red)# mode sso
Router(config-red)# end
Router# show redundancy states
Configuring CEF NSF
CEF NSF operates by default while the networking device is running in SSO mode. No configuration is necessary.
This example shows how to verify that CEF is NSF-capable:
router# show cef state
以下是《学习指南》中的摘抄:
因为仅当主组件出现故障时,他们才会激活,所以设备内的冗余子系统通常是以热备用模式维护的,它们不能提供性能。然而在高端和未来的Catalyst交换中,可以通过合适的配置克服这种缺点。
组件高可用性网络的一种折衷方法是:通过在网络拓扑中提供冗余,而不仅仅是在网络设备中提供冗余,来确保可靠性。
NSF(SSO)在Catalyst 4500和Catalyst 6500系列交换机中提供最高级别的可用性。
在Supervisor Engine发生切换之后,RPR和PRP+将在大约1分钟之内恢复交换机的流量转发。在SSO模式中,冗余Supervisor Engine以完全初始化状态进行启动,并且与活跃Supervisor Engine的启动配置和运行配置进行同步。对于SSO支持特性的软硬件状态发生变化的情况,备用Supervisor Engine (SSO模式)将与活跃Supervisor Engine保持同步。如果活跃Supervisor Engine上的SSO支持特性发生中断的情况,那么将无缝地切换到冗余Supervisor Engine。
SSO模式因为没有发生链路状态变更的情况,所以也就不会发生生成树拓扑的变更。
对于Catalyst 6500系列交换机,在Supervisor发生故障之后,第2层流量将在0~3s之内恢复正常工作状态。当SSO结合SRM(Single Router Mode单路由器模式),在发生Supervisor Engine切换之后,第2层和第3层流量将几乎不存在中断。
Catalyst 6500 系列交换机中使用单路由器模式的路由器冗余:
虽然在任何时候都只有一个Supervisor Engine处于活跃状态,而另一个Supervisor Engine处于冗余状态,但默认情况下,两个Supervisor Engine中的MSFC都处于活跃状态。
在典型的网络中,设计中包含冗余路径,使用两台交换机来提供机箱冗余。这样将有4台活跃路由器,难以诊断网络故障。Cisco引入了单路由器模式SRM冗余,用于替代内部冗余(双)MSFC配置(在这种配置下,两个MSFC同时处于活跃状态),从而将活跃路由器从4台减少到2台。
配置SRM:
1, 在指定路由器上启用SRM,然后在非指定路由器上启用SRM,如下所示。
MSFC_1(config)#redundancy
MSFC_1(config-r)#high-availability
MSFC_1(config-r-ha)#single-router-mode
MSFC_2(config)#redundancy
MSFC_2(config-r)#high-availability
MSFC_2(config-r-ha)#single-router-mode
2,通过在指定路由器上使用命令wr,将可以把运行配置保存到启动配置中,同时确保非指定路由器的启动配置也包含这些SRM命令。
3,重新启动非指定路由器。当系统提示时候保存配置时,输入no。如下所示:
MSFC_2#reload
System configuration has been modified. Save? [yes/no]: no
Proceed with reload?[confirm]
4,非指定路由器启动后将进入备用状态。
验证:show redundancy
经典案例:
请教6509+双720引擎该如何配置?
模块状态:
show module all
Mod Ports Card Type Model Serial No.
--- ----- -------------------------------------- ------------------ -----------
1 6 Firewall Module WS-SVC-FWM-1 SAD122300FB
2 48 48-port 10/100/1000 RJ45 EtherModule WS-X6148A-GE-TX SAL1226UW54
3 24 CEF720 24 port 1000mb SFP WS-X6724-SFP SAL1226VBVP
5 2 Supervisor Engine 720 (Active) WS-SUP720-3B SAL1226UYHE
6 2 Supervisor Engine 720 (Cold) WS-SUP720-3B SAL1230Y9ZJ
Mod MAC addresses Hw Fw Sw Status
--- ---------------------------------- ------ ------------ ------------ -------
1 0021.5517.aecc to 0021.5517.aed3 4.2 7.2(1) 2.3(4) Ok
2 001d.70c5.e380 to 001d.70c5.e3af 1.6 8.4(1) 8.7(0.22)H2A Ok
3 0021.d874.4eb0 to 0021.d874.4ec7 3.1 12.2(18r)S1 12.2(33)SXH2 Ok
5 001c.58d0.b098 to 001c.58d0.b09b 5.6 8.5(2) 12.2(33)SXH2 Ok
6 0016.9de6.ab68 to 0016.9de6.ab6b 5.6 8.5(2) 12.2(18)SXF1 Ok
Mod Sub-Module Model Serial Hw Status
---- --------------------------- ------------------ ----------- ------- -------
3 Centralized Forwarding Card WS-F6700-CFC SAL1226V63Q 4.1 Ok
5 Policy Feature Card 3 WS-F6K-PFC3B SAL1225UERJ 2.3 Ok
5 MSFC3 Daughterboard WS-SUP720 SAL1226UWA7 3.1 Ok
6 Policy Feature Card 3 WS-F6K-PFC3B SAL1230YE06 2.3 Ok
6 MSFC3 Daughterboard WS-SUP720 SAL1230YD9R 3.1 Ok
Mod Online Diag Status
---- -------------------
1 Pass
2 Pass
3 Pass
5 Pass
6 Pass
相关配置:
#show run begin redu
redundancy
keepalive-enable
mode sso
main-cpu
auto-sync running-config
出现的问题是将主引擎复位测试了一下,第二个引擎好像是需要很长的时间才能切换过来。正常情况下SSO模式1-2秒就可以切换。
请问:该配置那些内容才能实现引擎的快速冗余切换?出现上述切换时间过长的原因是什么?
解决:因为两块引擎里灌的IOS版本不一致。虽然你配置了SSO,但是交换机检测两块引擎IOS版本不一致,自动变为RPR模式,这个cold一般只在RPR模式中出现。
双机冗余备份使用的协议有Cisco的HSRP和标准的VRRP,具体配置都很简单。
双引擎配置使用的是RPR和SSO:
4500系列:
Catalyst 4500 series switches allow a redundant supervisor engine to take over if the active supervisor engine fails. In software, supervisor engine redundancy is enabled by running the redundant supervisor engine in route processor redundancy (RPR) or stateful switchover (SSO) operating mode.
With supervisor engine redundancy enabled, if the active supervisor engine fails or if a manual
switchover is performed, the redundant supervisor engine becomes the active supervisor engine. The redundant supervisor engine has been automatically initialized with the startup configuration of the active supervisor engine, shortening the switchover time (30 seconds or longer in RPR mode, depending on the configuration; subseconds in SSO mode).
When power is first applied to a switch, the supervisor engine that boots first becomes the active
supervisor engine and remains active until a switchover occurs.
A switchover will occur when one or more of the following events take place:
1,The active supervisor engine fails (due to either hardware or software function) or is removed.
2,A user forces a switchover.
3,A user reloads the active supervisor engine.
Supervisor Engine Redundancy Guidelines and Restrictions:
1,The Catalyst 4507R switch and the 4510R switch are the only Catalyst 4500 series switches that support supervisor engine redundancy.
2,The Catalyst 4510R switch supports the WS-X4516 supervisor engine only. The Catalyst 4507R supports supervisor engines WS-X4013+, WS-X4515, and WS-X4516.
3,Redundancy requires both supervisor engines in the chassis to be of the same supervisor engine model and to use the same Cisco IOS software image.
4,Router ports are not supported when SSO redundancy mode is configured.
5,When you use the WS-X4013+ and WS-X4515 supervisor engines in RPR or SSO mode, only the Gig1/1 and Gig2/1 Gigabit Ethernet interfaces are available, but the Gig1/2 and Gig2/2 uplink ports are unavailable.
6,When the WS-X4516 active and redundant supervisor engines are installed in the same chassis, the four uplink ports (Gig1/1, Gig2/1, Gig 1/2, and Gig2/2) are available.
7,The active and redundant supervisor engines in the chassis must be in slots 1 and 2.
8,Supervisor engine redundancy does not provide supervisor engine load balancing.
9,The Cisco Express Forwarding (CEF) table is cleared on a switchover. As a result, routed traffic is interrupted until route tables reconverge. This reconvergence time is minimal because the SSO feature reduces the supervisor engine redundancy switchover time from 30+ seconds to subseconds, so Layer 3 also has a faster failover time if the switch is configured for SSO.
10,Static IP routes are maintained across a switchover because they are configured from entries in the configuration file.
11,Information about Layer 3 dynamic states that is maintained on the active supervisor engine is not synchronized to the redundant supervisor engine and is lost on switchover.
12,If you are running (or upgrading to) Release 12.2(20)EWA or Release 12.2(25)EW and are using a single supervisor engine in a redundant chassis (Catalyst 4507R or Catalyst 4510R series switch), and you intend to use routed ports, do one of the following:
-Use SVI’s instead of routed ports.
-Change the redundancy mode from SSO to RPR.
Configuring Supervisor Engine Redundancy:
Switch(config)# redundancy
Switch(config-red)# mode {sso rpr}
Switch# show running-config
Switch# show redundancy [clients counters history states]
Switch(config-red)# mode {sso rpr}--->Configures SSO or RPR. When this command is entered, the redundant supervisor engine is reloaded and begins to work in SSO or RPR mode.
Switch> enable
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# redundancy
Switch(config-red)# mode sso
Switch(config-red)# end
Switch# show redundancy
This example shows how to display redundancy facility state information:
Switch# show redundancy states
Synchronizing the Supervisor Engine Configurations:
Switch(config)# redundancy
Switch(config-red)# main-cpu ---Enters main-cpu configuration submode.
Switch(config-r-mc)# auto-sync {startup-config config-register bootvar standard}
Switch(config-r-mc)# end
Switch# copy running-config startup-config
In SSO mode, the running-config is always synchronized.
This example shows how to reenable the default automatic synchronization feature using the auto-sync standard command to synchronize the startup-config and config-register configuration of the active supervisor engine with the redundant supervisor engine. Updates for the boot variables are automatic and cannot be disabled.
Switch(config)# redundancy
Switch(config-red)# main-cpu
Switch(config-r-mc)# [no] auto-sync standard
Switch(config-r-mc)# end
Switch# copy running-config startup-config
Performing a Manual Switchover: 手动切换引擎
Switch# show redundancy
Switch# redundancy force-switchover
Be aware of these usage guidelines:
1,To force a switchover, the redundant supervisor engine must be in a standby hot state. You can verify the state with the show redundancy command. If the state is not standby hot, the
redundancy force-switchover command will not execute.
2,Use the redundancy force-switchover command, rather than the reload command, to initiate a switchover. The redundancy force-switchover command will first check that the redundant
supervisor engine is in the correct state. If you issue the reload command and the status is not
standby hot, the reload command will reset the current supervisor engine only.
6500系列: Supervisor Engine 720
The redundant supervisor engines must be the same type with the same model PFC and MSFC.
During the startup of the standby MSFC, image version information is exchanged between MSFCs and one of the following occurs:
1,If the image version information matches and both MSFCs are configured as SSO or have the default (SSO) configuration, the system runs in SSO mode.
2,If the image version information does not match or if one of the MSFCs is configured for route processor redundancy (RPR), the system runs in RPR mode.
In NSF/SSO mode, one MSFC is active and the other MSFC is in a hot-standby mode. The hot-standby MSFC maintains a constant readiness state by receiving state information from the active MSFC. At any given moment, the standby MSFC may be called on by the supervisor engine to take over the responsibilities held by the active MSFC. The supervisor engine monitors the active MSFC and if the MSFC does not respond, the supervisor engine declares the MSFC as lost or down and proceeds to reset the MSFC. The standby MSFC has the up-to-date state information necessary to resume processing (the standby MSFC is fully initialized, but the VLANs are kept in an administrative down state until a switchover occurs).
With NSF, the switching modules and switch fabric continue to forward packets while the MSFC switchover is in progress.
Note :
High availability on the supervisor engine operates independent of the MSFC high-availability feature. However, you must enable high availability on the supervisor engine must be enabled to ensure the correct operation of the MSFC SSO feature.
If you run the MSFC in SSO mode and fail to run the high-availability feature on the supervisor engine, any switchover that may occur will result in a nonstateful switchover and the standby MSFC will reset itself and reload at the time of the switchover. This reset/reload of the standby MSFC occurs because there is insufficient state information on the supervisor engine to support a stateful switchover of the MSFC. This reset/reload of the standby MSFC interrupts service.
RPR is a cold standby mode. When a switchover occurs, the standby MSFC must go completely through its initialization. RPR mode is used primarily for the fast software upgrade (FSU). In RPR mode, the startup configuration is synchronized to the standby MSFC, however, it is not processed in any way until the switchover occurs. The running configuration is not synchronized to the standby MSFC.
When the active MSFC boots completely, no state information is exchanged between the MSFCs. If the active MSFC fails, the standby MSFC processes its startup configuration file and begins its initialization.
If there is an image compatibility problem, the active MSFC boots fully, but the standby MSFC suspends its startup before processing the startup configuration file. If the active MSFC fails, a switchover is triggered and the suspended standby MSFC begins to initialize and become the active MSFC.
Configuration Guidelines and Restrictions :
1, During a switchover, there will be traffic loss for traffic that is routed by the MSFC. NSF only applies to traffic that is hardware switched by modules and the switch fabric. New flows are not allowed until the switchover is complete.
2, In cases where the MSFC has failed and is unable to notify the supervisor engine of the failure, the supervisor engine may take 30 to 40 seconds before it realizes that the MSFC has failed and a switchover is triggered. If the supervisor engine receives the failure notification, the switchover is triggered immediately.
3, The Frame Relay, ATM, and PPP protocols that are not supported in SSO mode.
4, Standby supervisor engine/MSFC insertion—With NSF/SSO redundancy, you can hot swap the standby supervisor engine/MSFC for maintenance. When you hot insert the standby MSFC, the active MSFC detects the presence of the standby MSFC and starts to drive the standby MSFC state transition to hot-standby. When you remove the standby MSFC, the synchronization between the active and standby MSFC is stopped, any pending updates to the standby MSFC are discarded, and the system enters simplex mode. The standby MSFC state is displayed by entering the show redundancy states command.
Configuring SSO
SSO is the default mode. By default, even if you do not configure the system explicitly as SSO, the system comes up in SSO mode. However, we recommend that you explicitly configure SSO mode.
Router(config)# redundancy
Router(config-red)# mode sso
Router(config-red)# end
Router# show redundancy states
Configuring CEF NSF
CEF NSF operates by default while the networking device is running in SSO mode. No configuration is necessary.
This example shows how to verify that CEF is NSF-capable:
router# show cef state
以下是《学习指南》中的摘抄:
因为仅当主组件出现故障时,他们才会激活,所以设备内的冗余子系统通常是以热备用模式维护的,它们不能提供性能。然而在高端和未来的Catalyst交换中,可以通过合适的配置克服这种缺点。
组件高可用性网络的一种折衷方法是:通过在网络拓扑中提供冗余,而不仅仅是在网络设备中提供冗余,来确保可靠性。
NSF(SSO)在Catalyst 4500和Catalyst 6500系列交换机中提供最高级别的可用性。
在Supervisor Engine发生切换之后,RPR和PRP+将在大约1分钟之内恢复交换机的流量转发。在SSO模式中,冗余Supervisor Engine以完全初始化状态进行启动,并且与活跃Supervisor Engine的启动配置和运行配置进行同步。对于SSO支持特性的软硬件状态发生变化的情况,备用Supervisor Engine (SSO模式)将与活跃Supervisor Engine保持同步。如果活跃Supervisor Engine上的SSO支持特性发生中断的情况,那么将无缝地切换到冗余Supervisor Engine。
SSO模式因为没有发生链路状态变更的情况,所以也就不会发生生成树拓扑的变更。
对于Catalyst 6500系列交换机,在Supervisor发生故障之后,第2层流量将在0~3s之内恢复正常工作状态。当SSO结合SRM(Single Router Mode单路由器模式),在发生Supervisor Engine切换之后,第2层和第3层流量将几乎不存在中断。
Catalyst 6500 系列交换机中使用单路由器模式的路由器冗余:
虽然在任何时候都只有一个Supervisor Engine处于活跃状态,而另一个Supervisor Engine处于冗余状态,但默认情况下,两个Supervisor Engine中的MSFC都处于活跃状态。
在典型的网络中,设计中包含冗余路径,使用两台交换机来提供机箱冗余。这样将有4台活跃路由器,难以诊断网络故障。Cisco引入了单路由器模式SRM冗余,用于替代内部冗余(双)MSFC配置(在这种配置下,两个MSFC同时处于活跃状态),从而将活跃路由器从4台减少到2台。
配置SRM:
1, 在指定路由器上启用SRM,然后在非指定路由器上启用SRM,如下所示。
MSFC_1(config)#redundancy
MSFC_1(config-r)#high-availability
MSFC_1(config-r-ha)#single-router-mode
MSFC_2(config)#redundancy
MSFC_2(config-r)#high-availability
MSFC_2(config-r-ha)#single-router-mode
2,通过在指定路由器上使用命令wr,将可以把运行配置保存到启动配置中,同时确保非指定路由器的启动配置也包含这些SRM命令。
3,重新启动非指定路由器。当系统提示时候保存配置时,输入no。如下所示:
MSFC_2#reload
System configuration has been modified. Save? [yes/no]: no
Proceed with reload?[confirm]
4,非指定路由器启动后将进入备用状态。
验证:show redundancy
经典案例:
请教6509+双720引擎该如何配置?
模块状态:
show module all
Mod Ports Card Type Model Serial No.
--- ----- -------------------------------------- ------------------ -----------
1 6 Firewall Module WS-SVC-FWM-1 SAD122300FB
2 48 48-port 10/100/1000 RJ45 EtherModule WS-X6148A-GE-TX SAL1226UW54
3 24 CEF720 24 port 1000mb SFP WS-X6724-SFP SAL1226VBVP
5 2 Supervisor Engine 720 (Active) WS-SUP720-3B SAL1226UYHE
6 2 Supervisor Engine 720 (Cold) WS-SUP720-3B SAL1230Y9ZJ
Mod MAC addresses Hw Fw Sw Status
--- ---------------------------------- ------ ------------ ------------ -------
1 0021.5517.aecc to 0021.5517.aed3 4.2 7.2(1) 2.3(4) Ok
2 001d.70c5.e380 to 001d.70c5.e3af 1.6 8.4(1) 8.7(0.22)H2A Ok
3 0021.d874.4eb0 to 0021.d874.4ec7 3.1 12.2(18r)S1 12.2(33)SXH2 Ok
5 001c.58d0.b098 to 001c.58d0.b09b 5.6 8.5(2) 12.2(33)SXH2 Ok
6 0016.9de6.ab68 to 0016.9de6.ab6b 5.6 8.5(2) 12.2(18)SXF1 Ok
Mod Sub-Module Model Serial Hw Status
---- --------------------------- ------------------ ----------- ------- -------
3 Centralized Forwarding Card WS-F6700-CFC SAL1226V63Q 4.1 Ok
5 Policy Feature Card 3 WS-F6K-PFC3B SAL1225UERJ 2.3 Ok
5 MSFC3 Daughterboard WS-SUP720 SAL1226UWA7 3.1 Ok
6 Policy Feature Card 3 WS-F6K-PFC3B SAL1230YE06 2.3 Ok
6 MSFC3 Daughterboard WS-SUP720 SAL1230YD9R 3.1 Ok
Mod Online Diag Status
---- -------------------
1 Pass
2 Pass
3 Pass
5 Pass
6 Pass
相关配置:
#show run begin redu
redundancy
keepalive-enable
mode sso
main-cpu
auto-sync running-config
出现的问题是将主引擎复位测试了一下,第二个引擎好像是需要很长的时间才能切换过来。正常情况下SSO模式1-2秒就可以切换。
请问:该配置那些内容才能实现引擎的快速冗余切换?出现上述切换时间过长的原因是什么?
解决:因为两块引擎里灌的IOS版本不一致。虽然你配置了SSO,但是交换机检测两块引擎IOS版本不一致,自动变为RPR模式,这个cold一般只在RPR模式中出现。
2009/04/27
华为系列交换机VRRP双机冗余配置
基于 IPv4 的 VRRP 典型配置举例:
一: VRRP 单备份组配置举例
组网需求
1,Host需要访问 Internet,Host的缺省网关为202.38.160.111/24;
2,Switch A 和 Switch B 属于虚拟 IP 地址为 202.38.160.111/24 的备份组 1;
3,当 Switch A 正常工作时,Host A 发送给 Host B 的报文通过 Switch A 转发;
当 Switch A 出现故障时,Host A 发送给 Host B 的报文通过 Switch B 转发。
配置步骤:
(1) 配置 Switch A
# 配置 VLAN2。
system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port GigabitEthernet 2/0/5
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 设置 Switch A 在备份组 1 中的优先级为 110。默认优先级为100。
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 110
# 设置 Switch A 工作在抢占方式,抢占延迟时间为 5 秒。
[SwitchA-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
(2) 配置 Switch B
# 配置 VLAN2。
system-view
[SwitchB] vlan 2
[SwitchB-Vlan2] port GigabitEthernet 2/0/5
[SwitchB-vlan2] quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 设置 Switch B 工作在抢占方式,抢占延迟时间为 5 秒。
[SwitchB-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
(3) 验证配置结果
配置完成后,在 Host A 上可以 ping 通 Host B。通过 display vrrp verbose 命令查看配置后的结果。
# 显示 Switch A 上备份组 1 的详细信息。
[SwitchA-Vlan-interface2] display vrrp verbose
VRRP 监视接口配置举例:
当 Switch A 连接 Internet 的 VLAN 接口 3 不可用时,Host A 发送给 Host B 的报文通过 Switch B 转发。
# 设置备份组的认证方式为 SIMPLE 认证,认证字为 hello。
[SwitchA-Vlan-interface2] vrrp vrid 1 authentication-mode simple hello
# 设置 Master 发送 VRRP 报文的间隔时间为 5 秒。
[SwitchA-Vlan-interface2] vrrp vrid 1 timer advertise 5
# 设置监视接口。
[SwitchA-Vlan-interface2] vrrp vrid 1 track interface vlan-interface 3 reduced 30
VRRP 多备份组配置举例:
组网需求
1,202.38.160.0/24 网段内部分主机的缺省网关为 202.38.160.111/24,部分主机的缺省网关为 202.38.160.112/24;
2,利用 VRRP 备份组实现缺省网关间的负载分担和相互备份。
配置 Switch A
# 配置 VLAN2。
system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port GigabitEthernet 2/0/5
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 设置 Switch A 在备份组 1 中的优先级为 110。
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 110
# 创建备份组 2,并配置备份组 2 的虚拟 IP 地址为 202.38.160.112。
[SwitchA-Vlan-interface2] vrrp vrid 2 virtual-ip 202.38.160.112
配置 Switch B
# 配置 VLAN2。
system-view
[SwitchB] vlan 2
[SwitchB-vlan2] port GigabitEthernet 2/0/5
[SwitchB-vlan2] quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 创建备份组 2,并配置备份组 2 的虚拟 IP 地址为 202.38.160.112。
[SwitchB-Vlan-interface2] vrrp vrid 2 virtual-ip 202.38.160.112
# 设置 Switch B 在备份组 2 中的优先级为 110。
[SwitchB-Vlan-interface2] vrrp vrid 2 priority 110
验证配置结果
可以通过 display vrrp 命令查看配置后的结果。
# 显示 Switch A 上备份组的详细信息。
[SwitchA-Vlan-interface2] display vrrp verbose
VRRP 常见错误配置举例:
一:控制台上频频出现配置错误的提示
原因分析:
1,可能是备份组内的另一台交换机配置不一致造成的。
2,可能是有的机器试图发送非法的 VRRP 报文。
解决方法:
1,对于第一种情况,可以通过修改配置来解决。
2,对于第二种情况,则是有些机器有不良企图,应当通过非技术手段来解决。
二:同一个备份组内出现多个 Master 交换机
原因分析:
1,若短时间内存在多个Master 交换机,属于正常情况,无需进行人工干预。
2,若多个Master 交换机长时间共存,这很有可能是由于Master 交换机之间收不到VRRP报文,或者收到的报文不合法造成的。
解决方法:先在多个Master 交换机之间执行ping 操作。如果ping 不通,则检查网络连接是否正确;如果能ping 通,则检查VRRP 的配置是否一致。对于同一个VRRP 备份组的配置,必须要保证虚拟IP 地址个数、每个虚拟IP 地址、通告报文的发送时间间隔和认证方式完全一样。
三:VRRP 的状态频繁转换
原因分析:这种情况一般是由于 VRRP 通告报文发送时间间隔太短造成的。
解决方法:增加通告报文的发送时间间隔或者设置抢占延迟都可以解决这种故障。
一: VRRP 单备份组配置举例
组网需求
1,Host需要访问 Internet,Host的缺省网关为202.38.160.111/24;
2,Switch A 和 Switch B 属于虚拟 IP 地址为 202.38.160.111/24 的备份组 1;
3,当 Switch A 正常工作时,Host A 发送给 Host B 的报文通过 Switch A 转发;
当 Switch A 出现故障时,Host A 发送给 Host B 的报文通过 Switch B 转发。
配置步骤:
(1) 配置 Switch A
# 配置 VLAN2。
[SwitchA] vlan 2
[SwitchA-vlan2] port GigabitEthernet 2/0/5
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 设置 Switch A 在备份组 1 中的优先级为 110。默认优先级为100。
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 110
# 设置 Switch A 工作在抢占方式,抢占延迟时间为 5 秒。
[SwitchA-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
(2) 配置 Switch B
# 配置 VLAN2。
[SwitchB] vlan 2
[SwitchB-Vlan2] port GigabitEthernet 2/0/5
[SwitchB-vlan2] quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 设置 Switch B 工作在抢占方式,抢占延迟时间为 5 秒。
[SwitchB-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
(3) 验证配置结果
配置完成后,在 Host A 上可以 ping 通 Host B。通过 display vrrp verbose 命令查看配置后的结果。
# 显示 Switch A 上备份组 1 的详细信息。
[SwitchA-Vlan-interface2] display vrrp verbose
VRRP 监视接口配置举例:
当 Switch A 连接 Internet 的 VLAN 接口 3 不可用时,Host A 发送给 Host B 的报文通过 Switch B 转发。
# 设置备份组的认证方式为 SIMPLE 认证,认证字为 hello。
[SwitchA-Vlan-interface2] vrrp vrid 1 authentication-mode simple hello
# 设置 Master 发送 VRRP 报文的间隔时间为 5 秒。
[SwitchA-Vlan-interface2] vrrp vrid 1 timer advertise 5
# 设置监视接口。
[SwitchA-Vlan-interface2] vrrp vrid 1 track interface vlan-interface 3 reduced 30
VRRP 多备份组配置举例:
组网需求
1,202.38.160.0/24 网段内部分主机的缺省网关为 202.38.160.111/24,部分主机的缺省网关为 202.38.160.112/24;
2,利用 VRRP 备份组实现缺省网关间的负载分担和相互备份。
配置 Switch A
# 配置 VLAN2。
[SwitchA] vlan 2
[SwitchA-vlan2] port GigabitEthernet 2/0/5
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 设置 Switch A 在备份组 1 中的优先级为 110。
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 110
# 创建备份组 2,并配置备份组 2 的虚拟 IP 地址为 202.38.160.112。
[SwitchA-Vlan-interface2] vrrp vrid 2 virtual-ip 202.38.160.112
配置 Switch B
# 配置 VLAN2。
[SwitchB] vlan 2
[SwitchB-vlan2] port GigabitEthernet 2/0/5
[SwitchB-vlan2] quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
# 创建备份组 1,并配置备份组 1 的虚拟 IP 地址为 202.38.160.111。
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# 创建备份组 2,并配置备份组 2 的虚拟 IP 地址为 202.38.160.112。
[SwitchB-Vlan-interface2] vrrp vrid 2 virtual-ip 202.38.160.112
# 设置 Switch B 在备份组 2 中的优先级为 110。
[SwitchB-Vlan-interface2] vrrp vrid 2 priority 110
验证配置结果
可以通过 display vrrp 命令查看配置后的结果。
# 显示 Switch A 上备份组的详细信息。
[SwitchA-Vlan-interface2] display vrrp verbose
VRRP 常见错误配置举例:
一:控制台上频频出现配置错误的提示
原因分析:
1,可能是备份组内的另一台交换机配置不一致造成的。
2,可能是有的机器试图发送非法的 VRRP 报文。
解决方法:
1,对于第一种情况,可以通过修改配置来解决。
2,对于第二种情况,则是有些机器有不良企图,应当通过非技术手段来解决。
二:同一个备份组内出现多个 Master 交换机
原因分析:
1,若短时间内存在多个Master 交换机,属于正常情况,无需进行人工干预。
2,若多个Master 交换机长时间共存,这很有可能是由于Master 交换机之间收不到VRRP报文,或者收到的报文不合法造成的。
解决方法:先在多个Master 交换机之间执行ping 操作。如果ping 不通,则检查网络连接是否正确;如果能ping 通,则检查VRRP 的配置是否一致。对于同一个VRRP 备份组的配置,必须要保证虚拟IP 地址个数、每个虚拟IP 地址、通告报文的发送时间间隔和认证方式完全一样。
三:VRRP 的状态频繁转换
原因分析:这种情况一般是由于 VRRP 通告报文发送时间间隔太短造成的。
解决方法:增加通告报文的发送时间间隔或者设置抢占延迟都可以解决这种故障。
转: VLAN划分,GVRP还是VTP
GVRP协议简介
GVRP是GARP的一种应用,它基于GARP的工作机制,维护交换机中的VLSN动态注册信息,并传播该信息到其它的交换机中。所有支持GVRP特性的交换机能够接收来自其它交换机的VLAN信息,并动态更新本地的VLAN注册信息,包括当前的VLAN成员、这些VLAN成员可以通过哪个端口到达等。而且所支持GVRP特性的交换机能够将本地的VLAN注册注册信息向其它交换机传播,以使同一交换网内所有支持GVRP特性的设备的VLAN信息达成一致。GVRP传播的VLAN注册信息既包括本地手工配置的静态注册信息,也包括来自其它交换机的动态注册信息。
VTP协议简介
VTP的功能与GVRP相似,也是用来使VLAN配置信息在交换网内其它交换机上进行动态注册的一种二层协议。在一台VTPServer上配置一个新的VLAN信息,则该信息将自动传播到本域内的所有交换机,从而减少在多台设备上配置同一信息的工作量,且方便了管理。VTP信息只能在Trunk端口上传播。
GVRP和VTP两个协议有何异同点
相同点:
二者都是对跨以太网交换机的VLAN进行动态注册和删除的二层协议,交换机之间的协议报文交互都必须在VLANTrunk链路上进行。
不同点:
a、GVRP是IEEE制定的基于GARP的协议;而VTP是CISCO公司开发的私有协议,目前华为等交换机也支持VTP协议;
b、GVRP协议就是通过属性的声明-注册机制将本地的VLAN信息通告给其他交换机;而VTP协议是通过检查通告报文中的配置版本号信息,版本号低的交换机向版本号高的交换机进行学习,从而实现VLAN信息的共享;
c、支持VLAN数目不同,GVRP协议所支持的VLANID范围为1-4094,而VTP协议只支持1-1001号的VLAN。
GVRP和VTP两个协议在实践中的应用比较
在具体应用上,VTP支持的是服务器-客户端模式,即在主交换机建立VTP域,并将主交换机设置成VTPServer,然后在分交换机设置为VTPClient,这样只需在主交换机上建立VLAN,就会通知到局域网中的任何一台交换机,这样便于集中管理。
GVRP相对繁琐些,它需要在每一台交换机上建立VLAN,并且在每一个交换机(无论是主交换机还是分交换机)首先全局运行gvrp命令,开启gvrp功能,然后在干道汇聚连接上运行gvrp命令,开启GVRP功能,这样才会将本交换机上建立的VLAN通知注册到局域网中的其它交换机上。
由此可见,GVRP是IEEE制定的基于GVRP的协议,VTP是厂家开发的协议,因此GVRP的适用面比较宽泛,但VTP的设置要便捷些,并且有利于设备的集中管理,在VLAN的划分中得到广泛应用。但由于VTP模式本质上是把在核心交换机上划分的VLAN复制到局域网中的所有分交换机上,这样整个网络中的VLAN广播还是会在汇聚连接上传播,会加重核心交换机的负担。GVRP本质上是在各交换机上分别划分VLAN,并且通过GVRP裁减机制限制不必要的VLAN广播,使得主交换机和分交换机的VLAN广播相对均衡,减少了主交换机的CPU占用率,因此在大型网络中GVRP有较好的表现。
现在的交换机在支持GVRP协议的同时,一般也都支持VTP协议,但是要记住这两个协议可不允许同时开启的。
GVRP是GARP的一种应用,它基于GARP的工作机制,维护交换机中的VLSN动态注册信息,并传播该信息到其它的交换机中。所有支持GVRP特性的交换机能够接收来自其它交换机的VLAN信息,并动态更新本地的VLAN注册信息,包括当前的VLAN成员、这些VLAN成员可以通过哪个端口到达等。而且所支持GVRP特性的交换机能够将本地的VLAN注册注册信息向其它交换机传播,以使同一交换网内所有支持GVRP特性的设备的VLAN信息达成一致。GVRP传播的VLAN注册信息既包括本地手工配置的静态注册信息,也包括来自其它交换机的动态注册信息。
VTP协议简介
VTP的功能与GVRP相似,也是用来使VLAN配置信息在交换网内其它交换机上进行动态注册的一种二层协议。在一台VTPServer上配置一个新的VLAN信息,则该信息将自动传播到本域内的所有交换机,从而减少在多台设备上配置同一信息的工作量,且方便了管理。VTP信息只能在Trunk端口上传播。
GVRP和VTP两个协议有何异同点
相同点:
二者都是对跨以太网交换机的VLAN进行动态注册和删除的二层协议,交换机之间的协议报文交互都必须在VLANTrunk链路上进行。
不同点:
a、GVRP是IEEE制定的基于GARP的协议;而VTP是CISCO公司开发的私有协议,目前华为等交换机也支持VTP协议;
b、GVRP协议就是通过属性的声明-注册机制将本地的VLAN信息通告给其他交换机;而VTP协议是通过检查通告报文中的配置版本号信息,版本号低的交换机向版本号高的交换机进行学习,从而实现VLAN信息的共享;
c、支持VLAN数目不同,GVRP协议所支持的VLANID范围为1-4094,而VTP协议只支持1-1001号的VLAN。
GVRP和VTP两个协议在实践中的应用比较
在具体应用上,VTP支持的是服务器-客户端模式,即在主交换机建立VTP域,并将主交换机设置成VTPServer,然后在分交换机设置为VTPClient,这样只需在主交换机上建立VLAN,就会通知到局域网中的任何一台交换机,这样便于集中管理。
GVRP相对繁琐些,它需要在每一台交换机上建立VLAN,并且在每一个交换机(无论是主交换机还是分交换机)首先全局运行gvrp命令,开启gvrp功能,然后在干道汇聚连接上运行gvrp命令,开启GVRP功能,这样才会将本交换机上建立的VLAN通知注册到局域网中的其它交换机上。
由此可见,GVRP是IEEE制定的基于GVRP的协议,VTP是厂家开发的协议,因此GVRP的适用面比较宽泛,但VTP的设置要便捷些,并且有利于设备的集中管理,在VLAN的划分中得到广泛应用。但由于VTP模式本质上是把在核心交换机上划分的VLAN复制到局域网中的所有分交换机上,这样整个网络中的VLAN广播还是会在汇聚连接上传播,会加重核心交换机的负担。GVRP本质上是在各交换机上分别划分VLAN,并且通过GVRP裁减机制限制不必要的VLAN广播,使得主交换机和分交换机的VLAN广播相对均衡,减少了主交换机的CPU占用率,因此在大型网络中GVRP有较好的表现。
现在的交换机在支持GVRP协议的同时,一般也都支持VTP协议,但是要记住这两个协议可不允许同时开启的。
2009/04/06
三向重发布路由缺失:只是特例情况的
三向重发布路由缺失:
-lo1(RIP)
R1--OSPF--R2--EIGRP--R3
----->
<-----
第一步: RIP--->OSPF
R2(config-router)#redistribute rip subnets
R1上有路由:
O E2 22.22.22.0 [110/20] via 12.1.1.2, 00:00:08, Serial1/1
而R3上没有
--->结论是,单点三向重发布,重发布路由作用只在相关的两个路由协议之间,不会再重发布给另一个协议。即,RIP重发布给OSPF的路由条目,OSPF不会再将这些条目重发布给EIGRP。
所以需要手动将RIP路由重发布到EIGRP中,需要执行重发布RIP两次。
R2(config-router)#redistribute rip metric 10000 255 100 1 255
R3上就会有:
D EX 22.22.22.0 [170/2235136] via 23.1.1.2, 00:00:08, Serial1/0
第二步:R2上
OSPF<----->EIGRP双向单点重发布
!
router eigrp 90
redistribute ospf 110 metric 10000 255 100 1 1500
redistribute rip metric 10000 255 100 1 255
network 2.2.2.2 0.0.0.0
network 23.1.1.2 0.0.0.0
no auto-summary
!
router ospf 110
router-id 2.2.2.2
log-adjacency-changes
redistribute eigrp 90 subnets
redistribute rip subnets
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.2 0.0.0.0 area 0
!
router rip
version 2
network 22.0.0.0
no auto-summary
!
第三步:比较三个路由器上的路由条目,都是6条路由。配置正确。
特殊情况:在重发布时使用route-map指定重发布的条目,而使用route-map是在重发布时推荐的做法。
!
router eigrp 90
redistribute connected route-map RIP2EIGRP
!
!
route-map RIP2EIGRP permit 10
match interface Loopback1
!
这样就会在R3上出现路由缺失的情况,因为route-map默认最后是deny any的,所有在redistribute connected route-map的情况下,只是重发布了route-map允许的路由,例如是lo1的路由,而redistribute connected会优于redistribute ospf,所以连R2直连的12.1.1.0网段路由都屏蔽了。如下:
R3#sh ip route
1.0.0.0/32 is subnetted, 1 subnets
D EX 1.1.1.1 [170/2235136] via 23.1.1.2, 00:01:43, Serial1/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 23.1.1.2, 00:01:43, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
22.0.0.0/24 is subnetted, 1 subnets
D EX 22.22.22.0 [170/2297856] via 23.1.1.2, 00:00:49, Serial1/0
实验做到这里,感觉好像是因为自己在重发布的时候画蛇添足了,为何要这样人为地制造麻烦呢,直接redistribute rip route-map 不就行了。。。但是如果在以后需要用到重发布直连redistribute connected route-map,那么可能这些考虑就用到了。。。
这种情况原因:route-map匹配考虑不周全。
解决办法:
R2(config)#route-map RIP2EIGRP permit 20
R2(config-route-map)#end
R2#
R3#sh ip route
1.0.0.0/32 is subnetted, 1 subnets
D EX 1.1.1.1 [170/2235136] via 23.1.1.2, 00:12:59, Serial1/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 23.1.1.2, 00:12:59, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
22.0.0.0/24 is subnetted, 1 subnets
D EX 22.22.22.0 [170/2297856] via 23.1.1.2, 00:12:05, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
D EX 12.1.1.0 [170/2681856] via 23.1.1.2, 00:00:06, Serial1/0
同样在RIP直连重发布到OSPF中如果使用route-map的时候也要考虑这些情况。
-lo1(RIP)
R1--OSPF--R2--EIGRP--R3
----->
<-----
第一步: RIP--->OSPF
R2(config-router)#redistribute rip subnets
R1上有路由:
O E2 22.22.22.0 [110/20] via 12.1.1.2, 00:00:08, Serial1/1
而R3上没有
--->结论是,单点三向重发布,重发布路由作用只在相关的两个路由协议之间,不会再重发布给另一个协议。即,RIP重发布给OSPF的路由条目,OSPF不会再将这些条目重发布给EIGRP。
所以需要手动将RIP路由重发布到EIGRP中,需要执行重发布RIP两次。
R2(config-router)#redistribute rip metric 10000 255 100 1 255
R3上就会有:
D EX 22.22.22.0 [170/2235136] via 23.1.1.2, 00:00:08, Serial1/0
第二步:R2上
OSPF<----->EIGRP双向单点重发布
!
router eigrp 90
redistribute ospf 110 metric 10000 255 100 1 1500
redistribute rip metric 10000 255 100 1 255
network 2.2.2.2 0.0.0.0
network 23.1.1.2 0.0.0.0
no auto-summary
!
router ospf 110
router-id 2.2.2.2
log-adjacency-changes
redistribute eigrp 90 subnets
redistribute rip subnets
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.2 0.0.0.0 area 0
!
router rip
version 2
network 22.0.0.0
no auto-summary
!
第三步:比较三个路由器上的路由条目,都是6条路由。配置正确。
特殊情况:在重发布时使用route-map指定重发布的条目,而使用route-map是在重发布时推荐的做法。
!
router eigrp 90
redistribute connected route-map RIP2EIGRP
!
!
route-map RIP2EIGRP permit 10
match interface Loopback1
!
这样就会在R3上出现路由缺失的情况,因为route-map默认最后是deny any的,所有在redistribute connected route-map的情况下,只是重发布了route-map允许的路由,例如是lo1的路由,而redistribute connected会优于redistribute ospf,所以连R2直连的12.1.1.0网段路由都屏蔽了。如下:
R3#sh ip route
1.0.0.0/32 is subnetted, 1 subnets
D EX 1.1.1.1 [170/2235136] via 23.1.1.2, 00:01:43, Serial1/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 23.1.1.2, 00:01:43, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
22.0.0.0/24 is subnetted, 1 subnets
D EX 22.22.22.0 [170/2297856] via 23.1.1.2, 00:00:49, Serial1/0
实验做到这里,感觉好像是因为自己在重发布的时候画蛇添足了,为何要这样人为地制造麻烦呢,直接redistribute rip route-map 不就行了。。。但是如果在以后需要用到重发布直连redistribute connected route-map,那么可能这些考虑就用到了。。。
这种情况原因:route-map匹配考虑不周全。
解决办法:
R2(config)#route-map RIP2EIGRP permit 20
R2(config-route-map)#end
R2#
R3#sh ip route
1.0.0.0/32 is subnetted, 1 subnets
D EX 1.1.1.1 [170/2235136] via 23.1.1.2, 00:12:59, Serial1/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 23.1.1.2, 00:12:59, Serial1/0
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial1/0
22.0.0.0/24 is subnetted, 1 subnets
D EX 22.22.22.0 [170/2297856] via 23.1.1.2, 00:12:05, Serial1/0
12.0.0.0/24 is subnetted, 1 subnets
D EX 12.1.1.0 [170/2681856] via 23.1.1.2, 00:00:06, Serial1/0
同样在RIP直连重发布到OSPF中如果使用route-map的时候也要考虑这些情况。
汇总路由回馈问题:完美解决 route-map + prefix-list
单点双向重发布:考虑汇总路由回馈问题
R1--OSPF--R2--EIGRP--R3
----->
<-----
R2#sh run
!
router eigrp 90
redistribute ospf 110 metric 10000 255 100 1 1500
network 23.1.1.2 0.0.0.0
no auto-summary
!
router ospf 110
router-id 2.2.2.2
log-adjacency-changes
summary-address 172.16.0.0 255.255.252.0
redistribute eigrp 90 subnets
network 12.1.1.2 0.0.0.0 area 0
!
R2:
172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
D 172.16.0.0/24 [90/2297856] via 23.1.1.3, 00:04:00, Serial1/1
O 172.16.0.0/22 is a summary, 00:00:20, Null0
D 172.16.1.0/24 [90/2297856] via 23.1.1.3, 00:04:30, Serial1/1
D 172.16.2.0/24 [90/2297856] via 23.1.1.3, 00:04:21, Serial1/1
D 172.16.3.0/24 [90/2297856] via 23.1.1.3, 00:04:11, Serial1/1
R3:
172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
C 172.16.0.0/24 is directly connected, Loopback4
D EX 172.16.0.0/22 [170/3137280] via 23.1.1.2, 00:00:22, Serial1/0
C 172.16.1.0/24 is directly connected, Loopback1
C 172.16.2.0/24 is directly connected, Loopback2
C 172.16.3.0/24 is directly connected, Loopback3
-----------------------------------------------------------
防止汇总路由回馈:完美解决 route-map + prefix-list
R2#sh run b r e
router eigrp 90
redistribute ospf 110 metric 1000 255 100 1 1500 route-map anti-sum
network 23.1.1.2 0.0.0.0
no auto-summary
!
!
ip prefix-list anti-sum seq 5 permit 172.16.0.0/22
!
route-map anti-sum deny 10
match ip address prefix-list anti-sum
!
route-map anti-sum permit 20
!
R3:
172.16.0.0/24 is subnetted, 4 subnets
C 172.16.0.0 is directly connected, Loopback4
C 172.16.1.0 is directly connected, Loopback1
C 172.16.2.0 is directly connected, Loopback2
C 172.16.3.0 is directly connected, Loopback3
R1--OSPF--R2--EIGRP--R3
----->
<-----
R2#sh run
!
router eigrp 90
redistribute ospf 110 metric 10000 255 100 1 1500
network 23.1.1.2 0.0.0.0
no auto-summary
!
router ospf 110
router-id 2.2.2.2
log-adjacency-changes
summary-address 172.16.0.0 255.255.252.0
redistribute eigrp 90 subnets
network 12.1.1.2 0.0.0.0 area 0
!
R2:
172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
D 172.16.0.0/24 [90/2297856] via 23.1.1.3, 00:04:00, Serial1/1
O 172.16.0.0/22 is a summary, 00:00:20, Null0
D 172.16.1.0/24 [90/2297856] via 23.1.1.3, 00:04:30, Serial1/1
D 172.16.2.0/24 [90/2297856] via 23.1.1.3, 00:04:21, Serial1/1
D 172.16.3.0/24 [90/2297856] via 23.1.1.3, 00:04:11, Serial1/1
R3:
172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
C 172.16.0.0/24 is directly connected, Loopback4
D EX 172.16.0.0/22 [170/3137280] via 23.1.1.2, 00:00:22, Serial1/0
C 172.16.1.0/24 is directly connected, Loopback1
C 172.16.2.0/24 is directly connected, Loopback2
C 172.16.3.0/24 is directly connected, Loopback3
-----------------------------------------------------------
防止汇总路由回馈:完美解决 route-map + prefix-list
R2#sh run b r e
router eigrp 90
redistribute ospf 110 metric 1000 255 100 1 1500 route-map anti-sum
network 23.1.1.2 0.0.0.0
no auto-summary
!
!
ip prefix-list anti-sum seq 5 permit 172.16.0.0/22
!
route-map anti-sum deny 10
match ip address prefix-list anti-sum
!
route-map anti-sum permit 20
!
R3:
172.16.0.0/24 is subnetted, 4 subnets
C 172.16.0.0 is directly connected, Loopback4
C 172.16.1.0 is directly connected, Loopback1
C 172.16.2.0 is directly connected, Loopback2
C 172.16.3.0 is directly connected, Loopback3
路由优选部分_调整管理距离和metric
路由优选这回事
R1 R2 R3 FR帧中继相连 s1/2 123.1.1.0/24 OSPF
R2 R3 R4 以太网相连 fa 0/0 23.1.1.0/24 EIGRP
R2R3上双点双向重发布
R1上其环回
R1(config)#int lo 1
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#int lo 2
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#int lo 3
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#int lo 4
R1(config-if)#ip add 192.168.0.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#end
这时R4将会收到这几天路由,且由R2R3负载均衡线路。
要求:
192.168.0.0和192.169.2.0走R2
192.168.1.0和192.168.4.0走R3
即要求 奇数网络号走R3,偶数网络号走R2,且不能破坏链路的冗余特性。
===>最佳解决办法,使用route-map修改相应路由条目的metric,使R4不优选从R2或R3发来的这条路由条目。
R2:
!
router eigrp 90
redistribute ospf 110 metric 10000 100 255 1 1500 route-map O2E
network 2.2.2.2 0.0.0.0
network 23.1.1.2 0.0.0.0
no auto-summary
!
router ospf 110
router-id 2.2.2.2
log-adjacency-changes
redistribute eigrp 90 subnets
network 2.2.2.2 0.0.0.0 area 0
network 123.1.1.2 0.0.0.0 area 0
!
access-list 13 permit 192.168.1.0
access-list 13 permit 192.168.3.0
route-map O2E permit 10
match ip address 13
set metric 10000 1000 255 1 1500
!
route-map O2E permit 20
!
R4上的路由表:
D EX 192.168.0.0/24 [170/284160] via 23.1.1.2, 00:00:19, FastEthernet0/0
123.0.0.0/24 is subnetted, 1 subnets
D EX 123.1.1.0 [170/284160] via 23.1.1.2, 00:00:06, FastEthernet0/0
[170/284160] via 23.1.1.3, 00:00:06, FastEthernet0/0
D EX 192.168.1.0/24 [170/284160] via 23.1.1.3, 00:00:07, FastEthernet0/0
D EX 192.168.2.0/24 [170/284160] via 23.1.1.2, 00:00:21, FastEthernet0/0
D EX 192.168.3.0/24 [170/284160] via 23.1.1.3, 00:00:07, FastEthernet0/0
同样这个实验可以大大地扩展,这只是冰山一角而已。好像还可以使用反掩码精确匹配奇数或者偶数路由网络条目。例如:使用
R2(config)#access-list 13 permit 192.168.1.0 0.0.254.255
来代替
access-list 13 permit 192.168.1.0
access-list 13 permit 192.168.3.0
+++++++++++++++++++++++++++++++++++++++++++++++++
R1 R2 R3 FR帧中继相连 s1/2 123.1.1.0/24 OSPF
R2 R3 R4 以太网相连 fa 0/0 23.1.1.0/24 EIGRP
R2R3上双点双向重发布
R1上其环回
R1(config)#int lo 1
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#int lo 2
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#int lo 3
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#int lo 4
R1(config-if)#ip add 192.168.0.1 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#end
这时R4将会收到这几天路由,且由R2R3负载均衡线路。
要求:
192.168.0.0和192.169.2.0走R2
192.168.1.0和192.168.4.0走R3
即要求 奇数网络号走R3,偶数网络号走R2,且不能破坏链路的冗余特性。
===>最佳解决办法,使用route-map修改相应路由条目的metric,使R4不优选从R2或R3发来的这条路由条目。
R2:
!
router eigrp 90
redistribute ospf 110 metric 10000 100 255 1 1500 route-map O2E
network 2.2.2.2 0.0.0.0
network 23.1.1.2 0.0.0.0
no auto-summary
!
router ospf 110
router-id 2.2.2.2
log-adjacency-changes
redistribute eigrp 90 subnets
network 2.2.2.2 0.0.0.0 area 0
network 123.1.1.2 0.0.0.0 area 0
!
access-list 13 permit 192.168.1.0
access-list 13 permit 192.168.3.0
route-map O2E permit 10
match ip address 13
set metric 10000 1000 255 1 1500
!
route-map O2E permit 20
!
R4上的路由表:
D EX 192.168.0.0/24 [170/284160] via 23.1.1.2, 00:00:19, FastEthernet0/0
123.0.0.0/24 is subnetted, 1 subnets
D EX 123.1.1.0 [170/284160] via 23.1.1.2, 00:00:06, FastEthernet0/0
[170/284160] via 23.1.1.3, 00:00:06, FastEthernet0/0
D EX 192.168.1.0/24 [170/284160] via 23.1.1.3, 00:00:07, FastEthernet0/0
D EX 192.168.2.0/24 [170/284160] via 23.1.1.2, 00:00:21, FastEthernet0/0
D EX 192.168.3.0/24 [170/284160] via 23.1.1.3, 00:00:07, FastEthernet0/0
同样这个实验可以大大地扩展,这只是冰山一角而已。好像还可以使用反掩码精确匹配奇数或者偶数路由网络条目。例如:使用
R2(config)#access-list 13 permit 192.168.1.0 0.0.254.255
来代替
access-list 13 permit 192.168.1.0
access-list 13 permit 192.168.3.0
+++++++++++++++++++++++++++++++++++++++++++++++++
缺省默认路由的引入
前言:NP课上的,再次听到这些内容感觉印象很是模糊,特做个笔记。。。
TOPO:
R1-----R2-----R3-----ISP(R4)
R3: 一条到ISP的默认缺省路由
ip route 0.0.0.0 0.0.0.0 34.1.1.4
================================================
R1R2R3 运行的OSPF协议
R3(config-router)#default-information originate always
在远端路由器会产生:
O*E2 0.0.0.0/0 [110/1] via 12.1.1.2, 00:00:01, Serial1/1
数据库中传播的是一条Type-5 LSA
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 3.3.3.3 9 0x80000001 0x0092A6 110
R3(config)#router os 110
R3(config-router)#no default-information originate
R3(config-router)#end
+++++++++++++++++++++++++++++++++++++++++++++++++
R1R2R3 运行的EIGRP协议
R3(config)#router ei 90
R3(config-router)#redistribute static ?
metric Metric for redistributed routes
route-map Route map reference
R3(config-router)#redistribute static
R3(config-router)#end
远端路由器:
D*EX 0.0.0.0/0 [170/3193856] via 12.1.1.2, 00:00:11, Serial1/1
-----------------
* - candidate default
网关路由器R3:
router eigrp 90
redistribute connected
network 23.1.1.3 0.0.0.0
no auto-summary
!
ip default-network 192.168.1.0
ip route 0.0.0.0 0.0.0.0 34.1.1.4
!
interface Loopback1
ip address 192.168.1.1 255.255.255.0
end
远端路由器:
D*EX 192.168.1.0/24 [170/2809856] via 12.1.1.2, 00:00:25, Serial1/1
备注:这种情况要求default-network 3.0.0.0 是主类网络号,包括接口地址也必须是主类网络地址
例如:
!
interface Loopback0
ip address 3.3.3.3 255.0.0.0
!
ip default-network 3.0.0.0
!
远端路由器才会出现以下条目,注意是/8
D*EX 3.0.0.0/8 [170/2809856] via 12.1.1.2, 00:01:26, Serial1/1
网关路由器:
C* 3.0.0.0/8 is directly connected, Loopback0
------------------
网关路由器R3:使用汇总路由会产生一个缺省路由的特性
!
interface Serial1/0
ip address 23.1.1.3 255.255.255.0
ip summary-address eigrp 90 0.0.0.0 0.0.0.0 5
!
远端路由器:
D* 0.0.0.0/0 [90/2809856] via 12.1.1.2, 00:01:47, Serial1/1
同时在网关路由器R3上会引入一个指向null0的路由备份条目,因为先前已经存在了0.0.0.0指向ISP
P 0.0.0.0/0, 1 successors, FD is 128256
via Summary (128256/0), Null0
**注意:使用ip summary-address eigrp 90会抑制相应的详细路由,但是可以使用leakmap策略定义一些不愿被汇总路由抑制的一些详细路由条目.
+++++++++++++++++++++++++++++++++++++++++++++++++++++
TOPO:
R1-----R2-----R3-----ISP(R4)
R3: 一条到ISP的默认缺省路由
ip route 0.0.0.0 0.0.0.0 34.1.1.4
================================================
R1R2R3 运行的OSPF协议
R3(config-router)#default-information originate always
在远端路由器会产生:
O*E2 0.0.0.0/0 [110/1] via 12.1.1.2, 00:00:01, Serial1/1
数据库中传播的是一条Type-5 LSA
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 3.3.3.3 9 0x80000001 0x0092A6 110
R3(config)#router os 110
R3(config-router)#no default-information originate
R3(config-router)#end
+++++++++++++++++++++++++++++++++++++++++++++++++
R1R2R3 运行的EIGRP协议
R3(config)#router ei 90
R3(config-router)#redistribute static ?
metric Metric for redistributed routes
route-map Route map reference
R3(config-router)#redistribute static
R3(config-router)#end
远端路由器:
D*EX 0.0.0.0/0 [170/3193856] via 12.1.1.2, 00:00:11, Serial1/1
-----------------
* - candidate default
网关路由器R3:
router eigrp 90
redistribute connected
network 23.1.1.3 0.0.0.0
no auto-summary
!
ip default-network 192.168.1.0
ip route 0.0.0.0 0.0.0.0 34.1.1.4
!
interface Loopback1
ip address 192.168.1.1 255.255.255.0
end
远端路由器:
D*EX 192.168.1.0/24 [170/2809856] via 12.1.1.2, 00:00:25, Serial1/1
备注:这种情况要求default-network 3.0.0.0 是主类网络号,包括接口地址也必须是主类网络地址
例如:
!
interface Loopback0
ip address 3.3.3.3 255.0.0.0
!
ip default-network 3.0.0.0
!
远端路由器才会出现以下条目,注意是/8
D*EX 3.0.0.0/8 [170/2809856] via 12.1.1.2, 00:01:26, Serial1/1
网关路由器:
C* 3.0.0.0/8 is directly connected, Loopback0
------------------
网关路由器R3:使用汇总路由会产生一个缺省路由的特性
!
interface Serial1/0
ip address 23.1.1.3 255.255.255.0
ip summary-address eigrp 90 0.0.0.0 0.0.0.0 5
!
远端路由器:
D* 0.0.0.0/0 [90/2809856] via 12.1.1.2, 00:01:47, Serial1/1
同时在网关路由器R3上会引入一个指向null0的路由备份条目,因为先前已经存在了0.0.0.0指向ISP
P 0.0.0.0/0, 1 successors, FD is 128256
via Summary (128256/0), Null0
**注意:使用ip summary-address eigrp 90会抑制相应的详细路由,但是可以使用leakmap策略定义一些不愿被汇总路由抑制的一些详细路由条目.
+++++++++++++++++++++++++++++++++++++++++++++++++++++
2009/03/30
VoIP案例_烦尘子
很久都没有更新了,很是怀念。因为近期又是考试,又是关注51job的,很是没有多少时间让我不胡思乱想了,偶尔看到这篇VoIP的文章写得很好,但是可惜的是作者的博客已经关闭了,感谢烦尘子给我们网络众人奉献这么一篇文笔流畅浅简易懂的VoIP配置案例。
-----------------------------------------------------
某企业老板开明、有头脑,经营有方,从卖盒饭一步步发展到如今的在全国已有三家分公司,因此基在各方面都很仔细处处节俭,以节约企业成本。两个分公司和总部之间打电话都是使用传统的PSTN电话网络,每年的长话费用占公司很大一笔费用。
某天叫来负责管网络的小烦,说:你看XXX公司利用他们公司的企业网弄了个啥子IP电话,你看看咱们这个企业网能不能也利用利用!给咱们公司也节省些电话费!
拿着“圣旨”小烦仔细研究了起IP电话。
俗话说的IP电话就是VoIP,就是利用Internet/Intranet(IP)网络传递话带业务(包括话音/传真/话带数据等),即在分组交换网上通过(TCP/)IP协议实现传统的电话应用。
目前IP电话方案的设计有以下几种方式:普通语音网关接入方式,路由器接入方式,IP PHONE方式等。
1,普通语音网关接入方式是利用专用的语音网关设备连接语音程控交换机和广域网链路;
2,路由器接入方式是利用已有的路由器所具有的语音处理功能,实现传统模拟电话与IP网络的连接;
3,IP PHONE方式是使用软PBX,例如Cisco的Call Manager作为电话的管理中心,利用交换机连接IP电话,实现三网合一的连接模式。
在使用路由器布署IP电话的时候主要应用到以下几种类型语音卡:
§,FXS voice/fax接口卡。FXS的端口提供振铃电流,电压和拨号音。端口为标准的RJ11接头,用普通的电话线就可以直接接电话机。有一种说法通过电话线,FXS卡也可以接到标准模拟交换机的外线接口上(相当于电信局提供的一条外线)。还有一种说法是可以接PBX的中继接口上。
§, FXO voice/fax接口卡。FXO的端口相当于哑终端(电话机),本身无法提供振铃电流,电压和拨号音。端口也为标准的RJ11接口。它可以与PSTN的交换机相连,或者与PBX的标准接口(内线)相连。总之,它必须由对端提供振铃电流,电压和拨号音。
§, E/M voice/fax接口卡。E/M是一种交换机的接口标准。E/M卡主要用来与交换机上干线上的E/M口连接。
§, E1接口卡主要用来与交换机上的E1接口卡相连接,一路E1可以同时提供30路语音通话。
路由器的IOS软件需要是IP Plus特性的。
可以采用专门的AS5300 or AS5800语音接入网关,考虑到目前和以后企业IP电话的扩展可能性和最大通话连接数,决定还是利用原有设备增加语音模块的方案布署VoIP电话系统。
总部:Cisco3662:原有2块WIC-2T。增加NM-2V 2块、WIC-2FXO 4块
两分部:Cisco2621: 原有1块WIC-1T。增加NM-2V 1块、WIC-2FXS 1块
设计拓扑:
------------------------{PBX}------A]
fxo
(北京)1.1.1.1-----1.1.1.2 (上海)-- fxs -- B]
1.1.2.1
-----------------1.1.2.2 (深圳) -- fxs --C]
北京路由器配置:
interface FastEthernet0/0
ip address 10.10.0.1 255.255.255.0
!
interface Serial3/0
ip address 1.1.1.1 255.255.255.252
!
interface Serial3/1
ip address 1.1.2.1 255.255.255.252
!
voice-port 1/0/0
voice-port 1/0/1
……
dial-peer voice 1 pots
destination-pattern 0
port 1/0/0
!
dial-peer voice 2 pots
destination-pattern 0
port 1/0/1
!
dial-peer voice 10 voip
destination-pattern 100
session target ipv4:1.1.1.2
!
dial-peer voice 20 voip
destination-pattern 200
session target ipv4:1.1.2.2
!
router ospf 100
log-adjacency-changes
network 1.1.0.0 0.0.255.255 area 1
network 10.10.0.0 0.0.255.255 area 1
上海配置:
interface FastEthernet0/0
ip address 10.10.1.1 255.255.255.0
!
interface Serial0/0
ip address 1.1.1.2 255.255.255.252
!
voice-port 1/0/0
voice-port 1/0/1
!
dial-peer voice 1 pots
destination-pattern 100
port 1/0/0
!
dial-peer voice 2 pots
destination-pattern 101
port 1/0/1
!
dial-peer voice 3 voip
destination-pattern 0
session target ipv4:1.1.1.1
!
dial-peer voice 4 voip
destination-pattern 2..
session target ipv4:1.1.2.2
!
router ospf 100
network 1.1.0.0 0.0.255.255 area 1
network 10.10.0.0 0.0.255.255 area 1
!
深圳配置
interface FastEthernet0/0
ip address 10.10.2.1 255.255.255.0
!
interface Serial0/0
ip address 1.1.2.2 255.255.255.252
!
voice-port 1/0/0
voice-port 1/0/1
!
dial-peer voice 1 pots
destination-pattern 200
port 1/0/0
!
dial-peer voice 2 pots
destination-pattern 201
port 1/0/1
!
dial-peer voice 3 voip
destination-pattern 0
session target ipv4:1.1.1.1
!
dial-peer voice 4 voip
destination-pattern 1..
session target ipv4:1.1.1.2
!
router ospf 100
network 1.1.0.0 0.0.255.255 area 1
network 10.10.0.0 0.0.255.255 area 1
!
到此所有配置均配置完毕,在北京总部拿起电话A先拔FXO在PBX接口上的分机号888,出现提示音,然后拔上海的电话号100,此时上海的电话B响起。接起即可以通话了,听一听,音质还不错。
从B拔C,也可以通话,通话质量均还可以。
从B和C拔A也能拔通。
在VoIP系统中存在几个拔号的段,第一段是模拟电话到PBX的呼叫段,第二段PBX到路由器上fxo模块的呼叫段,第三段为路由器到到路由器,第四段为路由器上fxs到电话的呼叫段。
老板很高兴狠狠的表杨了一屯小烦,可是过了一段时间老板把小烦叫来狠狠的训了一屯,说你弄的啥VOIP电话啊!我中午想睡一会儿,有人打电话给我,我没有接,电话却一直响啊响的不停,我拿起一听也没人说话。烦死人了,你快快看看咋回事儿!!!
小烦急忙让分部的人用B电话打A电话测试 ,果然一直响,咋回事儿呢!!!查看配置,没错啊!是啥问题呢!!
从A打B,不出现这个问题;从B打C或者从C打B也不出现这个问题,那问题应该出在中心路由器或者PBX这块儿,换了一台PBX试试,问题依旧。
PBX排除了,那问题可能在中心路由器上,可能是FXO接口这块儿。于是上cisco.com查FXO相关的错误,查到<>手册。试试!!
在中心路由器上增加了如下配置:
voice-port 1/0/0
cptone CN
timeouts call-disconnect 0
timeouts ringing 5
timeouts wait-release 1
这些命令加进去后,问题解决!!
小烦长长的松了口气,终于可以休息下了!
整理下配置资料:
dial-peer voice 1 pots ******建立拔号对等体1
destination-pattern 0 ******设置号码为0, 有多个号码在0后面加相应的点号即可,如0…
port 1/0/0 ******和语音端口绑定
dial-peer voice 10 voip ******建立VoIP拔号对等体10
destination-pattern 100 ******设置拔号号码为100
session target ipv4:1.1.1.2 ******设置VoIP对体等对应的IP网关
voice-port 1/0/0 ******进入语音接口1/0/0配置模式
cptone CN ******设置区域
timeouts call-disconnect 0 ******设置呼叫无应答挂断时间
timeouts ringing 5 ******设置振铃时间
timeouts wait-release 1 ******设置等待释放时间
*****************over*********************
-----------------------------------------------------
某企业老板开明、有头脑,经营有方,从卖盒饭一步步发展到如今的在全国已有三家分公司,因此基在各方面都很仔细处处节俭,以节约企业成本。两个分公司和总部之间打电话都是使用传统的PSTN电话网络,每年的长话费用占公司很大一笔费用。
某天叫来负责管网络的小烦,说:你看XXX公司利用他们公司的企业网弄了个啥子IP电话,你看看咱们这个企业网能不能也利用利用!给咱们公司也节省些电话费!
拿着“圣旨”小烦仔细研究了起IP电话。
俗话说的IP电话就是VoIP,就是利用Internet/Intranet(IP)网络传递话带业务(包括话音/传真/话带数据等),即在分组交换网上通过(TCP/)IP协议实现传统的电话应用。
目前IP电话方案的设计有以下几种方式:普通语音网关接入方式,路由器接入方式,IP PHONE方式等。
1,普通语音网关接入方式是利用专用的语音网关设备连接语音程控交换机和广域网链路;
2,路由器接入方式是利用已有的路由器所具有的语音处理功能,实现传统模拟电话与IP网络的连接;
3,IP PHONE方式是使用软PBX,例如Cisco的Call Manager作为电话的管理中心,利用交换机连接IP电话,实现三网合一的连接模式。
在使用路由器布署IP电话的时候主要应用到以下几种类型语音卡:
§,FXS voice/fax接口卡。FXS的端口提供振铃电流,电压和拨号音。端口为标准的RJ11接头,用普通的电话线就可以直接接电话机。有一种说法通过电话线,FXS卡也可以接到标准模拟交换机的外线接口上(相当于电信局提供的一条外线)。还有一种说法是可以接PBX的中继接口上。
§, FXO voice/fax接口卡。FXO的端口相当于哑终端(电话机),本身无法提供振铃电流,电压和拨号音。端口也为标准的RJ11接口。它可以与PSTN的交换机相连,或者与PBX的标准接口(内线)相连。总之,它必须由对端提供振铃电流,电压和拨号音。
§, E/M voice/fax接口卡。E/M是一种交换机的接口标准。E/M卡主要用来与交换机上干线上的E/M口连接。
§, E1接口卡主要用来与交换机上的E1接口卡相连接,一路E1可以同时提供30路语音通话。
路由器的IOS软件需要是IP Plus特性的。
可以采用专门的AS5300 or AS5800语音接入网关,考虑到目前和以后企业IP电话的扩展可能性和最大通话连接数,决定还是利用原有设备增加语音模块的方案布署VoIP电话系统。
总部:Cisco3662:原有2块WIC-2T。增加NM-2V 2块、WIC-2FXO 4块
两分部:Cisco2621: 原有1块WIC-1T。增加NM-2V 1块、WIC-2FXS 1块
设计拓扑:
------------------------{PBX}------A]
fxo
(北京)1.1.1.1-----1.1.1.2 (上海)-- fxs -- B]
1.1.2.1
-----------------1.1.2.2 (深圳) -- fxs --C]
北京路由器配置:
interface FastEthernet0/0
ip address 10.10.0.1 255.255.255.0
!
interface Serial3/0
ip address 1.1.1.1 255.255.255.252
!
interface Serial3/1
ip address 1.1.2.1 255.255.255.252
!
voice-port 1/0/0
voice-port 1/0/1
……
dial-peer voice 1 pots
destination-pattern 0
port 1/0/0
!
dial-peer voice 2 pots
destination-pattern 0
port 1/0/1
!
dial-peer voice 10 voip
destination-pattern 100
session target ipv4:1.1.1.2
!
dial-peer voice 20 voip
destination-pattern 200
session target ipv4:1.1.2.2
!
router ospf 100
log-adjacency-changes
network 1.1.0.0 0.0.255.255 area 1
network 10.10.0.0 0.0.255.255 area 1
上海配置:
interface FastEthernet0/0
ip address 10.10.1.1 255.255.255.0
!
interface Serial0/0
ip address 1.1.1.2 255.255.255.252
!
voice-port 1/0/0
voice-port 1/0/1
!
dial-peer voice 1 pots
destination-pattern 100
port 1/0/0
!
dial-peer voice 2 pots
destination-pattern 101
port 1/0/1
!
dial-peer voice 3 voip
destination-pattern 0
session target ipv4:1.1.1.1
!
dial-peer voice 4 voip
destination-pattern 2..
session target ipv4:1.1.2.2
!
router ospf 100
network 1.1.0.0 0.0.255.255 area 1
network 10.10.0.0 0.0.255.255 area 1
!
深圳配置
interface FastEthernet0/0
ip address 10.10.2.1 255.255.255.0
!
interface Serial0/0
ip address 1.1.2.2 255.255.255.252
!
voice-port 1/0/0
voice-port 1/0/1
!
dial-peer voice 1 pots
destination-pattern 200
port 1/0/0
!
dial-peer voice 2 pots
destination-pattern 201
port 1/0/1
!
dial-peer voice 3 voip
destination-pattern 0
session target ipv4:1.1.1.1
!
dial-peer voice 4 voip
destination-pattern 1..
session target ipv4:1.1.1.2
!
router ospf 100
network 1.1.0.0 0.0.255.255 area 1
network 10.10.0.0 0.0.255.255 area 1
!
到此所有配置均配置完毕,在北京总部拿起电话A先拔FXO在PBX接口上的分机号888,出现提示音,然后拔上海的电话号100,此时上海的电话B响起。接起即可以通话了,听一听,音质还不错。
从B拔C,也可以通话,通话质量均还可以。
从B和C拔A也能拔通。
在VoIP系统中存在几个拔号的段,第一段是模拟电话到PBX的呼叫段,第二段PBX到路由器上fxo模块的呼叫段,第三段为路由器到到路由器,第四段为路由器上fxs到电话的呼叫段。
老板很高兴狠狠的表杨了一屯小烦,可是过了一段时间老板把小烦叫来狠狠的训了一屯,说你弄的啥VOIP电话啊!我中午想睡一会儿,有人打电话给我,我没有接,电话却一直响啊响的不停,我拿起一听也没人说话。烦死人了,你快快看看咋回事儿!!!
小烦急忙让分部的人用B电话打A电话测试 ,果然一直响,咋回事儿呢!!!查看配置,没错啊!是啥问题呢!!
从A打B,不出现这个问题;从B打C或者从C打B也不出现这个问题,那问题应该出在中心路由器或者PBX这块儿,换了一台PBX试试,问题依旧。
PBX排除了,那问题可能在中心路由器上,可能是FXO接口这块儿。于是上cisco.com查FXO相关的错误,查到<
在中心路由器上增加了如下配置:
voice-port 1/0/0
cptone CN
timeouts call-disconnect 0
timeouts ringing 5
timeouts wait-release 1
这些命令加进去后,问题解决!!
小烦长长的松了口气,终于可以休息下了!
整理下配置资料:
dial-peer voice 1 pots ******建立拔号对等体1
destination-pattern 0 ******设置号码为0, 有多个号码在0后面加相应的点号即可,如0…
port 1/0/0 ******和语音端口绑定
dial-peer voice 10 voip ******建立VoIP拔号对等体10
destination-pattern 100 ******设置拔号号码为100
session target ipv4:1.1.1.2 ******设置VoIP对体等对应的IP网关
voice-port 1/0/0 ******进入语音接口1/0/0配置模式
cptone CN ******设置区域
timeouts call-disconnect 0 ******设置呼叫无应答挂断时间
timeouts ringing 5 ******设置振铃时间
timeouts wait-release 1 ******设置等待释放时间
*****************over*********************
2009/03/11
BGP/IBGP/EBGP/IGP各得其所
先看一道CCIP-BGP的考题(引自Pass4sure 642-661):
Q: Please Match proper relationship between the correct description and the EBGP,IBGP or IGP category.
1. has the lowest default admin distance
2. has the highest default admin distance
3. not affected by route flaps external to the AS
4. propagates the internal subnets and BGP next-hop
5. propagates routing updates to an external AS
6. propagates the external routes within the AS
I. EBGP
II. IBGP
III. IGP
A. I-(1,5);II-(2,6);III-(3,4)
B. I-(1,3);II-(2,5);III-(4,6)
C. I-(2,5);II-(1,6);III-(3,4)
D. I-(3,5);II-(1,6);III-(2,4)
文章转自:http://kachy.net/?p=457
Answer: alpha
这道题主要就是考察路由协议之间的比较,先简单做个说明。
路由选择协议根据运行区域范围可以分为以下两大类:
1、IGP(内部网关协议):用于在自治系统内部交换路由信息。RIP、IGRP、EIGRP、OSPF都属于IGP。
2、EGP(外部网关协议):用于在不同自治系统之间交换路由信息。BGP(边界网关协议)就属于EGP。
此题重点在BGP知识点上面。
为什么要有IBGP
我们知道,在自治系统内部使用IGP路由协议,而在不同自治系统之间使用BGP路由协议(严格来讲,BGP不是路由协议).BGP产生的原因是为了在不同自治系统(AS)之间进行路由转发,而其中又提出了EBGP和IBGP两种,EBGP用于在不同自治系统之间,但IBGP,书上说它是应用于自治系统内部,可是在自治系统内部我们是使用IGP.这就和”BGP是应用于不同自治系统之间”产生矛盾,那么IBGP存在的意义,比如说某种情况,需要使用到IBGP,它在网络中起到的作用.EBGP与 IBGP之间的区别,EBGP在网络中又起什么作用?
为什么要有IBGP,原因如下:
1、IGP的能力限制,IGP处理路由的条目有限,而目前internet上核心路由器的路由表已经超过10万条。假如没有IBGP,那么这些路由只能采取重分发的方式直接导入到IGP中,这样做的缺点很明显:第一,IGP协议的作者并没有打算让IGP来处理如此大量的路由,IGP本身也无法处理这样大的路由数量;第二,如果非要让IGP来处理,那么根据IGP的处理原则,假如这10万路由中任何一条路由发生变化,那么运行IGP的路由器就不得不重新计算路由,更为严重的是,假如其中某一条路由出现路由抖动的情况,例如端口反复UP/DOWN,这会导致所有的IGP路由器每时每刻都不得不把10万条路由重新计算一遍,这种计算量对于绝大多数路由器来说是无法负担的。另外对于运行RIPv1的路由器来说,10万条路由的定期更新,这根本就是无法接受的事情,除去带宽占用率不谈,我想,也只有少量高端的GSR以及TSR能够有这样的性能吧。很显然,我们不可能让网络中所有的路由器都是GSR和TSR,如果真是这样,那么Cisco、Juniper以及华为等厂家就要偷笑了。例如:AS100—-AS200—AS300,假定AS100/200/300各有100台路由器,而AS100中有 1W条路由要传递要AS300中,而AS200的路由器不需要学习AS100的路由。如果没有IBGP的话,那么这1W条路由都必须被重分发到AS200 的IGP中去,这样的话,相当于AS200中所有的100台路由器都增加了1W条路由。如果利用IBGP的话,那么AS200中只有运行IBGP的路由器会学习到这1W条路由,其它运行IGP的路由器都不会学习到这1W条路由。并且由于BGP的路由控制能力大大强于IGP的路由控制能力,因此运行IBGP 的路由器比运行IGP的路由器能更好的对这1W条路由做一些路由策略的处理,从而保证整个AS内部的路由器学习到的路由数目可以控制在可接受的范围之内。
2、路由环路的问题。BGP是靠路由属性来防止路由环路的,例如AS_PATH属性,假如说没有IBGP协议,那么当所有BGP路由重分发到IGP中后,路由属性必然丢失,这就破坏了BGP的路由环路防止机制,产生了路由环路的隐患。
那么引申一下,既然IBGP能够传送所有的路由前缀,为什么还需要IGP?
1、IBGP之间是TCP连接,也就意味着IBGP邻居采用的是逻辑连接的方式,两个IBGP连接不一定存在实际的物理链路。所以需要有IGP来提供路由,以完成BGP路由的递归查找。
2、BGP协议本身实际上并不发现路由,BGP将路由发现的工作全部移交给了IGP协议,它本身着重于路由的控制。因此,如果没有IGP,那么BGP也就毫无用处了。
EBGP与IBGP的区别:
1、路由环路的避免措施不一样,IBGP强制规定ibgp speaker不允许把从一个ibgp邻居学习到的前缀传递给其它ibgp邻居,因此IBGP要求逻辑全连接。EBGP没有这样的要求,EBGP对路由环路的避免是通过AS_PATH属性来实现的。
2、使用的BGP属性不同,例如IBGP可以传递LOCAL_PREF(本地优先属性),而EBGP不行。
3、IBGP有同步的要求,而EBGP没有同步的要求
4、IBGP不需要IBGP邻居之间有物理连接,只需要逻辑连接即可,而EBGP下一般情况下都要求EBGP邻居之间存在物理连接。
EBGP在网络中起什么作用?这个题目太大了,EBGP我认为是在不同的AS之间提供路由的传递以及路由的控制,了解了BGP属性的用法,也就了解了EBGP的作用。
Q: Please Match proper relationship between the correct description and the EBGP,IBGP or IGP category.
1. has the lowest default admin distance
2. has the highest default admin distance
3. not affected by route flaps external to the AS
4. propagates the internal subnets and BGP next-hop
5. propagates routing updates to an external AS
6. propagates the external routes within the AS
I. EBGP
II. IBGP
III. IGP
A. I-(1,5);II-(2,6);III-(3,4)
B. I-(1,3);II-(2,5);III-(4,6)
C. I-(2,5);II-(1,6);III-(3,4)
D. I-(3,5);II-(1,6);III-(2,4)
文章转自:http://kachy.net/?p=457
Answer: alpha
这道题主要就是考察路由协议之间的比较,先简单做个说明。
路由选择协议根据运行区域范围可以分为以下两大类:
1、IGP(内部网关协议):用于在自治系统内部交换路由信息。RIP、IGRP、EIGRP、OSPF都属于IGP。
2、EGP(外部网关协议):用于在不同自治系统之间交换路由信息。BGP(边界网关协议)就属于EGP。
此题重点在BGP知识点上面。
为什么要有IBGP
我们知道,在自治系统内部使用IGP路由协议,而在不同自治系统之间使用BGP路由协议(严格来讲,BGP不是路由协议).BGP产生的原因是为了在不同自治系统(AS)之间进行路由转发,而其中又提出了EBGP和IBGP两种,EBGP用于在不同自治系统之间,但IBGP,书上说它是应用于自治系统内部,可是在自治系统内部我们是使用IGP.这就和”BGP是应用于不同自治系统之间”产生矛盾,那么IBGP存在的意义,比如说某种情况,需要使用到IBGP,它在网络中起到的作用.EBGP与 IBGP之间的区别,EBGP在网络中又起什么作用?
为什么要有IBGP,原因如下:
1、IGP的能力限制,IGP处理路由的条目有限,而目前internet上核心路由器的路由表已经超过10万条。假如没有IBGP,那么这些路由只能采取重分发的方式直接导入到IGP中,这样做的缺点很明显:第一,IGP协议的作者并没有打算让IGP来处理如此大量的路由,IGP本身也无法处理这样大的路由数量;第二,如果非要让IGP来处理,那么根据IGP的处理原则,假如这10万路由中任何一条路由发生变化,那么运行IGP的路由器就不得不重新计算路由,更为严重的是,假如其中某一条路由出现路由抖动的情况,例如端口反复UP/DOWN,这会导致所有的IGP路由器每时每刻都不得不把10万条路由重新计算一遍,这种计算量对于绝大多数路由器来说是无法负担的。另外对于运行RIPv1的路由器来说,10万条路由的定期更新,这根本就是无法接受的事情,除去带宽占用率不谈,我想,也只有少量高端的GSR以及TSR能够有这样的性能吧。很显然,我们不可能让网络中所有的路由器都是GSR和TSR,如果真是这样,那么Cisco、Juniper以及华为等厂家就要偷笑了。例如:AS100—-AS200—AS300,假定AS100/200/300各有100台路由器,而AS100中有 1W条路由要传递要AS300中,而AS200的路由器不需要学习AS100的路由。如果没有IBGP的话,那么这1W条路由都必须被重分发到AS200 的IGP中去,这样的话,相当于AS200中所有的100台路由器都增加了1W条路由。如果利用IBGP的话,那么AS200中只有运行IBGP的路由器会学习到这1W条路由,其它运行IGP的路由器都不会学习到这1W条路由。并且由于BGP的路由控制能力大大强于IGP的路由控制能力,因此运行IBGP 的路由器比运行IGP的路由器能更好的对这1W条路由做一些路由策略的处理,从而保证整个AS内部的路由器学习到的路由数目可以控制在可接受的范围之内。
2、路由环路的问题。BGP是靠路由属性来防止路由环路的,例如AS_PATH属性,假如说没有IBGP协议,那么当所有BGP路由重分发到IGP中后,路由属性必然丢失,这就破坏了BGP的路由环路防止机制,产生了路由环路的隐患。
那么引申一下,既然IBGP能够传送所有的路由前缀,为什么还需要IGP?
1、IBGP之间是TCP连接,也就意味着IBGP邻居采用的是逻辑连接的方式,两个IBGP连接不一定存在实际的物理链路。所以需要有IGP来提供路由,以完成BGP路由的递归查找。
2、BGP协议本身实际上并不发现路由,BGP将路由发现的工作全部移交给了IGP协议,它本身着重于路由的控制。因此,如果没有IGP,那么BGP也就毫无用处了。
EBGP与IBGP的区别:
1、路由环路的避免措施不一样,IBGP强制规定ibgp speaker不允许把从一个ibgp邻居学习到的前缀传递给其它ibgp邻居,因此IBGP要求逻辑全连接。EBGP没有这样的要求,EBGP对路由环路的避免是通过AS_PATH属性来实现的。
2、使用的BGP属性不同,例如IBGP可以传递LOCAL_PREF(本地优先属性),而EBGP不行。
3、IBGP有同步的要求,而EBGP没有同步的要求
4、IBGP不需要IBGP邻居之间有物理连接,只需要逻辑连接即可,而EBGP下一般情况下都要求EBGP邻居之间存在物理连接。
EBGP在网络中起什么作用?这个题目太大了,EBGP我认为是在不同的AS之间提供路由的传递以及路由的控制,了解了BGP属性的用法,也就了解了EBGP的作用。
转:CISCO Router&Switch 操作小技巧
CISCO Router&Switch 操作小技巧
發佈網址:http://WWW.ITPro.tw
作者:呂堃楠 Email:Mark@mail.itpro.tw MSN : Mark.ITPro@hotmail.com
前言:
這篇文章主要要表達就是CISCO Router和CISCO Switch 於指令操作的小技巧,方便網管朋友在管理CISCO設備的時候可以更容易由螢幕輸出的訊息中找到需要的關鍵資訊。
再看這篇文章的同時建議使用者可以順便複習一下CCNA課程中基本的指令。
若您要練習本篇所提及的技巧建議手上要有一顆CISCO Router(IOS 12.x)或是Dynamips模擬器。
在本文中堃哥將文章分成兩個部份:
第一部份是(一)基本命令講解。
第二部份是(二)技巧練習。
(一)基本命令講解
1.1 Show Running-configure Current operating configuration 使用sh run顯示當前設定檔
輸出範例如下:
ITPro-Labs#sh run
Building configuration…
Current configuration : 2153 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname ITPro-Labs
boot-start-marker
boot-end-marker
enable secret 5 $1$9hCY$O3nRYLpuYDXPaSLh95uTA.
aaa new-model
ip cef
ip sla monitor 10
type tcpConnect dest-ipaddr 1.1.1.2 dest-port 23 source-ipaddr 1.1.1.1 source-port 22392
frequency 3600
ip sla monitor schedule 10 life forever start-time now
frame-relay de-list 1 protocol ip
frame-relay de-list 1 protocol ip list 101
…(後省略)
上面顯示目前Router的設定,倘若要由眾多設定資訊中找到特定的關鍵可以使用下面參數
1.1.1 Show Running-configure 加上參數 include [關鍵字]
這句話的意思是有眾多顯示畫面的設定檔中找到我們輸入”特定”的關鍵字,例如我們要於上面的設定檔中找到
Router啟用sla則我們可以輸入 sh run i sla 顯示結果如下
ip sla monitor 10
ip sla monitor schedule 10 life forever start-time now
系統會將Running-Configure中關於sla的關鍵字給找出來。
◎有使用Linux或是UnIX的朋友對上述的命令應該不陌生其實這就是管線的概念將螢幕輸出的資訊透過 管線然後使用 include其實也就是 unix 中的 grep 找到特定的資訊。
1.1.2 Show Running-configure 加上參數 begin [關鍵字]
這句話的意思是找尋設定檔中將我們輸入的關鍵字”之後”的資訊都顯示出來,
簡單的說如果我們要找sla之後的訊息我們可以輸入sh run b sla 顯示結果如下
ip sla monitor 10 —-sla之後均顯示出來
type tcpConnect dest-ipaddr 1.1.1.2 dest-port 23 source-ipaddr 1.1.1.1 source-port
22392 frequency 3600
ip sla monitor schedule 10 life forever start-time now
frame-relay de-list 1 protocol ip
frame-relay de-list 1 protocol ip list 101
比對前面的輸出範例會發現 sla關鍵字之前的訊息都消失了,系統只會顯示sla之後的訊息,這是一個相當有用的命令,例如我們要找尋Running-Configure中關於eigrp的資訊我們可以輸入,Sh run b router eigrp 如此系統就只會顯示出eigrp之後的命令,可以很方便的找到關於EIGRP的訊息。
1.1.3 Show Running-configure 加上參數 exclude [關鍵字]
這句話的意思是找尋設定檔中將我們輸入的關鍵字以外的資訊都顯示出來,
簡單的說如果我們“排除”sla所有的訊息我們可以輸入sh run e sla 顯示結果如下
Building configuration…
Current configuration : 2153 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname ITPro-Labs
boot-start-marker
boot-end-marker
enable secret 5 $1$9hCY$O3nRYLpuYDXPaSLh95uTA.
aaa new-model
ip cef
type tcpConnect dest-ipaddr 1.1.1.2 dest-port 23 source-ipaddr 1.1.1.1 source-port 22392
frame-relay de-list 1 protocol ip
frame-relay de-list 1 protocol ip
由上述範例輸出我們可以清楚看見關於 sla的命令已經被排除了。
1.4 Show Running-configure 加上參數 /[關鍵字] 符號
這句話的意思是找尋設定檔中將我們輸入的關鍵字之後的資訊都顯示出來用法和 include類似差別在於當我們使用Show Running-configure在看設定檔時如果設定檔過長通常底下會出現 –More– 的訊息要我們進行換頁此時我們可以輸入 /[關鍵字]
直接由 Show Running-configure找到我們要的資訊十分的方便大家可以練習一下使用/[關鍵字]和include [關鍵字]兩者之間有什麼不同。
重點整理
使用 參數 include [關鍵字]
找尋螢幕中特定關鍵字
使用 參數 begin [關鍵字]
顯示螢幕中特定關鍵字之後的字串
使用 參數 exclude [關鍵字]
排除螢幕中特定關鍵字
使用 參數 /[關鍵字]
找尋螢幕中特定關鍵字
(二)技巧練習
熟悉上面技巧之後我們可以立刻將它用於我們實務環境中
Q2.1找出所有Router介面哪些介面是顯示 Down的 ??
A2.1我們可以輸入 ITPro-Labs#sh int i down
顯示如下:
FastEthernet0/1 is administratively down, line protocol is down
Serial1/0 is up, line protocol is down
Serial1/1 is up, line protocol is down
LMI enq sent 175, LMI stat recvd 0, LMI upd recvd 0, DTE LMI down
0 carrier transitions DCD=down DSR=down DTR=up RTS=up CTS=down
Serial1/2 is administratively down, line protocol is down
LMI enq sent 0, LMI stat recvd 0, LMI upd recvd 0, DTE LMI down
0 carrier transitions DCD=down DSR=down DTR=up RTS=up CTS=down
Serial1/3 is administratively down, line protocol is down
1 carrier transitions DCD=down DSR=down DTR=up RTS=up CTS=down
可以將所有介面關於Down的資訊全部找出來。
Q2.2利用 sh ip route找出所以關於 5.5.5.0 的路由 ??
A2.2我們可以輸入 sh ip route i 5.5.5.0
顯示如下:
ITPro-Labs#sh ip route i 5.5.5.0
C 5.5.5.0 is directly connected, Loopback5
如此則可以再上萬條路由中輕鬆找到我們想知道的路由資訊。
結語!
上述簡單的小技巧可方便於眾多資訊中找到我們需要的,熟悉上述資訊對於我們日常Debug 網路有很大的幫助,希望上述資訊對正在學習CISCO相關知識的使用者有幫助,若對文章有任何問題請寫Email告訴我,謝謝。
發佈網址:http://WWW.ITPro.tw
作者:呂堃楠 Email:Mark@mail.itpro.tw MSN : Mark.ITPro@hotmail.com
前言:
這篇文章主要要表達就是CISCO Router和CISCO Switch 於指令操作的小技巧,方便網管朋友在管理CISCO設備的時候可以更容易由螢幕輸出的訊息中找到需要的關鍵資訊。
再看這篇文章的同時建議使用者可以順便複習一下CCNA課程中基本的指令。
若您要練習本篇所提及的技巧建議手上要有一顆CISCO Router(IOS 12.x)或是Dynamips模擬器。
在本文中堃哥將文章分成兩個部份:
第一部份是(一)基本命令講解。
第二部份是(二)技巧練習。
(一)基本命令講解
1.1 Show Running-configure Current operating configuration 使用sh run顯示當前設定檔
輸出範例如下:
ITPro-Labs#sh run
Building configuration…
Current configuration : 2153 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname ITPro-Labs
boot-start-marker
boot-end-marker
enable secret 5 $1$9hCY$O3nRYLpuYDXPaSLh95uTA.
aaa new-model
ip cef
ip sla monitor 10
type tcpConnect dest-ipaddr 1.1.1.2 dest-port 23 source-ipaddr 1.1.1.1 source-port 22392
frequency 3600
ip sla monitor schedule 10 life forever start-time now
frame-relay de-list 1 protocol ip
frame-relay de-list 1 protocol ip list 101
…(後省略)
上面顯示目前Router的設定,倘若要由眾多設定資訊中找到特定的關鍵可以使用下面參數
1.1.1 Show Running-configure 加上參數 include [關鍵字]
這句話的意思是有眾多顯示畫面的設定檔中找到我們輸入”特定”的關鍵字,例如我們要於上面的設定檔中找到
Router啟用sla則我們可以輸入 sh run i sla 顯示結果如下
ip sla monitor 10
ip sla monitor schedule 10 life forever start-time now
系統會將Running-Configure中關於sla的關鍵字給找出來。
◎有使用Linux或是UnIX的朋友對上述的命令應該不陌生其實這就是管線的概念將螢幕輸出的資訊透過 管線然後使用 include其實也就是 unix 中的 grep 找到特定的資訊。
1.1.2 Show Running-configure 加上參數 begin [關鍵字]
這句話的意思是找尋設定檔中將我們輸入的關鍵字”之後”的資訊都顯示出來,
簡單的說如果我們要找sla之後的訊息我們可以輸入sh run b sla 顯示結果如下
ip sla monitor 10 —-sla之後均顯示出來
type tcpConnect dest-ipaddr 1.1.1.2 dest-port 23 source-ipaddr 1.1.1.1 source-port
22392 frequency 3600
ip sla monitor schedule 10 life forever start-time now
frame-relay de-list 1 protocol ip
frame-relay de-list 1 protocol ip list 101
比對前面的輸出範例會發現 sla關鍵字之前的訊息都消失了,系統只會顯示sla之後的訊息,這是一個相當有用的命令,例如我們要找尋Running-Configure中關於eigrp的資訊我們可以輸入,Sh run b router eigrp 如此系統就只會顯示出eigrp之後的命令,可以很方便的找到關於EIGRP的訊息。
1.1.3 Show Running-configure 加上參數 exclude [關鍵字]
這句話的意思是找尋設定檔中將我們輸入的關鍵字以外的資訊都顯示出來,
簡單的說如果我們“排除”sla所有的訊息我們可以輸入sh run e sla 顯示結果如下
Building configuration…
Current configuration : 2153 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname ITPro-Labs
boot-start-marker
boot-end-marker
enable secret 5 $1$9hCY$O3nRYLpuYDXPaSLh95uTA.
aaa new-model
ip cef
type tcpConnect dest-ipaddr 1.1.1.2 dest-port 23 source-ipaddr 1.1.1.1 source-port 22392
frame-relay de-list 1 protocol ip
frame-relay de-list 1 protocol ip
由上述範例輸出我們可以清楚看見關於 sla的命令已經被排除了。
1.4 Show Running-configure 加上參數 /[關鍵字] 符號
這句話的意思是找尋設定檔中將我們輸入的關鍵字之後的資訊都顯示出來用法和 include類似差別在於當我們使用Show Running-configure在看設定檔時如果設定檔過長通常底下會出現 –More– 的訊息要我們進行換頁此時我們可以輸入 /[關鍵字]
直接由 Show Running-configure找到我們要的資訊十分的方便大家可以練習一下使用/[關鍵字]和include [關鍵字]兩者之間有什麼不同。
重點整理
使用 參數 include [關鍵字]
找尋螢幕中特定關鍵字
使用 參數 begin [關鍵字]
顯示螢幕中特定關鍵字之後的字串
使用 參數 exclude [關鍵字]
排除螢幕中特定關鍵字
使用 參數 /[關鍵字]
找尋螢幕中特定關鍵字
(二)技巧練習
熟悉上面技巧之後我們可以立刻將它用於我們實務環境中
Q2.1找出所有Router介面哪些介面是顯示 Down的 ??
A2.1我們可以輸入 ITPro-Labs#sh int i down
顯示如下:
FastEthernet0/1 is administratively down, line protocol is down
Serial1/0 is up, line protocol is down
Serial1/1 is up, line protocol is down
LMI enq sent 175, LMI stat recvd 0, LMI upd recvd 0, DTE LMI down
0 carrier transitions DCD=down DSR=down DTR=up RTS=up CTS=down
Serial1/2 is administratively down, line protocol is down
LMI enq sent 0, LMI stat recvd 0, LMI upd recvd 0, DTE LMI down
0 carrier transitions DCD=down DSR=down DTR=up RTS=up CTS=down
Serial1/3 is administratively down, line protocol is down
1 carrier transitions DCD=down DSR=down DTR=up RTS=up CTS=down
可以將所有介面關於Down的資訊全部找出來。
Q2.2利用 sh ip route找出所以關於 5.5.5.0 的路由 ??
A2.2我們可以輸入 sh ip route i 5.5.5.0
顯示如下:
ITPro-Labs#sh ip route i 5.5.5.0
C 5.5.5.0 is directly connected, Loopback5
如此則可以再上萬條路由中輕鬆找到我們想知道的路由資訊。
結語!
上述簡單的小技巧可方便於眾多資訊中找到我們需要的,熟悉上述資訊對於我們日常Debug 網路有很大的幫助,希望上述資訊對正在學習CISCO相關知識的使用者有幫助,若對文章有任何問題請寫Email告訴我,謝謝。
2009/03/10
无线网络速率究竟有多快
简介:从802.11的2M发展到802.11g+的108M,无线设备的速度近几年来有了巨大的发展,其已和普通家用10/100Mbps网络差不多。但大家知道,无论是802.11b的11Mbps还是802.11g的54Mbps、802.11g+的108Mbps,其都是理论上 ...
--------------------------------------------------------------
从802.11的2M发展到802.11g+的108M,无线设备的速度近几年来有了巨大的发展,其已和普通家用10/100Mbps网络差不多。但大家知道,无论是802.11b的11Mbps还是802.11g的54Mbps、802.11g+的108Mbps,其都是理论上的速度,实际传输速度肯定达不到此,在普通环境下如隔一堵砖墙或同一间屋里其实际速度到底有多快呢?换言之也就是说无线网在无任何无线干扰的情况下其测试速度一般能达到多快呢?下面我们分别来了解一下。
802.11b
802.11b理论最大速度11Mbps,其WLAN传输速度一般在3-6Mbps之间,换算成MB(1MB=8Mb)也就是每秒传输速度在400KB-800KB左右。取其中间值600KB,这样的速度要传输100MB的文件需要2分半钟到3分钟左右(不同于有线网,因为无线网传输存在干扰不确定性,所以时间不可能很精确)。
简单换算一下,其要传输1GB的文件,则需要至少25分钟以上。而对于那些动辙数GB以上的游戏或高清视频文件或数十GB的硬盘WLAN拷贝来说,除非你有很好的耐心或不急用,那么802.11b如同10M的有线网络一样都不适用于局域网大容量文件的拷贝。
802.11g
由于802.11a非市场消费主流,其实际传输速度可参考802.11g标准。
802.11g理论最大速度54Mbps,其WLAN传输速度一般在16-30Mbps之间,换算成MB也就是每秒传输速度在2MB-4MB左右。取其中间值3MB,这样的速度要传输100MB的文件需要35秒左右,要传输1GB的文件,则需要至少4分钟以上。这样速度对于一般局域网应用已能应付。
802.11g+
802.11g+理论最大速度108Mbps,其WLAN传输速度一般在24-50Mbps之间,换算成MB也就是每秒传输速度在3MB-6MB左右。取其中间值4.5MB,这样的速度要传输100MB的文件需要25秒左右,要传输1GB的文件,则需要至少2分半钟以上。这样速度已接近100Mbps有线网络速度,应付多数WLAN应用绰绰有余。
从上面的介绍中我们可以看出平时就使用无线LAN的用户实际上并未感觉到有这么快的速度。从基本常识上来讲,“无线LAN的实际传输速度是最大传输速度的一半以下”。
当然,以上只是我们在较理想状态测得的速度,无线传输的真实速度受距离、墙壁等各种障碍物;其它无线信号如手机、微波炉等的干扰;加密与不加密等影响都较大。当远离接入点时,信号会越来越弱,速度也会下降。另外,当其它人加入到网络中时,带宽就被共享了。
下面我们再来看看无线上网卡的实际速度:
无线上网卡注意分为GPRS和CDMA两种。
GPRS的实际速度:基本和56Kbps的Modem速度持平。
CDMA的实际速度:达到153.6Kbps,是家里电话线上网的四倍左右。
无线上网卡也是通过无线传输的,所以其速度也会受到墙壁等各种障碍物;其它无线信号如手机、微波炉等的干扰。
总 结:
我们看到的宣称的无线设备都是理论的最大值,但是在实际应用中还是达不到这个标准的,一般都要打个折扣,也就是说实际速度只有本身宣称速度的一半。而且还是要在理想的状态下,如果受到影响还要有所损失,具体的速度还是要看实际应用的环境来定的。
---------------------------------------------------------------
另,无线在BT下载应用上是很不适宜的,因为现在的无线wireless操作模式仍是半双工的。
--------------------------------------------------------------
从802.11的2M发展到802.11g+的108M,无线设备的速度近几年来有了巨大的发展,其已和普通家用10/100Mbps网络差不多。但大家知道,无论是802.11b的11Mbps还是802.11g的54Mbps、802.11g+的108Mbps,其都是理论上的速度,实际传输速度肯定达不到此,在普通环境下如隔一堵砖墙或同一间屋里其实际速度到底有多快呢?换言之也就是说无线网在无任何无线干扰的情况下其测试速度一般能达到多快呢?下面我们分别来了解一下。
802.11b
802.11b理论最大速度11Mbps,其WLAN传输速度一般在3-6Mbps之间,换算成MB(1MB=8Mb)也就是每秒传输速度在400KB-800KB左右。取其中间值600KB,这样的速度要传输100MB的文件需要2分半钟到3分钟左右(不同于有线网,因为无线网传输存在干扰不确定性,所以时间不可能很精确)。
简单换算一下,其要传输1GB的文件,则需要至少25分钟以上。而对于那些动辙数GB以上的游戏或高清视频文件或数十GB的硬盘WLAN拷贝来说,除非你有很好的耐心或不急用,那么802.11b如同10M的有线网络一样都不适用于局域网大容量文件的拷贝。
802.11g
由于802.11a非市场消费主流,其实际传输速度可参考802.11g标准。
802.11g理论最大速度54Mbps,其WLAN传输速度一般在16-30Mbps之间,换算成MB也就是每秒传输速度在2MB-4MB左右。取其中间值3MB,这样的速度要传输100MB的文件需要35秒左右,要传输1GB的文件,则需要至少4分钟以上。这样速度对于一般局域网应用已能应付。
802.11g+
802.11g+理论最大速度108Mbps,其WLAN传输速度一般在24-50Mbps之间,换算成MB也就是每秒传输速度在3MB-6MB左右。取其中间值4.5MB,这样的速度要传输100MB的文件需要25秒左右,要传输1GB的文件,则需要至少2分半钟以上。这样速度已接近100Mbps有线网络速度,应付多数WLAN应用绰绰有余。
从上面的介绍中我们可以看出平时就使用无线LAN的用户实际上并未感觉到有这么快的速度。从基本常识上来讲,“无线LAN的实际传输速度是最大传输速度的一半以下”。
当然,以上只是我们在较理想状态测得的速度,无线传输的真实速度受距离、墙壁等各种障碍物;其它无线信号如手机、微波炉等的干扰;加密与不加密等影响都较大。当远离接入点时,信号会越来越弱,速度也会下降。另外,当其它人加入到网络中时,带宽就被共享了。
下面我们再来看看无线上网卡的实际速度:
无线上网卡注意分为GPRS和CDMA两种。
GPRS的实际速度:基本和56Kbps的Modem速度持平。
CDMA的实际速度:达到153.6Kbps,是家里电话线上网的四倍左右。
无线上网卡也是通过无线传输的,所以其速度也会受到墙壁等各种障碍物;其它无线信号如手机、微波炉等的干扰。
总 结:
我们看到的宣称的无线设备都是理论的最大值,但是在实际应用中还是达不到这个标准的,一般都要打个折扣,也就是说实际速度只有本身宣称速度的一半。而且还是要在理想的状态下,如果受到影响还要有所损失,具体的速度还是要看实际应用的环境来定的。
---------------------------------------------------------------
另,无线在BT下载应用上是很不适宜的,因为现在的无线wireless操作模式仍是半双工的。
2009/02/27
Extended-range VLANs
Extended-range VLANs:
VTP only learns about normal-range VLANs (VLAN IDs 1 to 1005). Extended-range VLANs (VLAN IDs greater than 1005) are not supported by VTP or stored in the VTP VLAN database.
Configuring Extended-Range VLANs
When the switch is in VTP transparent mode (VTP disabled), you can create extended-range VLANs (in the range 1006 to 4094). Extended-range VLANs enable service providers to extend their infrastructure to a greater number of customers. The extended-range VLAN IDs are allowed for any switchport commands that allow VLAN IDs. You always use config-vlan mode (accessed by entering the vlan vlan-id global configuration command) to configure extended-range VLANs. The extended range is not supported in VLAN database configuration mode (accessed by entering the vlan database privileged EXEC command). Extended-range VLAN configurations are not stored in the VLAN database, but because VTP mode is transparent, they are stored in the switch running configuration file, and you can save the configuration in the startup configuration file by using the copy running-config startup-config privileged EXEC command.
Extended-Range VLAN Configuration Guidelines
Follow these guidelines when creating extended-range VLANs:
• To add an extended-range VLAN, you must use the vlan vlan-id global configuration command and access config-vlan mode. You cannot add extended-range VLANs in VLAN database configuration mode (accessed by entering the vlan database privileged EXEC command).
• VLAN IDs in the extended range are not saved in the VLAN database and are not recognized by VTP.
• You cannot include extended-range VLANs in the pruning eligible range.
• The switch must be in VTP transparent mode when you create extended-range VLANs. If VTP mode is server or client, an error message is generated, and the extended-range VLAN is rejected.
• You can set the VTP mode to transparent in global configuration mode or in VLAN database configuration mode. You should save this configuration to the startup configuration so that the switch boots up in VTP transparent mode. Otherwise, you lose the extended-range VLAN configuration if the switch resets.
• STP is enabled by default on extended-range VLANs, but you can disable it by using the no spanning-tree vlan vlan-id global configuration command. When the maximum number of spanning-tree instances are on the switch, spanning tree is disabled on any newly created VLANs. If the number of VLANs on the switch exceeds the maximum number of spanning-tree instances, we recommend that you configure the IEEE 802.1s Multiple STP (MSTP) on your switch to map multiple VLANs to a single spanning-tree instance.
• Although the switch supports a total of 1005 (normal-range and extended-range) VLANs, the number of routed ports, SVIs, and other configured features affects the use of the switch hardware. If you try to create an extended-range VLAN and there are not enough hardware resources available, an error message is generated, and the extended-range VLAN is rejected.
Creating an Extended-Range VLAN
Extended-range VLANs are not saved in the VLAN database; they are saved in the switch running configuration file. You can save the extended-range VLAN configuration in the switch startup configuration file by using the copy running-config startup-config privileged EXEC command.
This example shows how to create a new extended-range VLAN with all default characteristics, enter config-vlan mode, and save the new VLAN in the switch startup configuration file:
Switch(config)# vtp mode transparent
Switch(config)# vlan 2000
Switch(config-vlan)# end
Switch# copy running-config startup config
源引:http://www.cisco.com/en/US/docs/switches/lan/catalyst3560/software/release/12.2_44_se/configuration/guide/swvlan.html#wp1200242
VTP in Cisco Configuration Guide:http://www.cisco.com/en/US/docs/switches/lan/catalyst3560/software/release/12.2_44_se/configuration/guide/swvtp.html
VTP only learns about normal-range VLANs (VLAN IDs 1 to 1005). Extended-range VLANs (VLAN IDs greater than 1005) are not supported by VTP or stored in the VTP VLAN database.
Configuring Extended-Range VLANs
When the switch is in VTP transparent mode (VTP disabled), you can create extended-range VLANs (in the range 1006 to 4094). Extended-range VLANs enable service providers to extend their infrastructure to a greater number of customers. The extended-range VLAN IDs are allowed for any switchport commands that allow VLAN IDs. You always use config-vlan mode (accessed by entering the vlan vlan-id global configuration command) to configure extended-range VLANs. The extended range is not supported in VLAN database configuration mode (accessed by entering the vlan database privileged EXEC command). Extended-range VLAN configurations are not stored in the VLAN database, but because VTP mode is transparent, they are stored in the switch running configuration file, and you can save the configuration in the startup configuration file by using the copy running-config startup-config privileged EXEC command.
Extended-Range VLAN Configuration Guidelines
Follow these guidelines when creating extended-range VLANs:
• To add an extended-range VLAN, you must use the vlan vlan-id global configuration command and access config-vlan mode. You cannot add extended-range VLANs in VLAN database configuration mode (accessed by entering the vlan database privileged EXEC command).
• VLAN IDs in the extended range are not saved in the VLAN database and are not recognized by VTP.
• You cannot include extended-range VLANs in the pruning eligible range.
• The switch must be in VTP transparent mode when you create extended-range VLANs. If VTP mode is server or client, an error message is generated, and the extended-range VLAN is rejected.
• You can set the VTP mode to transparent in global configuration mode or in VLAN database configuration mode. You should save this configuration to the startup configuration so that the switch boots up in VTP transparent mode. Otherwise, you lose the extended-range VLAN configuration if the switch resets.
• STP is enabled by default on extended-range VLANs, but you can disable it by using the no spanning-tree vlan vlan-id global configuration command. When the maximum number of spanning-tree instances are on the switch, spanning tree is disabled on any newly created VLANs. If the number of VLANs on the switch exceeds the maximum number of spanning-tree instances, we recommend that you configure the IEEE 802.1s Multiple STP (MSTP) on your switch to map multiple VLANs to a single spanning-tree instance.
• Although the switch supports a total of 1005 (normal-range and extended-range) VLANs, the number of routed ports, SVIs, and other configured features affects the use of the switch hardware. If you try to create an extended-range VLAN and there are not enough hardware resources available, an error message is generated, and the extended-range VLAN is rejected.
Creating an Extended-Range VLAN
Extended-range VLANs are not saved in the VLAN database; they are saved in the switch running configuration file. You can save the extended-range VLAN configuration in the switch startup configuration file by using the copy running-config startup-config privileged EXEC command.
This example shows how to create a new extended-range VLAN with all default characteristics, enter config-vlan mode, and save the new VLAN in the switch startup configuration file:
Switch(config)# vtp mode transparent
Switch(config)# vlan 2000
Switch(config-vlan)# end
Switch# copy running-config startup config
源引:http://www.cisco.com/en/US/docs/switches/lan/catalyst3560/software/release/12.2_44_se/configuration/guide/swvlan.html#wp1200242
VTP in Cisco Configuration Guide:http://www.cisco.com/en/US/docs/switches/lan/catalyst3560/software/release/12.2_44_se/configuration/guide/swvtp.html
修复重装XP后的Ubuntu引导分区

当我们重装了windows以后,由于硬盘mbr被重写,即把原来mbr中grub的信息清除了,那么grub自然就不能启动了,也就不能引导linux了,此时很多人可能就只能重装linux了,但其实只需简单的对mbr修复一下就可以了。
下面就说一下修复mbr的方法:
首先,把Ubuntu的安装光盘放进去,然后启动.正常进入安装界面,打开终端:
1、输入:sudo grub,于是变成grub>
2、先找到你的ubuntu的启动分区在哪(就是你的/boot目录所在的分区)输入:find /boot/grub/stage1 or find /grub/stage1我机器上回车之后显示:(hd0,7)这里hd0是指第一个硬盘,7代表第8个分区,即Ubuntu根目录所在分区(0代表第一个分区)。
3、输入:grub>root(hd0,7)
4、输入:grub>setup(hd0)如果出现successed,就表示成功了。
5、输入:grub>quit,然后重启。
对于有多个硬盘的朋友,请但是注意一点,如果你的windows装在第一块磁盘,而linux装在第二块磁盘,而你的bios设置为从第一块磁盘启动,那么在进行以上第3步的时候,一定要把参数设为你的第一块磁盘,即要把grub装入引导硬盘的mbr里。
-------
以上修复引导分区的方法已经得到验证。
订阅:
评论 (Atom)
