实验2看这个就知道还有实验1,因为实验1里用的都是真实IP地址,也懒得修改了,所以就不分享了,基本都是入门级别的知识点。拓扑图及ip规划 主要知识点 NAT:掌握nat中的easyip配置使用 DHCP:全局DHCP 接口DHCP模拟ISP设备配置 配置接口地址 interfaceGigabitEthernet000 ipaddress100。1。1。1255。255。255。252 R1路由器配置 配置路由器名称 sysnameR1 配置WAN接口地址 interfaceGigabitEthernet000 ipaddress100。1。1。2255。255。255。252 配置LAN接口地址 interfaceGigabitEthernet001 ipaddress1。1。1。1255。255。255。252 配置回程路由 iproutestatic10。10。10。0255。255。255。01。1。1。2 iproutestatic10。10。20。0255。255。255。01。1。1。2 iproutestatic10。10。30。0255。255。255。01。1。1。2 配置基本acl,做为nat转换源地址 aclnamenat2000 rule5permitsource10。10。20。00。0。0。255 rule10permitsource10。10。10。00。0。0。255 进入wan口配置nat interfaceGigabitEthernet000 natoutbound2000 核心交换机配置 配置交换机名称 sysnameHX 创建VLAN,使能DHCP vlanbatch10201000 dhcpenable 为vlan20创建全局地址池,使用全局dhcp ippoolvlanif20创建名为vlanif20的地址池 gatewaylist10。10。20。1网关地址 network10。10。20。0mask255。255。255。0地址池网段 dnslist8。8。8。8dns服务器地址 配置vlanif10接口ip,并配置接口dhcp基本信息 interfaceVlanif10 ipaddress10。10。10。1255。255。255。0 dhcpselectinterface配置dhcp模式为接口模式 dhcpserverdnslist8。8。8。8配置dns服务器地址 配置vlanif20接口ip,并开启全局dhcp interfaceVlanif20 ipaddress10。10。20。1255。255。255。0 dhcpselectglobal配置dhcp模式为全局模式 配置vlanif1000ip地址并将上联口加入vlan1000 interfaceVlanif1000 ipaddress1。1。1。2255。255。255。252 interfaceGigabitEthernet001 portlinktypeaccess portdefaultvlan1000 配置交换机互联口 interfaceGigabitEthernet0022 portlinktypetrunk porttrunkallowpassvlan2to4094 interfaceGigabitEthernet0023 portlinktypetrunk porttrunkallowpassvlan2to4094 interfaceGigabitEthernet0024 portlinktypetrunk porttrunkallowpassvlan2to4094 配置默认路由 iproutestatic0。0。0。00。0。0。01。1。1。1 接入交换机配置 分别为SW1和SW2配置 修改设备名称 SysnameSW1 SysnameSW2 创建vlan vlanbatch1020 分别为终端接口配置相关信息 interfaceGigabitEthernet001 portlinktypeaccess portdefaultvlan10(20) 配置设备互联接口 interfaceGigabitEthernet0024 portlinktypetrunk porttrunkallowpassvlan2to4094 测试DHCP: PC1: PC2: 测试网络连通性: PC到R1: 到ISP: 以上就是整个实验过程,有什么不对的地方或者需要补充的地方欢迎大神指正。全文手打,支持原创。