How restart the network interface in AIX?

Hi All,

Please let me know the command to restart the network interface and enable it on boot in AIX, similar to /etc/init.d/network restart in Redhat.

Thanks,
Sunil.K

Hi, you might wanna have a look to

more /etc/rc.net

rc.net - called by cfgmgr during 2nd boot phase.
Configures and starts TCP/IP interfaces.
Sets hostname, default gateway and static routes.

Thanks for the response.
What are the configuration for the updating IP and gateway..

Thanks,
Sunil.K

If you are unsure best to set all the TCP/IP settings using smitty TCP/IP.

Iff you are changing the default gateway on the command line you will need to remove the old default gateway first before adding the new one.

To put an IP address on an interface:

chdev -l en6 -a netaddr=9.9.9.9 -a netmask=255.255.255.0 -a state=up

To add a route to the routing table:

chdev -l inet0 -a route=net,-hopcount,0,-netmask,255.255.255.0,-if,en5,,,,-static,9.9.8.0,9.9.9.1

To remove the same route from the routing table

chdev -l inet0 -a delroute=net,-hopcount,0,-netmask,255.255.255.0,-if,en5,,,,-static,9.9.8.0,9.9.9.1

You can see what the route table should be with:

lsattr -El inet0

Hi,

Thanks for the response..I am actually looking for the files which stores IP and gateway related information ,like in RHEL below files holds the information about IP and gateway.

/etc/sysconfig/network ; config file holds the gateway and domain information
/etc/sysconfig/network-scripts/ifcfg-ethx ;config file holds the information about IP address .

Thanks,
Sunil.K

AIX stores this IP information in the ODM. Using commands like
lsattr -El en0
lsattr -El inet0
this ODM information is displayed.

Lets say, you want to have normal linux-like files holding you're IP info, you have to change the bootup option under the device inet0

bootup_option no Use BSD-style Network Configuration True

regards,Randy

Thanks for the help. Can you please tell the process of changing bootup option for network in detail????

Why do you need or want the ip config files over ODM?
Using ODM is the recommended method because of misstypes etc.

it starts with
#chdev -l inet0 -a bootup_option=yes

and then create the interface files etc. and reboot.

All the networking software is controlled by the SRC (System Resource Controller) and can be stopped and started via it:

lssrc -g tcpip

gives an overview over all daemons and their status in the group "tcpip". To start/stop the whole group or inetd alone:

stopsrc -g tcpip      (stopsrc -g <groupname>)
stopsrc -s inetd      (stopsrc -s <subsystemname>)

startsrc -g tcpip
startsrc -s inetd

You can also restart (groups of) subsystems with the "refresh" command:

refresh -g <groupname>
refresh -s <subsystemname>

I hope this helps.

bakunin

As you can see from all the posts AIX has a very detailed and really quite complex method of managing the TCP/IP settings on an LPAR.

Perhaps if you tell us what the trouble is - or what you are trying to achieve then we'll try to put you right - but these vague questions are best answered by - "Take the AIX course"

cheers
Ross