我正在使用 Ubuntu 12.04 设置路由器。我需要我的路由器在我们的互联网调制解调器和我客户的网络之间进行路由,为此我们获得了一个 IP 地址。
盒子有3个接口:
我的 /etc/network/interfaces 看起来像:
# The primary network interface
auto eth2
iface eth2 inet dhcp
# LAN point to our client's network
auto eth0
iface eth0 inet static
address 10.198.250.171
#gateway 10.198.0.4
netmask 255.255.0.0
network 10.198.0.0
broadcast 10.198.255.255
hwaddress ether 00:1E:EC:72:ED:92
# eth1 acts as our LAN's router IP
auto eth1
iface eth1 inet static …
Run Code Online (Sandbox Code Playgroud)