交换机数据配置学习资料一、登录超级终端
二、华为S2000交换机配置命令
1、交换机命名 sys name
如:SW1 即sys name SW1 2、查看交换机配置基本命令
dis cu
dis cpu 查看CPU使用率
sys 进全局模式
Q 退出
3、建立VLAN
sys
vlan 21
3、进交换机端口interface
interface e0/1
4、端口描述description
[SW1-e0/1]description to EB 16 (端口描述到哪里) 5、配置端口数据配置vlan
首先进入端口:例如进交换机端口1
interface Ethernet0/0/1
二层交换机端口可配置成trunk 和access模式
Trunk模式:
interface Ethernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 23 18
access模式
interface Ethernet0/0/2
port link-type access
port default vlan 23
[SW1-e0/1]port link-type trunk
[SW1-e0/1]port trunk permit vlan 23 21 18 (配VLAN)
撤消E0/2口的VLAN 1
[SW1-E0/2]undo port trunk permit vlan 1 (撤消E0/2口的VLAN 1)
6、配交换机管理IP配密码
interface Vlan-interface23
ip address 10.182.137.215 255.255.255.192
use
q
user-interface aux 0
user-interface vty 0 4
user privilege level 3 (3级权限)
加3级权限就可以telnet了
配密码
su vty 0
auth mode password
set admin setau
set authentication passwoud simple(简单密码) admin
set authentication passwoud cipher(高级模式) admin reset saved-configuration 恢复出厂值
reboot 重启交换机
sav 保存配置
三、华为S3300和S2309交换机配置命令
1、基本命令跟华为S2000的一样,就是配置端口数据有变动(1)交换机端口配置成trunk模式
interface Ethernet0/0/1
description to_3500_eth8_boss cmnet (端口描述)
port link-type trunk
port trunk allow-pass vlan 18 23
(2)交换机端口配置成access模式
interface Ethernet0/0/2
description to BOSS (端口描述)
port default vlan 23
2、端口速率10/100/1000M
配置接口速率前必须先取消接口的自协商模式。
在两端速率相同的情况下,接口才可以正常工作。
配置命令:undo negotiation auto(Ethernet接口视图、GE接口视图)
speed { 10 | 100 | 1000 }(Ethernet接口视图、GE接口视图)
双工模式
配置接口的双工模式前必须先取消接口的自协商模式。
全双工仅用于点对点的网络,在共享式网络中不能使用全双工模式。
说明:
只有以太网电接口支持通过命令行设置双工模式。
只有100M以太网电接口支持半双工模式。
配置命令:undo negotiation auto(Ethernet接口视图、GE接口视图)
duplex { full | half }(Ethernet接口视图、GE接口视图)
华为S2309配置模板
#
!Software Version V100R005C01SPC100
sysname cz_jz_haiyang
#
vlan batch 5 23
#
cluster enable
ntdp enable
ntdp hop 16
ndp enable
#
bpdu enable
#
dhcp enable
#
undo http server enable
#
vlan 5
description hezhuoting_boss
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin local-user admin service-type http
#
interface Vlanif1
ip address dhcp-alloc
#
interface Vlanif5
description hezuoting BOSS
#
interface Vlanif23
description yingyieting BOSS
ip address 192.168.1.2 255.255.255.0 #
interface Ethernet0/0/1
port link-type access
port default vlan 5
ntdp enable
ndp enable
#
interface Ethernet0/0/2 port link-type access port default vlan 5
ntdp enable
ndp enable
#
interface Ethernet0/0/3 port link-type access port default vlan 5
ntdp enable
ndp enable
#
interface Ethernet0/0/4 port link-type access port default vlan 5
ntdp enable
ndp enable
#
interface Ethernet0/0/5 port link-type access port default vlan 5
ntdp enable
ndp enable
#
interface Ethernet0/0/6 port link-type access port default vlan 5
ntdp enable
ndp enable
#
interface Ethernet0/0/7 port link-type access port default vlan 5
ntdp enable
ndp enable
#
interface Ethernet0/0/8 port link-type access port default vlan 5
ntdp enable
ndp enable
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 5
ntdp enable
ndp enable
port media type fiber
undo negotiation auto
speed 100
combo-port auto
#
interface NULL0
#
snmp-agent
snmp-agent local-engineid 000007DB7F00000100000315
snmp-agent sys-info version v3
#
user-interface con 0
idle-timeout 0 0
user-interface vty 0 4
user privilege level 3
set authentication password cipher GW8O3R5AND'Q=^Q`MAF4<1!! #
port-group link-type
#
port-group trunk
#
return
四、瑞斯康达itn 125交换机
[登录方式]
用网线联接ITN125交换机SNMP口
电脑设置IP:192.168.4.30 掩码:255.255.255.0
telnet 192.168.4.28
用户名raisecom
密码raisecom
高级密码raisecom
进入高级模式enable
进入配置模式config
[业务配置]
ITN125-4FE端口分为两种类型:line和client。使用端口类型+端口号可以进入每个端口进行业务配置。具体可以看设备的前面板。
1、创建并激活VLAN
Raisecom(config)#create vlan XXXX active
2、登录用户侧端口1,配置其为Access vlan100:
具体配置方法
Raisecom(config)#interface client 1
Raisecom(config-port)#switchport access vlan 100
3、进入线路侧端口1,配置其为TRUNK口,允许VLAN100,200通过:
具体配置方法
Raisecom(config)#interface line 1
Raisecom(config-port)#switchport mode trunk
Raisecom(config-port)#switchport trunk allowed vlan 100,200
[网管配置]
在config模式下,输入ip address A.B.C.D(IP)+255.255.255.0(掩码)+VLAN
将vlan 3配置为管理vlan ,ip地址为192.168.168.21
具体配置方法:
配置IP:
Raisecom(config)#ip address 192.168.168.21 255.255.255.0 3
配置公同体名:
Raisecom(config)#snmp-server community public ro
Raisecom(config)#snmp-server community private rw
我公司vlan 1、2作为公司内部管理预留,不能使用。
[端口限速配置]
配置client1端口限速1Mbps
具体配置方法
Raisecom(config)#rate-limit client 1 both 1000
[配置保存]
在全局模式下输入write
具体配置方法
Raisecom#write
=========================================================================
// 简单配置脚本模板以检查院ITN125配置举例
//业务:4个端口分配在不同vlan;每个端口限速10M;管理vlan 4001,IP地址172.18.0.16 //
raisecom
raisecom
enable
raisecom
config
create vlan 100,101,102,103,4001 active
interface line 1
switchport mode trunk
switchport trunk allowed vlan 100,101,102,103,4001 switchport trunk untagged vlan remove 1
exit
interface client 1
switchport access vlan 100
exit
interface client 2
switchport access vlan 101
exit
interface client 3
switchport access vlan 102
exit
interface client 4
switchport access vlan 103
exit
rate-limit client 1 both 1000
rate-limit client 2 both 1000
rate-limit client 3 both 1000
rate-limit client 4 both 1000
ip address 172.18.0.16 255.255.0.04001 line 1,2 网管地址snmp-server community public gl_cmcc
snmp-server community private gl_cmcc
write
y
五、迈普交换机配置
1、配置举例
2、配置交换机名称为“Switch_1”。
语法描述Switch>enable 进入到Enable模式Switch#configure terminal 进入到全局配置模式Switch(config)#hostname Switch_1 配置交换机名称
3、设置enable密码(config t 模式下):
enable password [0 | 7 ] string 设置enable密码,string为所要配置的密码4、创建VLAN:
vlan [vlan-num]
语法描述vlan-num 打开VLAN命令,并进入到VLAN配置模式,值的范围为1~4094
5、添加VLAN描述:
description string string为所增加描述的内容
6、在VLAN下添加端口:
port port-list untag| tag 配置端口为打标模式或不打标模式
7、在端口下绑定PVID号(也就是端口的默认VLAN号):
pvid pvid-num 在端口配置模式下配置(port下)
8、启用全局的igmpsnoop:
igmpsnoop enable
9、在端口下禁用广播风暴抑制功能:
storm-control disable
10、交换机三网合一配置
Switch#show run //查看配置
vlan 1 //删除vlan 1中的端口
description default
port 0/0-0/7untagged
vlan 20
description VLAN 20 /创建上网VLAN 20
port 0/0 tagged /tagged为打标也就是trunk
port 0/1 untagged /untagged为非打标也就是access
port 0/1 pvid 20 /设置端口1的PVID为20
vlan 2103
description VLAN2103 /创建电话VLAN 2103
port 0/0 tagged /tagged为打标也就是trunk
port 0/2 untagged /untagged为非打标也就是access
port 0/2 pvid 2103 /设置端口2的PVID为2103
vlan 2104
description VLAN2104 /创建IPTV VLAN 2104
port 0/0 tagged /tagged为打标也就是trunk
port 0/3-0/6 untagged /untagged为非打标也就是access
port 0/3-0/6 pvid 2104 /设置端口3-6的PVID为2104
exit /退出
igmpsnoop enable /开启IGMP组播功能
Spanning-tree disable /关闭生成树协议
port 0/0
storm-control disable /广播风暴控制抑制功能关闭
exit /退出
wr /保存
配置操作如下:通过配置口进去后出现下述界面:
Login: admin
Password: admin
Switch>enable
Switch# conf t 这时就可以进入配置界面了,模版如下:
enable password admin
Layer2-mode disable
vlan 21
port 0/0 tagged
port 0/9-0/15 untagged
vlan 23
port 0/0 tagged
port 0/1-0/8 untagged
exit
port 0/1-0/8
pvid 23
exit
port 0/9-0/15
pvid 21
exit
interface sw0
ip address 10.182.137.197 255.255.255.192
vlan-id 23
exit
ip route 0.0.0.0 0.0.0.0 10.182.137.193
exit
write
这时会提示是否需要保存,敲入y回车即可。
在switch#模式下sh run 可以查看配置,请核对一下配置是否完整。
迈普交换机配置模版
Login: admin
Password: admin
Switch>enable
Switch#
Switch#sh run
!LanSwitch BuildRun(MPBN Platform)
enable
configure terminal
![VLAN]
interface range ethernet 0/0/1 to ethernet 0/0/8 switchport mode access
exit
interface range ethernet 0/1/1
switchport mode trunk
exit
vlan 18
description cmnet
exit
vlan 23
description BOSS
exit
![DEVICE]
interface ethernet 0/0/1
switchport default vlan 23
exit
interface ethernet 0/0/2
switchport default vlan 18
exit
interface ethernet 0/0/3
switchport default vlan 23
exit
interface ethernet 0/0/4
switchport default vlan 18
exit
interface ethernet 0/0/5
switchport default vlan 23
exit
interface ethernet 0/0/6
switchport default vlan 18
exit
interface ethernet 0/0/7
switchport default vlan 23
exit
interface ethernet 0/0/8
switchport default vlan 18
exit
interface ethernet 0/1/1
switchport trunk allowed vlan 18,23 phystate 100base-fx
exit
Switch#
南宁恒灵服务有限公司
农勇烈
电话:137********
邮箱137********@https://www.wendangku.net/doc/0e5607953.html, 2013年9月26日