零零社区|百姓的网上家园-互动交流平台!(0.0)=^_^=(00社区)

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz

Solaris如何网卡IP地址?

2013-4-5 11:35| 发布者: 123456000000| 查看: 11| 评论: 0

摘要: ifconfig ifconfig用于配置网卡地址,改动后立即生效,但并不保存配置,下次启动后失效。 #ifconfig-a lo0:flags=849mtu8232 inet127.0.0.1netmaskff000000 hme0:flags=863mtu1500 inet172.16.255.2netmaskffff0000b ...
 ifconfig 
ifconfig用于配置网卡地址,改动后立即生效,但并不保存配置,下次启动后失效。 
# ifconfig -a 
lo0: flags=849 mtu 8232 
        inet 127.0.0.1 netmask ff000000 
hme0: flags=863 mtu 1500 
        inet 172.16.255.2 netmask ffff0000 broadcast 172.16.255.255 
        ether 8:0:20:ee:11:51 
#ifconfig hme0 172.16.3.3 netmask 255.255.255.0 
#ifconfig –a 
lo0: flags=849 mtu 8232 
        inet 127.0.0.1 netmask ff000000 
hme0: flags=863 mtu 1500 
        inet 172.16.3.3 netmask ffffff00 broadcast 172.16.3.255 
        ether 8:0:20:ee:11:51 


 /etc/hosts 
想要永久更改配置,则要更改配置文件,以网卡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 


路过

雷人

握手

鲜花

鸡蛋

相关阅读

发表评论

最新评论

相关分类


Archiver|手机版|小黑屋|00社区

GMT+8, 2023-1-31 10:51 , Processed in 0.042445 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部