Static IP | Unix Linux Forums | IP Networking

  Go Back    


IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum.

Static IP

IP Networking


Tags
linux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-17-2003
google's Avatar
google google is offline Forum Advisor  
Advisor
 
Join Date: Jul 2002
Last Activity: 17 June 2009, 5:17 PM EDT
Location: Atlanta
Posts: 740
Thanks: 0
Thanked 2 Times in 2 Posts
Static IP

Is it possible, and if so, how can I assign a static IP address to my RedHat 8.0 machine. I am using a Linksys router/switch with DHCP enabled. I have a small linux/windows2000 LAN at home. I want to assign a static IP so that I can setup port forwarding to my linux machine so that I can ssh into from the internet. Thanks in advance for any help/suggestions anyone might provide.
Sponsored Links
    #2  
Old 05-17-2003
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 16 April 2014, 10:38 AM EDT
Location: Asia pacific region
Posts: 12,898
Thanks: 492
Thanked 846 Times in 381 Posts
You can assign static IP addresses with the route command.

Also, might also need to disable your DHCP client.
Sponsored Links
    #3  
Old 05-17-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
 
Join Date: Jul 2002
Last Activity: 26 May 2006, 8:38 PM EDT
Location: new york
Posts: 1,025
Thanks: 0
Thanked 1 Time in 1 Post
no wait, i have a linksys 4 port cable/dsl router and you dont haveto disable DHCP. just make sure that whatever ip address you assign does not fall into the 192.168.1.100/255 range. assign it 192.168.1.2 and increment from there so its easier to keep track of what has what. you can still use DHCP.
    #4  
Old 05-18-2003
google's Avatar
google google is offline Forum Advisor  
Advisor
 
Join Date: Jul 2002
Last Activity: 17 June 2009, 5:17 PM EDT
Location: Atlanta
Posts: 740
Thanks: 0
Thanked 2 Times in 2 Posts
I have it assigned as 192.168.1.21 right now. Are you saying that I should assign it as follows: 192.168.1.101 (make this static on the linux machine) and then have the router begin assigning IPs from 102?

I am trying to get my www.no-ip.com client working so that I can "see" my PC from anywhere ont the net without messing up my DHCP. I connect my work laptop to my network at home. No-IP is a free DNS client - pretty cool.
Sponsored Links
    #5  
Old 05-18-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
 
Join Date: Jul 2002
Last Activity: 26 May 2006, 8:38 PM EDT
Location: new york
Posts: 1,025
Thanks: 0
Thanked 1 Time in 1 Post
no, if you have DHCP enabled then you can NOT use addresses in the range of 192.168.1.100/255 , in addition, with DHCP disabled you still can not use 192.168.1.255 because that address is reserved. the address you have assigned (192.168.1.21) is fine. so for example, you said that you want to allow ssh connections to 192.168.1.21 from out side of your LAN. you would do this with port forwording, you set up on the router to forword port 22 to 192.168.1.21. then to access your ssh server from out side of your lan all you have to do is connect using your external ip address (what your isp assigns). you can also set up DNS with www.no-ip.com like you said.
Sponsored Links
    #6  
Old 05-18-2003
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 16 April 2014, 10:38 AM EDT
Location: Asia pacific region
Posts: 12,898
Thanks: 492
Thanked 846 Times in 381 Posts
Sorry, that is simply not true. We have a similar set up at home and use both DHCP and static addresses from the same address block. It works fine. Some PC get their addresses from the DHCP server (software in the Linksys router), others use assigned static IPs.

We don't do it, but the device can be configured to only allocate DHCP IPs from a small range of numbers. Unless you have a giant LAN that is using almost all the addresses, this is not a problem.

Since the poster indicated that they have a small LAN, simply assign a static IP outside of the 'normal' range of DHCP allocations.

And, if I'm not mistaken, ARP should make this moot in many DHCP servers; i.e. a good DHCP server should check its ARP cache before assiging an IP to check to see if it is in use on the segment.

For example, here is a quote from:

http://www.networkpenetration.com/dhcp_flaws.html

Quote:
Some DHCP servers issue ARP requests or ICMP pings to detect for IP addresses that may be reclaimed by the server. This is done as operating systems / interfaces do not release there assigned IP address when shutdown. Basic testing of the denial of service code successfully defeat the ARP method of reclaiming IP addresses (ICMP method was not tested) as the number and speed of requests for IP addresses was significantly higher than the number of ARP requests issued by the DHCP server (when running multiple copies of the source code in a script). The source code could be extended to sniff for ARP requests / ICMP ping requests and reply accordingly thus defeating the servers method of reclaiming addresses.
OBTW: if you are operating your own small private LAN, you don't need to be worried about the hypothetical DHCP vulnerability above.
Sponsored Links
    #7  
Old 05-18-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
 
Join Date: Jul 2002
Last Activity: 26 May 2006, 8:38 PM EDT
Location: new york
Posts: 1,025
Thanks: 0
Thanked 1 Time in 1 Post
thats what i ment, though i think i didnt express my thoughts well. i do the same thing at home, the dhcp server will give out address in the 192.168.1.100/150 range, the desktop machines use dhcp and my web and mail server are assigned static addresses, the way i did it was just to go from 192.168.1.2 and on.

i was wrong about not being able to assign addresses within that range, ( the amount of IPs the dhcp server is set to give out.)
and as neo said , assign them outside of the normal range.

to make it simple, you can assign a static ip to a client, as long as that ip is not in use by another dhcp client.

sorry, the mistake was confusion on my part.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Even the Static cURL Library Isn't Static BrandonShw Programming 8 07-08-2011 11:57 AM
How to tell if i am using DHCP or Static xdrivex UNIX for Dummies Questions & Answers 1 06-03-2010 05:56 PM
Could static library include static library? freemagic Linux 4 04-07-2010 03:55 AM
I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP dlwoaud IP Networking 0 12-21-2009 04:01 AM
Static wojtyla Programming 6 02-25-2005 10:57 AM



All times are GMT -4. The time now is 12:10 PM.