LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-08-2003, 11:05 AM   #1
herron
LQ Newbie
 
Registered: Apr 2003
Posts: 4

Rep: Reputation: 0
static ip machine attached to dhcp router? will this work?


I have a linksys wireless router attached to my office's internet connection. The router runs a dhcp server so that wireless laptops can use it to connect to the internet. But, I have a linux workstation that I want to give a static ip (eg 192.168.1.100) so that the router can forward a few ports to this machine (e.g. 22/tcp so that I can ssh to the workstation when not in my office).

Right now I configured the workstation so that it is 1.100 as above. But when I came into my office this morning ifconfig said that the machine was 1.103. In fact, the machine had lost its internet connection. So, I re-started networking and all was fine. Now, ifconfig says that the machine is 1.100 again.

But, I am wondering if this is going to be a problem everyday. Why was my workstation adaptor confused about its true identity? Can I tell the adaptor to ignore dynamic IPs if the router tries to give it one?

Thanks,

Michael
 
Old 04-08-2003, 01:37 PM   #2
aherm
Member
 
Registered: Jan 2003
Location: upNorth
Distribution: openSuSE/uBuntu
Posts: 410

Rep: Reputation: 30
Obviously your linux workstation is setup with dhcp. With dhcp enabled it will grab any IP address (e.g. 192.168.1.100) signed by the router i.e. the dhcp server. When this signed IP address leased time expires it will ask again a different IP address and in that case the router give 192.168.1.103. If you connect your notebook, and because your notebook setup is also using dhcp it will ask any IP from the router, can be 192.168.1.100 ... 192.168.1.254 but not 192.168.1.103 as it grabbed by the workstation.

Don't use dhcp if you want to have a static address on the workstation. Will it work? I don't know. I mean it depends. And sombody may help you to make it works ;-)


Have a lot of fun :-)
 
Old 04-08-2003, 01:46 PM   #3
herron
LQ Newbie
 
Registered: Apr 2003
Posts: 4

Original Poster
Rep: Reputation: 0
I was unclear here...

My workstation does not use dhcp to get an IP address. I configured it to have the static IP 192.168.1.100. The router assigns addresses to wireless users starting at 192.168.1.200.

Right now, the workstation is doing fine. But, sometimes it seems to get confused and eth0 thinks it has an IP address of 1.200 or 1.201 etc. My question is, how can I prevent this? ie, how can I use a workstation with a static IP on a router that runs a dhcp server?

michael
 
Old 04-08-2003, 02:21 PM   #4
Loser Pants
LQ Newbie
 
Registered: Mar 2003
Posts: 3

Rep: Reputation: 0
I'm haveig the same problem. I want my linux box to keep a static IP so I can forward a couple of ports to it. I read on theese forums about how to manually give a static IP, which I don't know if it is the right way to do it, the rest of my network can not acess my router. Can you have 1 static IP and multiple DHCP assigned IP's on the same network segment?
 
Old 04-08-2003, 02:29 PM   #5
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
I am not familiar with home routers, but have set up dchp a couple of time. Is there a way to configure your router, like though your web browser? I think I remeber reading that Linksys routers can be configured by using a web browser. If so and you can configure dhcp, then there are a couple of options.

1. Is to turn off dhcp. I don't recomend using it un less there are 10 to 15 or more node and the lan.

2. You could set up a reservation so that your MAC of the nic on the laptop always get assigned the same ip address or setup it up to exclude the 5 or 10 numbers so that you could use statice ips for server (if you have any).

If you can config the router, you might want to think about setting up some custom rules. I never trust a factroy setting.
 
Old 04-08-2003, 05:19 PM   #6
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
Let me to clarify the terms:
1. static ip is ip set at computer box
2. dynamic ip is the ip send to the box on its request and can be:
a. constant (same each time for box)
b. non-constant

Case 1 - can be applied at computer at any time
Case 2a. - require proper dhcp server (in your case the router) configuration on MAC addres base
 
Old 04-16-2003, 06:43 PM   #7
deckmoney
LQ Newbie
 
Registered: Apr 2003
Distribution: Mandrake 9.1
Posts: 20

Rep: Reputation: 0
Normally SOHO routers have an option to reserve certain IP addresses. For instance, my router (NetGear) allows me to assign IP addresses to certain MAC addresses). You should have no problem using a static IP address with your router as long as you fill in the correct settings, and the IP address isn't in use already. I run this setup great, as I too use port forwarding.

<security rant>
I would highly recommend you modify your wireless settings so the user doesn't automatically receive an IP address. Basically home routers have 4 ways to prevent unauthorized use: WEP key, SSID, MAC address filtering, and turning off DHCP. WEP keys can be broken in time, and we all know that SSID's (even "non-broadcast" SSIDs) can be discovered. You should filter the MAC addresses so it makes it that much harder for someone to use your network (they can be stolen from packet headers). Disabling DHCP makes it harder for the casual passerby to access your network.
</rant>
 
Old 04-16-2003, 06:52 PM   #8
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
i believe in the linksys you can give an IP to a certain computer based on its MAC address. Check that out though in advance setup options of the router. If the router lets you do that then that solves all of your problems..... like tangle said a couple posts ago.
 
  


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
Printer(attached to windows machine) configuration RohanShrivastav SUSE / openSUSE 1 06-07-2005 08:09 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
DSL via router: DHCP or static IP? Sinope Linux - Newbie 5 08-08-2004 04:18 PM
DHCP server problems -- can't get my box to work as a router KingofBLASH Linux - Networking 1 03-21-2004 06:19 AM
RH9 / DHCP Doesn't Work / Static Does mfriedkin Linux - Wireless Networking 1 02-06-2004 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:16 PM.

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