LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-09-2005, 10:39 PM   #1
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Rep: Reputation: 15
Question I want static IP, but have to use DHCP (preffered/desired address)


The question is simple!
My provider (Charter Communications) is using cable modems and runs DHCP obviously. While ago I have been granted access to a forum by my IP address, because it was always the same (my computer ran 24/7). Then I put linux on it and of course got new IP, so I don't have access to that forum any more .
Does some body know where in linux desired/last/preferred address stored, so I would edit it, and try to get it of DHCP after reboot?
Or may be as a solution some kind of DHCP packet spooffer, so I can put static IP and spoof DHCP requests and responses


Any help deeply appreciated
 
Old 02-09-2005, 10:50 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
let me save you some trouble... you won't get a static ip from your cable provider without paying for it.

whatever forum grants access via IP is not catering to the general public, and has a downright ignorant access verification system.

ISPs tend to offer static IP addresses with an increased service fee.


(it wasn't linux's fault your IP rolled... it was meerly a matter of time)

Last edited by secesh; 02-09-2005 at 10:51 PM.
 
Old 02-09-2005, 11:01 PM   #3
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Original Poster
Rep: Reputation: 15
No, no, I am not saying that it was a linux fault. I know how DHCP works, so I guessed, that I can try to get my IP via DHCP in this way. In windows, if you set your NIC to static IP and then enable it back to DHCP, it will first try to get that static IP via DHCP. In linux I just don't know how exactly to do this
 
Old 02-09-2005, 11:27 PM   #4
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
ifconfig eth0 55.68.16.46

For example. This will tell linux to temporarily use this ip address.
I don't expect your ISP will honor it though.

(eth0 is normally the first ethernet connection. You can get more info by running ifconfig with no arguments. Ignore 'lo', it is the loopback device.)
 
Old 02-09-2005, 11:39 PM   #5
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Original Poster
Rep: Reputation: 15
Yes, I tryed that one, setted it to static IP first, and then back to DHCP, and I still get the previous IP that I got via DHCP before. Well, I understand, that it might be assigned already, and that I cannot ping it means nothing.
There is a file in my /etc/sysconfig/network called eth-00:04......and so on my MAC, and in this file I have

BOOTPROTO=dhcp
_nm_name=bus-pci-0000:00:09.0
REMOTE_IPADDR=""
MTU=""
NETMASK=255.255.254.0
UNIQUE=WL76.IH1TcNNtXe0
BROADCAST=24.XXX.XXX.255
IPADDR=""
STARTMODE=onboot
NETWORK=""
USERCONTROL=no

What does IPADDR used for?
Is this file dynamically created each time?
 
Old 02-09-2005, 11:43 PM   #6
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
http://howtos.linux.com/guides/solrh...ap9sec90.shtml

generally used whith bootproto=static, i can't say what effect (if any) it might have on dhcp... couldn't pull a reference on that within <2mins either...
 
Old 02-09-2005, 11:56 PM   #7
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Original Poster
Rep: Reputation: 15
I don't have these particular files in my /etc/sysconfig/network/scripts
I have ifup-ppp, ifup-autoip and so on, but in /etc/sysconfig/network I have the above mentioned file, that probaly serves the same purpose, so I'll try to put my desired address in that IPADDR field...
 
Old 02-09-2005, 11:57 PM   #8
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 34
hi,
open /etc/sysconfig/network-scripts/ifcfg-eth0 and add the following
BOOTPROTO=static
IPADDR= ur ip
save the file and restart network service.
the command 'ifcfg eth0 x.x.x.x ' wont work. u will get ur static ip. or execute 'netconfig', enter ur ip,netmask,gateway...etc and exit.restart network service. happy networking
 
Old 02-09-2005, 11:59 PM   #9
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Original Poster
Rep: Reputation: 15
Yeah, It work for me like that for a while, but then, I think the lease just expired and I lost connectivity, so I had to use DHCP. Like it was said before, ISP will probably not honor that
 
Old 02-10-2005, 12:24 AM   #10
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Original Poster
Rep: Reputation: 15
I tryed the following

1. edited the file ifcfg-eth-00:04..... that responds to my "outlooking" connection and left everything the same as in above quote, but put IPADDR=24.XXX.XXX.XXX (my desired IP)

2. #ifconfig eth1 down
3. #ifconfig eth1 up
4. #ifconfig eth1
showed that I still have my previous IP, but I totally lost connectivity ot the Internet
so I edited evetything back and restarted the interface, still no connectivity until I restarted the machine

It looks like I do not understand something, but I want back to that forum

Last edited by homa2001; 02-10-2005 at 12:27 AM.
 
Old 02-10-2005, 12:46 AM   #11
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
How did you get into the forum in the first place?
Was it free, or did you need to pay for it?

If it was free, then why not just register again?

If it wasn't free, then they probably don't track usage by IP address.
If they do, then I wouldn't use that forum!
 
Old 02-10-2005, 12:56 AM   #12
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Original Poster
Rep: Reputation: 15
It is free, but they filter by IP, I guess, so foreiners cannot post, but can read though. I am from the city, that that forum belongs to, but moved to a different country, so I don't have access anymore. I wrote to the admin of that forum with requetst to open access for me, and he did, but he does not respond to my request now , and probably will not. So the only way to get access again is to get back that particular IP or use one of their proxies, but I don't want to do so. But the forum is not the concern right now. Right now it is like a challenge for me to get that IP. And to gain more experience with linux at the same time. Forum is just a pleasant addition to that, cause I still can post there from school as they hava a static IP, and he granted access from there as well
 
Old 02-10-2005, 01:38 AM   #13
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Interesting... Ok.

Wish I could help more. I'm not sure much more can be done.

One thing to watch out for though. Your ISP definitely will not assign you that address if someone else is using it. Before you make your next attempts, you may want to ping/traceroute the address to see if you can tell if it is currently assigned (A returned ping means "No". Lack of a ping return means nothing.)
 
Old 02-10-2005, 01:47 AM   #14
homa2001
LQ Newbie
 
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22

Original Poster
Rep: Reputation: 15
I tryed that, and I recieved destination ureachble, but its MAC is in my ARP table (we are on the same subnet), so that means, that somebody is having it
, but they will release it some day, so any guesses how can you ask DHCP for a specific address first?

Last edited by homa2001; 02-10-2005 at 02:58 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I disable DHCP now I am using static address? rosco136 Linux - Networking 4 08-01-2005 02:53 AM
Static IP Address with DHCP server control taylortbb Linux - Networking 1 06-28-2005 01:43 PM
Eth0 set up for Static, obtaining DHCP address?! IndustrialGeek Linux - Networking 2 01-03-2005 12:39 AM
computer switches from static to dhcp address (automagically?) cyberpuerka Linux - Networking 1 09-03-2004 11:29 AM
Static address works but DHCP doesn't... devahl Linux - Networking 1 05-03-2004 04:55 PM


All times are GMT -5. The time now is 09:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration