Users logged in through which NIC

We have two NIC cards in our IBM RS/6000 F50 running AIX 4.3.3

We are trying to make sure we have moved all users to log in through the new NIC.

10.22.x.y (old)
10.22.x.z (new)

How can I tell which users are still using the old address for logging in so I can update their work station to point to the new address? It is a large warehouse with hundreds of users.

Unfortunately, the actual IP address is used from their 286/386 DOS workstation (glorified terminal) in order to connect to the box (it's in the autoexec.bat), so we have to change each workstation.

I know there are too many issues to list with this setup, and DNS would solve most of it, but that is further down the path.

TIA

Why no just assign both addresses to the new NIC?

We are upgrading to a new hardware platform. The idea is to get everyone pointing to the new NIC card, and when we cutover, we just assign the address to the new machine and now everyone is pointing to the new machine.

Problem is, if you're still pointing to the old address, those work stations will be idle come Monday morning.

Are you logging in with telnet or SSH?

If SSH, check for an environment variable called SSH_CONNECTION.

e.g. SSH_CONNECTION='81.92.103.204 2563 212.101.7.123 22'
that is SSH_CONNECTION='{client ip} {client port} {server ip} {server port}'

I'd stick a line in everyone's .profile to append that variable to a file at login. In that way you'll have generated a tab-separated file containing exactly what you want within about a day.

You do
"netstat -pn", it will show each connection as to foreing and a local address.

Hope it helps.

I am not into AIX.
So options and parameters may differ thereon.
But generally netstat should also on an AIX box
show the local IP addresses used by tcp sockets
(e.g. netstat -an)
Maybe the AIX netstat further offers an option to limit to tcp connections like GNU,
as with -t ?
You could combine this with the who command,
or if you have it on AIX, the lsof command (but I doubt it's available there).

You could also force your users on a certain NIC by using some tcp wrapper
for your network login services (e.g. telnet, rlogin etc.)
On Linux xinetd handles this automatically by conf file entries for those services.
Most commercial Unix vendors will offer a tcp wrapper for their OS free of charge
(e.g. HP-UX does)

If your users connect via SSH you could set the ListenAdress directive in
sshd_config to the IP address (viz. NIC) you want your users to connect to
(by default sshd will listen to all local up NICs)