Cisco交换机一般配置Vlan设置
cisco3560三层交换机vlan间路由配置实例

cisco3560三层交换机vlan间路由配置实例Vtp mode server //定义VTP工作模式为sever模式Vtp domain centervtp //定义VTP域的名称为centervtpVlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan 3 name vlan3Vlan 4 name vlan4Vlan 5 name vlan5Vlan 6 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 //进入虚拟的以太通道组1switchport trunk encapsulation dot1q //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //在这个trunk上允许所有的vlan 通过Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1switchport trunk encapsulation dotlq //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //在这个trunk上允许所有的vlan 通过channel-group 1 mode on //把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allchannel-group 1 mode onport-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依*源和目的IP的方式)interface gigabitethernet 0/3 //进入模块0上的吉比特以太口3 switchport trunk encapsulation dotlq //给trunk封装为802.1Q switchport mode trunk //定义这个接口的工作模式为trunk switchport trunk allowed vlan all //允许所有vlan信息通过interface gigabitethernet 0/4 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/5 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/6 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchprot trunk allowed vlan allinterface gigbitethernet 0/7 //进入模块0上的吉比特以太口7Switchport mode access //定义这个接口的工作模式为访问模式switchport access vlan 9 //定义这个接口可以访问哪个vlan(实际就是分配这个接口到vlan)no shutdownspanning-tree vlan 6-9 cost 1000 //在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 – 10 //进入模块0上的吉比特以太口8,9,10switchport mode access //定义这些接口的工作模式为访问模式switchport access vlan 8 //把这些接口都分配到vlan8中no shutdownspanning-tree portfast //在这些接口上使用portfast(使用portfast 以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11 switchport trunk encapsulation dotlq //给这个接口封装为802.1Qswitchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //允许所有vlan信息通过interface gigabitethernet 0/12 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface vlan 1 //进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)ip address 172.16.1.7 255.255.255.0 //配置IP地址和子网掩码no shutdownstandby 1 ip 172.16.1.9 //开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9standby 1 priority 110 preempt //定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式。
cisco典型三层交换机VLAN配置

cisco典型三层交换机VLAN配置所谓典型局域网就是指由一台具备三层交换功能的核心交换机接几台分支交换机(不一定具备三层交换能力)。
我们假设核心交换机名称为:com;分支交换机分别为:par1、par2、par3,分别通过port 1的光线模块与核心交换机相连;并且假设vlan名称分别为counter、market、managing……需要做的工作:A、设置vtp domain(核心、分支交换机上都设置)B、配置中继(核心、分支交换机上都设置)C、创建vlan(在server上设置)D、将交换机端口划入vlanE、配置三层交换A、设置vtp domain。
vtp domain 称为管理域。
交换vtp更新信息的所有交换机必须配置为相同的管理域。
如果所有的交换机都以中继线相连,那么只要在核心交换机上设置一个管理域,网络上所有的交换机都加入该域,这样管理域里所有的交换机就能够了解彼此的vlan列表。
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 设置交换机为客户端模式par3#vlan database 进入vlan配置模式par3(vlan)#vtp domain com 设置vtp管理域名称compar3(vlan)#vtp client 设置交换机为客户端模式注意:这里设置核心交换机为server模式是指允许在该交换机上创建、修改、删除vlan及其他一些对整个vtp域的配置参数,同步本vtp域中其他交换机传递来的最新的vlan信息;client模式是指本交换机不能创建、删除、修改vlan配置,也不能在nvram中存储vlan配置,但可同步由本vtp域中其他交换机传递来的vlan信息。
思科交换机VLAN配置

配置 Cisco互换机VLAN配置进入特权模式Switch#en进入配置模式Switch#config创立VLAN:Switch(config)# vlan10 ( 创立VLAN)给 VLAN 起名字Switch#configSwitch(config)# valn 20Switch(vlan)# name neiwangSwitch(vlan)#ex分派端口(将 f 0/1-f 0/10端口划归vlan20,f 0/11-f 0/24端口划归vlan30 ):Switch(config)#int range f0/1-10(多端口)Switch(config-if-range)#switchport mode access(一定)Switch(config-if-range)#switchport access vlan 20Switch(config-if-range)#exSwitch(config)#int range f0/11-24Switch(config-if-range)#switchport mode accessSwitch(config-if-range)#switchport access vlan 30Switch(config-if-range)#ex设置 VLAN的 IP 地点Switch#configSwitch(config)#int vlan 20Switch(config-if)#ip address shutdownSwitch(config-if)#exSwitch(config)#int vlan 30Switch(config-if)#ip address shutdownSwitch(config-if)#exSwitch(config)#exSwitch#ex保留设置Switch#wr设置一台互换机VLAN之间互通写路由Switch(config)#ip routingSwitch>enSwitch#configSwitch(config)#vlan 20Switch(config-vlan)#exSwitch(config)#vlan 30Switch(config-vlan)#exitSwitch(config)#int f 0/1Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#exSwitch(config)#int f 0/2Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 30 Switch(config-if)#exSwitch(config)#int vlan 20Switch(config-if)#ip address shutdown Switch(config-if)#exSwitch(config)#int vlan 30Switch(config-if)#ip address shutdown Switch(config-if)#exSwitch(config)#ip routingSwitch(config)#exSwitch#exSwitch#wr (保留) 0删除端口 vlanSwitch(config)#int f 0/2Switch(config)#no switchport access vlan 20 两台互换机 VLAN互通的 TRUNKswitchA(config)#int fa0/24switchA(config-if)#switchport mode trunkswitchA(config-if)#switchport trunk encapsulation dot1q。
Cisco交换机配置手册

2950交换机简明配置维护手册目录说明 (3)产品特性 (3)配置端口 (4)配置一组端口 (4)配置二层端口 (6)配置端口速率及双工模式 (6)端口描述 (7)监控及维护端口 (8)监控端口和控制器的状态 (8)刷新、重置端口及计数器 (10)关闭和打开端口 (10)配置VLAN (11)理解VLAN (11)可支持的VLAN (12)配置正常范围的VLAN (12)生成、修改以太网VLAN (13)删除VLAN (14)将端口分配给一个VLAN (15)配置VLAN Trunks (16)使用STP实现负载均衡 (19)配置Cluster (23)说明本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。
产品特性2950是只支持二层的交换机支持VLAN∙到250 个VLAN∙支持VLAN ID从1到4094(IEEE 802.1Q 标准)∙支持ISL及IEEE 802.1Q封装安全∙支持IOS标准的密码保护∙支持标准及扩展的访问列表来定义安全策略∙支持基于VLAN的访问列表监视∙交换机LED指示端口状态∙SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量∙内置支持四组的RMON监控功能(历史、统计、告警及事件)配置端口配置一组端口当使用interface range命令时有如下的规则:∙有效的组范围:o vlan从1 到4094o fastethernet槽位/{first port} - {last port}, 槽位为0o gigabitethernet槽位/{first port} - {last port},槽位为0o port-channel port-channel-number - port-channel-number, port-channel号从1到64∙端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的.∙interface range命令只能配置已经存在的interface vlan∙所有在同一组的端口必须是相同类别的。
Cisco交换机配置总结

Cisco交换机配置总结一、用户及本地、远程登录配置1、创建用户Cisco#configure terminalCisco(config)#username admin secret ****** //建议用secret2、本地验证Cisco(config)#enable secret netadmin3、远程登录Cisco(config)#line vty 0 15Cisco(config-line)#login localCisco(config-line)#logging synchronous //同步显示,可不配二、Vlan配置1、创建vlanCisco(config)#vlan 10Cisco(config-vlan)#name xxx //给vlan取名Cisco(config-vlan)#no shutCisco(config-vlan)#exit2、配置IPCisco(config)#int vlan 10 //进入vlan接口Cisco(config-if)#ip add 192.168.0.254 255.255.255.0 //配IP,二层交换机的非管理vlan不需要配IPCisco(config-if)#no shut3、将多个端口一次性划到一个vlanHRBSH(config)#int range fa0/1 - 16 //进入多个端口HRBSH(config-if-range)#switchport access vlan 10三、Trunk配置HRBSH (config)#int gigabitEthernet 0/1HRBSH (config)#switchportHRBSH (config-if)#switchport trunk encapsulation dot1q //三层交换机需要配置HRBSH (config-if)#switchport mode trunkHRBSH (config-if)#switchport trunk allowed 85,95四、保存配置HRBSH#copy run to configHRBSH#wrHRBSH#copy run tftp //导出配置五、系统维护更改设备名:hostname查看vlan:show vlan查看当前配置:show run查看接口信息:show interface帮助:show ?删除某条配置:no查看arp表: show arp查看mac表:show mac-六、Cisco 2900系列密码破解⒈连接交换机的console口到终端或PC仿真终端。
cisco三层交换机vlan间路由配置实例

cisco三层交换机vlan间路由配置实例下面以cisco3560实例说明如何在一个典型的快速以太局域网中实现VLAN。
所谓典型局域网就是指由一台具备三层交换功能的核心交换机接几台分支交换机(不一定具备三层交换能力)。
我们假设核心交换机名称为:COM;分支交换机分别为:PAR1、PAR2、PAR3,分别通过Port 1的光线模块与核心交换机相连;并且假设VLAN名称分别为COUNTER、MARKET、MANAGING……需要做的工作:1、设置VTP DOMAIN(核心、分支交换机上都设置)2、配置中继(核心、分支交换机上都设置)3、创建VLAN(在server上设置)4、将交换机端口划入VLAN5、配置三层交换1、设置VTP DOMAIN。
VTP DOMAIN 称为管理域。
交换VTP更新信息的所有交换机必须配置为相同的管理域。
如果所有的交换机都以中继线相连,那么只要在核心交换机上设置一个管理域,网络上所有的交换机都加入该域,这样管理域里所有的交换机就能够了解彼此的VLAN列表。
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 设置交换机为客户端模式PAR3#vlan database 进入VLAN配置模式PAR3(vlan)#vtp domain COM 设置VTP管理域名称COMPAR3(vlan)#vtp Client 设置交换机为客户端模式注意:这里设置核心交换机为Server模式是指允许在该交换机上创建、修改、删除VLAN 及其他一些对整个VTP域的配置参数,同步本VTP域中其他交换机传递来的最新的VLAN 信息;Client模式是指本交换机不能创建、删除、修改VLAN配置,也不能在NVRAM中存储VLAN配置,但可同步由本 VTP域中其他交换机传递来的VLAN信息。
Cisco交换机一般配置Vlan设置

一、开机1、如是新设备,开机需跳过系统默认配置模式,进入手动配置模式;2、进入用户模式,系统提示符为>,此模式只能查看统计信息,无配置功能;3、用户模式下,输入enable,进入特权模式,系统提示符为;二、一些常用设置1、设置enable密码configenablesecretXXX2、设置主机名confighostnameXXX3、关闭http访问confignohttpserver4、关闭密码明文显示configservicepassword-encryption5、配置consol口密码configlinecon0config-linepasswordXXXconfig-lineloginconfig-lineexit6、关闭telnet访问configlinevty04config-linenopasswordconfig-lineexit7、关闭VLAN1configinterfacevlan1config-ifshutdownconfig-ifexit三、创建VLAN10vlan1设备自动生成,不能更改、删除方法1:vlandatabasevlanvlan10nameXXXvlanapple方法2:nameXXX就是命名Vlanconfigureterminalconfigvlan10config-vlannameXXXconfig-vlanexit四、Vlan配置configureterminalconfig-ifinterfacevlan10------进入Vlan10config-ifipaddress---config-ifnoshutdown------开启端口config-ifdescriptionXXX-----描述名XXX,只支持英文config-ifexit-----退出五、添加Vlan到某个端口configureterminalconfiginterfacerangegigabitEthernet0/16----进入端口16 config-if-rangnoshutdown-------开启端口config-if-rangswitchportmodeaccess--------------将交换机端口转换为ACCESS模式config-if-rangswitchportaccessvlan10--------在16端口允许Vlan10通过config-if-rangexit-------退出六、单独修改某个Vlan网关config-ifinterfacevlan10--进入Vlan10config-ifipaddress------七、创建ACL规则,标准ACLconfigipaccess-listextendedswj ACL规则名config-ext-nacl0.0.0----拒绝vlan30的用户访问vlan10资源八、将ACL应用到vlan10configinterfacevlan10--创建vlan10的SVI接口config-ifipaccess-groupswjin--将扩展ACL应用到vlan10的SVI接口下九、保存copyrun-configurestart-configure。
CISCO交换机基本配置和使用概述

CISCO交换机基本配置和使用概述CISCO交换机是一种常用的网络设备,用于构建局域网(Local Area Network,LAN)。
它可以通过物理线路的连接,将多台计算机或其他网络设备连接到同一个网络中,实现数据的传输和共享。
CISCO交换机的基本配置包括IP地址的配置、VLAN的配置、端口配置、安全性配置等。
接下来,我们将对这些配置进行详细说明。
首先,IP地址的配置是CISCO交换机的基本操作之一。
通过配置IP地址,我们可以对交换机进行管理和监控。
具体的配置步骤如下:1. 进入交换机的配置模式。
在命令行界面输入"enable"命令,进入特权模式。
2. 进入全局配置模式。
在特权模式下输入"configure terminal"命令,进入全局配置模式。
3. 配置交换机的IP地址。
在全局配置模式下输入"interfacevlan 1"命令,进入虚拟局域网1的接口配置模式。
然后输入"ip address 192.168.1.1 255.255.255.0"命令,配置交换机的IP地址和子网掩码。
4. 保存配置并退出。
在接口配置模式下输入"exit"命令,返回到全局配置模式。
然后输入"exit"命令,返回到特权模式。
最后输入"copy running-config startup-config"命令,保存配置到闪存中。
其次,VLAN的配置是CISCO交换机的关键配置之一。
通过配置VLAN,我们可以将交换机的端口划分为不同的虚拟局域网,实现数据的隔离和安全。
1. 进入交换机的配置模式。
同样,在特权模式下输入"configure terminal"命令,进入全局配置模式。
2. 创建VLAN。
在全局配置模式下输入"vlan 10"命令,创建一个编号为10的VLAN。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
一、开机
1、如是新设备,开机需跳过系统默认配置模式,进入手动配置模式。
2、进入用户模式,系统提示符为>,此模式只能查看统计信息,无配置功能。
3、用户模式下,输入enable,进入特权模式,系统提示符为#。
二、一些常用设置
1、设置enable密码
(config)#enablesecretXXX
2、设置主机名
(config)#hostnameXXX
3、关闭http访问
(config)#nohttpserver
4、关闭密码明文显示
(config)#servicepassword-encryption
5、配置consol口密码
(config)#linecon0
(config-line)#passwordXXX
(config-line)#login
(config-line)#exit
6、关闭telnet访问
(config)#linevty04
(config-line)#nopassword
(config-line)#exit
7、关闭VLAN1
(config)#interfacevlan1
(config-if)#shutdown
(config-if)#exit
三、创建VLAN10(vlan1设备自动生成,不能更改、删除)方法1:
#vlandatabase
(vlan)#vlan10nameXXX
(vlan)#apple
方法2:nameXXX就是命名Vlan
#configureterminal
(config)#vlan10
(config-vlan)#nameXXX
(config-vlan)#exit
四、Vlan配置
#configureterminal
(config-if)#interfacevlan10------进入Vlan10
(config-if)#ipaddress
---
(config-if)#noshutdown------开启端口
(config-if)#descriptionXXX-----描述名XXX,只支持英文(config-if)#exit-----退出
五、添加Vlan到某个端口
#configureterminal
(config)#interfacerangegigabitEthernet0/16----进入端口16 (config-if-rang)#noshutdown-------开启端口
(config-if-rang)#switchportmodeaccess
--------------将交换机端口转换为ACCESS模式
(config-if-rang)#switchportaccessvlan10
--------在16端口允许Vlan10通过
(config-if-rang)#exit-------退出
六、单独修改某个Vlan网关
(config-if)#interfacevlan10--进入Vlan10
(config-if)#ipaddress
------
七、创建ACL规则,(标准ACL)
(config)#ipaccess-listextendedswj(ACL规则名)
(config-ext-nacl)#0.0.0
----拒绝vlan30的用户访问vlan10资源
八、将ACL应用到vlan10
(config)#interfacevlan10--创建vlan10的SVI接口
(config-if)#ipaccess-groupswjin--将扩展ACL应用到vlan10的SVI接口下九、保存
#copyrun-configurestart-configure。