为您找到与cisco交换机策略路由配置相关的共200个结果:
cisco制造的路由器设备、交换机和其他设备承载了全世界80%的互联网通信,成为硅谷中新经济的传奇,那么你了解Cisco常用的路由器交换机配置命令吗?下面是读文网小编整理的一些关于Cisco常用的路由器交换机配置命令的相关资料,供你参考。
交换机基本状态:
switch: ;ROM状态, 路由器是rommon>
hostname> ;用户模式
hostname# ;特权模式
hostname(config)# ;全局配置模式
hostname(config-if)# ;接口状态
交换机口令设置:
switch>enable ;进入特权模式
switch#config terminal ;进入全局配置模式
switch(config)#hostname ;设置交换机的主机名
switch(config)#enable secret xxx ;设置特权加密口令
switch(config)#enable password xxa ;设置特权非密口令
switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4 ;进入虚拟终端
switch(config-line)#login ;允许登录
switch(config-line)#password xx ;设置登录口令xx
switch#exit ;返回命令
交换机VLAN设置:
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继
switch(config)#vtp domain ;设置发vtp域名
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp mode server ;设置发vtp模式
switch(config)#vtp mode client ;设置发vtp模式
交换机设置IP地址:
switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address ;设置IP地址
switch(config)#ip default-gateway ;设置默认网关
switch#dir flash: ;查看闪存
交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息
看过文章“Cisco常用的路由器交换机配置命令”
浏览量:2
下载量:0
时间:
cisco思科公司是全球领先的网络解决方案供应商,其出产的设备配置起来也跟别的不太一样,下面是Cisco路由器交换机防火墙配置命令详解,希望对你有所帮助。
路由器显示命令
router#show run ;显示配置信息
router#show inte***ce ;显示接口信息
router#show ip route ;显示路由信息
router#show cdp nei ;显示邻居信息
router#reload;重新起动#p#副标题#e#
路由器口令设置
router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令
router(config)#enable password xxb ;设置特权非密口令
router(config)#line console 0 ;进入控制台口
router(config-line)#line vty 0 4 ;进入虚拟终端
router(config-line)#login ;要求口令验证
router(config-line)#password xx ;设置登录口令xx
router(config)#(Ctrl+z) ; 返回特权模式
router#exit ;返回命令
路由器配置
router(config)#int s0/0 ;进入Serail接口
router(config-if)#no shutdown ;激活当前接口
router(config-if)#clock rate 64000 ;设置同步时钟
router(config-if)#ip address ;设置IP地址
router(config-if)#ip address second ;设置第二个IP
router(config-if)#int f0/0.1 ;进入子接口
router(config-subif.1)#ip address ;设置子接口IP
router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议
router(config)#config-register 0x2142 ;跳过配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引导
路由器文件操作
router#copy running-config startup-config ;保存配置
router#copy running-config tftp ;保存配置到tftp
router#copy startup-config tftp ;开机配置存到tftp
router#copy tftp flash: ;下传文件到flash
router#copy tftp startup-config;下载配置文件
ROM状态
Ctrl+Break ;进入ROM监控状态
rommon>confreg 0x2142 ;跳过配置文件
rommon>confreg 0x2102 ;恢复配置文件
rommon>reset;重新引导
rommon>copy xmodem: flash: ;从console传输文件
rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP
rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码
rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP
rommon>TFTP_FILE=c2600.bin ;指定下载的文件
rommon>tftpdnld ;从tftp下载
rommon>dir flash: ;查看闪存内容
rommon>boot ;引导IOS
Cisco路由器交换机防火墙配置命令详解的相关
浏览量:2
下载量:0
时间:
cisco思科是全世界领先且顶尖的通讯厂商,他出产的路由器功能也是很出色的,那么你知道Cisco怎么基于策略路由的配置吗?下面是读文网小编整理的一些关于Cisco怎么基于策略路由的配置的相关资料,供你参考。
下面的防火墙配置是为了完整性而加进去的,它不是策略路由配置所必需的。在这里的防火墙可以被其它类似的产品代替,如PIX或其它类似防火墙设备。这里的防火墙的配置如下:
access-list 1 permit 10.0.0.0 0.255.255.255
ip nat pool net-10 172.16.255.1 172.16.255.254 prefix-length 24
ip nat inside source list 1 pool net-10
interface Ethernet0
ip address 172.16.20.2 255.255.255.0
ip nat outside
interface Ethernet1
ip address 172.16.39.2 255.255.255.0
ip nat inside
router eigrp 1
network 172.16.0.0
default-metric 10000 100 255 1 1500
ip route 172.16.255.0 255.255.255.0 Null0
end
在我们的例子中,Cisco WAN路由器上运行策略路由来保证从10.0.0.0/8网络来的IP数据包被发送到防火墙去。配置中定义了两条net-10策略规则。第一条策略就定义了从10.0.0.0/8网络来的IP数据包被发送到防火墙去(我们很快会看到这里的配置有问题)。而第二条规则允许所有的其它数据包能按正常路由。这里的Cisco WAN路由器的配置如下:
interface Ethernet0/0
ip address 172.16.187.3 255.255.255.0
interface Ethernet0/1
ip address 172.16.39.3 255.255.255.0
interface Ethernet3/0
ip address 172.16.79.3 255.255.255.0
ip policy route-map net-10
router eigrp 1
network 172.16.0.0
access-list 110 permit ip 10.0.0.0 0.255.255.255 172.16.36.0 0.0.0.255
access-list 111 permit ip 10.0.0.0 0.255.255.255 any
route-map net-10 permit 10
match ip address 111
set interface Ethernet0/1
route-map net-10 permit 20
end
我们可以这样测试我们所做的配置。在名为Cisco-1的路由器10.1.1.1上发送ping命令到Internet上的一个主机(这里就是192.1.1.1主机)。要查看名为Internet Router的路由器上的情况,我们在特权命令模式下执行debug ip packet 101 detail命令。(其中,在此路由器上有access-list 101 permit icmp any any配置命令)。下面是输出结果:
Results of ping from Cisco-1 to 192.1.1.1/internet taken from Internet_Router:
Pakcet never makes it to Internet_Router
正如您所看到的:数据包没有到达Internet_Router路由器。下面的在Cisco WAN路由器上的debug命令给出了原因:
Debug commands run from Cisco_WAN_Router:
"debug ip policy"
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1, len 100, policy match
2d15h: IP: route map net-10, item 10, permit
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1 (Ethernet0/1), len 100, policy routed
2d15h: IP: Ethernet3/0 to Ethernet0/1 192.1.1.1
这里,数据包确实匹配了net-10策略图中的第一条规则。但为什么还是没有达到预期的目的呢?用"debug arp"来看一下。
"debug arp"
2d15h: IP ARP: sent req src 172.16.39.3 0010.7bcf.5b02,
dst 192.1.1.1 0000.0000.0000 Ethernet0/1
2d15h: IP ARP rep filtered src 192.1.1.1 00e0.b064.243d, dst 172.16.39.3 0010.7bcf.5b02
wrong cable, interface Ethernet0/1
debug arp的输出给出了原因。路由器努力完成它被指示要做的动作,而且试图把数据包发向Ethernet0/1接口,但失败了。这要求路由器为目的地址192.1.1.1执行地址解析协议操作,当执行该任务时,路由器知道了目的地址不处于该接口。接下来,路由器发生封装错误。所以,最后数据包不能到达192.1.1.1。
我们怎样避免这个问题呢?修改路由图使防火墙地址为下一跳。
Config changed on Cisco_WAN_Router:
!
route-map net-10 permit 10
match ip address 111
set ip next-hop 172.16.39.2
!
修改后,在Internet Router上运行同样的命令:debug ip packet 101 detail。这时,数据包可以按配置前进。我们也能看到数据包被防火墙翻译成了172.16.255.1。192.1.1.1主机的回应:
Results of ping from Cisco_1 to 192.1.1.1/internet taken from Internet_Router:
2d15h: IP: s=172.16.255.1 (Ethernet1), d=192.1.1.1 (Serial0), g=192.1.1.1, len 100, forward
2d15h: ICMP type=8, code=0
2d15h:
2d15h: IP: s=192.1.1.1 (Serial0), d=172.16.255.1 (Ethernet1), g=172.16.20.2, len 100, forward
2d15h: ICMP type=0, code=0
2d15h:
在Cisco WAN路由器上执行debug ip policy命令后,我们可以看到数据包被传递到了防火墙,172.16.39.2:
Debug commands run from Cisco_WAN_Router:
"debug ip policy"
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1, len 100, policy match
2d15h: IP: route map net-10, item 20, permit
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1 (Ethernet0/1), len 100, policy routed
2d15h: IP: Ethernet3/0 to Ethernet0/1 172.16.39.2
看过文章“Cisco怎么基于策略路由的配置"
浏览量:2
下载量:0
时间:
cisco公司已成为公认的全球网络互联解决方案的领先厂商,其公司出产的一系列路由器更是引领全球,那么你知道思科Cisco路由怎么基于策略配置吗?下面是读文网小编整理的一些关于思科Cisco路由怎么基于策略配置的相关资料,供你参考。
下面的防火墙配置是为了完整性而加进去的,它不是策略路由配置所必需的。在这里的防火墙可以被其它类似的产品代替,如PIX或其它类似防火墙设备。这里的防火墙的配置如下:
access-list 1 permit 10.0.0.0 0.255.255.255
ip nat pool net-10 172.16.255.1 172.16.255.254 prefix-length 24
ip nat inside source list 1 pool net-10
interface Ethernet0
ip address 172.16.20.2 255.255.255.0
ip nat outside
interface Ethernet1
ip address 172.16.39.2 255.255.255.0
ip nat inside
router eigrp 1
network 172.16.0.0
default-metric 10000 100 255 1 1500
ip route 172.16.255.0 255.255.255.0 Null0
end
在我们的例子中,Cisco WAN路由器上运行策略路由来保证从10.0.0.0/8网络来的IP数据包被发送到防火墙去。配置中定义了两条net-10策略规则。第一条策略就定义了从10.0.0.0/8网络来的IP数据包被发送到防火墙去(我们很快会看到这里的配置有问题)。而第二条规则允许所有的其它数据包能按正常路由。这里的Cisco WAN路由器的配置如下:
interface Ethernet0/0
ip address 172.16.187.3 255.255.255.0
interface Ethernet0/1
ip address 172.16.39.3 255.255.255.0
interface Ethernet3/0
ip address 172.16.79.3 255.255.255.0
ip policy route-map net-10
router eigrp 1
network 172.16.0.0
access-list 110 permit ip 10.0.0.0 0.255.255.255 172.16.36.0 0.0.0.255
access-list 111 permit ip 10.0.0.0 0.255.255.255 any
route-map net-10 permit 10
match ip address 111
set interface Ethernet0/1
route-map net-10 permit 20
end
我们可以这样测试我们所做的配置。在名为Cisco-1的路由器10.1.1.1上发送ping命令到Internet上的一个主机(这里就是192.1.1.1主机)。要查看名为Internet Router的路由器上的情况,我们在特权命令模式下执行debug ip packet 101 detail命令。(其中,在此路由器上有access-list 101 permit icmp any any配置命令)。下面是输出结果:
Results of ping from Cisco-1 to 192.1.1.1/internet taken from Internet_Router:
Pakcet never makes it to Internet_Router
正如您所看到的:数据包没有到达Internet_Router路由器。下面的在Cisco WAN路由器上的debug命令给出了原因:
Debug commands run from Cisco_WAN_Router:
"debug ip policy"
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1, len 100, policy match
2d15h: IP: route map net-10, item 10, permit
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1 (Ethernet0/1), len 100, policy routed
2d15h: IP: Ethernet3/0 to Ethernet0/1 192.1.1.1
这里,数据包确实匹配了net-10策略图中的第一条规则。但为什么还是没有达到预期的目的呢?用"debug arp"来看一下。
"debug arp"
2d15h: IP ARP: sent req src 172.16.39.3 0010.7bcf.5b02,
dst 192.1.1.1 0000.0000.0000 Ethernet0/1
2d15h: IP ARP rep filtered src 192.1.1.1 00e0.b064.243d, dst 172.16.39.3 0010.7bcf.5b02
wrong cable, interface Ethernet0/1
debug arp的输出给出了原因。路由器努力完成它被指示要做的动作,而且试图把数据包发向Ethernet0/1接口,但失败了。这要求路由器为目的地址192.1.1.1执行地址解析协议操作,当执行该任务时,路由器知道了目的地址不处于该接口。接下来,路由器发生封装错误。所以,最后数据包不能到达192.1.1.1。
我们怎样避免这个问题呢?修改路由图使防火墙地址为下一跳。
Config changed on Cisco_WAN_Router:
!
route-map net-10 permit 10
match ip address 111
set ip next-hop 172.16.39.2
!
修改后,在Internet Router上运行同样的命令:debug ip packet 101 detail。这时,数据包可以按配置前进。我们也能看到数据包被防火墙翻译成了172.16.255.1。192.1.1.1主机的回应:
Results of ping from Cisco_1 to 192.1.1.1/internet taken from Internet_Router:
2d15h: IP: s=172.16.255.1 (Ethernet1), d=192.1.1.1 (Serial0), g=192.1.1.1, len 100, forward
2d15h: ICMP type=8, code=0
2d15h:
2d15h: IP: s=192.1.1.1 (Serial0), d=172.16.255.1 (Ethernet1), g=172.16.20.2, len 100, forward
2d15h: ICMP type=0, code=0
2d15h:
在Cisco WAN路由器上执行debug ip policy命令后,我们可以看到数据包被传递到了防火墙,172.16.39.2:
Debug commands run from Cisco_WAN_Router:
"debug ip policy"
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1, len 100, policy match
2d15h: IP: route map net-10, item 20, permit
2d15h: IP: s=10.1.1.1 (Ethernet3/0), d=192.1.1.1 (Ethernet0/1), len 100, policy routed
2d15h: IP: Ethernet3/0 to Ethernet0/1 172.16.39.2
看过文章“思科Cisco路由怎么基于策略配置”
浏览量:2
下载量:0
时间:
思科公司已成为公认的全球网络互联解决方案的领先厂商,其公司出产的一系列路由器更是引领全球,那么你知道cisco怎么策略路由实现定向路由吗?下面是读文网小编整理的一些关于cisco怎么策略路由实现定向路由的相关资料,供你参考。
拓扑图
由于设计需要,必须将汇聚层上来的不同地址段路由到核心层不同入口,实现类似负载均衡效果。这里没有把拓扑给全,实际上在NE40和3550之间的两个网段上各有一个认证网关。
这里通过cisco3550上的策略路由功能实现。
首先创建两个ACL,定义源地址:
access-list 100 permit ip 10.200.0.0 0.3.255.255 any
access-list 104 permit ip 10.204.0.0 0.3.255.255 any
注意:这两条ACL我们只是要定义源地址用的。只是7650下连的地址。
然后定义策略路由:
route-map lygcatv permit 10
match ip address 100
set ip next-hop 172.255.0.1
!
route-map lygcatv permit 20
match ip address 104
set ip next-hop 172.255.0.9
注意:两个策略名字一样实际上是一个策略,后面的10和20是索引号,或者叫优先级号,实际应用中先比较10号,不匹配再比较20号。100和104对应上面的两个ACL,最后定义下一跳地址,就是NE40上和3550相连的地址。
最后应用到接口上:
interface FastEthernet0/12
no switchport
ip address 172.255.0.17 255.255.255.248
ip policy route-map lygcatv
注意:策略只能应用到入口上,否则不成功,只是经过痛苦的失败得到的结果,后来一查资料果然如此。这样在3550上就不需要静态或动态路由了,在7650上当然还要设置正确路由。
看过文章“思科Cisco路由怎么基于策略配置”
浏览量:5
下载量:0
时间:
cisco思科是全球领先的大品牌,相信很多人也不陌生,那么你知道cisco交换机上配置SSH吗?下面是读文网小编整理的一些关于cisco交换机上配置SSH的相关资料,供你参考。
在Cisco路由器产品系列中只有7200系列、7500系列和12000系列(GSR)等高端产品的IOS支持SSH.一般支持SSH的IOS版本文件名中都带有K3或者K4字样,K3 代表56bit SSH 加密,K4代表168bit SSH加密。如我省省网GSR 12016和12008上用的IOS 就是一个支持56bit SSH 加密的版本。
目前Cisco的产品只支持SSH-1,还不支持SSH-2.下面以GSR 12008为例详细介绍SSH-1的配置方法(斜体字为配置输入的命令):
① 配置hostname和ip domain-name:
Router#configure terminalRouter(config)#hostname TEST-GSR12008TEST-GSR12008(config)#ip domain-name jx.cn.net |
② 配置登录用户名和密码(以本地认证为例):
TEST-GSR12008(config)#username test password 0 test 注:添加一个用户:test,口令:testTEST-GSR12008(config)#line vty 0 4 TEST-GSR12008(config-line)#login local |
在这两部分做完以后,用show run命令就能够看到:
hostname TEST-GSR12008!boot system flash gsr-k3p-mz.120-14.S.binenable secret 5 $1$DMyW$gdSIOkCr7p8ytwcRwtnJG.enable password 7 094F47C31A0A!username test password 7 0835495D1Dclock timezone PRC 16redundancymain-cpuauto-sync startup-config!!!!ip subnet-zerono ip fingerip domain-name jx.cn.netip name-server 202.101.224.68ip name-server 202.101.226.68 ! |
③ 配置SSH服务:
TEST-GSR12008(config)#crypto key generate rsaThe name for the keys will be: TEST-GSR12008.jx.cn.net注:SSH的关键字名就是hostname + . +ip domain-nameChoose the size of the key modulus in the range of 360 to 2048 for yourGeneral Purpose Keys. Choosing a key modulus greater than 512 may takea few minutes.How many bits in the modulus [512]: 注:选择加密位数,用默认就行了Generating RSA keys ...[OK]TEST-GSR12008(config)#endTEST-GSR12008#writeBuilding configuration... |
这时候用show run命令可以看到:
ip subnet-zerono ip fingerip domain-name jx.cn.netip name-server 202.101.224.68ip name-server 202.101.226.68ip ssh time-out 120ip ssh authentication-retries 3 ! |
用命令show ip ssh也能看到:
SSH Enabled - version 1.5 Authentication timeout: 120 secs; Authentication retries: 3 |
现在SSH服务已经启动,如果需要停止SSH服务,用以下命令:
TEST-GSR12008(config)#crypto key zeroize rsa |
④设置SSH参数
配置好了SSH之后,通过show run命令我们看到SSH默认的参数:超时限定为120秒,认证重试次数为3次,可以通过下面命令进行修改:
TEST-GSR12008(config)#ip ssh {[time-out seconds]} | [authentication-retries interger]} |
如果要把超时限定改为180秒,则应该用:
TEST-GSR12008(config)# ip ssh time-out 180 |
如果要把重试次数改成5次,则应该用:
TEST-GSR12008(config)# ip ssh authentication-retries 5 |
这样,SSH已经在路由器上配置成功了,就能够通过SSH进行安全登录了
看过文章“cisco交换机上配置SSH”
浏览量:2
下载量:0
时间:
cisco是全球领先且顶尖的通讯厂商,出产的路由器功能也是很出色的,那么你知道怎么cisco路由器上面配置SSH代替Telnet吗?下面是读文网小编整理的一些关于怎么cisco路由器上面配置SSH代替Telnet的相关资料,供你参考。
Telnet 到Cisco路由器进行远程管理是很多网管的选择,但是通过Telnet传输的数据都是明文,因此这种登录方式存在很大的安全隐患。一个恶意用户完全可能通过类似Sniffer这样的嗅探工具,在管理员主机或者适当的接口进行本地监听获取管理员登录Cisoc路由器的密码。
1、安全测试:
笔者在本地安装了sniffer,然后利用Telnet登录Cisco路由器。停止嗅探然后解码查看,如图1所示笔者登录路由器进入用户模式和全局模式是输入的密码都明文显示出来了。虽然密码被拆分成了两部分,但一个有经验的攻击者完全可能将它们进行组合从而获取Cisco路由器的登录密码。其实,不仅仅是这些,利用嗅探工具管理员所有在路由器上输入的命令都会被嗅探到。这样,就算是管理员更改了路由器的密码,并且进行了加密但都可以嗅探得到
从上面最后一行Data:后面的那个C就表示我们输入的第一个密码。再接着查看后面的几个Telnet Data数据包我们就可以看出它的密码。这样对于我们的网络来说是特别不安全的。
2、SSH的安全性
SSH 的英文全称是Secure Shell,是由芬兰的一家公司开发的。SSH由客户端和服务端的软件组成,有1.x和2.x两个不兼容的版本。SSH的功能强大,既可以代替 Telnet,又可以为FTP、POP3和PPP提供一个安全的“通道”。使用SSH,可以把传输的所有数据进行加密。即使有人截获到数据也无法得到有用的信息。同时,数据经过压缩,大大地加快传输的速度。它默认的连接端口是22。通过使用SSH,可以把所有传输的数据进行加密,这样类似上面的“中间人” 攻击方式就不可能实现了,而且它也能够防止DNS和IP欺骗。另外,它还有一个额外的好处就是传输的数据是经过压缩的,所以可以加快传输的速度。
3、SSH部署
基于上面的测试和SSH的安全特性,要实现Cisco路由器的安全管理用SSH代替Telnet是必要的。当然,要实现SSH对CISOC的安全管理,还需要在路由器上进行相关设置。下面笔者就在虚拟环境中演示SSH的部署、连接的技术细节。
(1).Cisco配置
下面是在Cisco上配置SSH的相关命令和说明:
R2(config)#ip domain-name cisco.com 配置一个域名
R2(config)#crypto key generate rsa general-keys modulus 1024 https://生成一个rsa算法的密钥,密钥为1024位
(提示:在Cisoc中rsa支持360-2048位,该算法的原理是:主机将自己的公用密钥分发给相关的客户机,客户机在访问主机时则使用该主机的公开密钥来加密数据,主机则使用自己的私有的密钥来解密数据,从而实现主机密钥认证,确定客户机的可靠身份。)
The name for the keys will be: R2.cisco.com
% The key modulus size is 1024 bits
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
R2(config)#
*Mar 1 00:09:46.607: %SSH-5-ENABLED: SSH 1.99 has been enabled
R2(config)#ip ssh time 120 设置ssh时间为120秒
R2(config)#ip ssh authentication 4 设置ssh认证重复次数为4,可以在0-5之间选择
R2(config)#line vty 0 4
R2(config-line)#transport input ssh 设置vty的登录模式为ssh,默认情况下是all即允许所有登录
R2(config-line)#login
R2(config-line)#
这样设置完成后,就不能telnet到Cisoc路由器了。
设置登录方式,然后点击“Open”。
而这里就是颁发给我们的证书。
R2(config)#aaa new-model 启用AAA
R2(config)#aaa authentication login default local 启用aaa认证,设置在本地服务器上进行认证
R2(config)#username cisco pass cisco 创建一个用户cisco并设置其密码为cisco用于SSH客户端登录
R2(config)#line vty 0 4
R2(config-line)#login authentication default 设置使用AAA的default来进行认证
R2(config-line)#exit
R2(config)#
好了现在就可以使用SSH登录了。
(2).SSH登录
上面设置完成后就不能Telnet到cisco了,必须用专门的SSH客户端进行远程登录。为了验证SSH登录的安全性,我们在登录的过程中启用网络抓包软件进行嗅探。
我采用的SSH客户端为PuTTY,启动该软件输入路由器的IP地址172.16.1.1,然后进行扥两个会弹出一个对话框,让我们选择是否使用刚才设置的 SSH密钥,点击“是”进入登录命令行,依次输入刚才在路由器上设置的SSH的登录用户及其密码cisco,可以看到成功登录到路由器。
然后我们查看嗅探工具抓包的结果,所有的数据都进行了加密,我们看不到注入用户、密码等敏感信息。由此可见,利用SSH可以确保我们远程登录Cisco路由器的安全。
总结:其实,SSH不仅可用于路由器的安全管理。在我们进行系统的远程管理、服务器的远程维护等实际应用中都可以部署基于SSH远程管理。另外,当下的 SSH工具不仅有命令行下的,也有一些GUI图形界面下的工具。网络管理,安全第一,SSH能够极大程度地预防来自“中间人”的攻击,希望本文对大家提升网络管理的安全性有所帮助帮助。
看过文章“怎么cisco路由器上面配置SSH代替Telnet"
浏览量:2
下载量:0
时间:
要组建一个网络,就须在应用中对网络结构要有一个很清晰的了解,而在物理上的正确连接、路由器中的分配IP地址、广域网路由协议的选择及局域网的接入等都是在实际应用中必需十分注意的。以下则是我们经过实验总结出来的使整个网络运行起来的三个主要方面。
路由器的配置
因为今天的路由器所包含的已不仅仅是对数据转发与路由转换的概念,它还可以实现多种意义和功能,如:安全限制、流量控制等。所以,在此我们只是简要介绍一下实现其原始功能的几个步骤。首先,进入端口模式,给予每个广域网口及以太网口一个IP地址与相应的地址掩码。其次,在广域网口要设置带宽与数据的链路传输封装协议(在实验中我们分别使用了HDLC及PPP协议)。最后,要配置路由协议,在大型的网络中,可选用的有很多不同的协议(静态路由、动态的OSPF、EIGRP)。而我们则选用的是CISCO的专有动态路由协议EIGRP。
浏览量:2
下载量:0
时间:
思科cisco依靠自身的技术和对网络经济模式的深刻理解,使他成为了网络应用的成功实践者之一,他出产的路由器也是全球顶尖的,那么你知道cisco路由器初始配置的方法吗?下面是读文网小编整理的一些关于cisco路由器初始配置的相关资料,供你参考。
一、路由器开机初始序列
当路由器进行初始化时,路由器进行以下操作:
1)自ROM执行上电自检,检测CPU,内存、接口电路的基本操作。
2)自ROM进行引导,将操作系统装下载到主存。
3)引导操作系统由配置寄存器的引导预确定由FLASH 或网络下载,则配置文件的boot system 命令确定其确切位置。
4)操作系统下载到低地址内存,下载后由操作系统确定路由器的工作硬件和软件部分并在屏幕上显示其结果。
5)NVRAM中存储的配置文件装载到主内存并通过执行,配置启动路由进程,提供接口地址、设置介质特性。如果NVRAM中设有有效的配置文件,则进入Setup 会话模式。
6)然后进入系统配置会话,显示配置信息,如每个接口的配置信息。
二、Setup会话
当NVRAM里没有有效的配置文件时,路由器会自动进入Setup会话模式。以后也可在命令行敲入Setup进行配置。
Setup 命令是一个交互方式的命令,每一个提问都有一个缺省配置,如果用缺省配置则敲回车即可。如果系统已经配置过,则显示目前的配置值。如果是第一次配置,则显示出厂设置。当屏幕显示 "------ More ------",键入空格键继续;从Setup 中退出,只要键入Ctrl-C即可。
1、Setup主要参数:
配置它的一般参数,包括:
主机名 :hostname
特权口令 :enable password
虚终端口令 :virtual terminal password
SNMP网管 :SNMP Network Management
IP :IP
IGRP路由协议:IGRP Routing
RIP路由协议 :RIP Routing
DECnet : DECnet . 等
其中 Console 的secret、 password的设置:
enable secret
enable password
Virtual Terminor 的password的设置:
Line vty
Password
Host name的设置:
Hostname
2、Setup接口参数:
设置接口参数,如以太网口、TokenRing口、同步口、异步口等。包括IP地址、子网屏蔽、TokengRing速率等。
3、Setup描述:
在设置完以上参数后,该命令提示是否要用以上的配置,如果回答是"YES"则系统存储以上的配置参数,系统就
可以使用了。
4、 Setup相关命令:
Show config
write memory
write erase
reload
setup
5、路由器丢失PASSWORD的恢复
以下办法可以恢复:
enable secret password (适合10。3(2)或更新的版本)
enable password
console password
通过修改Configuration Register(出厂为0x2102),使路由器忽略PASSWORD,这样就可以进入路由器,就可以
看到enable password和Console password,但enable secret password以被加密,只能替换。可以进入的tion
Register值为0x142.
运行password恢复可能会使系统DOWN掉一个半小时;
将Console terinal连在路由器的Console口上,确认终端设置为9600bps、8Data bit 、No parity、1 stop
bit;
show version显示Configuration Register 0x2102;
关机再开,按"Ctrl+ Break",进入ROM MONITOR状态,提示符为">";
键入"> o/r 0x142",修改 Configuration Register到0x142,可以忽略原先的password;
键入"> initialize",初始化路由器,等一段时间后,路由器会出现以下提示:
"system configuration Diaglog ……"
Enter "NO"
提示"Press RETURN to get started!" ,Press "Enter"
进入特权模式
Router>enable
Router#show startup-config
这样就可以得到password(enable&console password)
修改password
"Router#config ter"
"Router(config)# enable secret cisco"
"Router(config)# enable password cisco1"
"Router(config)# line con 0"
"Router(config)# password cisco"
"Router(config)# config-register 0x2102"
"ctrl + Z"
"Router#copy running-config startup-config"
"reload"
以password cisco进入特权用户。
浏览量:3
下载量:0
时间:
思科用自己敏锐的洞察力、丰富的行业经验、先进的技术,帮助企业把网络应用转化为战略性的资产,充分挖掘网络的能量,获得竞争的优势,那你知道Cisco 2501路由器怎么配置DDN吗?下面是读文网小编整理的一些关于Cisco 2501路由器怎么配置DDN的相关资料,供你参考。
首先准备终端一台,用路由器中所配的Console电缆及Terminal连接器,将终端 连接到路由器的Console口;连接好电源线,检查无误后,先将终端电源打开,再将路由器电源打开,最后显示信息如下:
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 2048 Kbytes of main memory
F3: 3653456+93560+192532 at 0x3000060
Restricted Rights Legend
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706 Cisco Internetwork Operating System Software
IOS (tm) 3000 Software (IGS-I-L), Version 11.1(4), RELEASE SOFTWARE (fc1) Copyright (c) 1986-1996 by cisco Systems, Inc. Compiled Mon 17-Jun-96 15:45 by mkamson
Image text-base: 0x0301F2B4, data-base: 0x00001000
cisco 2509 (68030) processor (revision D) with 2048K/2048K bytes of memory.
Processor board ID 03843159, with hardware revision 00000000
Bridging software.
X.25 software, Version 2.0, NET2, BFE and GOSIP compliant.
1 Ethernet/IEEE 802.3 interface.
2 Serial network interfaces.
8 terminal lines.
32K bytes of non-volatile configuration memory.
4096K bytes of processor board System flash (Read ONLY)
Notice: NVRAM invalid, possibly due to write erase.
--- System Configuration Dialog ---
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Would you like to enter the initial configuration dialog? [yes]: 回车
First, would you like to see the current interface summary? [yes]: 回车
Any interface listed with OK? value "NO" does not have a valid configu
ration
Interface IP-Address OK? Method Status
Protocol
Ethernet0 unassigned NO unset up
down
Serial0 unassigned NO unset up
down
Serial1 unassigned NO unset down
down
Configuring global parameters:
Enter host name [Router]: Router (路由器取名为Router)
The enable secret is a one-way cryptographic secret used
instead of the enable password when it exists.
Enter enable secret: cisco (设置路由器高级口令为cisco)
The enable password is used when there is no enable secret
and when using older software and some boot images.
Enter enable password: user (设置路由器低级口令为user
Enter virtual terminal password: cisco (设置路由器虚终端口令为cisco )
Configure SNMP Network Management? [yes]: 回车
Community string [public]: 回车
Configure IP? [yes]: 回车
Configure IGRP routing? [yes]: no (不采用IGRP协议路由)
Configure RIP routing? [no]: 回车
Configuring interface parameters:
Configuring interface Ethernet0:
Is this interface in use? [yes]: 回车
Configure IP on this interface? [yes]: 回车
IP address for this interface: 86.101.3.20 (输入本路由器局域网口IP地址)
Number of bits in subnet field [0]:16
Class A network is 86.0.0.0, 16 subnet bits; mask is 255.255.255.0
Configuring interface Serial0:
Is this interface in use? [yes]: 回车
Configure IP on this interface? [yes]: 回车
Configure IP unnumbered on this interface? [no]: 回车
IP address for this interface: 86.101.254.3 (输入本路由器广域网口IP地址)
Number of bits in subnet field [0]:16
Class A network is 86.0.0.0, 16 subnet bits; mask is 255.255.255.0
Configuring interface Serial1:
Is this interface in use? [yes]: no (不使用本广域网口)
The following configuration command script was created:
hostname Router
enable secret 5 $1$jwb1$5fepuyO0PwUsa3ijZlR6t1
enable password user
line vty 0 4
password cisco
snmp-server community public
!
ip routing
!
interface Ethernet0
ip address 86.101.3.20 255.255.255.0
!
interface Serial0
ip address 86.101.254.3 255.255.255.0
!
interface Serial1
shutdown
no ip address
!
end
Use this configuration? [yes/no]: yes (采用以上设置)
Building configuration...
Use the enabled mode 'configure' command to modify this configuration.
Press RETURN to get started!
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to down
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state
to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state
to down
%LINK-5-CHANGED: Interface Serial1, changed state to administratively
down
%LINK-5-CHANGED: Interface Serial0, changed state to administratively
down
%SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) 3000 Software (IGS-I-L), Version 11.1(4), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1996 by cisco Systems, Inc.
Compiled Mon 17-Jun-96 15:45 by mkamson
Router>
Router>enable (进入路由器超级用户)
Password: (输入路由器高级口令,但不回显)
Router#config (进入设置状态)
Configuring from terminal, memory, or network [terminal]? 回车
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int e0 (初始化路由器局域网口)
Router(config-if)#ip add 86.101.3.20 255.255.255.0 (路由器局域网口地址及子网掩码)
Router(config-if)#int s0 (初始化路由器广域网口)
Router(config-if)#ip add 86.101.254.3 255.255.255.0 (路由器广域网口地址及子网掩码)
Router(config-if)#encap ppp (采用ppp)
Router(config-if)#exit (退出接口设置状态)
Router(config-if)#ip route 86.101.4.0 255.255.255.0 S0 (对方局域网络、 子网掩码及与本地相连的广域网口)
Router(config)#exit (退出设置状态)
Router#write (保存设置信息)
Building configuration...
[OK]
看过文章“Cisco 2501路由器怎么配置DDN”
浏览量:2
下载量:0
时间:
cisco公司制造的路由器、交换机和其他设备承载了全球80%的互联网通信,成为了网络应用的成功实践者之一,那么你知道怎么设置Cisco路由器的备份配置吗?下面是读文网小编整理的一些关于怎么设置Cisco路由器的备份配置的相关资料,供你参考。
对于某些企业或组织的某些关键业务数据的网络传输,要求网络设备高度的可靠性,而且需要维护方便。
Cisco路由器的备份技术有多种。这里介绍一下路由器自身的备份技术及线路备份技术。
一般来说,路由器是建立局域网与广域网连接的桥梁。
所谓的路由器自身的备份技术是为了解决路由器由于自身硬件(如内存、CPU)或软件IOS的某种故障或局域端口的故障,所连接局域设备的端口或线路的故障所导致的网络瘫痪的问题。
路由器的备份要求至少有一台与正在工作的主路由器功能相同的路由器,在主路由器瘫痪的情况下,以某种方式代替主路由器,为局域网用户提供路由服务。
对于局域网的计算机,在主路由器瘫痪的情况下,如何找到备份路由器,主要有以下集中办法:
·proxy ARP
·IRDP
·动态路由
·HSRP
·Proxy ARP
支持Proxy ARP 的计算机无论与本网段的计算机还是不同网段的计算机进入通讯都发送ARP广播以寻找与目的地址相对应的MAC地址,这时,知道目的地址的路由器会响应ARP的请求,并将自己的MAC地址广播给源计算机,然后源计算机就将IP数据包发给该路由器,并由路由器最终将数据包发送到目的。
在主路由器瘫痪情况下,计算机再进行通讯时,它将继续发送Proxy ARP广播,备份路由器响应该请求,并进行数据传输。
缺点:
如果主路由器正在传输数据时瘫痪,正在通信的计算机在未发送另外的Proxy ARP请求之前.根本就无法知道主路由器已瘫痪,会继续向该路由器发包,导致传输中断,正在通信的计算机只有在另外发送Proxy ARP请求或重新启动之后才能找到备份路由器以进行传输。
Cisco路由器支持Proxy ARP
·IRDP
局域网中的支持IRDP的计算机会监听主路由器发出的"Hello"的多点广播信息包,如果该计算机不再收到"Hello"信息时,它就会利用备份路由器进行数据传输。
·动态路由
对于某些计算机,它们本身支持RIP动态路由以寻找路由器, 这种办法的缺点是主路由器与备份路由器间的转换较慢。
以上三种办法,主要都是在计算机一方采用的技术,Cisco路由器提供了HSRP技术,采用这种技术不需要计算机进行任何设置,即对计算机来说,主路由器与备份路由器之间切换是透明的,而且它们之间的切换速度较快。
采用HSRP进行备份的一组路由器共用一个虚拟的MAC地址及虚拟IP地址,每个参与HSRP的局域端口有一个本端口的IP地址和MAC地址,每个路由器都有一个权值,权值最高的作为主路由器进行工作,其它的不工作,当主路由器瘫痪时,第二个权值最高的路由器将作为主路由器,依次类推。路由器之间定期交换权值信息以确定路由器的工作状态。如果主路由器在一段时间内不发送这种信息包,其它备份路由器将认为该路由器已坏,权值电高的备份路由器将接管虚拟MAC地址和IP地址,并负责传输数据。一旦主路由器恢复正常,将自动切换回去,重新接管传输数据的工作,之后备份路由器停止传输,处于备份状态。另外,HSRP允许路由器对某些端口的工作状态进行监测,一旦这个端口出现故障,也进行自动切换。
总之,对于局域网的计算机,它们的网关只有一个,即虚拟 IP 地址。所有的备份工作都由路由器自动完成。
HSRP适应于主路由器与备份路由器的线路完全一致的情况。
使用HSRP功能,建议采用收敛速度较快的动态路由协议,如OSPF,EIGRP。
HSRP基本配置步骤:
1. 在端口配置下,设置端口 IP 地址,
ip address端口 IP 地址 子网掩码
2. 在端口配置下,启用 HSRP 功能,并设置虚拟 IP 地址
standby 组号 IP 虚拟 IP 地址
其中只有有相同组号的路由器属于同一个hsrp组,所有属于同一个hsrp组的路由器的虚拟地址必须一致
3. 在端口设置状态下设置HSRP抢占
standby 组号 preempt
该设置允许权值高于该hsrp组的其它路由器成为主路由器。所有该给路由器都应该设置此项,以便每台路由器都可以成为其它路由器的备份路由器。如果不设置该项,即使用该路由器权值再高,也不会成为主路由器。
4. 设置路由器的hsrp权值
standby 组号 priority 权值
如果不设置该项,缺省权值为100,其中权值数字大,则抢占为主路由器的优先权越高。
5. 设置hsrp组路由器身份验证字符串
standby 组号 authentication 字符串
该项设置为可选设置,如果设置该项,则该hsrp组的所有路由器都必须进行该项设置,且只有有相同字符串的该组路由器才能进行hsrp。
6. 设置hsrp切换时间
standby 组号 时间参数1 时间参数2
其中时间参数1表示路由器每间隔多长时间交换一次hello信息,以表明路由器是否出现故障或工作正常。时间参数2表示在多长时间内同组的其他路由器没有收到主路由器的信息,则宣布主路由器瘫痪。该设置的缺省值分别为3秒和10 秒。如果要更改缺省值,所有同hsrp组的路由器的该项设置必须一致。
7. 端口跟踪设置
standby 组号 track 端口号
该项设置为可选设置
该设置表示如果所监测的端口出现故障,则也进行路由器的切换。可以跟踪多外端口。
注意:如果主路由器上有多条线路被跟踪,则有一条线路出现故障时,就会切换到备份路由器上,即使其他都正常工作,直到主路由器该线路正常工作,才能重新发换过来。该项设置实现的功能在实际应用中完全可以由线路备份功能实现,而且在大多数情况下,该项设置也没有多大意义。
看过文章“怎么设置Cisco路由器的备份配置”
浏览量:2
下载量:0
时间:
思科公司制造的路由器、交换机和其他设备承载了全世界80%的互联网通信,成为了网络应用的成功实践者之一,那么你知道怎么使用脚本配置cisco路由器吗?下面是读文网小编整理的一些关于怎么使用脚本配置cisco路由器的相关资料,供你参考。
我要进行running-configure配置的备份操作,当然,设备早已经配置好了,tftp服务器也准备好了。
路由器配置如下
username ccie privilege 15 password 0 ccie!interface FastEthernet0/0no ip addressshutdownduplex autospeed auto!interface FastEthernet0/1ip address 11.133.183.251 255.255.255.0duplex autospeed auto!ip classlessip route 0.0.0.0 0.0.0.0 11.133.183.254ip http serverip pim bidir-enable!line vty 0 4login local |
那么可以按照下面的步骤进行:
1、编写脚本:
新建一个文件crt.vbs,尾缀为。vbs,内容如下:
#$language = "VBScript"#$interface = "1.0"Sub main' turn on synchronous mode so we don't miss any datacrt.Screen.Synchronous = TrueOn Error Resume Nextcrt.session.Connect("/telnet 11.133.183.251")If Err.Number<>0 Thencrt.session.Connect("/telnet 11.133.183.251")End Ifcrt.Screen.WaitForString "Username:"crt.Screen.Send "ccie" & VbCrcrt.Screen.WaitForString "Password:"crt.Screen.Send "ccie " & VbCrcrt.Screen.WaitForString "Router#"crt.Screen.Send "config t" & VbCrcrt.Screen.WaitForString "Router(config)#"crt.Screen.Send "int f0/1" & VbCrcrt.Screen.WaitForString "Router(config-if)#"crt.Screen.Send "no sh" & VbCrcrt.Screen.WaitForString "Router(config-if)#"crt.Screen.Send "end" & VbCrcrt.Screen.WaitForString "Router#"crt.Screen.Send "copy run tftp://11.133.183.249" & VbCrcrt.Screen.WaitForString "Address or name of remote host [11.133.183.249]"crt.Screen.Send ""& VbCrcrt.Screen.WaitForString "Destination filename [router-confg]"crt.Screen.Send ""& VbCrDo while (crt.Screen.WaitForString("--- more ---",1)<>False)crt.Screen.Send " "Loop' crt.Screen.Send "exit" & VbCrcrt.session.disconnectcrt.Screen.Synchronous = FalseEnd Sub |
相信懂vb的朋友很容易看懂的,上面内容的相关解释如下:
* crt.session.Connect("/telnet 11.133.183.251")--这个应该很好理解了,需要telnet的设备。* crt.Screen.WaitForString "Username:"--从设备上返回的信息,也就是提示信息。* crt.Screen.Send "ccie" & VbCr--像设备上发送的字符,即你在正常操作时输入的命令或字符* & VbCr ------输入字符后并回车。 |
2、应用脚本:
* 打开CRT软件
* 点击“Script"菜单
* 点击“RUN”
* 在弹出菜单中找到刚才编写的脚本存放的目录,并输入脚本的名字crt.vbs.
这时可以看到脚本在执行,如下:
User Access VerificationUsername: cciePassword:Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/1Router(config-if)#no shRouter(config-if)#endRouter#copy run tftp://11.133.183.249Address or name of remote host [11.133.183.249]?Destination filename [router-confg]?!!694 bytes copied in 9.60 secs (77 bytes/sec)Router# |
看过文章“怎么使用脚本配置cisco路由器”
浏览量:2
下载量:0
时间:
随着我国通信行业的发展,也推动了路由市场的需求量,这里主要针对思科路由器,详细的分析了思科路由器如何限速,下面读文网小编为大家讲解具体设置方法,供你参考!
大家都知道如果要限制某项服务,就要在路由器上设置ACL(访问控制列表)将该服务所用的端口封掉,从而阻止该服务的正常运行。对BT软件,我们可以尝试封它的端口。一般情况下,BT软件使用的是6880-6890端口,在公司的核心思科路由器上使用以下命令将6880-6890端口全部封锁。
限速:
access-list 130 remark bt
access-list 130 permit tcp any any range 6881 6890
access-list 130 permit tcp any range 6881 6890 any
rate-limit input access-group 130 712000 8000 8000 conform-action transmit exceed-action drop
rate-limit output access-group 130 712000 8000 8000 conform-action transmit exceed-action drop
禁止下载:
access-list 130 deny tcp any any range 6881 6890
access-list 130 deny tcp any range 6881 6890 any
ip access-group 130 in / out
不过现在的bt软件,再封锁后会自动改端口,一些软件还是用到8000、8080、2070等端口,限制这些端口这样网络不正常!第二种方法是使用NVAR(Network-Based Application Recognition,网络应用识别)。NBAR (Network-Based Application Recognition) 的意思是网络应用识别。 NBAR 是一种动态能在四到七层寻找协议的技术,它不但能做到普通 ACL 能做到那样控制静态的、简单的网络应用协议TCP/UDP 的端口号。例如我们熟知的 WEB 应用使用的 TCP 80 ,也能做到控制一般 ACLs 不能做到动态的端口的那些协议,例如 VoIP 使用的 H.323, SIP 等。
要实现对 BT 流量的控制,就要在思科路由器上实现对 PDLM 的支持。 PDLM 是 Packet Description Language Module 的所写,意思是数据包描述语言模块。它是一种对网络高层应用的协议层的描述,例如协议类型,服务端口号等。它的优势是让 NBAR 适应很多已有的网络应用,像 HTTP URL , DNS , FTP, VoIP 等 , 同时它还可以通过定义,来使 NBAR 支持许多新兴的网络应用。例如 peer2peer 工具。 PDLM 在思科的网站上可以下载,并且利用 PDLM 可以限制一些网络上的恶意流量。CISCO在其官方网站提供了三个PDLM模块,分别为KAZAA2.pdlm,bittorrent.pdlm.emonkey.pdlm可以用来封锁KAZAA,BT,电驴得到PDLM然后通过TFTP服务器将 bittorrent.pdlm 拷贝到路由中。利用ip nbar pdlm bittorrent.pdlm命令将NBAR中的 BT 功能启动。再创建一个 class-map 和 policy map 并且把它应用到相应的思科路由器的接口上。一般是 连接 Internet (Chinanet ) 的接口是 FastEthernet 或 10M 的以太网接口。在思科路由器上您可以看见如下的配置 :
class-map match-all bittorrent
match protocol bittorrent
policy-map bittorrent-policy
class bittorrent
drop
interface FastEthernet0/
description neibujiekou
ip address 192.168.0.1 255.255.255.0
service-policy input bittorrent-policy
service-policy output bittorrent-policy
这样您就可以在你的公司或单位的因特网接入思科路由器上实施一些流量控制。同时NBAR和PDLM还可以应用在您公司和单位的内联广域网上,可以保证广域网带宽的合理使用。
在Cisco路由器设备中,只有支持思科快速转发(CEF,Cisco Express Forward)的路由器或交换机才能使用rate-limit来限制流量,具体设置分三步:
1. 在全局模式下开启cef:configure terminal,Router(config)#ip cef。
2. 定义标准或者扩展访问列表(定义一个方向就可以了):Router(config)#access-list 111 permit ip 192.168.1.0 0.0.0.255 any。
3. 在希望限制的端口上进行rate-limit:
Router(config)#interface FastEthernet 0/1。
Rounter(config-if)#rate-limit input access-group 111 2000000 40000 60000,这样我们就对开始进行Cisco路由器限速,速率为2Mbps。注意,是对整个网段,因为你定义的ACL就是针对整个网段的。
rate-limit命令格式:#rate-limit {input|output} [access-group number]。
input|output:这是定义数据流量的方向。
access-group number:定义的访问列表的号码。
bps:定义流量速率的上限,单位是bps。
burst-normal burst-max:定义的数据容量的大小,一般采用8000,16000,32000,单位是字节,当到达的数据超过此容量时,将触发某个动作,丢弃或转发等,从而达到限速的目的。
conform-action和exceed-action:分别指在速率限制以下的流量和超过速率限制的流量的处理策略。
action:是处理策略,包括drop和transmit等。
读文网小编分享了cisco路由器配置限速的解决方法,希望大家喜欢。
浏览量:2
下载量:0
时间:
思科公司制造的路由器、交换机和其他设备承载了全球80%的互联网通信,成为了网络应用的成功实践者之一,那么你知道思科3640策略路由如何配置吗?下面是读文网小编整理的一些关于思科3640策略路由如何配置的相关资料,供你参考。
策略路由是一种路由规划,它可以使数据包按照用户指定的策略进行转发。对于某些管理目的,如QoS需求或拓扑结构,要求某些路由必须经过特定的路径,就可以使用策略路由。例如,一个策略可以指定从某个网络发出的数据包只能转发到某个特定的接口。
策略路由使用rout maps 实现的,它和访问控制列表很相似。
3640#show run Current configuration: ! version 12.0 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname 3640 ! ! ip subnet-zeroR>! ! ! ! ! interface Ethernet0/0 ip address 172.16.0.1 255.255.255.0 no ip redirects no ip directed-broadcast standby 1 priority 120 preempt /*双机热备配置*/ standby 1 ip 172.16.0.100 standby 1 track Serial0/0 50 /*双机热备配置*/ interface Serial0/0 ip address 10.10.10.1 255.255.255.0 no ip directed-broadcast encapsulation ppp no ip mroute-cache no fair-queue ! interface Serial0/1 ip address 10.10.10.10 255.255.255.0 no ip directed-broadcast encapsulation ppp no ip mroute-cache no fair-queue ! interface Serial1/0 no ip address no ip directed-broadcast shutdown ! interface Serial1/1 no ip address no ip directed-broadcast shutdown ! interface Serial1/2 no ip address no ip directed-broadcast shutdown priority-group 5 /*CQ 5 配置应用*/ CQ:定制队列 ! interface Serial1/3 no ip address no ip directed-broadcast shutdown priority-group 2 /*PQ 2 配置应用*/ PQ:优先级队列 ! interface Serial3/0 no ip address no ip directed-broadcast ip policy route-map mail /*策略路由mail应用*/ shutdown ! interface Serial3/1 no ip address no ip directed-broadcast ip route-cache policy /*启动策略路由mytest的快速转发*/ ip policy route-map mytest /*策略路由mytest应用*/ shutdown no fair-queue ! interface Serial3/2 no ip address no ip directed-broadcast shutdown ! |
看过文章“思科3640策略路由如何配置”
浏览量:2
下载量:0
时间:
在实验中,我们用路由器当帧中继交换机使用,有的时候会出现Serial口不足的情况,那么我就需要部署两台路由器,然后配置一条Tunnel链路把两台交换机连起来。
实验的拓扑图:
R2上Tunnel链路的配置:
R2(config)#int f1/0 R2(config-if)#ip add 192.168.1.1 255.255.255.0 R2(config-if)#no sh R2(config-if)#int tunnel 0 R2(config-if)#tunnel source fastEthernet 1/0 R2(config-if)#tunnel destination 192.168.1.2 R2(config-if)#exi R2(config)#exi |
R3上Tunnel链路的配置:
R3上Tunnel链路的配置和R2几乎一样,指定一个source端口和一个destination的IP。
R2上的配置:
R3(config)#frame-relay switching R2(config)#int s0/0 R2(config-if)#no sh R2(config-if)#en fr R2(config-if)#frame-relay intf-type dce R2(config-if)#fram rout 104 int tun 0 100 R2(config-if)#fram route 105 int tun 0 101 R2(config-if)#end |
R3上的配置:
R3(config)#frame-relay switching R3(config)#int s0/2 R3(config-if)#no sh R3(config-if)#en fr R3(config-if)#frame intf-type dce R3(config-if)#frame-relay route 401 int tun 0 100 R3(config-if)#exi R3(config)#int s0/3 R3(config-if)#no sh R3(config-if)#en fr R3(config-if)#frame intf-type dce R3(config-if)#fram route 501 int tun 0 101 R3(config-if)#exi |
R1上的配置:
R1(config)#int s0/0 R1(config-if)#en fr R1(config-if)#frame-relay inverse-arp R1(config-if)#ip add 10.0.0.1 255.255.255.0 R1(config-if)#end |
R4和R5上的配置和R1类似,只是IP地址不一样而已。
注意:在配置frame-relay route的时候,要使用Tunnel的端口,Tunnel端口上也有DLCI号,每条PVC只能使用一个DLCI号。
Tunnel链路的帧中继网络的配置和不使用Tunnel链路的帧中继网络配置就两个区别:
1、Tunnel链路的配置。
2、frame-relay中的出口要使用Tunnel。
浏览量:2
下载量:0
时间:
cisco公司过去20多年,思科几乎成为了“互联网、网络应用、生产力”的同义词,思科公司在其进入的每一个领域都成为市场的领导者,那么你知道如何在cisco2811路由器上配置端口映射吗?下面是读文网小编整理的一些关于如何在cisco2811路由器上配置端口映射的相关资料,供你参考。
首先到路由器上配置
Router>en #进入特权模式
Router#conf t #进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#access-list 1 permit 192.168.1.0 0.0.0.255 #建立访问控制列表准备做nat转换
Router(config)#ip nat inside source list 1 interface f0/0 #建立NAT转换,将192.168.1.0的地址转换为接口f0/0的地址
Router(config)#int f0/1 #进入接口模式
Router(config-if)#ip nat inside #设定f0/1为NAT内部接口
Router(config-if)#int f0/0 #进入F0/0的接口模式
Router(config-if)#ip nat outside #设定F0/0为NAT外部接口
Router(config-if)#exit
Router(config)#
此时已经启用了NAT,内网可以上网了。
现在开始端口映射,让访问内网服务器:
Router(config)#ip nat inside source static tcp 192.168.1.100 5631 10.0.0.1 5631 extendable
Router(config)#ip nat inside source static tcp 192.168.1.100 5632 10.0.0.1 5632 extendable #因为10.0.0.1这个地址已经应用在f0/0接口上并做了NAT转换的地址,这里必须加上extendable这个关键字,否则报错。如果用另外的外网ip比如10.0.0.2,在这里就可以不加extendable。
现在外网的机器可以访问内网了。
命令show ip nat translations可以查看nat转换情况
show run也可以找到相关配置
Router(config)#exit #退出全局配置模式,到特权模式下使用show命令
Router#sho ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 10.0.0.1:23 192.168.1.100:23 --- ---
tcp 10.0.0.1:23 192.168.1.100:23 10.0.0.2:48268 10.0.0.2:48268
tcp 10.0.0.1:5631 192.168.1.100:5631 --- ---
tcp 10.0.0.1:5632 192.168.1.100:5632 --- ---
附:要删除哪条命令只要在命令前加 no 即可
补充: 你telnet的是5631端口,而服务器的telnet端口是23
你要telnet到服务器的5631端口就必须改服务器的telnet端口,在注册表改,服务器的防火墙也要打开相应端口。
如果你不改服务器端口也可以将5631的端口映射到服务器的23端口,命令如下:
Router(config)#ip nat inside source static tcp 192.168.1.100 23 10.0.0.1 5631 extendable
要先删掉5631到5631的映射,命令如下
Router(config)#no ip nat inside source static tcp 192.168.1.100 5631 10.0.0.1 5631 extendable
不改服务器端口就必须将外网ip的5631端口映射到服务器的23端口。然后你telnet ip 5631 其实就是telnet服务器的23端口。
在cisco2811路由器上配置端口映射的相关
浏览量:2
下载量:0
时间: