Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-09-2005, 10:39 PM
|
#1
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Rep:
|
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

|
|
|
|
02-09-2005, 10:50 PM
|
#2
|
|
Senior Member
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154
Rep:
|
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.
|
|
|
|
02-09-2005, 11:01 PM
|
#3
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Original Poster
Rep:
|
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
|
|
|
|
02-09-2005, 11:27 PM
|
#4
|
|
Member
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835
Rep:
|
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.)
|
|
|
|
02-09-2005, 11:39 PM
|
#5
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Original Poster
Rep:
|
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?
|
|
|
|
02-09-2005, 11:43 PM
|
#6
|
|
Senior Member
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154
Rep:
|
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...
|
|
|
|
02-09-2005, 11:56 PM
|
#7
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Original Poster
Rep:
|
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... 
|
|
|
|
02-09-2005, 11:57 PM
|
#8
|
|
Red Hat India
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260
Rep:
|
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
|
|
|
|
02-09-2005, 11:59 PM
|
#9
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Original Poster
Rep:
|
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
|
|
|
|
02-10-2005, 12:24 AM
|
#10
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Original Poster
Rep:
|
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.
|
|
|
|
02-10-2005, 12:46 AM
|
#11
|
|
Member
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835
Rep:
|
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!
|
|
|
|
02-10-2005, 12:56 AM
|
#12
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Original Poster
Rep:
|
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
|
|
|
|
02-10-2005, 01:38 AM
|
#13
|
|
Member
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835
Rep:
|
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.)
|
|
|
|
02-10-2005, 01:47 AM
|
#14
|
|
LQ Newbie
Registered: Feb 2005
Location: Madison, WI, USA
Distribution: SuSE, Red Hat
Posts: 22
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:18 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|