注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

北边的风

IT 钓鱼 养生

 
 
 

日志

 
 

cisco 交换机 配置案例  

2016-09-20 10:21:12|  分类: IT心得 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
* General Troubleshooting
show interfaces counters errors
show interfaces | include input err
show interfaces | include output err
show interfaces status | include connected

show standby brief
show etherchannel summary

* Enable SSH (Catalyst 4948, IOS 12.2(31)SGA9)
conf term
hostname switch1
ip domain-name foo.com
crypto key generate rsa
The name for the keys will be: switch1.foo.com
Choose the size of the key modulus in the range of 360 to 2048 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.

How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys ...[OK]

ip ssh time-out 60
ip ssh authentication-retries 2
ip ssh version 2

line vty 0 4
 transport input ssh
line vty 5 15
 transport input ssh


show cry key mypubkey rsa
show ssh

* Removing Files (Catalyst 4948, IOS 12.2(31)SGA9)
switch#del bootflash:cat4500-ipbasek9-mz.122-52.SG.bin
Delete filename [cat4500-ipbasek9-mz.122-52.SG.bin]? 
Delete bootflash:cat4500-ipbasek9-mz.122-52.SG.bin? [confirm]
switch#squeeze bootflash: 
All deleted files will be removed. Continue? [confirm]
Squeeze operation may take a while. Continue? [confirm]
Squeeze of bootflash complete
switch#dir bootflash:

* Upgrade IOS with .bin file (Catalyst 4948, IOS 12.2(31)SGA9)
switch#write
switch#show version
switch#show bootvar
switch#dir bootflash:
switch#copy tftp: bootflash:
  Address or name of remote host []? 10.1.1.25
  Source filename []? cat4500-ipbasek9-mz.122-31.SGA9.bin
  Destination filename [cat4500-ipbasek9-mz.122-31.SGA9.bin]? 
  Accessing tftp://10.1.1.25/cat4500-ipbasek9-mz.122-31.SGA9.bin...
  Loading cat4500-ipbasek9-mz.122-31.SGA9.bin from 10.1.1.25 (via Vlan101): !!!!!!!!!!!  (and so on...)
  [OK - 12628916 bytes]
  12628916 bytes copied in 71.164 secs (177462 bytes/sec)

switch#dir bootflash:
switch#conf term
switch(config)#boot system bootflash:cat4500-ipbasek9-mz.122-31.SGA9.bin
switch(config)#config-register 0x2102
switch(config)#end
switch#dir bootflash:cat4500-ipbasek9-mz.122-31.SGA9.bin
switch#write
switch#show bootvar
switch#reload

* Upgrade IOS with .bin file (Catalyst 3750, IOS 12.2(25)SEE2)
WARNING! - This procedure is only good for a standalone switch that is NOT part of a stack!

copy run start
show version
show boot
dir flash:
# If you don't have enough room for the new image, delete the old one:
del flash:c3750-ipbase-mz.122-25.SEE2.bin
# Once you have enough room, upload the new image:
copy tftp flash
  Address or name of remote host [192.168.1.25]? 
  Source filename [c3750-ipbase-mz.122-37.SE.bin]? 
  Destination filename [c3750-ipbase-mz.122-37.SE.bin]? 
  Accessing tftp://192.168.1.25/c3750-ipbase-mz.122-37.SE.bin...
  Loading c3750-ipbase-mz.122-37.SE.bin from 192.168.1.25 (via Vlan54): !!!!!!!!!!!!!! (and so on...)
  [OK - 7624064 bytes]
conf term
boot system flash:c3750-ipbase-mz.122-37.SE.bin
end
dir flash:c3750-ipbase-mz.122-37.SE.bin
show boot
copy run start
reload

* Upgrade IOS with .tar file (Cat 3750, IOS 12.2(25)SEE2)
WARNING! - This procedure is only good for a standalone switch that is NOT part of a stack!

copy run start
show version
show boot
dir flash:
# If you don't have enough room for the new image, delete the old one:
del /recursive flash:c3750-ipbase-mz.122-25.SEE2
# Once you have enough room, upload the new image:
archive tar /xtract tftp://192.168.1.25//c3750-ipbase-tar.122-37.SE.tar flash:
  Loading /c3750-ipbase-tar.122-37.SE.tar from 192.168.1.25 (via Vlan54): !
  c3750-ipbase-mz.122-37.SE/ (directory)
  extracting c3750-ipbase-mz.122-37.SE/c3750-ipbase-mz.122-37.SE.bin (7624064 bytes)!!!!!!!!!! (and so on...)
  c3750-ipbase-mz.122-37.SE/html/ (directory)
  extracting c3750-ipbase-mz.122-37.SE/html/forms.js (13563 bytes)!!!
  extracting c3750-ipbase-mz.122-37.SE/html/sitewide.js (20829 bytes)!!!!
  extracting c3750-ipbase-mz.122-37.SE/html/combo.js (9353 bytes)!!
  extracting c3750-ipbase-mz.122-37.SE/html/layers.js (1616 bytes)
  extracting c3750-ipbase-mz.122-37.SE/html/toolbar.js (7084 bytes)!!
  (and so on...)
  extracting c3750-ipbase-mz.122-37.SE/info (596 bytes)!
  extracting info (103 bytes)!!
  [OK - 10311680 bytes]
conf term
boot system flash:c3750-ipbase-mz.122-37.SE/c3750-ipbase-mz.122-37.SE.bin
end
dir flash:c3750-ipbase-mz.122-37.SE/c3750-ipbase-mz.122-37.SE.bin
show boot
copy run start
reload

* Etherchannel + VLAN trunking (Catalyst 4006, IOS 12.2(20)EWA)
interface Port-channel10
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 2,5,10,16,17,21,22,101,130
 switchport mode trunk
 no snmp trap link-status

interface GigabitEthernet3/1
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 2,5,10,16,17,21,22,101,130
 switchport mode trunk
 no snmp trap link-status
 channel-group 10 mode desirable

interface GigabitEthernet3/2
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 2,5,10,16,17,21,22,101,130
 switchport mode trunk
 no snmp trap link-status
 channel-group 10 mode desirable

* VLAN HSRP (Hot Standby Router Protocol) w/ACL (Catalyst 4006, IOS 12.2(20)EWA)
! primary unit
interface Vlan5
 ip address 192.168.5.2 255.255.255.0
 ip access-group in_from_prod_dmz in
 standby 5 ip 192.168.5.1
 standby 5 priority 105
 standby 5 preempt
 standby 5 authentication asdfasdf 

! secondary unit
interface Vlan5
 ip address 192.168.5.3 255.255.255.0
 ip access-group in_from_prod_dmz in
 standby 5 ip 192.168.5.1
 standby 5 authentication asdfasdf

* Port Monitoring - Useful for NIDS or troubleshooting (Catalyst 4006, IOS 12.2(20)EWA)
monitor session 1 source interface Gi4/1
monitor session 1 destination interface Gi5/15

#show monitor detail
Session 1
---------
Type              : Local Session
Source Ports      :
    RX Only       : None
    TX Only       : None
    Both          : Gi4/1
Source VLANs      :
    RX Only       : None
    TX Only       : None
    Both          : None
Source RSPAN VLAN : None
Destination Ports : Gi5/15
    Encapsulation : Native
          Ingress : Disabled
         Learning : Disabled
Filter VLANs      : None
Filter Addr Type  : 
    RX Only       : None
    TX Only       : None
    Both          : None
Filter Pkt Type   : 
    RX Only       : None
Dest RSPAN VLAN   : None
IP Access-group   : None
  评论这张
 
阅读(41)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016