首页导航栏 - 网络工程 | 网站建设 | 设计在线 | 精彩图片 | 职业前线 | 创业之路 | 启步工具 | 教程资讯 | 休闲娱乐
帐号:
密码:

Google
Google提供的相关资源
启步网 > 教程资讯 > Linux教程
Solaris下如何配置网卡IP地址?
作者: 不详 阅读: 来源:互连网 时间:2007-8-6 20:16:01
字体
Solaris下如何配置网卡IP地址?下面介绍两种方法:
一,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 

责任编辑:一路狂奔
参与评论(条评论)
请遵守国家法律
笔名:
邮箱:
( 以上评论仅代表网友个人意见,不代表本站观点 )
相关资源
  • vim与scp结合,编辑管理远程文件 [2007-7-30]
  • RedHat Linux下的FTP服务器配置 [2007-7-30]
  • Apache与Tomcat安装配置 [2007-7-3]
  • 优化安装 mysql+apache+php [2007-7-3]
  • 用SSH实现远程数据自动备份 [2007-6-14]
  • Linux必学60个命令文件处理 [2007-6-14]
  • linux环境变量设置及保存地点 [2007-6-14]
  • 通过LoadRunner监控Linux的资源状况 [2007-6-14]
  • Linux操作--VI使用技巧介绍 [2007-6-14]
  • 处理日常事务的 Linux 程序 [2007-5-28]
  •