红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

Debian下配置跨网段网关

发布时间:2008-04-04 00:02:08来源:红联作者:ylnyzl
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。
文章评论

共有 0 条评论