sys
vlan 1
port e1/0/1 to e1/0/4
vlan 2
port e1/0/5 to e1/0/8
vlan 3
port e1/0/9 to e1/0/12
quit
int vlan 1
ip add 192.168.1.1 255.255.255.0
int vlan 2
ip add 192.168.2.1 255.255.255.0
int vlan 3
ip add 192.168.3.1 255.255.255.0
quit
ip rou 0.0.0.0 0.0.0.0 路由器ip地址
save
这个访问外网,在路由器上还要设置一下参数。
sys
[h3c]vlan 1
[h3c-vlan1]port ethernet1/0/1 to ethernet1/0/4
[h3c-vlan1]quit
[h3c]interface vlan-interface 1
[h3c-interface-vlan-interface 1]ip address 192.168.0.1 24
[h3c-interface-vlan-interface 1]quit
[h3c]vlan 2
[h3c-vlan2]port ethernet1/0/5 to ethernet1/0/8
[h3c-vlan2]quit
[h3c]interface vlan-interface 2
[h3c-interface-vlan-interface 2]ip address 192.168.1.1 24
[h3c-interface-vlan-interface 2]quit
[h3c]vlan 3
[h3c-vlan3]port ethernet1/0/9 to ethernet1/0/12
[h3c-vlan3]quit
[h3c]interface vlan-interface 3
[h3c-interface-vlan-interface 3]ip address 192.168.2.1 24
[h3c-interface-vlan-interface 3]quit
[h3c]vlan 100
[h3c-vlan100]port ethernet1/0/24
[h3c-vlan100]quit
[h3c]interface vlan-interface 100
[h3c-interface-vlan-interface 100]ip address 192.168.3.1 24
[h3c-interface-vlan-interface 100]quit
[h3c]ip route-static 192.168.0.0 255.255.255.0 192.168.0.1
[h3c]ip route-static 0.0.0.0 0.0.0.0 192.168.3.1
192.168.3.1是连接路由器的接口IP
?这个网络环境的话暂时实现不了你所说的要求,因为在3600上一旦配置虚接口做三个vlan下IP的网关的话,交换机会自动生成直接路由,这样的话,三个vlan之间就相互能够通讯了,不做的话你没有网关,你怎么做NAT呢
标签:h3c