免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5887 | 回复: 2
打印 上一主题 下一主题

Cisco 35系列交换机的常用配置方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-14 13:48 |只看该作者 |倒序浏览
Cisco 35系列交换机的常用配置方法
====================================================================================
一、添加vlan21
cisco3560#vlan  database
cisco3560(vlan)#vlan 21 ?
  are        Maximum number of All Route Explorer hops for this VLAN
  backupcrf  Backup CRF mode of the VLAN
  bridge     Bridging characteristics of the VLAN
  media      Media type of the VLAN
  mtu        VLAN Maximum Transmission Unit
  name       Ascii name of the VLAN
  parent     ID number of the Parent VLAN of FDDI or Token Ring type VLANs
  ring       Ring number of FDDI or Token Ring type VLANs
  said       IEEE 802.10 SAID
  state      Operational state of the VLAN
  ste        Maximum number of Spanning Tree Explorer hops for this VLAN
  stp        Spanning tree characteristics of the VLAN
  tb-vlan1   ID number of the first translational VLAN for this VLAN (or zero if none)
  tb-vlan2   ID number of the second translational VLAN for this VLAN (or zero if none)
  
cisco3560(vlan)#vlan 21 name vlan21
VLAN 21 added:
    Name: vlan21
cisco3560(vlan)#exit   保存退出
APPLY completed.
Exiting....
cisco3560#
===================================================================================
二、为vlan21添加IP地址
cisco3560(config)#interface vlan 21
cisco3560(config-if)#ip address 172.18.21.254 255.255.255.0
cisco3560(config-if)#exit
====================================================================================
三、添加端口到vlan21
cisco3560#configure terminal
cisco3560(config)#interface gigabitEthernet 0/42
cisco3560(config-if)#switchport access vlan 21
cisco3560(config-if)#no shut   启动端口
cisco3560(config-if)#exit
====================================================================================
四、添加ACL访问控制规则(先添加访问控制组,再添加策略)
cisco3560#conf terminal
cisco3560(config)#interface vlan 21
cisco3560(config-if)#
cisco3560(config-if)#ip access-group 121 ?
  in   inbound packets
  out  outbound packets
cisco3560(config-if)#ip access-group 121 in
cisco3560(config-if)#exit 退出到全局配置模式
cisco3560(config)#
cisco3560(config)#access-list 121 ?   
  deny     Specify packets to reject
  dynamic  Specify a DYNAMIC list of PERMITs or DENYs
  permit   Specify packets to forward
  remark   Access list entry comment
cisco3560(config)#access-list 121 ? ip (源)XXX.XXX.XXX.XXX 掩码的反码  目标ip 目标掩码的反码
cisco3560(config)#access-list 121  deny ip 172.18.10.0 0.0.0.255 172.18.12.0 0.0.0.255
                  access-list 121  deny ip 172.18.10.0 0.0.0.255 172.18.14.0 0.0.0.255
                   。。。。。
                  access-list 121  permit ip any any
ACL(访问列表)配置
Switch(config)# access-list 121 permit tcp any host 10.1.1.1 eq smtp
Switch(config)# access-list 121 deny tcp any host 10.1.1.2 eq telnet
Switch(config)# access-list 121 permit tcp any host 10.1.1.2
Switch(config)# access-list 121 deny tcp any any
======================================================================================
五、添加路由的方法
1、到主机的路由
2、到vlan的路由
cisco3560(config)#
ip route 0.0.0.0 0.0.0.0 172.18.101.1
ip route 172.26.0.0 255.255.0.0 172.19.1.10
ip route 172.30.0.0 255.255.0.0 172.19.1.8
ip route 192.168.101.0 255.255.255.0 172.19.1.6
cisco3560(config)#ip route 172.18.13.0 255.255.255.0 vlan 21 ?
      Distance metric for this route
  A.B.C.D    Forwarding router's address
  name       Specify name of the next hop
  permanent  permanent route
  tag        Set tag for this route
  
=======================================================================================
六、show命令的用法
cisco3560#show ip interface brief  
Interface              IP-Address      OK? Method Status                Protocol
Vlan1                  unassigned      YES NVRAM  up                    down   
Vlan2                  172.18.1.254    YES NVRAM  up                    up      
Vlan10                 172.18.10.254   YES manual up                    up      
Vlan11                 172.18.11.254   YES manual up                    up      
Vlan12                 172.18.12.254   YES manual up                    up      
Vlan14                 172.18.14.254   YES manual up                    up      
cisco3560#
cisco3560#show vlan brief  查看vlan与端口的对应关系
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/31, Gi0/32, Gi0/37, Gi0/38, Gi0/39, Gi0/50, Gi0/51, Gi0/52
2    vlan2                            active    Gi0/1, Gi0/2, Gi0/3, Gi0/4, Gi0/5, Gi0/6, Gi0/7, Gi0/8, Gi0/9, Gi0/10, Gi0/11, Gi0/12, Gi0/49
10   vlan10                           active    Gi0/22, Gi0/40
11   vlan11                           active    Gi0/23
12   vlan12                           active    Gi0/24
13   vlan13                           active    Gi0/45
14   vlan14                           active    Gi0/25
15   vlan15                           active    Gi0/26, Gi0/27, Gi0/28
16   vlan16                           active    Gi0/29, Gi0/30
cisco3560#show access-lists  查看ACL规则表
Extended IP access list 101
    10 deny ip 172.18.10.0 0.0.0.255 172.18.12.0 0.0.0.255
    20 deny ip 172.18.10.0 0.0.0.255 172.18.14.0 0.0.0.255
    30 deny ip 172.18.10.0 0.0.0.255 172.18.15.0 0.0.0.255
    40 permit ip any any (23754 matches)
cisco3560#
cisco3560# show ip interface brief  查看交换机接口配置信息
Interface              IP-Address      OK? Method Status                Protocol
Vlan1                  unassigned      YES NVRAM  up                    down   
Vlan2                  172.18.1.254    YES NVRAM  up                    up      
Vlan10                 172.18.10.254   YES manual up                    up      
Vlan11                 172.18.11.254   YES manual up                    up      
Vlan12                 172.18.12.254   YES manual up                    up      
Vlan13                 172.18.13.254   YES manual up                    down   
Vlan14                 172.18.14.254   YES manual up                    up         
GigabitEthernet0/1     unassigned      YES unset  up                    up      
GigabitEthernet0/2     unassigned      YES unset  up                    up      
GigabitEthernet0/3     unassigned      YES unset  up                    up      
cisco3560#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.18.101.1 to network 0.0.0.0
     172.19.0.0/24 is subnetted, 1 subnets
C       172.19.1.0 is directly connected, Vlan20
     172.18.0.0/24 is subnetted, 10 subnets
C       172.18.14.0 is directly connected, Vlan14
C       172.18.15.0 is directly connected, Vlan15
C       172.18.12.0 is directly connected, Vlan12
C       172.18.10.0 is directly connected, Vlan10
C       172.18.11.0 is directly connected, Vlan11
C       172.18.1.0 is directly connected, Vlan2
C       172.18.101.0 is directly connected, Vlan102
S    172.26.0.0/16 [1/0] via 172.19.1.10
S    172.30.0.0/16 [1/0] via 172.19.1.8
S    192.168.101.0/24 [1/0] via 172.19.1.6
S*   0.0.0.0/0 [1/0] via 172.18.101.1
cisco3560#



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/16729/showart_1719538.html

论坛徽章:
0
2 [报告]
发表于 2008-12-22 12:58 |只看该作者

销售 回收CISCO WS-X4448-GB-SFP 4448-GB-SFP 模块 思科

高价现金回收 CISCO 3750G-24TS-S 3750G-48TS-S 交换机 二手 cisco 思科 交换机 路由器 防火墙 模块等高价现金回收

诚心求购二手CISCO 华为3COM 交换机 路由器 防火墙 模块等网络产品.

二手cisco交换机 二手cisco路由器 二手cisco模块 二手cisco防火墙等专业回收 高价求购

不论产品新旧,数量多少均可.

同时也收购电信,银行,等企业的淘汰产品,及企业的 cisco 工程备件。

cisco 3550-24-SMI   cisco 3550-24-EMi   cisco 3550-48-smi emi  3550-12G

cisco 3750-24TS-S 3750-48TS-S 3750G-24TS-S  3750G-48TS-S  3750G-12S-S

cisco 2811  2821  2851 3560G-24TS-S  3560G-48TS-S 等路由及交换机

cisco 6500  6724  6548  sup720 SUP720-3B 等模块

CISCO 4506 4503 4515 4448-GB-RJ45 等4500系列机器及模块

cisco pix515E  pix525  pix535等防火墙

CISCO 3550 系列  CISCO 2950 系列   CISCO 3600 系列  CISCO 3660 系列  CISCO 2600 系列  
CISCO 4000 系列  CISCO 4500 系列   CISCO 3750 系列  CISCO 3560 系列  CISCO 2800 系列
CISCO 3700 系列  CISCO 6500 系列
CISCO NM PA 模块
CISCO 4000  6000  7000  12000 模块等

有货的朋友请联系: 13910071388 何先生  QQ 469966846

合作方式:我公司是长期求购,希望有机会能和您建立起长期合作的关系.

交易方式:当面交易,现金操作,全国各地均可以上门服务,决对的方便,快捷,安全.

有货的朋友请来电详谈或者单聊.  节假日均可!节假日均可!节假日均可!

如QQ不在,请电话联系.

敬候您的佳音!

3750-24TS-S.JPG (695.4 KB, 下载次数: 69)

3750-24TS-S.JPG

3560-48PS-S.JPG (1.63 MB, 下载次数: 64)

3560-48PS-S.JPG

论坛徽章:
0
3 [报告]
发表于 2008-12-22 13:02 |只看该作者

高价现金回收 CISCO 2811 2821 2851 路由器

CISCO全新及二手路由器,交换机,模块,防火墙,服务器等网络设备。(NA/NP/IE实验室设备,4500, 6500,7200,7500,12000系列等)      
高端路由器及模块   
     GSR12008,GSR12012,CISCO7505机箱CISCO7507机箱CISCO7513机箱CISCO7204VXR,CISCO7206VXR,RSP8,RSP4+,RSP2,VIP4-80,4GE-SFP-LC, 3GE-GBIC-SC, GE-GBIC-SC,OC48X/POS-SR-SC PA-MC-8TE1+ PA-MC-8TE1/120 2FE2W VWIC2-2MFT-G703 4012 4013 4148 4448,4418 4515,4516,4516-10GE
,OC48E/POS-SR-SC,4OC48E/POS-SR-SC, C192E/POS-IR-SC,WS-C6509 ,WS-SUP720-3B,WS-SUP720-3B-XL,WS-X6K-SUP1A-2GE,WS-X6K-S1A-MSFC2,WS-X6K-S2-MSFC2,WS-F6K-MSFC2,WS-X6416-GBIC,WS-X6516-GBIC,WS-X6516A-GBIC,WS-X6408A-GBIC,WS-X6348-RJ-45,WS-F6700-DFC3B,PFC-3B WS-F6K-DFC, WS-XF6700-CFC, WS-X6148-GE-TX,WS-X6148A-GE-TX,WS-X6408A-GBIC,WS-X6548-RJ-45,WS-X6548-GE-TX,WS-X6724-SFP,WS-X6748-SFP
中端交换机   
     3550-24 3550-48 3550-12T 3550-12G 3560-24 3560-48 3560G-24TS-S,TS-E3560G-48TS-S,TS-E,PS-S,3750-24,3750G-24TS-S,TS-E3750-48,3750G-48TS-S,TS-E,PS-S,4503,4503-E,4506,4506-E,6506,6506-E,6509,6509-E,7609,12008等。  
CISCO维修   
路由器   
     CISCO2500系列 CISCO1800系列 、 1600系列 、 1700系列、 CISCO2610 2620 2621 2620;CISCO3725 3745 CISCO3825 3845 CISCO 4000系列4500系列,CISCO6500系列 CISCO 7206VXR CISCO 12000系列    
交换机   
     CISCO 1900系列2900系列CISCO 2950系列CISCO 3550系列CISCO 4000系列CISCO45系列CISCO 65系列72系列 
防火墙:
     PIX-515,PIX-515E,PIX-525,PIX-535;ASA全系列等
产品说明:
     我们cisco 中高端各型交换机,路由器,防火墙,模块
手机13910071388 何先生
Q Q:469966846
MSN: ciscoax@hotmail.com
Email:ciscoax@163.com
网址:www.xwaxkj.com
地址:北京市中关村
公司:芯网翱翔科技(北京)有限责任公司
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP