您在这里:首页 > 学员专区 > 技术文章
Oracle视频
Oracle
CUUG课程

AIX TCP/IP

 

在大多数 UNIX系统上用命令设置 TCP/IP,例如 ifconfig 和 route,然后通过编辑初始化文件使配置永久生效。AIX 中也可以这样做,但是使用 SMIT 做所有的配置是最好的,这样做能保证更新/etc/rc.net 和 ODM 里的信息。


1、配置 IP 地址和主机名

如同其它操作系统对 TCP/IP 的支持,AIX 首先也要配置 IP 地址和主机名,以便主机间的通讯和资源共享。使用 SMIT 是方便且可靠的方法,具体操作如下:使用 SMIT 快捷命令:

# smit   mktcpip

首先在Available Network Interfaces屏幕,选择适当的网络接口。这些网络接口是在系统bootup时由cfgmgr认出,并且设置到 ODM数据库的。

然 后 出 现 Minimum Configuration & Startup菜 单 ,至 少 要 填 写HOSTNAME 和Internet ADDRESS域,也可在START Now域指定是否想要现在或在 bootup时启动 TCP/IP。

在这个屏幕还能设置其它参数如网络掩码、名字服务、网关和电缆线类型。如果让 Network MASK 域空白, AIX将根据系统的 IP 地址类提供缺省值。 CABLEType 域可选参数的含义:bnc 细缆、dix 粗缆、tp 双绞线。

例子:

----------------------------------------------------------------------

Minimum Configuration & Startup

To Delete existing configuration data, please use Further Configuration menus

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

* HOSTNAME                                           [a2410bjv]

* Internet ADDRESS (dotted decimal)                  [15.24.48.58]

Network MASK (dotted decimal)                      [255.255.248.0]

* Network INTERFACE                                   en0

NAMESERVER

Internet ADDRESS (dotted decimal)         [15.41.144.101]

DOMAIN Name                               [nsr.hp.com]

Default GATEWAY Address                            [15.24.55.253]

(dotted decimal or symbolic name)

Your CABLE Type                                    N/A              +

START Now                                         no               +

----------------------------------------------------------------------

也可用专用命令设定或修改主机名,操作如下

# smit hostname

在 Hostname 屏幕选择 Set the Hostname 菜单条款。

在 HOSTNAME 域填入新的主机名。

 

2、路由管理

对于今天的局域网来说,与外界的联系必不可少,所以路由及路由管理也是必须的。

(1)增加路由。

为主机增加路由,操作如下:

# smit   mkroute

填写 DESTINATION Address 目标地址和 Default GATEWAY Address 默认网关地址,Destination Type 目标类型可以选择 net 或 host,METRIC 域缺省值 1。

----------------------------------------------------------------------

                               Add Static Route

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

Destination TYPE                                  net              +

* DESTINATION Address                                []

(dotted decimal or symbolic name)

* Default GATEWAY Address                            []

(dotted decimal or symbolic name)

* METRIC (number of hops to destination gateway)     [1]               #

----------------------------------------------------------------------

(2)删除路由

用 SMIT 删除一条路由的操作与增加一条路由很相象。输入如下命令并且在各域填入适当的值即可:

# smit  rmroute

(3)刷新路由表

启动 SMIT :

# smit  fshrttbl

出现如下:

----------------------------------------------------------------------

Flush Routing Table

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

Flush Routing Table in the Current Running System   yes              +

Flush Routing Table in the Configuration Data Base  no               +

(effective in the next system restart)

----------------------------------------------------------------------


如果只想暂时刷新路由表,而保持 ODM 数据库中的路由信息,就接受缺省值。如
果还想要清除 ODM 的路由信息,Flush Routing Table in the Configuration Data Base域选 YES。

 

3、网卡配置

增加新网卡后第一次系统启机时(或作cfgmgr)会自动认出网卡并给予默认配置,故有时必须对网卡配置进行修改甚至删除。

(1)改变网卡的配置

用 SMIT 命令:

# smit  chinet

在 Available Network Interfaces 菜单选择适当的网络接口。按需要做适当的改变。

如果让 BROADCAST ADDRESS 域空白, AIX将基于子网掩模提供一个缺省值。

例子:

----------------------------------------------------------------------

Change / Show a Standard Ethernet Interface

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

[Entry Fields]

Network Interface Name                              en0

INTERNET ADDRESS (dotted decimal)                  [15.24.48.58]

Network MASK (hexadecimal or dotted decimal)       [255.255.248.0]

Current STATE                                     up               +

Use  Address  Resolution  Protocol  ( ARP ) ?                            yes

+

BROADCAST ADDRESS (dotted decimal)                 []

----------------------------------------------------------------------


(2)删除网卡配置

用 SMIT 命令:

# smit  inet

选 Remove a Network Interface 选项。选择适当的网络接口。

注意:SMIT  删除网络接口没有确认提示!

 

4、编辑一些重要文件

(1)编辑/etc/hosts。

可以用 SMIT 操作编辑/etc/hosts 文件或直接使用一个文本编辑器编辑/etc/hosts 文件。用 SMIT 操作如下:

# smit  hostent

----------------------------------------------------------------------

Hosts Table  (/etc/hosts)

Move cursor to desired item and press Enter.

List All Hosts

Add a Host

Change / Show Characteristics of a Host

Remove a Host

----------------------------------------------------------------------

(2)编辑/etc/inetd.conf

使用 SMIT 编辑/etc/inetd.conf 并确认更新 ODM 数据库:

# smit inetdconf

生成:

----------------------------------------------------------------------

inetd Subservers

Move cursor to desired item and press Enter.

List All inetd Subservers

Add an inetd Subserver

Change / Show Characteristics of an inetd Subserver

Remove an inetd Subserver

----------------------------------------------------------------------

用菜单来选择增加或删除/etc/inetd.conf入口并更新ODM。如果用文本编辑器编辑 /etc/inetd.conf 必须用 refresh -s inetd 命令来刷新信息。

(3)编辑/etc/services

使用 SMIT 编辑/etc/services。

# smit  inetserv

生成:

----------------------------------------------------------------------

Services (/etc/services)

Move cursor to desired item and press Enter.

List All Services

Add a Service

Change / Show Characteristics of a Service

Remove a Service

----------------------------------------------------------------------

根据需要按菜单做修改,也可使用一个文本编辑器直接修改/etc/services 文件。

(4)编辑/etc/hosts.equiv

使用 SMIT 修改/etc/hosts.equiv

# smit  hostsequiv

生成:

----------------------------------------------------------------------

Host Access  (/etc/host.equiv)

Move cursor to desired item and press Enter.

List All Remote Hosts

Add a Remote Host

Remove a Remote Host

----------------------------------------------------------------------

根据需要按菜单做修改。也可使用一个文本编辑器直接修改/etc/hosts.equiv 文件。

(5)编辑/etc/ftpusers

编辑/etc/ftpusers,对 ftp 用户做配置。同样有 SMIT  方式或直接修改。

例:

# smit  ftpusers

生成:

----------------------------------------------------------------------

Restrict File Transfer Program Users  (/etc/ftpusers)

Move cursor to desired item and press Enter.

Show All Restricted Users

Add a Restricted User

Remove a Restricted User

----------------------------------------------------------------------

 

(文章来自网络,如有侵权请来信告知,本站将在第一时间删除。)

相关文章 [上一篇] AIX 磁盘和文件系统
010-88589926(88587026)
CUUG热门培训课程
Oracle DBA就业培训
CUUG名师
网络课程
技术沙龙
最新动态

总机:(010)-88589926,88589826,88587026 QQ讨论群:243729577 182441349 邮箱:cuug_bj@cuug.com
通信地址:北京市海淀区紫竹院路98号北京化工大学科技园609室(CUUG)邮政编码:100089 
中国UNIX用户协会 Copyright 2010  ALL Rights Reserved 北京神脑资讯技术有限公司
京ICP备11008061号  京公网安备110108006275号