Quantcast

Maximum PC

It is currently Sat Nov 29, 2014 2:19 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: Network Program Help
PostPosted: Sat Feb 19, 2005 5:21 pm 
Klamath
Klamath
User avatar

Joined: Wed Oct 20, 2004 12:18 pm
Posts: 240
Location: Transmitting from Alpha Centauri
I am new to programming, but I am very network literite and work in the C# server rooms at HP. I would like to have a tiny program that does nothing but release the IP and then renew it without me having to type anything.

I would also love to have the functionality of viewing the current internet IP along with the LAN.

Any help would be great!


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Sun Feb 20, 2005 2:48 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
SuperCrazySniper wrote:
I would like to have a tiny program that does nothing but release the IP and then renew it without me having to type anything.

How do you propose to do this? Brain waves or something? =)


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Sun Feb 20, 2005 5:27 am 
Klamath
Klamath
User avatar

Joined: Wed Oct 20, 2004 12:18 pm
Posts: 240
Location: Transmitting from Alpha Centauri
Gadget wrote:
SuperCrazySniper wrote:
I would like to have a tiny program that does nothing but release the IP and then renew it without me having to type anything.

How do you propose to do this? Brain waves or something? =)


Could anyone here who has something legit to say help me out? The language could be Basic for all I care! I just need some help.


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Sun Feb 20, 2005 9:13 am 
I'd rather be modding!
I'd rather be modding!
User avatar

Joined: Fri Jun 25, 2004 3:47 pm
Posts: 3731
Location: Las Vegas
SuperCrazySniper wrote:
Gadget wrote:
SuperCrazySniper wrote:
I would like to have a tiny program that does nothing but release the IP and then renew it without me having to type anything.

How do you propose to do this? Brain waves or something? =)


Could anyone here who has something legit to say help me out? The language could be Basic for all I care! I just need some help.


Gadgets point was both a joke and a request.

You don't really give enough info about your vision - and the statement about "not having to type anything" makes it sound like you want it done by magic.

Can you atleast describe a senario?

Manta


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Sun Feb 20, 2005 10:51 am 
Klamath
Klamath
User avatar

Joined: Wed Oct 20, 2004 12:18 pm
Posts: 240
Location: Transmitting from Alpha Centauri
I was on edge this morning and did not take it like he ment it. Sorry about that...

Well...basically, when I am running a network, especially setting one up at a LAN party, the biggest problem I have is when a computer either has no NIC installed (stupid idiots..) or the IP is misconfigured.

The latter is much more frequent and I would like to have a program on a floppy that when run, will release & renew the LAN IP + give the internet IP for viewing. I would like to view the internet IP so I know that the computer is connected to the net.

This programs should be very simple, but since I have no programming experience other than ASP and HTML, my efforts would be fruitless.

Hope this explains a little bit better...


Top
  Profile  
 
 Post subject:
PostPosted: Sun Feb 20, 2005 11:26 am 
In the lab!
In the lab!
User avatar

Joined: Sun Jun 06, 2004 10:47 am
Posts: 831
Location: Secret Laboratory
1) what os we talking about... becuase the procedure would be different for win98 vs xp...

2) if we're talking 2k or xp... then open up a command prompt and take a look at ipconfig

Code:
USAGE:

    ipconfig [/? | /all | /renew [adapter] | /release [adapter] |
              /flushdns | /displaydns | /registerdns |
              /showclassid adapter |
              /setclassid adapter [classid] ]

where

    adapter         Connection name
                   (wildcard characters * and ? allowed, see examples)

    Options:

       /?           Display this help message
       /all         Display full configuration information.
       /release     Release the IP address for the specified adapter.
       /renew       Renew the IP address for the specified adapter.
       /flushdns    Purges the DNS Resolver cache.
       /registerdns Refreshes all DHCP leases and re-registers DNS names
       /displaydns  Display the contents of the DNS Resolver Cache.
       /showclassid Displays all the dhcp class IDs allowed for adapter.
       /setclassid  Modifies the dhcp class id. 

The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address leases for all adapters bound to TCP/IP will be released or renewed.

For Setclassid, if no ClassId is specified, then the ClassId is removed.

Examples:
    > ipconfig                   ... Show information.
    > ipconfig /all              ... Show detailed information
    > ipconfig /renew            ... renew all adapters
    > ipconfig /renew EL*        ... renew any connection that has its
                                     name starting with EL
    > ipconfig /release *Con*    ... release all matching connections,
                                     eg. "Local Area Connection 1" or
                                         "Local Area Connection 2"


I mean it's no automated program but really is it that hard to type a few words?


Top
  Profile  
 
 Post subject:
PostPosted: Sun Feb 20, 2005 11:39 am 
Klamath
Klamath
User avatar

Joined: Wed Oct 20, 2004 12:18 pm
Posts: 240
Location: Transmitting from Alpha Centauri
I know what to do, but this would be the building block program for soemthing more complex. I am currently planning a very simple program that will trace routed packets, run ipconfig release/renew, view internet IP, etc. This could all be done from a floppy!

The ipconfig thing I am trying to do now is the first of several features I plan to add in at a later time. I am putting my pinky toe in the water to test it and see how this all works out.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Feb 20, 2005 3:35 pm 
I'd rather be modding!
I'd rather be modding!
User avatar

Joined: Fri Jun 25, 2004 3:47 pm
Posts: 3731
Location: Las Vegas
SuperCrazySniper wrote:
I know what to do, but this would be the building block program for soemthing more complex. I am currently planning a very simple program that will trace routed packets, run ipconfig release/renew, view internet IP, etc. This could all be done from a floppy!

The ipconfig thing I am trying to do now is the first of several features I plan to add in at a later time. I am putting my pinky toe in the water to test it and see how this all works out.


Maybe a batchfile will do it.

In python there is no "easy" way. Though its an interesting problem.

there may be a Java or C solution - not my current rhelm - sorry.

Manta


Top
  Profile  
 
 Post subject:
PostPosted: Sun Feb 20, 2005 8:06 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
MantaBase wrote:
Maybe a batchfile will do it.


Your best bet is the batch file, just have it set so that it does ipconfig /renew everytime you reboot.


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Sun Feb 20, 2005 8:09 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
SuperCrazySniper wrote:
I was on edge this morning and did not take it like he ment it. Sorry about that...

Well...basically, when I am running a network, especially setting one up at a LAN party, the biggest problem I have is when a computer either has no NIC installed (stupid idiots..) or the IP is misconfigured.

The latter is much more frequent and I would like to have a program on a floppy that when run, will release & renew the LAN IP + give the internet IP for viewing. I would like to view the internet IP so I know that the computer is connected to the net.

This programs should be very simple, but since I have no programming experience other than ASP and HTML, my efforts would be fruitless.

Hope this explains a little bit better...


Why not just use a DHCP server? It's a lot easier and you can set your clients to automatically request an IP. From what your needs tell me, you need a DHCP server managing IP's than a program that will renew your IP's for you. Besides, you can't renew IP's unless you have a DHCP server, otherwise, the machine will assume that it's a static IP - BTW, that's true for all systems and not just windows.


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Mon Feb 21, 2005 3:52 pm 
Klamath
Klamath
User avatar

Joined: Wed Oct 20, 2004 12:18 pm
Posts: 240
Location: Transmitting from Alpha Centauri
DJSPIN80 wrote:
SuperCrazySniper wrote:
I was on edge this morning and did not take it like he ment it. Sorry about that...

Well...basically, when I am running a network, especially setting one up at a LAN party, the biggest problem I have is when a computer either has no NIC installed (stupid idiots..) or the IP is misconfigured.

The latter is much more frequent and I would like to have a program on a floppy that when run, will release & renew the LAN IP + give the internet IP for viewing. I would like to view the internet IP so I know that the computer is connected to the net.

This programs should be very simple, but since I have no programming experience other than ASP and HTML, my efforts would be fruitless.

Hope this explains a little bit better...


Why not just use a DHCP server? It's a lot easier and you can set your clients to automatically request an IP. From what your needs tell me, you need a DHCP server managing IP's than a program that will renew your IP's for you. Besides, you can't renew IP's unless you have a DHCP server, otherwise, the machine will assume that it's a static IP - BTW, that's true for all systems and not just windows.


I understand this and I have a router assigning IP addresses. Sometimes though, Windows does not want to renew correctly and therefore makes a fuss and keeps my friends from getting on the network.

This programs will delete the current IP and give it a new one, also showing me the internet IP so I know they are on the internet.


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Mon Feb 21, 2005 5:58 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
SuperCrazySniper wrote:
This programs will delete the current IP and give it a new one, also showing me the internet IP so I know they are on the internet.


I'm sure that you can set the lease time on your router to be a short one. Also, if your router can assign the IP's, then let it do its job - writing a program that will do, in essence, what your router will do is a total waste of time - everyones time, including yours.

If you're really that adamant, just use a batch script and put it on your startup folder. Do something like:

Code:
ipconfig /renew
ipconfig /all > outputFile.txt
outputFile.txt


This way, when the machine is booted or rebooted, it gets an IP from the DHCP server, calls IPCONFIG and displays the result which is piped to a text file called outputFile.txt and then you open the outputFile.txt onto Windows using Notepad (since .txt files automatically associate itself with Notepad).


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Mon Feb 21, 2005 10:53 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
MantaBase wrote:
SuperCrazySniper wrote:
Gadget wrote:
SuperCrazySniper wrote:
I would like to have a tiny program that does nothing but release the IP and then renew it without me having to type anything.

How do you propose to do this? Brain waves or something? =)


Could anyone here who has something legit to say help me out? The language could be Basic for all I care! I just need some help.


Gadgets point was both a joke and a request.

You don't really give enough info about your vision - and the statement about "not having to type anything" makes it sound like you want it done by magic.

Can you atleast describe a senario?

Manta

Maybe I should bold the smilie next time. ;)


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Mon Feb 21, 2005 11:02 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
SuperCrazySniper wrote:
Well...basically, when I am running a network, especially setting one up at a LAN party, the biggest problem I have is when a computer either has no NIC installed (stupid idiots..) or the IP is misconfigured.

The latter is much more frequent and I would like to have a program on a floppy that when run, will release & renew the LAN IP + give the internet IP for viewing. I would like to view the internet IP so I know that the computer is connected to the net.

A batch file is probably the easiest way to semi-automate the process you're describing, however, by the time you open the cmd window, type a: and myfile.bat, you really haven't saved any time over a simple ipconfig /renew_all have you?

Now if you were going to do something slightly more abitious like an auto-run cdrom that tries to diagnose / correct network problems and if everythignis fine then ties into a J2EE server or something which checks for and auto-magically downloads the latest patches and maps, I would say you might have something worth implementing.

I feel your pain though. Anyone who has setup a lan party knows this trouble you're describing. In the meantime, probably the best thing you can do is create some good documentation - help them help themselves.


Top
  Profile  
 
 Post subject: Re: Network Program Help
PostPosted: Tue Feb 22, 2005 5:27 am 
Klamath
Klamath
User avatar

Joined: Wed Oct 20, 2004 12:18 pm
Posts: 240
Location: Transmitting from Alpha Centauri
Gadget wrote:
SuperCrazySniper wrote:
Well...basically, when I am running a network, especially setting one up at a LAN party, the biggest problem I have is when a computer either has no NIC installed (stupid idiots..) or the IP is misconfigured.

The latter is much more frequent and I would like to have a program on a floppy that when run, will release & renew the LAN IP + give the internet IP for viewing. I would like to view the internet IP so I know that the computer is connected to the net.

A batch file is probably the easiest way to semi-automate the process you're describing, however, by the time you open the cmd window, type a: and myfile.bat, you really haven't saved any time over a simple ipconfig /renew_all have you?

Now if you were going to do something slightly more abitious like an auto-run cdrom that tries to diagnose / correct network problems and if everythignis fine then ties into a J2EE server or something which checks for and auto-magically downloads the latest patches and maps, I would say you might have something worth implementing.

I feel your pain though. Anyone who has setup a lan party knows this trouble you're describing. In the meantime, probably the best thing you can do is create some good documentation - help them help themselves.


I finally gave in a created an online help thing non my web site. I will post this in the network section so that others may benefit also. Thanks again everyone!

http://www.lanpartyhome.com/networksetup.html

I especially had fun doing the Visio drawing.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Feb 23, 2005 11:50 am 
Team Member Top 100
Team Member Top 100

Joined: Fri Sep 17, 2004 5:35 pm
Posts: 1176
Look up sockets. You can try to connect to whatismyip.com and if it works, parse the output and spit out the IP address. For releasing/renewing the IP, I'm afraid that's driver-dependent (not sure), which means there's no good way of doing it.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Feb 23, 2005 4:56 pm 
I'd rather be modding!
I'd rather be modding!
User avatar

Joined: Fri Jun 25, 2004 3:47 pm
Posts: 3731
Location: Las Vegas
Kybo_Ren wrote:
Look up sockets. You can try to connect to whatismyip.com and if it works, parse the output and spit out the IP address. For releasing/renewing the IP, I'm afraid that's driver-dependent (not sure), which means there's no good way of doing it.


I looked up the socket module in Python. You could do - but what a pain in the ass - you would have to be a deep network-socket-port pro.

A batch file on a floppy or piffed to a desktop icon would work :)

Manta


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.