3层交换机基本配置

3层交换机基本配置
3层交换机基本配置

基本配置

S> enable 进入特权模式

S# configure terminal 进入全局配置模式

S(config)# hostname name 改变交换机名称

S(config)# enable password level level_# password 设置用户口令

(level_#=1)或特权口令(level_#=15)

S(config)# line console 0 进入控制台接口

S(config-line)# password console_password 接上一条命令,设置控制台口令S(config)# line vty 0 15 进入虚拟终端

S(config-line)# password telnet_password 接上一条命令,设置Telnet口令S(config-line)# login 允许Telnet登录

S(config)# enable password|secret privilege_password 配置特权口令(加密或不加密)

S(config)# interface ethernet|fastethernet|gigabitethernet

slot_#/port_# 进入接口子配置模式

S(config-if)# [no] shutdown 关闭或启用该接口(默认启用)

S(config)# ip address IP_address sunbet_mask 指定IP地址

S(config)# ip default-gateway router's_IP_address 指定哪台路由器地址为默认网关

S# show running-config 查看当前的配置

S# copy running-config startup-config 将RAM中的当前配置保存到NVRAM

S> show interface [type slot_#/port_#] 查看所有或指定接口的信息

S> show ip 显示交换机的IP配置(只在1900系列上可用)

S> show version 查看设备信息

S# show ip interface brief 验证IP配置

S(config-if)# speed 10|100|auto 设置接口速率

S(config-if)# duplex auto|full|half 设置接口双工模式

S> show mac-address-table 查看CAM表

S# clear mac-address-table 清除CAM表中的动态条目

1900(config)# mac-address-table permanent MAC_address type

[slot_#/]port_# 在CAM表中创建静态条目

2950(config)# mac-address-table static MAC_address vlan VLAN_# interface type [slot_#/] port_# 在CAM表中创建静态条目

1900(config)# mac-address-table restricted static MAC_address

source_port list_of_allowed_interface 设置静态端口安全措施

1900(config-if)# port secure 启用粘性学习

1900(config-if)# port secure max-mac-count value 设置粘性学习特性能够学到的地址数量(默认132,取值范围是1-132)

1900(config)# address-violation suspend|ignore|disable 改变安全选项1900> show mac-address-table security 验证端口安全措施

2950(config)# switchport mode access 定义接口为主机端口而不是中继端口2950(config)# switchport port-security 启用端口安全措施

2950(config)# switchport port-security maximum value 指定可与此接口相

关的设备的最大数量

2950(config)# switchport port-security violation

protect|restrict|shutdown 指定出现安全违规时应该发生的事

2950(config)# switchport port-security mac-address MAC_address 指定允许与此接口相关的确切的MAC地址

2950(config)# switchport port-security mac-address sticky 启用粘性学习特性

2950(config)# show port interface type [slot_#/] port_# 验证接口配置2950(config-if) description name 设置接口描述信息

2950# show buffers 查看系统缓存的大小

1900# copy nvram tftp:// IP_address_of_TFTP_server/ file_name 将配置文件备份到TFTP服务器上

1900# copy tftp:// IP_address_of_TFTP_server/ file_name nvram 从TFTP 服务器上恢复配置到NVRAM

1900# delete nvram 删除配置文件

2950# erase startup-config 删除配置文件

3550# show tcam qos TCAM_ID statistics 查看TCAM剩余容量

4000> enable 进入特权模式

4000>(enable) set password 设置用户模式密码

4000>(enable) set enablepass 设置授权密码

4000>(enable) set interface sc0 IP_address mask 配置IP地址

4000>(enable) set port enable|disable slot_#/port_# 启用/禁用接口4000>(enable) show port [slot_#/port_#] 显示接口信息

4000>(enable) set port name slot_#/port_# name 设置交换机接口描述信息4000>(enable) set port speed slot_#/port_# 4|10|16|100|auto 设置交换机接口速率

4000>(enable) set port duplex slot_#/port_# full|half 设置交换机接口双工模式

4000>(enable) clear config all 删除NVRAM中的配置信息

4000>(enable) erase all 删除FLASH中的内容

4000>(enable) show flash 显示FLASH中的内容

4000>(enable) show cam [count] dynamic|static|permanent|system [vlan_#] 显示CAM表

VLAN 1900(config)# vtp domain VTP_domain_name 定义交换机域名

1900(config)# vtp server|client|transparent 定义交换机VTP模式(默认服务器)

1900(config)# vtp password VTP_password 配置VTP口令

1900(config)# vtp pruning enable|disable 启用/禁用修剪(默认启用)1900(config)# vtp trap enable 启用SNMP陷阱(默认启用)

1900# show vtp 验证VTP配置

2950# vtp database 访问VLAN和VTP配置(以下均是在IOS12.1前用,12.1后全是在全局配置模式下)

2950(vlan)# vtp domain VTP_domain_name 定义交换机域名

2950(vlan)# vtp server|client|transparent 定义交换机VTP模式(默认服务

器)

2950(vlan)# vtp password VTP_password 配置VTP口令

2950(vlan)# vtp pruning 启用/禁用修剪(默认启用)

2950(config)# snmp-server enable traps vtp 启用SNMP陷阱(默认启用)2950# show vtp status 检查VTP配置

2950# show vtp counters 显示与VTP消息发送与接收相关的VTP统计信息1900(config-if)# trunk on|off|desirable|auto 指定中继类型

1900# show trunk A|B 验证接口中继(A是fa0/26,B是fa0/27)

2950(config-if)# switchport mode trunk|dynamic desirable|dynamic

auto|nonegotiate 指定中继类型(默认自动协商)

2950(config-if)# switchport trunk native|allowed|pruning vlan VLAN_# 配置中继

2950(config-if)# switchport trunk pruning vlan remove VLAN_# 清除不希望消减的VLAN

2950# show interfaces [type 0/port_#] switchport|trunk 验证接口中继1900(config)# vlan VLAN_# [name VLAN_name] 创建VLAN

1900(config-if)# vlan-membership static VLAN_# 将该接口静态地分配给一个VLAN

1900# show vlan 验证VLAN

1900# show vlan-membership 查看VLAN成员关系

1900# show spantree [VLAN_#] 查看VLAN的STP信息

2950# vlan database 进入VLAN数据库(ISO12.1前用)

2950(vlan)# vlan VLAN_# [name VLAN_name] 创建VLAN

2950(config)# vlan VLAN_# 进入VLAN数据库(ISO12.1后用)

2950(config-vlan)# name VLAN_name 创建VLAN

2950(config-if)# switchport mode access 指定连接是接入链路连接

2950(config-if)# switchport access vlan VLAN_# 指定VLAN是接入链路连接4000>(enable) set vlan VLAN_# name VLAN_name 配置VLAN

4000>(enable) set vlan VLAN_# slot_#/port_#-port_# 为VLAN分配端口4000>(enable) set trunk slot_#/port_#

[on|off|desirable|auto|nonegotiate] [VLAN_#]

[isl|dot1q|dot10|lane|negotiate] 配置中继

4000>(enable) clear trunk slot_#/port_# VLAN_# 删除VLAN

4000>(enable) show trunk slot_#/port_# 验证中继端口

4000>(enable) set vtp v2 enable 配置VTPv2

4000>(enable) set vtp [domain name] [mode client|server|transparent] [passwd password] [pruning enable|disable] [v2 enable|disable] 设置VTP 4000>(enable) show vtp domain 验证VTP域的信息

4000>(enable) show vtp statistics 显示发出或收到的VTP通告信息的摘要内容

4000>(enable) set vtp pruneeligible VLAN_# 设置VTP消减

4000>(enable) clear vtp pruneeligible VLAN_# 清除不希望消减的VLAN

STP 4000>(enable) set spantree enable|disable VLAN_# 启用/禁用STP(默认启用)

2950(config)# [no] spanning-tree vlan VLAN_# 启用/禁用STP(默认启用)4000>(enable) show spantree [VLAN_#] 验证STP状态

2950# show spanning-tree 验证STP状态

4000>(enable) set spantree root [secondary] VLAN_# [dia network_diameter] [hello hello_time] 设置主根节点桥、备份节点桥、最大桥数量(2-7)、持续时间(1-10,默认2)

4000>(enable) set spantree portcost slot_#/port_# cost_# 设置端口开销2950(config-if)# spanning-tree cost cost_# 设置端口开销

4000>(enable) set spantree portpri slot_#/port_# priority_# 设置端口优先级

4000>(enable) set spantree portvlanpri slot_#/port_# priority_# [VLAN_#] 改变VLAN的优先级设置

2950(config-if)# spanning-tree vlan VLAN_# port-priority priority_# 设置端口优先级

4000>(enable) set spantree fwddelay delay_# [VLAN_#] 设置从侦听状态到学习状态再到转发状态的时间间隔(默认15秒,取值范围是4-30秒)

4000>(enable) set spantree hello interval_time [VLAN_#] 设置根节点交换机发送BPDU的时间间隔(默认2秒,取值范围是1-10秒)

4000>(enable) set spantree maxage agingtime [VLAN_#] 设置交换机持有BPDU 的时间(默认20秒,取值范围是6-40秒)

2950(config)# spanning-tree vlan VLAN_# forward-time forward_time 设置从侦听状态到学习状态再到转发状态的时间间隔(默认15秒,取值范围是4-30秒)

2950(config)# spanning-tree vlan VLAN_# hello-time hello_time 设置根节点交换机发送BPDU的时间间隔(默认2秒,取值范围是1-10秒)

2950(config)# spanning-tree vlan VLAN_# max-age maxage 设置交换机持有BPDU的时间(默认20秒,取值范围是6-40秒)

4000>(enable) set port channel slot_#/port_# on 建立以太通道集合

4000>(enable) show port capabilities slot_#/port_# 查看端口的配置4000>(enable) show port channel 验证以太通道集合的配置

2950(config-if)# channel-group group_number mode auto|desirable|on 建立以太通道集合

2950# show etherchannel

group_number|brief|detail|load-balance|port|port-channel|summary 验证以太通道集合的配置

4000>(enable) set spantree portfast slot_#/port_# enable 配置PortFast 2950(config-if)# spanning-tree portfast 配置PortFast

4000>(enable) set spantree uplinkfast enable|disable [rate

station_update_rate] [all-protocols off|on] 启用/禁用UplinkFast 4000>(enable) show spantree uplinkfast 验证UplinkFast配置

2950(config)# spanning-tree uplinkfast [max_update_rate] 启用/禁用UplinkFast

2950# show spanning-tree uplinkfast 验证UplinkFast配置

4000>(enable) set spantree backbonefast enable|disable 启用/禁用BackboneFast

4000>(enable) show spantree backbonefast 验证BackboneFast配置

2950(config)# spanning-tree backbonefast 启用BackboneFast

虚拟网间路由

2600(config)# interface type slot_#/port_#.subint_number 配置子接口2600(config-subif)# encapsulation dot1q|isl|sde|tr-isl VLAN_# 配置封装类型

4000>(enable) show module 查看交换机的硬件配置

4000>(enable) session module_# 访问L3SM

L3SM(config-if)# mac-address mac_address 分配MAC地址

MLS 2600(config)# mls rp ip 启动MLS

2600(config-if)# mls rp vtp-domain domain_name 分配路由器接口到VTP域中

2600(config-if)# mls rp vlan-id VLAN_# 向接口分配VLAN

2600(config-if)# mls rp management-interface 指定该接口为管理接口2600# show mls rp 提供全局MLS信息

2600# show mls rp interface type slot_#/port_# 提供指定接口的MLS信息2600# show mls rp vtp-domain domain_name 提供VTP域的MLS信息

6500>(enable) set mls enable 在MLS-SE上启动MLS

6500>(enable) set mls include rp_ip_address 告诉交换机哪一个IP地址是正确的

6500>(enable) show mls include 显示外部路由处理器的IP地址列表

6500>(enable) set mls flow [destination|destination-source|full] 告诉MLS交换机要缓存候选数据包的哪些信息

6500>(enable) show mls entry 显示第三层缓存表

6500>(enable) set mls agingtime aging_time 改变缓存的衰老时间(默认256秒,取值范围是8-2032秒中的8的倍数值)

6500>(enable) set mls agingtime fast fast_aging_time pkt_threshold 改变快速衰老周期和数据包门限值

6500>(enable) show mls ip 验证MLS-SE的配置

6500>(enable) clear mls entry [destination IP_address] [source

IP_address] [flow protocol] [source_port] [destination_port] [all] 删除所有或指定MLS缓存记录

3550(config)# ip routing 启动IP路由

3550(config)# ip cef 启动CEF

3550(config-if)# no switchport 将第二层接口转换为第三层接口

3550(config-if)# ip route-cache cef 在接口上启动CEF

3550# show ip cef 验证CEF

组播

3640(config)# ip multicast-routing 启动路由器上的组播服务

3640(config-if)# ip pim dense-mode 将接口设置为PIM密集模式

3640(config-if)# ip pim sparse-mode 将接口设置为PIM稀疏模式

3640(config-if)# ip pim sparsed-dense-mode 将接口设置为PIM稀疏-密集模式

3640(config)# ip pim rp-address IP_address group_ACL_# [override] 手工配置RP

3640(config)# ip pim send-rp-announce type slot_#/port_# scope ttl_value group-list ACL_# 通告RP组的分配

3640(config)# ip pim send-rp-discovery scope ttl_value 配置RP映射代理3640(config-if)# ip multicast ttl-threshold ttl_value 设置TTL门限值3640(config-if)# ip igmp join-group group_address 加入组播组

3640# show ip mroute 查看组播信息

3640# ping 验证RP之间或其他组播路由器之间的连接

3640# mtrace source_IP_address [destination_IP_address] [group] 组播traceroute

3640(config-if)# ip cgmp 配置CGMP路由器

4000>(enable) set cgmp enable 启动CGMP

4000>(enable) show cgmp statistics 查看CGMP统计信息

4000>(enable) show multicast group cgmp 查看交换机了解到的组播组信息4000>(enable) set cgmp leave enable 检查由客户端产生的IGMPv2的离开信息

4000>(enable) set igmp enable 启动IGMP

4000>(enable) ip igmp snooping 启动IGMP探听

4000>(enable) set igmp fastleave enable 启动快速离开过程

4000>(enable) show igmp statistics 显示交换机上IGMP探听的状态信息QoS 2950(config)# wrr-queue cos-map queue_ID cos_value 建立队列

2950(config)# wrr-queue bandwidth bandwidth_value 设置队列门限

2950(config)# class-maps name 定义对信息传输分类时的匹配标准

2950(config-cmap)# match access-group ACL_# 识别被分类的信息传输

2950(config)# policy-map name 确定为接入信息传输所设置的分类标准

2950(config-pmap)# class name

2950(config-pmap-c)# set ip dscp number

2950(config-if)# service-policy input name 对该接口应用策略

3550(config)# mls qos 启动QoS

3550(config-if)# auto qos voip 在接口上启动自动服务质量

3550(config)# priority-list priority_queue_# protocol protocol

high|medium|normal|low [list ACL_#] 为优先级队列定义信息流

3550(config)# priority-list priority_queue_# queue-limit limit_# 定义特定优先级队列的最大队列空间

3550(config-if)# priority-group priority_queue_# 向特定输出接口分配优先级队列

3550(config)# queue-list queue_list_# interface type slot_#/port_# queue_number 为一个特定的定制队列定义信息流

3550(config)# queue-list queue_list_# queue queue_number byte-count

size_in_bytes [limit number_of_queue] 为特定的定制队列定义队列的最大空间

3550(config-if)# custom-queue-list custom_queue_number 为特定的输出接口分配优先级队列

4840(config)# ip slb serverfarm serverfarm_name 配置SLB冗余

4840(config-slb-sfarm)# real IP_address [port_#] 指定虚拟IP地址

4840(config-slb-sfarm)# inservice 启动服务器

4840(config)# virtual IP_address [network_mask] tcp|udp

[port_number|wsp|wsp-wtp|wsp-wtls|wsp-wtp-wtls] [service service_name] 建立虚拟服务器IP地址

三层交换机配置实例

三层交换综合实验 一般来讲,设计方案中主要包括以下内容: ◆????? 用户需求 ◆????? 需求分析 ◆????? 使用什么技术来实现用户需求 ◆????? 设计原则 ◆????? 拓扑图 ◆????? 设备清单 一、模拟设计方案 【用户需求】 1.应用背景描述 某公司新建办公大楼,布线工程已经与大楼内装修同步完成。现公司需要建设大楼内部的办公网络系统。大楼的设备间位于大楼一层,可用于放置核心交换机、路由器、服务器、网管工作站、电话交换机等设备。在每层办公楼中有楼层配线间,用来放置接入层交换机与配线架。目前公司工程部25人、销售部25人、发展部25人、人事部10人、财务部加经理共15人。 2.用户需求 为公司提供办公自动化、计算机管理、资源共享及信息交流等全方位的服务,目前的信息点数大约100个,今后有扩充到200个的可能。 公司的很多业务依托于网络,要求网络的性能满足高效的办公要求。同时对网络的可靠性要求也很高,要求在办公时间内,网络不能宕掉。因此,在网络设计过程中,要充分考虑到网络设备的可靠性。同时,无论是网络设备还是网络线路,都应该考虑冗余备份。不能因为单点故障,而导致整个网络的瘫痪,影响公司业务的正常进行。 公司需要通过专线连接外部网络。 【需求分析】 为了实现网络的高速、高性能、高可靠性还有冗余备份功能,主要用于双核心拓扑结构的网络中。

本实验采用双核心拓扑结构,将三层交换技术和VTP、STP、EthernetChannel 综合运用。 【设计方案】 1、在交换机上配置VLAN,控制广播流量 2、配置2台三层交换机之间的EthernetChannel,实现三层交换机之间的高速互通 3、配置VTP,实现单一平台管理VLAN, 同时启用修剪,减少中继端口上不必要的广播信息量 4、配置STP,实现冗余备份、负载分担、避免环路 5、在三层交换机上配置VLAN间路由,实现不同VLAN之间互通 6、通过路由连入外网,可以通过静态路由或RIP路由协议 【网络拓扑】 根据用户对可靠性的要求,我们将网络设计为双核心结构,为了保证高性能,采用双核心进行负载分担。当其中的一台核心交换机出现故障的时候,数据能自动转换到另一台交换机上,起到冗余备份作用。 注意:本实验为了测试与外网的连通性,使用一个简单网络

华为三层交换机配置步骤解释

华为三层交换机配置步骤 1. 给交换机划分VLAN Vlan 是虚拟局域网的意思,它相当于一个局域网工作组。“ vlan 几”可以理解成编号为几的vlan ,比如vlan 2 就是编号为 2 的vlan ,只是一个编号而已,并不是说vlan 2 的网段一定要是 2 网段,vlan 2 的IP 地址是可以随便设置的。 下面我将三层交换机的第20个端口添加到vlan 10 里,步骤如下: A. 在交换机里添加VLAN 10 system-view (一般用缩写:sys ) [Quidway] vlan 10 (添加编号为10 的vlan ) [Quidway-vlan10] quit (一般缩写:q) B. 设置vlan 10 的IP地址为192.168.66.66 网关为255.255.255.0 [Quidway] interface vlanif 10 (interface 一般可以缩写为:int ;vlanif 也可以只写vlan ) [Quidway-vlanif10] ip address 192.168.66.66 255.255.255.0 (address 缩写add) [Quidway-vlanif10]quit C. 设定交换机上第20个端口模式为access (默认为trunk ,需在将端口划入VLAN前转为ACCES)S [Quidway] int gigabitethernet 0/0/20 (gigabitethernet :千兆以太网口) [Quidway-GigabitEthernet0/0/20] port link-type access (port :端口) [Quidway-GigabitEthernet0/0/20]quit D. 将第20个端口加入到vlan 10 里 [Quidway] vlan 10 [Quidway-vlan10] port gigabitethernet 0/0/20 (如果是多个连续端口,用XX to XX ) [Quidway-Vlan10] quit 这样就是成功的将交换机上的第20 个端口添加到了编号为10 的Vlan 里,划分VLAN就是这 4 个步骤, 2 个步骤设置vlan ,2 个步骤设置端口。现在可以用网线把交换机的第20 个端口和电脑网卡连接起来,设置网卡地址为192.168.66.XX ,网关为192.168.66.66 ,在CMD里ping192.168.66.66 可以ping 通。 2. 删除vlan A.在系统视图下,用“ undo int vlan 2 ”命令删除vlan 2 的3层口,这样vlan 2 就没有了,但是划分给vlan 2 的那些端口依然还处于vlan 2 里,这时可以将那些端口释放出来,让他们不再属于任何vlan B.在系统视图下,用“ undo vlan 2 ”命令删除2层口,这个命令可以释放那些原先划分给了vlan 2 的端口,现在它们不属于任何vlan 了。 当然,将交换机上的某个端口更换到某个vlan 里,是可以直接在vlan 视图里添加端口的。 注意:交换机上的某个端口被设置成了access 模式,且加入了一个vlan ,要想将这个端口的模式更改为trunk ,直接在端口视图里打上“ port link-type trunk ”是不行的,会出现Error: Please renew the default configurations. 这时需要先从VLAN里删除这个端口,也就是前面说的让这个端口不属于任何vlan ,才能将 这个端口设置为trunk 。 3. 通过端口进行限速 现在要对交换机上的第 2 个端口进行限速操作,让通过这个端口的下载速度不超过128KB/S 配置命令说明: Inbound:对入端口报文进行限速 Outbound:对出端口报文进行限速 sys [Quidway] int gigabitethernet 0/0/2 [Quidway-GigabitEthernet0/0/2] qos lr outbound cir 1024 cbs 204800 (1024代表1M的带宽,理论下载速度就是128KB/S,204800=1024*200 ,cbs 代表

思科三层交换机配置总结

思科交换机的基本配置命令学习 CISCO交换机基本配置:Console端口连接 用户模式hostname# ; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname csico ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#exit ;返回命令 交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:switch#vlan database ;进入VLAN设置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3 switch(vlan)#no vlan 2 ;删vlan 2 switch(config)#int f0/1 ;进入端口1 switch(config)#speed ? 查看speed命令的子命令 switch(config)#speed 100 设置该端口速率为100mb/s (10/auto) switch(config)#duplex ? 查看duplex的子命令 switch(config)#duplex full 设置该端口为全双工(auto/half) switch(config)#description TO_PC1 这是该端口描述为TO_PC1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式) switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继 switch(config)#vtp domain vtpserver ;设置vtp域名相同 switch(config)#vtp password ;设置发vtp密码 switch(config)#vtp server ;设置vtp服务器模式 switch(config)#vtp client ;设置vtp客户机模式 交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表: switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址 switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关 switch(config)#ip domain-name https://www.360docs.net/doc/7c2074357.html, 设置域名 switch(config)#ip name-server 192.168.1.18 设置域名服务器 switch(config)#mac-address-table? 查看mac-address-table的子命令 switch(config)#mac-address-table aging-time 100 设置超时时间为100ms switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口 switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7 switch(config)#end

三层交换机配置实例

---------------------------------------------------------------最新资料推荐------------------------------------------------------ 三层交换机配置实例 三层交换综合实验一般来讲,设计方案中主要包括以下内容: 用户需求需求分析使用什么技术来实现用户需求设计原则拓扑图设备清单一、模拟设计方案【用户需求】 1. 应用背景描述某公司新建办公大楼,布线工程已经与大楼内装修同步完成。 现公司需要建设大楼内部的办公网络系统。 大楼的设备间位于大楼一层,可用于放置核心交换机、路由器、服务器、网管工作站、电话交换机等设备。 在每层办公楼中有楼层配线间,用来放置接入层交换机与配线架。 目前公司工程部 25 人、销售部 25人、发展部 25 人、人事部 10 人、财务部加经理共 15 人。 2. 用户需求为公司提供办公自动化、计算机管理、资源共享及信息交流等全方位的服务,目前的信息点数大约 100 个,今后有扩充到 200 个的可能。 公司的很多业务依托于网络,要求网络的性能满足高效的办公要求。 同时对网络的可靠性要求也很高,要求在办公时间内,网络不能宕掉。 1 / 14

因此,在网络设计过程中,要充分考虑到网络设备的可靠性。 同时,无论是网络设备还是网络线路,都应该考虑冗余备份。 不能因为单点故障,而导致整个网络的瘫痪,影响公司业务的正常进行。 公司需要通过专线连接外部网络。 【需求分析】为了实现网络的高速、高性能、高可靠性还有冗余备份功能,主要用于双核心拓扑结构的网络中。 本实验采用双核心拓扑结构,将三层交换技术和 VTP、 STP、EthernetChannel综合运用。 【设计方案】 1、在交换机上配置 VLAN,控制广播流量 2、配置 2 台三层交换机之间的 EthernetChannel,实现三层交换机之间的高速互通 3、配置 VTP,实现单一平台管理 VLAN,同时启用修剪,减少中继端口上不必要的广播信息量 4、配置 STP,实现冗余备份、负载分担、避免环路 5、在三层交换机上配置 VLAN 间路由,实现不同 VLAN 之间互通 6、通过路由连入外网,可以通过静态路由或 RIP 路由协议【网络拓扑】根据用户对可靠性的要求,我们将网络设计为双核心结构,为了保证高性能,采用双核心进行负载分担。 当其中的一台核心交换机出现故障的时候,数据能自动转换到另一台交换机上,起到冗余备份作用。 注意: 本实验为了测试与外网的连通性,使用一个简单网络【设备

S7506E三层交换机配置资料讲解

***************************************************************** ************* * Copyright (c) 2004-2008 Hangzhou H3C Tech. Co., Ltd. All rights reserved. * * Without the owner's prior written consent, * * no decompiling or reverse-engineering shall be allowed. * ***************************************************************** ************* Login authentication Username:admin Password: <7506E>di cur # version 5.20, Release 6305 # sysname 7506E # domain default enable system # telnet server enable # ip ttl-expires enable ip unreachables enable # port-security enable # loopback-detection enable # mirroring-group 1 local mirroring-group 2 local # switch-mode standard #

rule 0 permit ip source 192.168.128.0 0.0.15.255 rule 1 permit ip source 192.168.160.0 0.0.31.255 acl number 3011 rule 0 permit ip source 192.168.34.0 0.0.0.255 rule 1 permit ip source 192.168.37.0 0.0.0.255 rule 2 permit ip source 192.168.31.0 0.0.0.255 rule 3 permit ip source 192.168.39.0 0.0.0.255 rule 4 permit ip source 192.168.254.0 0.0.0.255 acl number 3500 # vlan 1 # vlan 2 to 2221 # vlan 2222 description wireless_guest # vlan 2223 to 2500 # vlan 3000 description test # vlan 3901 description dianxin ap # vlan 3902 description test # vlan 3985 description dhcp for temp guest meeting supervlan subvlan 36

三层交换机基本配置及利用三层交换机实现不同VLAN间通信

实验四 三层交换机基本配置及利用三层交换机实现不同VLAN 间通信 一、实验名称 三层交换机基本配置及VLAN/802.1Q -VLAN 间通信实验。 二、实验目的 理解和掌握通过三层交换机的基本配置及实现VLAN 间相互通信的配置方法。 三、实验内容 若企业中有2个部门:销售部和技术部(2个部门PC 机IP 地址在不同网段),其中销售部的PC 机分散连接在2台交换机上,配置交换机使得销售部PC 能够实现相互通信,而且销售部和技术部之间也能相互通信。 在本实验中,我们将PC1和PC3分别连接到SwitchA (三层交换机)的F0/5端口和SwitchB 的F0/5端口并划入VLAN 10,将PC2连接到SwitchA (三层交换机)的F0/15端口并划入VLAN 20,SwitchA 和SwitchB 之间通过各自的F0/24端口连接。配置三层交换机使在不同VLAN 组中的PC1、PC2、PC3能相互通信。 三、实验拓扑 四、实验设备 S3550-24(三层交换机)1台、S2126交换机1台、PC 机3台。 五、实验步骤 VLAN/802.1Q -VLAN 间通信: 1.按实验拓扑连接设备,并按图中所示配置PC 机的IP 地址,PC1、PC3网段相同可以通信,但是PC1、PC3和PC2是不同网段的,所以PC2(技术部)不能和另外2台PC 机(销售部)通信。 2.在交换机SwitchA 上创建VLAN 10,并将0/5端口划入VLAN 10中。 SwitchA(config)#vlan 10 !创建VLAN 10 SwitchA (config-vlan)#name sales ! 将VLAN 10 命名为sales SwitchA (config)#interface f0/5 !进入F0/5接口配置模式 SwitchA (config-if)#switchport access vlan10 !将F0/5端口划入VLAN 10 SwitchA #show vlan id 10 !验证已创建了VLAN 10并已将F0/5端口划入VLAN 10中 PC2

三层交换机与路由器的配置_实例(图解)

三层交换机与路由器的配置实例(图解) 目的:学会使用三层交换与路由器让处于不同网段的网络相互通信 实验步骤:一:二层交换机的配置: 在三个二层交换机上分别划出两VLAN,并将二层交换机上与三层交换或路由器上的接线设置为trunk接口 二:三层交换机的配置: 1:首先在三层交换上划出两个VLAN,并进入VLAN为其配置IP,此IP将作为与他相连PC的网关。 2:将与二层交换机相连的线同样设置为trunk接线,并将三层交换与路由器连接的线设置为路由接口(no switchsport) 3:将路由器和下面的交换机进行单臂路由的配置 实验最终结果:拓扑图下各个PC均能相互通信

交换机的配置命令: SW 0: Switch> Switch>en Switch#conf Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 2 Switch(config-vlan)#exit Switch(config)#int f0/2 Switch(config-if)#switchport access vlan 2 Switch(config-if)#no shut Switch(config-if)#int f0/3 Switch(config-if)#switchport mode trunk %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up Switch(config-if)#exit Switch(config)# SW 1: Switch>en Switch#conf Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int f0/2 Switch(config-if)#switchport access vlan 2 % Access VLAN does not exist. Creating vlan 2 Switch(config-if)#no shut Switch(config-if)#exit Switch(config)#int f0/3 Switch(config-if)#switchport mode trunk %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up Switch(config-if)# SW 2: Switch>en Switch#conf Configuring from terminal, memory, or network [terminal]?

三层交换机的配置命令

三层交换机的图,如图所示: 一.交换机的配置: S2的配置命令: Enable Conf terminal Hostname S2 Switch(config)#vlan 10 Switch(config-vlan)#name stu10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#name stu20 Switch(config)#interface f0/1 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config)#interface f0/2 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config)#inte f0/24 Switch(config-if)#switchport mode trunk

S3的配置命令: Enable Conf terminal Hostname S3 Switch(config)#vlan 10 Switch(config-vlan)#name stu10 Switch(config-vlan)#vlan 20 Switch(config-vlan)#name stu20 Switch(config)#interface f0/1 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 Switch(config)#interface f0/2 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config)#inte f0/24 Switch(config-if)#switchport mode trunk 二.三层交换机的配置命令 Enable Conf terminal Switch(config)#vlan 10 Switch(config-vlan)#vlan 20 Switch(config)#interface f0/1 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config)#interface f0/2 Switch(config-if)#switchport trunk encapsulation dot1q Switch(config-if)#switchport mode trunk Switch(config)#interface vlan 10 Switch(config-if)#ip address 192.168.10.254 255.255.255.0 Switch(config-if)#no shutdown

举例讲解H3C配置三层交换机4个步骤详细用法

举例讲解H3C配置三层交换机4个步骤详细用法 配置三层交换机的四个步骤:第一步:划分VLAN,并描述;第二步:给VLAN划网关;第三步:给VLAN指定端口;第四步:配置路由协议。 举例讲解H3C配置三层交换机4个步骤详细用法,配置三层交换机通用的四个步骤就是:划分VLAN,并描述;给VLAN划网关;给VLAN指定端口;配置路由协议;学会这几个步骤之后就能解决所有的配置三层交换机的问题。 language-modechinese//切换到中文模式 system-view//进入系统视图 [H3C]displaycurrent-configuration//显示当前配置三层交换机 //以下开始配置三层交换机 配置三层交换机第一步:划分VLAN,并描述 vlan1 description local-s3600//本交换机使用 # vlan2 description link-to-shanxicentre//陕西省中心 # vlan3 description link-to-shangjiecentre//商界分中心内部使用 # vlan4 description link-to-shangdongsuo//商东所 # vlan5 description link-to-shangnansuo//商南所 配置三层交换机第二步:给VLAN划网关 # interfaceVlan-interface2 description linktoshanxicentre ipaddress 10.61.242.110 255.255.255.252//省中心指定广域网关、子网掩码 # interfaceVlan-interface3

(完整版)实验四-交换机基本配置

实验四:交换机基本配置 一、实验项目名称:交换机基本配置。 二、实验环境:与Internet连接的局域网。 三、实验目的和要求: 1.清除交换机的现有配置; 2.检验默认交换机配置; 3.创建基本交换机配置; 4.管理MAC地址表; 5.配置端口安全性。 四、实验过程: 拓扑图 任务1:清除交换机的现有配置 步骤 1. 键入enable 命令进入特权执行模式。 enable 命令,进入特权执行模式。

步骤 2. 删除VLAN 数据库信息文件。 VLAN 数据库信息与配置文件分开存储,以vlan.dat 文件名存储在闪存中。要删除VLAN 文件,请发出命令delete flash:vlan.dat 步骤 3. 从NVRAM 删除交换机启动配置文件。 步骤 4. 确认VLAN 信息已删除。 使用show vlan 命令检查是否确实删除了VLAN 配置。 步骤 5. 重新加载交换机。 在特权执行模式提示符下,输入reload 命令开始这一过程。

任务2:检验默认交换机配置 步骤 1. 进入特权模式。 特权模式下,您可以使用全部交换机命令。不过,由于许多特权命令会配置操作参数,因此应使用口令对特权访问加以保护,防止未授权使用。特权命令集不仅包括用户执行模式所包含的那些命令,还包括configure 命令,通过该命令可以访问其余命令模式。 请注意特权执行模式下配置中提示符的变化。 步骤 2. 检查当前交换机配置。 发出show running-config 命令,检查当前的运行配置。

问题:1.交换机有多少个快速以太网接口?(24个)

2.交换机有多少个千兆以太网接口?(2个,分别是光纤上联接口,汇聚功能接口) 3.显示的vty 线路值范围是什么?(0-15) 发出show startup-config 命令,检查当前NVRAM 的内容。 问题:为什么交换机做出这样的响应?(因为启动配置文件不存在) 发出show interface vlan1 命令,检查虚拟接口VLAN1 的特征。 1.交换机上设置了IP 地址吗?(没有) 2.虚拟交换机接口的MAC 地址是什么?(00e0.b0d8.2421) 3.此接口打开了吗?(没有,administratively down 指端口被管理员关掉。) 现在使用show ip interface vlan1 命令查看接口的IP 属性。 你看到的输出是什么? (指端口已被管理员关掉,“line protocol is down”可能是frame封装的问题。) 步骤 3. 显示Cisco IOS 信息。 使用show version 命令显示Cisco IOS 信息。

三层交换机配置ACL(访问控制列表)

三层交换机配置ACL(访问控制列表) 说明:书本上讲述的ACL主要是应用在路由器上,但现在三层交换机在大中型企业中的应用越来越广泛,三层交换机因拥有路由器的功能而逐渐代替路由器。ACL访问控制列表是构建安全规范的网络不可缺少的,但在三层交换机上配置ACL却不为一些刚进企业的初级网络管理维护人员所知。在这里我介绍一下在三层交换机上配置ACL的试验过程。 试验拓扑介绍: 三层交换机上配置本地Vlan 实现下层接入层交换机不同Vlan互通。 PC1 192.168.20.10 VLAN 192.168.20.1 PC2 192.168.30.20 VLAN 192.168.30.1 PC3 192.168.40.30 VLAN 192.168.40.1 PC4 192.168.50.40 VLAN 192.168.50.1 F0/1 192.168.70.2 (开启路由功能) 路由器上配置 F0/0 192.168.60.1 PC5 192.168.60.50 F0/1 192.168.70.1 试验步骤: 1、在二层交换机上把相应的PC加入VLAN 查看交换机Switch0 Switch0(config)#show run ! interface FastEthernet0/1

switchport access vlan 2 ! interface FastEthernet0/2 switchport access vlan 3 ! 查看交换机Switch1 Switch1#show run ! interface FastEthernet0/3 switchport access vlan 4 ! interface FastEthernet0/4 switchport access vlan 5 ! 2、在三层交换机上配置相应的本地VALN Switch(config)#inter vl 2 Switch(config-if)#ip add 192.168.20.1 255.255.255.0 Switch(config-if)#no shut Switch(config)#inter vl 3 Switch(config-if)#ip add 192.168.30.1 255.255.255.0 Switch(config-if)#no shut Switch(config)#inter vl 4 Switch(config-if)#ip add 192.168.40.1 255.255.255.0 Switch(config-if)#no shut Switch(config)#inter vl 5 Switch(config-if)#ip add 192.168.50.1 255.255.255.0 Switch(config-if)#no shut Switch(config-if)#exi 在接口itnerface f0/1上开启路由接口 Switch(config)#inter f0/1 Switch(config-if)#no switchport 3、在二层交换机和三层交换机之间开启中继链路 4、在路由器和三层交换机上配置动态路由协议RIP Router(config)#router rip Router(config)#network 192.168.60.0 Router(config)# network 192.168.70.0 三层交换机上配置 Switch(config)#router rip Switch(config-router)#ne Switch(config-router)#network 192.168.70.0 Switch(config-router)#network 192.168.20.0 Switch(config-router)#network 192.168.30.0 Switch(config-router)#network 192.168.40.0 Switch(config-router)#network 192.168.50.0 Switch(config-router)# 5、验证各PC互通 PC>ping 192.168.30.20 Pinging 192.168.30.20 with 32 bytes of data: Request timed out.

华为三层交换机配置方法及命令

Enable //进入私有模式 Configure terminal //进入全局模式 service password-encryption //对密码进行加密 hostname Catalyst 3550-12T1 //给三层交换机定义名称 enable password 123456. //enable密码 Enable secret 654321 //enable的加密密码(应该是乱码而不是654321这样) Ip subnet-zero //允许使用全0子网(默认都是打开的) Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1 Service dhcp //提供DHCP服务 ip routing //启用三层交换机上的路由模块 Exit Vtp mode server //定义VTP工作模式为sever模式 Vtp domain centervtp //定义VTP域的名称为centervtp Vlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002) Vlan 3 name vlan3 Vlan 4 name vlan4 Vlan 5 name vlan5 Vlan 6 name vlan6 Vlan 7 name vlan7 Vlan 8 name vlan8 Vlan 9 name vlan9 Exit interface Port-channel 1 //进入虚拟的以太通道组1 Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1 channel-group 1 mode on //把这个接口放到快速以太通道组1中 Interface gigabitethernet 0/2 //同上channel-group 1 mode on port-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)

三层交换机基本配置

三层交换机基本配置 【实验名称】 三层交换机端口配置 【实验目的】 配置开启三层交换机的三层功能,实现路由作用。 【背景描述】 为了隔离广播域而划分了VLAN,但不同的VLAN之间需要通信,本实验将实现这一功能。即同一VLAN里的计算机能跨交换机通信,不同VLAN里的计算机系统也能互相通信。 【技术原理】 三层交换机是在二层交换的基础上实现了三层的路由功能。三层交换机基于“一次路由,多次交换”的特性,在局域网环境中转发性能远远高于路由器。而且三层交换机同时具备二层的功能,能和二层交换机进行很好的数据转发。三层交换机的以太网接口要比一般的路由器多很多,更加适合多个局域网段之间的互联。 三层交换机本身默认开启了路由功能,可利用IP Routing命令进行控制。 【实验设备】 S3350(一台),PC机(两台)。 【实验拓扑】

注意:先连线,在进行配置,注意连接线缆的接口编号。S3350为三层交换机。 【实验步骤】 步骤一 开启三层交换机的路由功能: Switch>enable //进程特权模式 Switch #configure terminal //进入全局模式 Switch (config)#hostname s3350-24 S3350-24 (config)#ip routing //开启三层交换机的路由功能 步骤二 配置三层交换机端口的路由功能: S3350-24>enable //进入特权模式 S3350-24#configure terminal //进入全局模式 S3350-241 (config)#interface fastethernet 0/2 //进入fa0/2端口 S3350-24 (config-if)#no switchport //开启端口的三层路由功能 S3350-24 (config-if)#ip address 192.168.5.254 255.255.255.0 //配置ip地址S3350-24 (config-if)#no shutdown //启用端口,使其转发数据

华为三层交换机的配置案例

配置命令 system-view //进入系统视图 [H3C]display current-configuration //显示当前配置//以下开始配置 第一步:划分VLAN,并描述 vlan 1 description local-S3600 vlan 2 description link-to-wenquan vlan 3 description link-to-ruzhou vlan 4 description link-to-xiaotun vlan 5 description link-to-baofeng vlan 6 description link-to-pingxi vlan 7 description link-to-pingnan vlan 8 description Uplink-to-Putian

vlan 9 description link-to-pingxicentre 第二步:给VLAN 划网关 interface Vlan-interface2 description link to wenquan ip address 10.41.77.41 255.255.255.192 interface Vlan-interface3 description link to ruzhou ip address 10.41.77.105 255.255.255.192 interface Vlan-interface4 description link to xiaotun ip address 10.41.77.169 255.255.255.192 interface Vlan-interface5 description link to baofeng ip address 10.41.77.233 255.255.255.192 interface Vlan-interface6 description link to pingxi ip address 10.41.78.41 255.255.255.192 interface Vlan-interface7 description link to pingnan ip address 10.41.78.105 255.255.255.192

比较全面的三层交换机配置实例

比较全面的三层交换机配置实例(带命令解释哟!) Enable //进入私有模式 Configure terminal //进入全局模式 service password-encryption //对密码进行加密 hostname Catalyst 3550-12T1 //给三层交换机定义名称 enable password 123456. //enable密码 Enable secret 654321 //enable的加密密码(应该是乱码而不是654321这样) Ip subnet-zero //允许使用全0子网(默认都是打开的) Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1 Service dhcp //提供DHCP服务 ip routing //启用三层交换机上的路由模块 Exit Vtp mode server //定义VTP工作模式为sever模式 Vtp domain centervtp //定义VTP域的名称为centervtp Vlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan 3 name vlan3 Vlan 4 name vlan4 Vlan 5 name vlan5 Vlan 6 name vlan6 Vlan 7 name vlan7 Vlan 8 name vlan8 Vlan 9 name vlan9 Exit interface Port-channel 1 //进入虚拟的以太通道组1 switchport trunk encapsulation dot1q //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunk switchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过 Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1 switchport trunk encapsulation dotlq //给这个接口的trunk封装为802.1Q的帧格式 switchport mode trunk //定义这个接口的工作模式为trunk switchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过 channel-group 1 mode on //把这个接口放到快速以太通道组1中 Interface gigabitethernet 0/2 //同上 switchport trunk encapsulation dotlq switchport mode trunk switchport trunk allowed vlan all channel-group 1 mode on port-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依*源和目的IP

相关文档
最新文档