基础配置
R1
[R1]INT e 0/0/8
[R1-Ethernet0/0/8]ip add 202.1.1.2 24
[R1]ip pool test1
Info: It's successful to create an IP address pool.
[R1-ip-pool-test1]network 192.168.1.0 mask 24
[R1-ip-pool-test1]gateway-list 192.168.1.1
#不下发1.88
[R1-ip-pool-test1]excluded-ip-address 192.168.1.88
[R1]INT Vlanif 1
[R1-Vlanif1]IP ADD 192.168.1.1 24
[R1-Vlanif1]dhcp select global
R2
[R2]INT G 0/0/1
[R2-GigabitEthernet0/0/1]IP ADD 180.76.76.1 24
[R2]INT G 0/0/0
[R2-GigabitEthernet0/0/0]IP ADD 202.1.1.3 24
关键配置
R1
缺省路由
[R1]ip route-static 0.0.0.0 0 202.1.1.3
NAT
[R1]ACL 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]INT E0/0/8
[R1-Ethernet0/0/8]nat outbound 2000
验证