您的位置 首页 知识

华为三层交换机怎么配置

交换机如果带console接口,那么包装箱里面会有一根console线,一边是console接口,一边是COM接头。

台式机主板上一般会有COM插口,如果没有或者是用笔记本,请买一条COM转USB线。插入电脑USB后装上驱动就能使用COM口了。

连接设备方法:

使用console线把交换机和电脑连接

打开超级终端(开始-附件-系统工具里面)或使用第三方工具如secureCRT。win7系统取消了超级终端,可以用secureCRT

打开secureCRT,设置链接参数,如下图所示:

端口选择:请打开电脑设备管理器,查看自己电脑的COM端口的信息,请根据自己端口的信息选择正确的com端口,如下图

设置完毕,点击连接,输入交换机用户名和密码就登录进去了

 按一般说法,CONSOLE线一般是将反转的电缆连接到RJ45-DB9转接口形成CONSOLE线,用来配置网络设备。但经试验,这种线只能从网络设备接收信息,却无法向网络设备发送信息,因而无法控制网络设备。

  拿来一条CISCO设备直接带来的CONSOLE线对比,参照网络相关说法,将现有的RJ45-DB9转接口进行改造,制做了适用的CONSOLE线。做成后的具体对应关系如下:

——————————–

找一个根console口线,和电脑连接起来,

1.首先进入系统视图:system-view

进入后<>变成[ ],当然我这是在华为的ensp模拟器下,实操是需要输入账户和密码的。

2.然后创建vlan

我这里是批量创建,你也可以单个单个创建(vlan 10,vlan20,vlan30这样)

3.配置vlanif接口的ip地址

int vlan * 进入vlanif接口视图

vlan10网段10,vlan20网段20,vlan30网段30

24就是掩码255.255.255.0

4.划分对应的端口到vlan

int g0/0/* 进入第几个端口

access是端口模式

default vlan* 划分端口到哪个vlan

5.保存(重要)

在模拟器上无所谓,只是临时配置

如果是真机实操,切记保存,不然交换机重启后配置就全没了。

保存方法按Ctrl+Z或按q一直退至到用户视图下(<>)输入save,y确认。

6.配置我们小明、小红、小邓三台电脑的ip

OK,现在我们来ping一下看是否能够互访

现在三个人都能够互相访问了。

7.权限控制ACL

显示互访是都可以,如果我们想某人只能被访问不能访问别人,或只能访问别人不能被访问怎么办

acl3001 创建高级ACL

谁能访问谁把rule后面的deny 改成permit

配置ACL规则,谁能访问谁,谁不能访问谁,一次可写多条,如下写的事30网段的不能访问10网段的也就是vlan30不能访问vlan10,但是反过来vlan10还是能继续访问30。所以配置之后小邓不能访问小明了,其它照常。

配置基于高级ACL的流分类(traffic classifier tc1)//if-match acl 3001将ACL与流分类关联

traffic behavior tb1//创建流行为,配置deny拒绝报文通过

traffic policy tp1//创建流策略,classifier tc1 behavior tb1//将流分类tc1和tb1关联

最后应用到到接口g0/0/3

8.注意事项

很多人到时候或许会疑惑,为什么我配置的ACL没有生效?

型号过低时不支持ACL的,模拟器的交换机型号是S5700 V200R001C00

你可以输入dis ver 查看你的设备型号

dis curr 查看设备配置dis version 查看版本dis dev manuinfo 查看型号运行的mstpdis stp brief 查看端口stp状态dis stp 查看stp 运行模式dis mad verbose 查看虚拟化检测线状态dis ip routing-table 查看路由表dis logbuffer reverse 查看系统日志dis ip int brief 查看ip地址dis int brie 查看接口状态dis lldp ne list 查看邻居信息dis lldp ne inter g1/0/0/40 verbose 查看邻居地址Username:guestPassword:Info: The max number of VTY users is 10, and the number of current VTY users on line is 2. The current login time is 2021-05-13 08:30:13+00:00.<binhengredian>dis cur!Software Version V200R011C10SPC600#sysname binhengredian#vlan batch 2 42 103#authentication-profile name default_authen_profileauthentication-profile name dot1x_authen_profileauthentication-profile name mac_authen_profileauthentication-profile name portal_authen_profileauthentication-profile name dot1xmac_authen_profileauthentication-profile name multi_authen_profile#telnet server enable#diffserv domain default#radius-server template default#pki realm default#free-rule-template name default_free_rule#portal-access-profile name portal_access_profile# drop-profile default#aaa authentication-scheme default authentication-scheme radius authentication-mode radius authorization-scheme default accounting-scheme default local-aaa-user password policy administrator password history record number 0 password expire 0 domain default authentication-scheme radius radius-server default domain default_admin authentication-scheme default local-user admin password irreversible-cipher $1a$MNQ+7n7.”!$N!GU=zBQ4″!’&eXoWW>5X08D0tlwwQex)YS*Fq+L$ local-user admin privilege level 15 local-user admin service-type telnet#interface Vlanif1 ip address 172.168.0.140 255.255.255.0#interface MEth0/0/1 #interface Eth-Trunk40 port link-type trunk port trunk allow-pass vlan 2 to 4094 load-balance src-dst-mac#interface GigabitEthernet0/0/1 port link-type access port default vlan 42#interface GigabitEthernet0/0/2 port link-type access port default vlan 42#interface GigabitEthernet0/0/3 port link-type access port default vlan 42#interface GigabitEthernet0/0/4 port link-type access port default vlan 42#interface GigabitEthernet0/0/5 port link-type access port default vlan 42#interface GigabitEthernet0/0/6 port link-type access port default vlan 42#interface GigabitEthernet0/0/7 port link-type access port default vlan 42#interface GigabitEthernet0/0/8 port link-type access port default vlan 42#interface GigabitEthernet0/0/9 port link-type access port default vlan 42#interface GigabitEthernet0/0/10 port link-type access port default vlan 42#interface GigabitEthernet0/0/11 port link-type access port default vlan 42#interface GigabitEthernet0/0/12 port link-type access port default vlan 42#interface GigabitEthernet0/0/13 port link-type access port default vlan 42#interface GigabitEthernet0/0/14 port link-type access port default vlan 42#interface GigabitEthernet0/0/15 port link-type access port default vlan 42#interface GigabitEthernet0/0/16 port link-type access port default vlan 42#interface GigabitEthernet0/0/17 port link-type access port default vlan 42#interface GigabitEthernet0/0/18 port link-type access port default vlan 42#interface GigabitEthernet0/0/19 port link-type access port default vlan 42#interface GigabitEthernet0/0/20 port link-type access port default vlan 42#interface GigabitEthernet0/0/21 port link-type access port default vlan 42#interface GigabitEthernet0/0/22 port link-type access port default vlan 42#interface GigabitEthernet0/0/23 port link-type access port default vlan 42#interface GigabitEthernet0/0/24 port link-type access port default vlan 42#interface GigabitEthernet0/0/25 eth-trunk 40#interface GigabitEthernet0/0/26 eth-trunk 40#interface GigabitEthernet0/0/27 eth-trunk 40#interface GigabitEthernet0/0/28 eth-trunk 40#interface GigabitEthernet0/0/29#interface GigabitEthernet0/0/30#interface GigabitEthernet0/0/31# interface GigabitEthernet0/0/32#interface NULL0#iproute-static0.0.0.00.0.0.0172.168.0.1#user-interface con 0 authentication-mode aaauser-interface vty 0 4 authentication-mode aaa user privilege level 15 protocol inbound telnetuser-interface vty 16 20#dot1x-access-profile name dot1x_access_profile#mac-access-profile name mac_access_profile#return<binhengredian>

现在都有蓝牙连接,无线连接,USB接口的com口等转接线,简单方便设置调试

电脑上使用超级终端或者SecureCRT.EXE来调试