Sponsored Content
Operating Systems AIX How to clear IP address on AIX? Post 302356890 by ravager on Monday 28th of September 2009 05:55:26 AM
Old 09-28-2009
This will allow you to check all network settings on your system


Code:
#!/bin/ksh 
#for i in `lsdev -Cc if |grep en |awk '{print $1}'`
for i in  0 1 2 3 4 5 6 7 8 9 ; do
     ifdev=`lsdev -C |grep ent${i} |nawk -F ent '{print $2}'|awk '{print $1}'`
     if  [[ ${i} = ${ifdev} ]] ; then 
          tput smso 
          echo "  en$i  ent$i   "
          tput rmso 
          lscfg  |grep ent${i} |nawk -F "        " '{print $1 "\t" $3 " " $4 }'
          netstat -v en$i |egrep -i "Device Type:|media|Number of adapters:|ETHERNET STATISTICS"
          lsattr -El en$i |egrep "netaddr       |mtu |Status"|nawk -F " " '{print $1 " " $2 }'|grep -v remmtu
     else 
          echo " No device existing for ent$i "
     fi
done


Last edited by bakunin; 09-28-2009 at 07:07 AM.. Reason: i have taken the freedom of adding code-tags for the code and some indentation too.
 

10 More Discussions You Might Find Interesting

1. AIX

Setting Dual Ip address on LPAR AIX 5.3

Hi Guys, Can somebody help me how to add and activate addtional ip address on AIX. My server is IBM p5-570 i already set ipadress on ent1 ent0 -- 192.168.206.105 ( default ) ent1 -- 192.168.0.89 (additional) i can ping from outside to 192.168.0.89 but i can not telnet or ftp. for... (6 Replies)
Discussion started by: cahyo3074
6 Replies

2. AIX

AIX:Command to get netaddress/subnet address command in IPv4/IP6

AIX:Command to get netaddress/subnet address command in IPv4/IP6 Can anybody help us with a command to retrieve netaddress/subnet address command in IPv4/IP6 on aix machine. net/subnet address is in the format 172.16.212.0(signifies all 255 machines in an IPv4 network) (2 Replies)
Discussion started by: rookie8278
2 Replies

3. AIX

how to send a file from aix to a email address?

how to send a file from aix to a email address? such as xxx@yahoo.com? (2 Replies)
Discussion started by: rainbow_bean
2 Replies

4. AIX

My AIX 5.3 update userPassword in clear on LDAP

I'm running OpenLDAP 2.3.43 in a linux Host. I have a AIX 5.3 TL9 as client. All works fine with client authentification, information reading in LDAP server and all the stuff. The only problem is : when I run passwd with an LDAP user it updates password (userPassword) with clear text. ... (0 Replies)
Discussion started by: puppetmaster
0 Replies

5. AIX

Problem with IP address when restarting AIX

Hi! I have useud SMIT to configured my static adress for AIX but when I restart the AIX the ipadress is not shown when I print netstat -in or ifconfig -a. I have to configure the ip whit smit to have it start! How can I starting the ip during boot? (6 Replies)
Discussion started by: peter.olofsson
6 Replies

6. AIX

From address of an email from AIX server

My application resides on an AIX server and sends out emails when a job is completed, and a report ready to be picked up. However the from address of the email seems to have our test server's name, instead of the production server. In reality the mail is coming from the production server only. I... (5 Replies)
Discussion started by: ggayathri
5 Replies

7. AIX

Help with clear printer queue script in AIX 5.3

Good day UNIX forum, could you help me with my clear printer queue script, i have problems with the consistency of this function, sometimes it works sometimes it doesn't. Thanks in advance } preRemovePrintQ(){ clear; echo; echo... (1 Reply)
Discussion started by: beware187
1 Replies

8. AIX

AIX How to exchange hostname and IP address between two AIX servers?

Hi all, I am trying to exchange hostname and IP address of two AIX machines. But i am confused as how to change it ? do i need to use "smitty mktcpip" or "smitty tcpip" ? what is the difference between smitty mktcpip and smitty tcpip ? Also anymore steps to follow or just updating... (3 Replies)
Discussion started by: lramsb4u
3 Replies

9. AIX

Production Issue in AIX Oracle RAC [errpt output : DUPLICATE IP ADDRESS DETECTED IN THE NET]

1)We have 2 node cluster RAC on AIX: ->test1 ->test3 2) After rebooting server both the node sequentailly, we are getting below error from errpt command : # errpt |more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION FE2DEE00 0901223914 P S SYSXAIXIF DUPLICATE IP ADDRESS... (2 Replies)
Discussion started by: manjusharma128
2 Replies

10. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies
LO(4)							   BSD Kernel Interfaces Manual 						     LO(4)

NAME
lo -- software loopback network interface SYNOPSIS
pseudo-device loop DESCRIPTION
The loop interface is a software loopback mechanism which may be used for performance analysis, software testing, and/or local communication. As with other network interfaces, the loopback interface must have network addresses assigned for each address family with which it is to be used. These addresses may be set or changed with the SIOCSIFADDR ioctl(2). The loopback interface should be the last interface configured, as protocols may use the order of configuration as an indication of priority. The loopback should never be configured first unless no hard- ware interfaces exist. DIAGNOSTICS
lo%d: can't handle af%d. The interface was handed a message with addresses formatted in an unsuitable address family; the packet was dropped. SEE ALSO
intro(4), inet(4), ns(4) HISTORY
The lo device appeared in 4.2BSD. BUGS
Previous versions of the system enabled the loopback interface automatically, using a nonstandard Internet address (127.1). Use of that address is now discouraged; a reserved host address for the local network should be used instead. 4.2 Berkeley Distribution June 5, 1993 4.2 Berkeley Distribution
All times are GMT -4. The time now is 12:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy