- 论坛徽章:
- 0
|
请各位高手给小弟指点一下,问什么我在netmasks文件中设置的ip 10.6.75.161的掩码为255.255.255.128不生效,重启机器后,用ifconfig -a查看,掩码却是255.0.0.0。相关配置文件如下:
root@I2000 # ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.6.75.161 netmask ffffff80 broadcast 10.255.255.255
ether 0:3:ba:9b:54:df (红色的部分一重新启动就变成ff000000了,现在之所以正确,是我用命令ifconfig ce0 netmask 255.255.255.128改的//the red part is that I use command “ifconfig ce0 netmask 255.255.255.128” to realize,but it is not permanent )
root@I2000 # cd /etc
root@I2000 # ls hostname*
hostname.ce0
root@I2000 # more hostname.ce0
I2000
root@I2000 # cd /etc/inet
root@I2000 # more hosts
#
# Internet host table
#
127.0.0.1 localhost
10.6.75.161 I2000 loghost
root@I2000 # cd /etc
root@I2000 # more netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center. Currently this number is restricted to being a class
# A, B, or C network number. In the future we should be able to support
# arbitrary network numbers per the Classless Internet Domain Routing
# guidelines.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
10.6.75.0 255.255.255.128
root@I2000 # more /etc/defaultrouter
10.6.75.147
root@I2000 # |
|