分类:
2006-06-01 00:13:21
第一、 hostname相关
1、 设置hostname的3种方法。
To check the host name, enter:
a.# hostname IBM150 //没有马上写入ODM,下面2种方法都马上写入。
IBM150
b.# chdev -l inet0 -a hostname=server3
inet0 changed
c.# lsattr -El inet0 -a hostname -F value
server3
其中:
# lsattr -El inet0
authm 65536 Authentication Methods True
bootup_option no Use BSD-style Network Configuration True
gateway Gateway True
hostname IBM150 Host Name True
rout6 IPv6 Route True
route Route True
2、 关于host name resolution
a、默认情况下,主机名解析顺序为:DNS->NIS->/etc/hosts。这个顺序在/etc/netsvc.conf 中定义。
解析一下/etc/hosts文件,文件的格式为:IP HOSTNAME1,HOSTNAME2... #DES,书中描述为
IP HOSTNAME DES,也就是说没行一个主机记录,经过测试,其实可以使用上面的格式。
例如编辑这个文件添加如下一行:
192.168.1.38 DestopPc sujian’s pc
那么如下ping操作全部成功
#ping DestopPc
#ping “sujian’s”//这个双引号其实是让单引号生效。
#ping pc
#ping 192.168.1.38
3、 设置NSORDER环境变量//NSORDER变量存在的时候就会覆盖/etc/netsvc.conf和主机解析顺序。
# export NSORDER =nis,bind,local
ksh: =nis,bind,local: This is not an identifier.//本机不存在nis服务,所以报错。
# export NSORDER=bind,local
# echo $NSORDER
bind,local
4、The /etc/resolv.conf file defines the DNS name server information for local
resolver routines. If the /etc/resolv.conf file does not exist, the DNS is not
available and the system will attempt name resolution using the default paths,
the /etc/netsvc.conf file (if it exists), or the NSORDER environment variable (if it
exists).
翻译:/etc/resolv.conf文件定义DNS名字服务的本地解析路由信息,如这个文件不存在,那么DNS无法运行,而系统只能尝试通过默认的顺序进行名字解析。(此处name应该是域名,而不是单独的名字)
5、如果DNS服务列表在TCPIP中,启动的时候会产生/etc/resolv.conf文件,关于这个文件不配置smitty resolv.conf
例子:
#hostname
test1
#cat /etc/resolv.conf
nameserver 10.3.8.63
domain cn.abc.com
这样的文件说明什么呢?说明test1这个主机应该使用ip:10.3.8.63的域名服务器来解析主机号,同时它属于cn.abc.com域,本机器完整主机名是:test1.cn.abc.com。
尝试在这个文件中加入
nameserver 61.144.56.100 记录之后还是无法ping通这DNS。实验失败,不知道什么原因。
6、网络接口的配置
a.配置接口可以使用2类命令,chined 和chdev 直接修改ODM,这种修改是永久的,而另外一个就是ifconfig命令。这个命令不更新ODM 。
b.ifconfig命令另文已经介绍。
7、显示系统配置(5L之后支持)
The prtconf command is useful to show slot placements.
# prtconf
System Model: IBM,7043-150
Machine Serial Number: 107F82F
Processor Type: PowerPC_604e
Number Of Processors: 1
Processor Clock Speed: 375 MHz
CPU Type: 32-bit
Kernel Type: 32-bit
LPAR Info: -1 NULL
Memory Size: 512 MB
Good Memory Size: 512 MB
Platform Firmware level: Not Available
Firmware Version: IBM,TCP05287
Console Login: enable
Auto Restart: true
Full Core: false
Network Information
Host Name: tt
IP Address: 192.168.1.150
Sub Netmask: 255.255.255.0
Gateway:
Name Server: 192.168.1.1
Domain Name: n
Paging Space Information
Total Paging Space: 512MB
Percent Used: 1%
Volume Groups Information
=======================================================================rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 542 362 108..37..00..108..10..9
=======================================================================
INSTALLED RESOURCE LIST
The following resources are installed on the machine.
+/- = Added or deleted from Resource List.
* = Diagnostic support not available.
Model Architecture: chrp
Model Implementation: Uni-Processor, PCI bus
+ sys0 System Object
+ sysplanar0 System Planar
* pci0 P1 PCI Bus
* isa0 P1 ISA Bus
+ fda0 P1/D1 Standard I/O Diskette Adapter
+ fd0 P1-D1 Diskette Drive
* siokma0 P1/K1 Keyboard/Mouse Adapter
+ sioka0 P1/K1 Keyboard Adapter
+ kbd0 P1-K1 PS/2 keyboard
+ sioma0 P1/K1 Mouse Adapter
+ siota0 P1/Q1 Tablet Adapter
+ paud0 P1/Q2 Ultimedia Integrated Audio
+ ppa0 P1/R1 CHRP IEEE1284 (ECP) Parallel Port Adapter
+ sa0 P1/S1 Standard I/O Serial Port
+ sa1 P1/S2 Standard I/O Serial Port
+ ent0 P1/E1 IBM 10/100 Mbps Ethernet PCI Adapter (23100020)
+ scsi0 P1/Z1 Wide/Fast-20 SCSI I/O Controller
+ hdisk0 P1/Z1-A0 Other SCSI Disk Drive
+ hdisk1 P1/Z1-A1 Other SCSI Disk Drive
+ cd0 P1/Z1-A3 16 Bit SCSI Multimedia CD-ROM Drive (650 MB)
+ mtn0 P1.1-I3/G1 GXT3000P Graphics Adapter
* pci1 P1.1 PCI Bus
+ L2cache0 L2 Cache
+ mem0 Memory
+ proc0 P1-C1 Processor
8、Configuring network attributes(no command)