cisco3560思科交换机常用配置教程与实例

合集下载

cisco_3560配置手册

cisco_3560配置手册

三层交换机配置与管理一、曰常管理命令二、密码恢复三、VLAN配置四、SPAN监听配置五、DHCP服务配置1. 在上配置DHCP服务2. 配置作为DHCP中继代理六、流量控制七、策略路由一、曰常管理命令l clear arp-cache清除ARP缓存l arp 192.168.100.22 000a.eb22.c1b5 arpa 绑定MAC和IPl sh ip accounting output-packets显示统计信息(当然需要配置统计功能如:ip accounting-transits 3200)l 通过IP追查交换机端口:CiscoWorks 2000 LMS网管软件的User tracking可以追查一个IP地址对应的端口。

sh mac-address-table address 00e0.9102.afd0 显示这个MAC地址在哪个接口出来的;sh mac-address-table interface Fa0/20显示20端口上的MAC地址,如果只有一个,则可能连接一个电脑,如果有很多个条目,则可以连接一个交换机。

sh cdp entry *显示邻居信息;二、密码恢复下面步骤也适用于Cisco 层 2 系列的交换机比如Catalyst 2900/3500XL,2940,2950/2955和层3 系列的比如Catalyst 3550 的密码恢复.通过终端或带有仿真终端程序(比如Hyper Terminal)的PC,连接到交换机的console 对于Catalyst 2900/3500XL 拔下交换机的电源线,然后按住交换机的Mode 按钮,再重新插上交换机的电源线.直到端口Port 1x 的LED 熄灭之后释放Mode 按钮.Catalyst 2940/2950L 拔下交换机的电源线,然后按住交换机的Mode 按钮,再重新插上交换机的电源线.直到STAT 的LED 熄灭之后释放Mode 按钮. Catalyst 2955 对于2955 交换机,它没有外部的Mode 按钮,因此就不能使用之前的那种方法来进行密码恢复.在交换机启动时,对于Windows 系列的PC,按下Ctrl+Break 键;对于UNIX 系列的工作站,按下Ctrl+C.如下:C2955 Boot Loader (C2955HBOOTM) Version 12.1(0.0.514), CISCO DEVELOPMENT TESTVERSIONCompiled Fri 13Dec02 17:38 by madisonWSC2955T12 starting...Base ethernet MAC Address: 00:0b:be:b6:ee:00Xmodem file system is available.Initializing Flash...flashfs[0]: 19 files, 2 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440flashfs[0]: Bytes used: 4510720 flashfs[0]: Bytes available: 3230720 flashfs[0]: flashfsfsck took 7 seconds....done initializing flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4/---接下来交换机会在15 秒内自动启动,等出现该信息之后,按下Ctrl+Break 键或Ctrl+C 键----/The system has been interrupted prior to initializing the flash file system to finishloading the operating system software:flash_init load_helper bootswitch:接下来输入flash_init 命令: switch: flash_init Initializing Flash...flashfs[0]: 143 files, 4 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 3612672flashfs[0]: Bytes used: 2729472 flashfs[0]: Bytes available: 883200 flashfs[0]: flashfs fsck took 86 seconds....done Initializing Flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4switch:接着输入load_helper 命令: switch: load_helper switch:再输入dir flash:命令显示交换机的文件系统:switch: dir flash: Directory of flash:/2 rwx 1803357 <date> c3500xlc3h2smz.1205.WC7.bin4 rwx 1131 <date> config.text5 rwx 109 <date> info6 rwx 389 <date> env_vars7 drwx 640 <date> html18 rwx 109 <date> info.ver403968 bytes available (3208704 bytes used)switch:把配置文件重命名:switch: rename flash:config.text flash:config.old switch:输入boot 命令启动交换机:switch: bootLoading"flash:c3500xlc3h2smz.1205.WC7.bin"...#################### #################################File "flash:c3500xlc3h2smz.1205.WC7.bin" uncompressed and installed, entry point: 0x3000executing...(略)不进入setup 模式:System Configuration DialogAt any point you may enter a question mark '?' for help. Use ctrlc to abort configuration dialog at any prompt. Default settings are in square brackets '[]'.Continue with configuration dialog? [yes/no]: n进入特权模式,恢复原始的配置文件:Switch#rename flash:config.old flash:config.textDestination filename [config.text] Switch#把配置文件保存在内存里:Switch#copy flash:config.text system:runningconfigDestination filename [runningconfig]?1131 bytes copied in 0.760 secsSwitch# 进入全局配置模式,取消密码设置: Switch(config)#no enable secret 保存配置: Switch#write memoryBuilding configuration...[OK] Switch#三、VLAN配置我们现在是一个具备三层交换功能的核心交换机接几台分支交换机(不具备三层交换能力)。

思科3560交换机配置实例

思科3560交换机配置实例
switchport mode access
!
interface GigabitEthernet0/6
switchport access vlan 4
switchport mode access
!
interface GigabitEthernet0/7
switchport access vlan 5
ip routing
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface GigabitEthernet0/1
switchport mode access
!
interface GigabitEthernet0/8
switchport access vlan 5
switchport mode access
!
interface GigabitEthernet0/9
switchport access vlan 5
switchport mode access
!
interface GigabitEthernet0/24
no switchport
ip address 172.16.9.1 255.255.255.0
!
interface GigabitEthernet0/25
!
interface GigabitEthernet0/26
switchport mode access

思科3560G交换机常用配置

思科3560G交换机常用配置

思科3560G交换机常用配置一.配置telnet登陆账号和密码用串口线连上交换机Switch(config)#usernaSwitch(config)#username admin pasSwitch(config)#username admin password 123Switch(config)#line vty 0 4Switch(config-line)#login localSwitch(config-line)#end%SYS-5-CONFIG_I: Configured from console by consoleSwitch#wr二.配特权密码Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#enable password 456三.划分vlanSwitch(config)#vlan 10Switch(config-vlan)#int vlan 10Switch(config-if)#%LINK-5-CHANGED: Interface Vlan10, changed state to upSwitch(config-if)#ip add 192.168.10.1 255.255.255.0四.配dhcpSwitch(config)#ip dhcp pool vlan10Switch(dhcp-config)#network 192.168.10.0 255.255.255.0Switch(dhcp-config)#default-router 192.168.10.1Switch(dhcp-config)#dns-server 192.168.1.1Switch(dhcp-config)#五.划分端口Switch(config)#int range fastEthernet 0/1-5 进入1-5端口Switch(config-if-range)#switchport mode access 并把接口方式改为accessSwitch(config-if-range)#switchport access vlan 10把1-5端口划vlan 10Switch(config-if-range)#no sh六. 配静态路由Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2 192.168.10.2是一跳地址七. 配置完一定要保存Switch#wrBuilding configuration...[OK]。

cisco3560三层交换机vlan间路由配置实例

cisco3560三层交换机vlan间路由配置实例

interface vlan 4 //同上
ip address 172.16.4.252 255.255.255.0
no shutdown
standby 4 ip 172.16.4.254
standby 4 priority 110 preempt
ip access-group 101 in
switchport mode trunk
switchprot trunk allowed vlan all
interface gigbitethernet 0/7 //进入模块0上的吉比特以太口7
Switchport mode access //定义这个接口的工作模式为访问模式
interface vlan 5
ip address 172.16.5.252 255.255.255.0
no shutdown
standby 5 ip 172.16.5.254
standby 5 priority 110 preempt
ip access-group 101 in
interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11
switchport trunk encapsulation dotlq //给这个接口封装为802.1Q
switchport mode trunk //定义这个接口的工作模式为trunk
Enable //进入私有模式
Configure terminal //进入全局模式
service password-encryption //对密码进行加密
hostname Catalyst 3550-12T1 //给三层交换机定义名称

CISCO3560 VLAN配置实例

CISCO3560 VLAN配置实例

CISCO3560 VLAN配置实例[原创规范]1.注意事项1.1.交换机启动需要大约4-5分钟;1.2.网线插入交换机接口从黄变为绿需要大约1-2分钟,即进入正常工作模式;1.3.建议使用XP系统进行操作,2003默认没有安装超级终端,需要使用安装光盘添加该工具才有;1.4.请严格按照以下步骤进行,背景灰色字体为交换机显示信息,蓝色字体为配置命令。

2.准备工作先保持交换机断电状态;使用调试串口线连接笔记本电脑的串口与交换机背面的CONSOLE接口;打开超级终端:开始-所有程序-附件-超级终端;配置超级终端:名称-cisco选择com1或com2(请依照实际情况进行选择)修改每秒位数为9600应用-确定-回车;3.初始配置给交换机通电;片刻后会看到交换机的启动信息,直到出现以下配置选项:Would you like to terminate autoinstall? [yes]: noWould you like to enter the initial configuration dialog? [yes/no]:noWould you like to terminate autoinstall? [yes]: no4.出现命令窗口Switch>5.备份出厂配置Switch>en进入特权模式Switch#copy running-config sfbak-configDestination filename [sfbak-config]?回车片刻后会出现:1204 bytes copied in 0.529 secs (2276 bytes/sec)表示文件备份成功。

6.配置账号密码Switch#configure terminal 进入配置子模式Switch(config)#enable password cisco 设置PASSWORD密码为ciscoSwitch(config)#enable secret cisco 设置SECRET密码为ciscoSwitch(config)#exit片刻后会出现:00:11:26: %SYS-5-CONFIG_I: Configured from console by console表示将配置保存到了内存中,在后面的配置过程中会出现类似的信息,属于正常现象。

cisco3560 3层交换机和路由器连接,交换机如何配置

cisco3560 3层交换机和路由器连接,交换机如何配置

如图。

pc0 属于vlan2,pc1属于vlan3,pc0 ip 192.168.0.10 /24 192.168.0.254 pc1 ip 1 0.139.168.10 /21 10.139.168.254 。

所有交换机的管理vlan是vlan4 192.168.1.x/24 。

要求pc0、pc1可以telnet 到交换机,和路由器 R1 ,交换机之间可以互ping通,pc 0和pc1可以ping通pc3。

pc0、pc1、可以互ping通。

3层交换机和路由器R1如何配置,主要是3层交换机如何配置,我已经在交换机的端口配置好了ip 。

路由器之间的ip 1 0.1.1.0/24 也已经配置好。

麻烦高后帮忙配置一下3层交换机和路由器。

谢谢。

分享到:2012-11-21 18:00提问者采纳这种配置我郁闷!我直接打命令看看能不能解决。

同时覆盖你一些配置吧!三层交换机3560enableconfigure terminalinterface range fastethernet0/1 -2switchport trunk encapsulation dot1qswitchport mode trunkexit这个时候,三层交换机接下面的二层交换机都为中继链路了(trunk),同时需要配置vtp,让各个交换机的vlan信息同步,如下配置:三层交换:enableconfigure terminalvtp domain netvtp mode server两个二层交换机都要配:enableconfigure terminalvtp domain netvtp mode client然后在三层交换上配置vlanenablevlan databasevlan 2vlan 3vlan 4exitconfigure terminalinterface vlan 2ip address 192.168.0.254 255.255.255.0exitinterface vlan 3ip address 10.139.168.254 255.255.248.0exitinterface vlan 4ip address 192.168.1.254 255.255.255.0然后在第一个二层交换机上将PC划分相应的vlan当中。

Cisco3560三层交换机Vlan间路由配置实例

Cisco3560三层交换机Vlan间路由配置实例需要做的⼯作:1、设置VTP DOMAIN(核⼼、分⽀交换机上都设置)2、配置中继(核⼼、分⽀交换机上都设置)3、创建VLAN(在server上设置)4、将交换机端⼝划⼊VLAN5、配置三层交换1、设置VTP DOMAIN。

VTP DOMAIN 称为管理域。

COM#vlan database 进⼊VLAN配置模式COM(vlan)#vtp domain COM 设置VTP管理域名称 COMCOM(vlan)#vtp server 设置交换机为服务器模式PAR1#vlan database 进⼊VLAN配置模式PAR1(vlan)#vtp domain COM 设置VTP管理域名称COMPAR1(vlan)#vtp Client 设置交换机为客户端模式PAR2#vlan database 进⼊VLAN配置模式PAR2(vlan)#vtp domain COM 设置VTP管理域名称COMPAR2(vlan)#vtp Client 设置交换机为客户端模式2、配置中继为了保证管理域能够覆盖所有的分⽀交换机,必须配置中继。

COM(config)#interface gigabitEthernet 2/1COM(config-if)#switchportCOM(config-if)#switchport trunk encapsulation isl 配置中继协议COM(config-if)#switchport mode trunkCOM(config)#interface gigabitEthernet 2/2COM(config-if)#switchportCOM(config-if)#switchport trunk encapsulation isl 配置中继协议在分⽀交换机端配置如下:PAR1(config)#interface gigabitEthernet 0/1PAR1(config-if)#switchport mode trunkPAR2(config)#interface gigabitEthernet 0/1PAR2(config-if)#switchport mode trunk3、创建VLAN⼀旦建⽴了管理域,就可以创建VLAN了。

Cisco3560三层交换机VLAN的配置案例

4)、创建访问控制列表(ACL) 3560(config)#access-list 101 deny ip 192.168.7.0 0.0.0.255 192.168.8.0 0.0.0.255 3560(config)#access-list 101 deny ip 192.168.7.0 0.0.0.255 192.168.10.0 0.0.0.255 3560(config)#access-list 101 deny ip 192.168.7.0 0.0.0.255 192.168.11.0 0.0.0.255 3560(config)#access-list 101 permit ip any any
3、网络拓扑图
4、配置三层交换机 本例以思科三层交换机为例,具体配置命令如下所示:
1)、创建5个vlan 3560(config)#vlan 10 3560(config-vlan)#vlan 20 3560(config-vlan)#vlan 30 3560(config-vlan)#vlan 40 3560(config-vlan)#vlan 50 3560(config-vlan)#exit
2、各机房IP地址分配
机房一、二: IP:192.168.7.X/24,网关:192.168.7.254 机房三、四: IP:192.168.8.X/24,网关:192.168.8.254 机房五、六: IP:192.168.10.X/24,网关:192.168.10.254 机房七: IP:192.168.11.X/24,网关:192.168.11.254 服务器: IP:192.168.12.X/24 网关:192.168.12.254
2)、将端口划分到相应的VLAN
3560(config)#int range f0/1-5 3560(config-if-range)#switchport mode access 3560(config-if-range)#switchport access vlan10 3560(config-if-range)#exit 3560(config)#int range f0/6-10 3560(config-if-range)#switchport mode access 3560(config-if-range)#switchport access vlan20 3560(config-if-range)#exit 3560(config)#int range f0/11-15 3560(config-if-range)#switchport mode access 3560(config-if-range)#switchport access vlan30 3560(config-if-range)#exit 3560(config)#int range f0/16-20

cisco3560配置手册

3层交换机:管理ip:192.168.1.2 上门连路由器ip:192.168.1.5分2个段:Vlan1 192.168.1.0 255.255.255.0 网关192.168.1.2Vlan5 172.16.5.0 255.255.254.0 网关172.16.5.1键入3560设备管理IP地址Switch>enableSwitch#conf tSwitch(config)# interface vlan 1Switch(config-if)#ip address 192.168.1.253 255.255.255.0 --这里应该用192.168.1.x的地址Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#line vty 0 4Switch(config-line)#loginSwitch(config-line)#password ciscoSwitch# configure terminalSwitch(config)# ip routingSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.5 添加到router的默认路由第一步:创建VLAN:Switch>enSwitch#Vlan DatabaseSwitch(Vlan)>Vlan 5 Name vlan5exit第二步:设置VLAN IP地址:Switch#Config TSwitch(Config)>Int Vlan 5Switch(Config-vlan)Ip Address 172.16.5.1 255.255.255.0Switch(Config-vlan)No Shut第三步:设置端口全局参数Switch(Config)Interface Range Fa 0/1 – 12 (1-12当trunk口,用来级联其他交换机)Switch(Config-if-range)Switchport Mode TRUNKSwitch(Config-if-range) switchport trunk encapsulation dot1qEXITSwitch(Config)Interface Range Fa 0/13 – 24 (13-24当访问口用)Switch(Config-if-range)Switchport Mode AccessSwitch(Config-if-range)Spanning-tree Portfast第四步:将端口添加到VLAN5,20-24添加到VLAN5(12-19不添是在vlan1吗?对)Switch(Config)Interface Range Fa 0/20 - 24Switch(Config-if-range)Switchport Access Vlan 5将3550作为DHCP服务器/*VLAN 1和5可用地址池和相应参数的配置, VLAN1和5要设几个地址池*/ 各设一个Switch(Config)Ip Dhcp Pool Test01/*设置可分配的子网*/Switch(Config-pool)Network 192.168.1.0 255.255.255.0/*设置DNS服务器*/Switch(Config-pool)Dns-server 202.103.224.68/*设置该子网的网关*/Switch(Config-pool)Default-router 192.168.1.2Switch(Config)Ip Dhcp Pool Test05/*设置可分配的子网*/Switch(Config-pool)Network 172.16.5.0 255.255.254.0 (这个段给他510台机器使用)/*设置DNS服务器*/Switch(Config-pool)Dns-server 202.103.224.68 (设为电信dns 有问题吗?没问题)/*设置该子网的网关*/Switch(Config-pool)Default-router 172.16.5.1第5步:设置DHCP保留不分配的地址Switch(Config)Ip Dhcp Excluded-address 192.168.1.1 192.168.1.80Switch(Config)Ip Dhcp Excluded-address 192.168.1.121Switch(Config)Ip Dhcp Excluded-address 192.168.1.250 192.168.1.254(VLAN1只分配81到120的ip)第6步:启用路由/*路由启用后,各VLAN间主机可互相访问*/Switch(Config)Ip Routing第7步:配置访问控制列表Switch(Config)access-list 105 permit ip 172.16.5.0 0.0.1.255 any (any=0.0.0.0. 255.255.255.255吗)(要允许172.16这个段上网,需要设这个吗)不用Switch(Config)access-list 105 permit ip 172.16.5.0 0.0.1.255 192.168.1.2 0.0.0.0(允许访问路由器)Switch(Config)access-list 105 permit udp any any eq bootpcSwitch(Config)access-list 105 permit udp any any eq tftp第7,8步可以省略第8步:应用访问控制列表/*将访问控制列表应用到VLAN 5Switch(Config)Int Vlan 5Switch(Config-vlan)ip access-group 105 out第9步:结束并保存配置Switch(Config-vlan)EndSwitch#wr。

Cisco 3560 系列简单三层划分 配置

Cisco 3560 系列简单三层划分配置三层交换机具备网络层的功能,实现VLAN 相互访问的原理是:利用三层交换机的路由功能,通过识别数据包的IP地址,查找路由表进行选路转发,三层交换机利用直连路由可以实现不同VLAN 之间的相互访问。

三层交换机给接口配置IP 地址。

采用SVI(交换虚拟接口)的方式实现VLAN 间互连。

SVI是指为交换机中的VLAN 创建虚拟接口,并且配置IP地址。

实现目标:PC3能访问PC1和PC2, 但PC1不能和PC2/PC3互通 PC2不能和PC1/PC3互通。

\一、首先我们配置PC上的IP和GateWay:PC1IP: 192.168.1.2Submark: 255.255.255.0Gateway: 192.168.1.1PC2IP: 192.168.2.2Submark: 255.255.255.0Gateway: 192.168.2.1PC3IP: 192.168.1.3Submark: 255.255.255.0Gateway: 192.168.1.1二、其次进行对Cisco2950进行vlan划分:Switch1:Switch>en --进入特权Switch#conf t --全局配置Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2 --创建vlan 2 使用默认vlan名Switch(config-vlan)#exit --退出vlan 2 配置操作Switch(config)#vlan 3 --创建vlan 3Switch(config-vlan)#exit -- 退出vlan 3 配置操作Switch(config)#int fa0/2 --配置交换机2口Switch(config-if)#switch access vlan 2 设置交换机2口为vlan 2 Switch(config-if)#exit --退出2口操作Switch(config)#int fa0/3 --配置3口Switch(config-if)#switch acces vlan 3 --设置交换机3口为 vlan 3 Switch(config-if)#exit --退出3口配置操作。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档