配置三层交换机第一步:划分VLAN,并描述 vlan1 descriptionlocal-s3600//本交换机使用

vlan2 descriptionlink-to-shanxicentre//陕西省中心

vlan3 descriptionlink-to-shangjiecentre//商界分中心内部使用

vlan4 descriptionlink-to-shangdongsuo//商东所

vlan5 descriptionlink-to-shangnansuo//商南所

配置三层交换机第二步:给VLAN划网关

interfaceVlan-interface2 descriptionlinktoshanxicentre ipaddress10.61.242.110255.255.255.252//省中心指定广域网关、子网掩码

interfaceVlan-interface3 descriptionlinktoshangjiecentre ipaddress10.161.134.65255.255.255.192//商界分中心局域网关、子网掩码

interfaceVlan-interface4 descriptionlinktoshangdongsuo ipaddress10.61.242.113255.255.255.252//商东所广域网关、子网掩码

interfaceVlan-interface5 descriptionlinktoshangnansuo ipaddress10.61.242.117255.255.255.252//商南所广域网关、子网掩码

配置三层交换机第三步:给VLAN指定端口

interfaceEthernet1/0/2//将交换机的端口2指定给省中心使用 descriptionlinktoshanxicentre portaccessvlan2

interfaceEthernet1/0/15-24//将交换机的端口15-24指定给分中心内部使用 descriptionlinktoshangjiecentre portaccessvlan3

interfaceEthernet1/0/3//将交换机的端口3指定给商东所使用 descriptionlinktoshangdongsuo portaccessvlan4

interfaceEthernet1/0/4//将交换机的端口4指定给商南所使用 descriptionlinktoshangnansuo portaccessvlan5

配置三层交换机第四步:配置路由协议 //配静态路由(只用对远端设备配一条路由即可,本地自通) iproute0.0.0.00.0.0.010.61.242.109//指定所有网段到商东所的路由 //配置三层交换机商东所的反向路由 iproute10.161.134.0255.255.255.010.61.242.114 iproute10.161.135.0255.255.255.010.61.242.114 //配置三层交换机商南所的反向路由 iproute10.161.135.0255.255.255.010.61.242.118 iproute10.161.136.0255.255.255.010.61.242.118 //省中心配置三层交换机: iproute10.61.242.0255.255.255.010.61.242.110//商东所242.114和商南所242.118共属的242.0指向分中心网关 iproute10.161.134.0255.255.255.010.61.242.110//分中心内部网段指向分中心网关 //iproute10.161.134.0255.255.255.010.61.242.110 //iproute10.161.135.0255.255.255.010.61.242.110 //iproute10.161.136.0255.255.255.010.61.242.110