- 论坛徽章:
- 0
|
Redhat AS 5和Ubuntu 8.10网卡IP地址、网关及DNS配置的差异
Redhat AS 5 Linux网卡配置
---------------------------------------------------------------------------
网卡IP地址配置
/etc/sysconfig/network-scripts/ifcfg-eth0
#VIA Technologies, Inc. VT6105 [Rhine-Ⅲ]
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:40:D0:4B:44:BE
IPADDR=192.168.3.20
NETMASK=255.255.0.0
ONBOOT=yes
主机名及网关配置
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=flush
GATEWAY=192.168.0.1
DNS配置
/etc/resolv.conf
nameserver=192.168.0.1
---------------------------------------------------------------------------
Ubuntu 8.10网卡配置
---------------------------------------------------------------------------
网卡IP地址配置及网关配置
/etc/network/interfaces
#This file describes the network interfaces available on your system
#and how to activate them. For more information, see interfaces(5).
#The loopback network interface
auto lo
iface lo inet loopback
#The primary network interface
auto eth1
iface eth1 inet static
address 192.168.3.20
netmask 255.255.0.0
gateway 192.168.0.1
主机名的配置
/etc/hostname
Percy-Ubuntu
DNS配置
/etc/resolv.conf
nameserver=192.168.0.1
---------------------------------------------------------------------------
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/87794/showart_1724692.html |
|