六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 123|回复: 0

回忆Solaris_ 学习笔记1 [网络地址和掩码]

[复制链接]

升级  56.05%

691

主题

691

主题

691

主题

探花

Rank: 6Rank: 6

积分
2121
 楼主| 发表于 2013-1-16 16:36:07 | 显示全部楼层 |阅读模式
/etc/hostname.interface
此文件格式有两种,/etc/hostname.hme0;第一块百兆网络接口设备;/etc/hostname.le1为十兆网络接口设备

[ 73 ]testsvr1:/etc% more hostname*
testsvr1

系统名与IP地址的映射
与/etc/hostname.interface 协同工作,配置本机网卡地址
# more /etc/hosts
127.0.0.1 localhost
172.36.5.1 testsvr1 testsvr1. loghost
172.36.5.6 ITDTEST
172.21.82.63 ultra5
172.36.5.99 dctlsyb
172.36.5.3 testsvr3
172.36.5.7 testsvr7

###
172.36.5.14 epctest2
###
172.36.5.11 epcuatmq1
172.36.5.1 dctuatmq1
172.36.5.2 dcttestsvr2
172.36.5.13 pnuatmq1
192.10.1.96 epcmq1

系统名不是机器名,机器名是唯一的,要更改机器名,用命令:hostname。
有了/etc/hostname.interface和/etc/hosts两个文件,系统就知道如何配置网卡了,如第一个百兆网卡的名字是hme0,其对应的地址是172.36.5.1。
/etc/netmasks文件

ifconfig命令
检测网络端口状态
#ifconfig -a
配置网络端口地址
#ifconfig le0 172.36.5.1 netmask 255.255.255.0
配置网络端口状态
#ifconfig le0 up/down
配置网络端口是否可用
#ifconfig le0 plumb/unplumb
ping命令
检测网络状态
测试网络速度
[tr][/tr]
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表