Checking LB status.. stuck in script syntax of code

#!/bin/ksh
#This script will check status of load balancer in AIX servers from hopbox
#Steps to do as folows :
#Login to server
#netstat -ani | grep <IP>
#check if the output contains either lo0 OR en0
#if the above condition matches, validation looks good
#else, send an email with impacted server names
file="/export/home/vinil/scripts/LB_check/server.txt"
while read line
do
ssh -t -t <IP_address_of_server>|v1=`netstat -ani|grep $IP|awk '{print $1}`;
if [ v1 -eq lo0 -o v1 -eq en0 ]; then
echo $v1
echo  LB is running on host $host>>log.txt;
else
echo "LB is not working ">>log.txt ;
fi
done <$file

The highlighted line is not working as expected. Please correct and let me know any modifications needed.
Thanks

Well you can help including the error message you get rather expecting us to guess

quote is missing

netstat -ani|grep $IP|awk '{print $1}'`;

ssh -t -t $IP|v1=`netstat -ani|grep $IP_2|awk '{print $1}'`;

the issue is this is not running at all. While debugging, it is giving same result upon changing the value to be grep

can you try to split below line

ssh -t -t $IP|v1=`netstat -ani|grep $IP_2|awk '{print $1}`;

to

ssh -t -t $IP
v1=`netstat -ani|grep $IP_2|awk '{print $1}'`

Also could you please let us know from where you will be getting values for $IP_2 & $IP

I will try this for you and post the update. Meanwhile, please note that the variable mentioned ($IP and $IP_2)are different server names used in production for client.I have already defined their values in script.

ssh -q <server_name>| netstat -ani | grep -i <IP> | awk '{print $1}' 

Failed again. Can some one correct me or provide me better code that can check particular on specific server and print if the IP is associated with lo0 or en0 (these are LB components )
Thanks

---------- Post updated 04-21-14 at 10:46 AM ---------- Previous update was 04-20-14 at 04:31 PM ----------

ssh -t -t <server_name> netstat -ani | grep -i <IP> | awk '{print $1}'

the above works as expected but failed to complete the loop of reading input file having list of servers one per line. Any help appreciated

You need -n option for ssh

ssh -n -x <server_name> netstat -ani | grep -i <IP> | awk '{print $1}'