LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-09-2005, 02:51 PM   #1
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Simple Windows script


Hi everyone,

What would the Windows equivalent be for the following commands?

ifconfig eth0 down && ifconfig eth0 up && /etc/init.d/named restart

Essentially, there is a Windows 2000 server that has two NICs, named "Inside" and "Outside". "Inside" has a static IP, and "Outside" gets an IP via DHCP from an ISP. Whenever it renews its IP address, the routing table gets mucked up. The simplest way to fix it is to disable "Inside" and the re-enable it. Since the DNS service binds to "Inside", that needs to be restarted as well.

TIA.
 
Old 01-09-2005, 08:00 PM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
HEhe, maybe you should be asking this in some MS forum, if there are any, or googling it.
 
Old 01-09-2005, 09:05 PM   #3
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
Not completely sure I understand what you are looking for, but how about this:

ipconfig /release <adapter>
ipconfig /renew <adapter>
 
Old 01-11-2005, 06:28 AM   #4
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by marghorp
HEhe, maybe you should be asking this in some MS forum, if there are any, or googling it.
Well, I have tried other forums, but so far no bites. Googling is a great idea, I always start off by googling when I have a question.

I understood that this forum was not limited to Linux? If I am wrong I will take my silly problem elsewhere, but I hope I am not because there are some really, really smart people here!
 
Old 01-11-2005, 06:34 AM   #5
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by deiussum

ipconfig /renew <adapter>
Thanks for the reply, deissum, but I am not trying to renew my IP address. What I am trying to do is disable the adapter. Once it is disabled, I want to re-enable it. For whatever reason, this fixes the routing table. Finally, after the two previous things are done, I need to restart DNS Server since it is bound to the adapter that I will be disabling. I know that the executable is DNS.EXE, but I simply don't know how to restart it through a script.

Thanks again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Simple script Savahn Programming 2 07-14-2004 05:23 PM
Help on simple script granny Programming 2 02-11-2004 04:02 PM
simple script hso_sof Linux - Software 2 08-25-2003 12:09 PM
Simple C Shell script is not so simple elconde Programming 2 09-16-2001 11:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration