在Server 2012 Core 模式下安装 路由与远程访问服务

install-windowsfeature -name remoteaccess -includemanagementtools
配置并启用路由与远程访问服务

netsh ras set type lanonly none none
netsh ras set conf enabled

以下两个服务默认处于禁用状态,需手动启用

sc config remoteaccess  start=auto
sc config ramgmtsvc  start=auto
sc start remoteaccess
sc start ramgmtsvc 

添加接口

netsh routing ip relay add interface "以太网 2"

安装协议

netsh routing ip relay install

指明DHCP服务器

netsh routing ip relay add dhcpserver 172.26.10.1