红联首页 凝聚Linux人的力量
菜鸟过关 | 精华文档 | 同城人(交友) | 我与Linux的故事 | Linux新闻 | Linux视频 | Linux人才 | 软件下载 | 大学校园 | English
发新话题
打印

Debian下配置跨网段网关

Debian下配置跨网段网关

Interfaces文件如下

# This file describe the network interfaces available on your system
# and how toactivate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface the0 inet static
address 222.27.179.199
netmask 255.255.0.0
network 222.27.0.0
broadcast 222.27.255.255
gateway 222.27.178.1

其中网络掩码netmask是配置的关键。

第一次我配置网络掩码为255.255.255.0,运行

#/etc/init.d/networking restart

提示:

Reconfiguring network interfaces…SIOCADDRT: Network is unreachable

Failed to bring up eth0.

done.

将网络掩码改成255.255.0.0后,提示


Reconfiguring network interfaces…if-up.d/mountnfs[eth0]: waiting for interface lo before doing NFS mountswaiting for interface eth0

done.

看来跨网段网关访问使用了NFS。

TOP

发新话题