Automated script to assign TCP/IP settings automatically after unintentionally unplug
Yesterday i had a situation that cause me headache for a while , I have a web server running win2k3 it has 2 NIC's
one of them assigned to public area network
and the other is not functioning
The place where the server is ,
is messy and cables on the floor so any one can stumble with
cables on the floor and indeed it happened somebody stumbled with the cable and unplugged it form the functioning NIC adapter when s/he returned the cable s/he didn't return it to the right functioning NIC adapter by the way both NIC are enabled
So i made a little trip to place where the server is and begun to do some troubleshooting if you can visualize the situation the unfunction NIC is enabled and it has private ip address so the the icons of connectivity are blinking so i didn't gave care to troubleshoot connectivity after a period i noticed that cable is plugged into the unfunction NIC
so i decided to write a tiny script to handle the situation if someone unplugged the cable and put it and in the unfunction NIC
a college of mine said you could simply assign the other NIC with same TCP/IP settings and he is right and yes its legal to assign same TCP/IP settings to different NIC but it must be disconnected i can do it and make my life much more easier but i decided to automate the process
and write batch script using netsh and automate it as cron job that's all
sorry for long
um. this is a unix forum. dont you think it might be better to ask windows people about this issue?
Thank for response
but its not an issue it's just a tip for automating ip settings and posted it here because the forum is related to networking in general.
Hi,
I need a script to execute below task. As of now I am doing it manually and want it automated.
1)go to below path
cd /path/of/file
check for the availibility of two file as below of the latest date.
test.week1.data
test.week2.data
Case1. If above files are not present... (3 Replies)
show /HOST command shows that
status = OpenBoot Running
when in this state, can the power be unplugged from the server ?
we are unable to bring the status to "powered off". Even if we issue "stop /SYS" it will momentarily be in the powered off status and then go back to power on... (1 Reply)
if i have a script called test.sh
file1=$(ls -l|awk '{print $9 $1}')
awk ' /date_of_selling:/ { print $6 ":" &9 }' /$file1 >> data.txt
if i wanna this script to run automatically every day at 8 am :D (3 Replies)
I have solaris 9 system.
I want to change the "tcp_conn_req_max_q" setting in /etc/system.
whats the correct way,
set ndd:tcp_conn_req_max_q=2048
or
set tcp:tcp_conn_req_max_q=2048
thanks (1 Reply)
Hello,
I am scripting noob but I need little monitoring script.
It will be very good if you can help me.
What I need:
Script will login via ssh to another machine (ssh -l user ipadress), make top command and log first row + machine ip. It should monitor like 10 machines.
Script should run... (1 Reply)
I'm totally new to shell scripting and I would like to ask your help
1.i want to have a .sh script where it runs opening 2 applications one after another
2.i have 2 applications in
/applications/app1
/applications/app2
3. want this script to launch app1 for 20 seconds and get killed... (2 Replies)
Hi ALL:
I need to write a script that will start bunch of servers. and these servers each has a sudo account and they need a passowrd.
I dont know where to start and look.
Can you please give me some hints or some sample code.
Thanks in advance.
splax (4 Replies)