打印

個人筆記---網絡管理

個人筆記---網絡管理

1.配置IP地址:
#vi /etc/rc.config.d/netconf
文件下面有所有的网卡的名字、网卡的iP地址、网关、子网掩码的配置
这样配置以后可以长期生效,下次机器重新启动的时候就会根据该配置文
件来自动配置网络了。

或者
#ifconfig lan0 133.64.48.91 255.255.255.192
#ifconfig lan1 129.9.168.120 255.255.255.192


》》》查看网卡的地址
#lanscan lan0
#lanscan lan1
lan2不配置地址。

》》》网卡的常用诊断工具
ping;
lanscan;看看网卡地状态是否为“up”
linkloop;(用此命令的时候,一定要先用lanscan来查处网卡的物理地址,
因为该命令的后面接的参数是网卡物理地址,这可以简单地断定网线、集线器
是否有问题)

》》》在同一网中, subnetmask 应一致。

2.配置路由信息:
方法一:可以通过修改/etc/rc.confg.d/netconf文件来增加,下次启动的时候
就会生效。
方法二:可以用命令行来设置
/usr/sbin/route add default 20.08.28.98 1

查看路由信息
#netstat -an

3.非常有用的命令:
(1) #set_parms
它后面带的参数可以是如下
date_time:设者时间;
ip_address:设置网卡地址;
hostname:设置主机名;
addl_netwrk:设置主机的网关

(2) 使用举例:
#mstm
选择system(),并且在菜单上选中Tools/information/information log
便可以看到很多关于硬件的消息,如:

System Information for (scp1)
HPUX Model Number......: L2000 //机器型号是HP L2000
HPUX Model String......: 9000/800/L2000-44
Original Product Number: A5191A
Current Product Number.:
System Serial Number...: (Unknown)
Hversion...............: 0x5c40
Sversion...............: 0x491
Software Capabilities..: 0x100000f0

PD CPU Information:
Number of CPUs in the current Protection Domain = 2 //两个cpu

Cabinet 0; Cell 0; CPU Map
cpu -------------------------------------------------
slot |00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|
-------------------------------------------------
state| a| | | | | | | | | | | | | | | |
-------------------------------------------------
c - Configured (CPU powered on)
d - De-configured (CPU powered off)
a - Active (configured and processes running)



选择memory,并且在菜单上选中Tools/information/information log
便可以看到关于内存的信息,如:
-- Information Tool Log for MEMORY on path 8 --

Log creation time: Wed Jul 3 17:05:47 2002

Hardware path: 8


Basic Memory Description

Module Type: MEMORY
Total Configured Memory : 1024 MB //可以看到总的内存有多少,是1G
Page Size: 4096 Bytes

Memory interleaving is supported on this machine and is ON.

Memory Board Inventory
DIMM Slot Size (MB)
--------- ---------
0a 256 //可以看到每个内存槽里面是不是已经插了内存条,还有
该内存条是多少的内存,比如这里0a槽上插的是256M
1a 256
0b 256
1b 256
--------- --------- //可以看出该台小型机的4个内存槽都已经插满了
System Total (MB): 1024


Memory Error Log Summary

The memory error log is empty.

Page Deallocation Table (PDT)

PDT Entries Used: 0
PDT Entries Free: 50
PDT Total Size: 50

在使用mstm的时候可以打开另外一个终端窗口,执行命令#/usr/sbin/ioscan -fn ,这样可以知道每个设备
的硬件地址信息。


这样可以得到如下结果:
lan 2 0/7/0/0 btlan6 CLAIMED INTERFACE HP A3738A PCI 10/100Base-TX Ultimate Combo
/dev/diag/lan2 /dev/ether2 /dev/lan2
memory 0 8 memory CLAIMED MEMORY Memory
processor 0 160 processor CLAIMED PROCESSOR Processor
processor 1 166 processor CLAIMED PROCESSOR Processor
这样可以知道0/7/0/0地址对应的是一个100M的网卡,然后再到mstm窗口中去查看它的information log
信息,这样可以很清楚硬件信息了。


该收集结果文件中还可以找到磁盘的使用信息

TOP

very good!

TOP


感谢一直以来您对我们的支持!
当前时区 GMT+8, 现在时间是 2008-12-5 11:27 京ICP证060528 号

Designed By 17DST