#ifconfig hme0 plumb
ifconfig -a command should show following type of output which means device is enabled and is ready to configure ip address and netmask :
hme0: flags=842 mtu 1500
inet 0.0.0.0 netmask 0
ether 3:22:11:6d:2e:1f
2. Configuring ipaddress and netmask and making the interface status as up .
#ifconfig hme0 192.9.2.106 netmask 255.255.255.0 up
#ifconfig -a will now show the ip address , netmask and up status as follows :
hme0: flags=843 mtu 1500
inet 192.9.2.106 netmask ffffff00 broadcast 192.9.2.255
ether 3:22:11:6d:2e:1f
The file /etc/netmasks is used to define netmasks for ip addresses .
127.0.0.1, is the standard loop back route and 127.0.0.0 is the default loopback ipaddress used by the kernel when no interface is configured this will be the only entry dispalyed by the system on invoking ifconfig -a command..
A:
(1)/etc/nsswitch.conf的hosts解析加上nis或/和dns,内容如下
hosts: files dns
(2)设置到DNS服务器网关于/etc/defaultrouter,内容如下
bash-3.00# cat /etc/defaultrouter
10.204.10.254
bash-3.00#
(3)设置DNS服务器的IP地址/etc/resolv.conf,内容如下
bash-3.00# cat /etc/resolv.conf
nameserver 10.204.0.17
nameserver 10.204.0.18
bash-3.00#
bash-3.00# cat /etc/hosts
#
# Internet host table
#
#::1 localhost
127.0.0.1 localhost
10.204.10.55 RAC1 loghost
10.204.10.254 router
bash-3.00#
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/66634/viewspace-1000445/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/66634/viewspace-1000445/