1.配置LSW1
(1)配置连接用户的接口和对应的VLANIF接口
[LSW1]vlan batch 10 20
[LSW1-GigabitEthernet0/0/1]port link-type access
[LSW1-GigabitEthernet0/0/1]port default vlan 10
[LSW1-GigabitEthernet0/0/2]port link-type access
[LSW1-GigabitEthernet0/0/2]port default vlan 20
[LSW1]int Vlanif 10
[LSW1-Vlanif10]ip add 10.1.10.2 24
[LSW1-Vlanif10]int Vlanif 20
[LSW1-Vlanif20]ip add 10.1.20.2 24
(2)配置连接路由器的接口和对应的VLANIF接口
[LSW1]vlan batch 100
[LSW1-GigabitEthernet0/0/3]port link-type access
[LSW1-GigabitEthernet0/0/3]port default vlan 100
[LSW1]int Vlanif 100
[LSW1-Vlanif100]ip add 10.1.100.2 24
(3)配置缺省路由
[LSW1]ip route-static 0.0.0.0 0.0.0.0 10.1.100.1
(4)配置DHCP服务器
[LSW1]dhcp enable
[LSW1]int Vlanif 10
[LSW1-Vlanif10]dhcp select interface
[LSW1-Vlanif10]dhcp server dns-list 114.114.114.114
[LSW1-Vlanif10]int Vlanif 20
[LSW1-Vlanif20]dhcp select interface
[LSW1-Vlanif20]dhcp server dns-list 114.114.114.114
2.配置AR1
(1)配置连接交换机的接口对应的IP地址
[AR1-GigabitEthernet0/0/1]ip add 10.1.100.1 24
(2)配置连接公网的接口对应的IP地址
[AR1-GigabitEthernet0/0/0]ip add 20.1.1.1 24
(3)配置缺省路由和回程路由
[AR1]ip route-static 0.0.0.0 0.0.0.0 20.1.1.2
[AR1]ip route-static 10.1.0.0 255.255.0.0 10.1.100.2
(4)配置NAT功能,使内网用户可以访问外网
[AR1]acl 2000
[AR1-acl-basic-2000]rule permit source 10.1.0.0 0.0.255.255
[AR1-GigabitEthernet0/0/0]nat outbound 2000
3.配置AR2
[AR2-GigabitEthernet0/0/0]ip add 20.1.1.2 24
4.配置PC
5.检查配置结果