PDA

View Full Version : ipconfig = ifconfig, ok. /release = ???



xave
05-18-2004, 02:06 PM
Bonjour,

My Internet Connection is through a cable modem. I know that to switch from Windows to Knoppix, I have to IPConfig /Release before leaving Windows.

Can anyone can help me to release the adrress from within Knoppix to switch back to Windows ?


(beside, does anyone has an idea about how to release the ip in my modem when neither Knoppix nor Windows have the lease ?)

IsaacKuo
05-18-2004, 04:00 PM
I don't know, but one possible solution is to use a hardware router/firewall. This device will use DHCP to get its address through the cable modem, and then route things so that the computer(s) behind it can use local addresses. Locally, it will be its own DHCP server so your computer can get automatically generated local addresses (with no limit), or you can use static IPs if you want.

This piece of hardware costs money, of course, but IMHO it's worth the extra security. Basically, the router acts as a shield, preventing incoming packets to even hit the computer unless they were specifically requested. As an extra bonus, you can attach more than one computer or a videogame system or whatever.

OErjan
05-18-2004, 07:53 PM
pump -r eth0 should do it.
in slackware i is dhcpcd -k eth0.

xave
05-18-2004, 08:52 PM
Thanks, I'll try that.

(and btw, if you're to make a google search on man pump, do it on google.com/linux rather than simply google.com, or be prepared for profanity ! :) )

mzilikazi
05-19-2004, 12:52 AM
Bonjour,

My Internet Connection is through a cable modem. I know that to switch from Windows to Knoppix, I have to IPConfig /Release before leaving Windows.

Really? That's weird.

Another way to answer to your question would be:
ifconfig eth0 down


(beside, does anyone has an idea about how to release the ip in my modem when neither Knoppix nor Windows have the lease ?)

Ummm disconnect it? Your modem *should* hand out i.p. addresses automatically and I have not yet heard of anyone having to release an i.p. before changing OS's. Of course there's a first time for everything. :)

It's been my experience that often times a cable modem will give the same i.p. based on your MAC address.

xave
05-19-2004, 06:10 AM
Ummm disconnect it? Your modem *should* hand out i.p. addresses automatically and I have not yet heard of anyone having to release an i.p. before changing OS's. Of course there's a first time for everything. :)

From my searches in the forum, it appears that I am not the first to have this problem when switching from Windows to Knoppix, even if I found no references to the other way round.

Sadly, I tried but Knoppix hanged at first boot, leaving the IP leased and me unable to dhcp a new one before my (old) modem self releases the address, ie. a couple of hours later, no matter if I switch it off or not.

I try to keep this kind of tests to the minimum, as I am not willing to jeopardize couples of hours of Net access.


What bugs me is that there must be a way : If Windows freezes, I can boot up in Windows and it just gives me my IP back, but I cannot boot in Knoppix and have this address. If Knoppix freezes, neither Knoppix nor Windows will give me back the addresse before the end of my modem's lease.

user unknown
05-19-2004, 07:47 AM
Do you think, you could reuse the ip?
Then you could write a script.

In windows you call ifconfig >C:\last_ip.txt
I don't know how to invoke this automatically on shutdown - is this possible in Windows?

In linux, you retrieve it by


cat /mnt/c/last_ip.txt | grep P-z-P | sed 's/.*Adresse:\([0-9\.]*\) .*/\1/g'

Since my linux is localized to german, the grep pattern might be P-t-P and in the sed it might be 'address' for you.

You could look for the timestamp to see if the file is recent, and delete it after usage.

But I don't know how to tell your ppp to use this adress - my dhcp works perfectly.