| 使用Debian Linux操作系统架设网关 |
| |
| |
作者:lynn 文章来源:赛迪网技术社区 点击数: 更新时间:2007-4-17 15:36:55  |
|
|
| 1、网关主机设置
服务器上有两块网卡,eth0使用*.*.*.*IP地址连接Internet,eth1连接LAN,则其/etc/network/interfaces的设置如下:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static
address *.*.*.*
netmask 255.255.255.0
gateway *.*.*.254 auto eth1 iface eth1 inet static address 192.168.0.1 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255
当然也可以使用ifconfig进行配置:
$ ifconfig eth0 *.*.*.* netmask 255.255.255.0
$ route add default gw *.*.*.254
$ ifconfig eth1 192.168.0.1 netmask 255.255.255.0
dns [1] [2] [3] 下一页
|
|
| |
| 电子化建设录入:jerry 责任编辑:jerry |
|
|
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
|
| 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
|
|
|