Chinaunix首页 | 论坛 | 博客
  • 博客访问: 412409
  • 博文数量: 78
  • 博客积分: 1527
  • 博客等级: 上尉
  • 技术积分: 830
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-27 20:57
文章分类

全部博文(78)

文章存档

2011年(1)

2008年(12)

2007年(53)

2006年(12)

我的朋友

分类: LINUX

2008-04-03 21:48:37

 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。
阅读(3943) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~