华为交换机2700如何配置管理ip 和划分两个vlan

kuaidi.ping-jia.net  作者:佚名   更新日期:2024-06-27
华为s2700-26tp交换机配置管理IP和VLAN

S2700是二层交换机,无法在端口上设置管理IP,管理IP只能设置在VlanIf上,且无法自动获取;2-24口要互相不能访问需要做端口隔离

需要路由器的
二层划分3个vlan 是可以的
命令如下:
vlan batch 10 20 30
进入相应端口 划入相应VLAN
port link-type access/trunk/hypbrid
port default vlan XX 或port trunk allow-pass vlan xx /all

int vlan 1
ip add 192.168.5.6 255.255.255.0 //管理IP设置完毕。

vlan1是不能随便拿来用的,默认vlan1包含所有接口,一般都当管理VLAN来使用,你要换个VLAN号比如2和3,下边你的vlan1192.168.5.1也就不用了,换成192.168.2.1好了。

vlan 2
vlan 3
int vlan 2
ip add 192.168.2.1 255.255.255.0
int vlan 3
ip add 192.168.6.1 255.255.255.0
SVI接口设置完毕。
这样vlan2和3之间已经可以互通了,接下来就是把接口划入对于的VLAN,对接交换机的可以使用trunk,直接连电脑的可以划为access。
int f0/0
port link-type trunk //trunk接口设置

int f0/1
port link-type access
port default vlan 2 //把接口划入VLAN2

int f0/2
port link-type access
port default vlan 3 //把接口划入VLAN3

这样f0/1和f0/2接口下的电脑把网关分别设置为int vlan 2和3的地址,就能互相访问。

S2700为二层交换机, 不能路由两个vlan的网段。