1 配置接口
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 10
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk pvid vlan 10
port trunk allow-pass vlan xxxxxx
2 vlan 配置
system-view
vlan batch 10 to 20 //批量
vlan 21 //单vlan
//配置vlan名称
vlan 22
name xx
quit
vlan vlan-name xx //通过名称进入相应vlan
//端口指定到vlan
vlan 10
quit
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 10
//批量设置vlan
port-group 10
group-member GigabitEthernet 0/0/2 to GigabitEthernet 0/0/10
port link-type access
NAT
//easyip方式
acl number 2000 //创建acl2000
rule 5 permit source 192.168.0.0 0.0.0.255 //允许转换的内网地址段
quit
interface Ethernet0/0/1
undo port switch //关闭交换特性切换为路由接口
ip address 192.168.0.1 255.255.255.0
quit
int G0/0/1
ip address 200.100.1.2 255.255.255.0
nat outbond 2000 //在出接口上做easy ip 方式nat
quit
ip route-static 0.0.0.0 0.0.0.0 200.100.1.1