当前位置: 技术问答>linux和unix
紧急求救!如何在SunOs 5.8系统下,增加一个IP地址?谢谢!
来源: 互联网 发布时间:2014-12-21
本文导语: 如何在SunOs 5.8系统下,增加一个IP地址? 用ifconfig的话,格式怎么写? 如果想永久的话,是否应该在文件里写死?在什么文件中配?如何写? 谢谢! | ifconfig hme0 172.16.3.3 netmask 255.255.255.0 ...
如何在SunOs 5.8系统下,增加一个IP地址?
用ifconfig的话,格式怎么写?
如果想永久的话,是否应该在文件里写死?在什么文件中配?如何写?
谢谢!
用ifconfig的话,格式怎么写?
如果想永久的话,是否应该在文件里写死?在什么文件中配?如何写?
谢谢!
|
ifconfig hme0 172.16.3.3 netmask 255.255.255.0
永久改变配置,则要更改配置文件,以网卡hme0为例:
#more /etc/hostname.hme0
Sunland
#more /etc/hosts
127.0.0.1 localhost
172.16.255.2 Sunland loghost
#vi /etc/hosts
#more /etc/hosts
127.0.0.1 localhost
172.16.3.3 Sunland loghost
#more /etc/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
#vi /etc/netmasks
#more /etc/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
172.16.3.0 255.255.255.0
#reboot
永久改变配置,则要更改配置文件,以网卡hme0为例:
#more /etc/hostname.hme0
Sunland
#more /etc/hosts
127.0.0.1 localhost
172.16.255.2 Sunland loghost
#vi /etc/hosts
#more /etc/hosts
127.0.0.1 localhost
172.16.3.3 Sunland loghost
#more /etc/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
#vi /etc/netmasks
#more /etc/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
172.16.3.0 255.255.255.0
#reboot