sys #进入到配置模式 dhcp enable #开启DHCP功能 undo dhcp server ip-pool lan1 #删除自带的DHCP池 dhcp server ip-pool lan1 #新建DHCP池 gateway-list 192.168.0.1 network 192.168.0.0 mask 255.255.255.0 address range 192.168.0.10 192.168.0.250 dns-list 114.114.114.114 223.5.5.5 expired day 3 #过期时间
interface Vlan-interface1 #删除自带三层地址 undo ip add interface GigabitEthernet0/4 #配置内网口地址 port link-mode route ip address 192.168.0.1 255.255.255.0 interface GigabitEthernet0/0 #配置外网口地址 port link-mode route ip address 1.1.1.2 255.255.255.252 nat outbound 2000 address-group 1 #启用端口NAT ip route-static 0.0.0.0 0 1.1.1.1 #配置默认路由到移动
acl basic 2000 #配置NAT的匹配数据流 rule 0 permit source 192.168.0.0 0.0.0.255 nat address-group 1 #配置NAT的转换后地址 address 1.1.1.2 1.1.1.2
看看天上,于是我去了满是风雪的地方