Static IP


 
Thread Tools Search this Thread
Special Forums IP Networking Static IP
# 1  
Old 05-17-2003
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.
# 2  
Old 05-17-2003
You can assign static IP addresses with the route command.

Also, might also need to disable your DHCP client.
# 3  
Old 05-17-2003
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
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.
# 5  
Old 05-18-2003
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.
# 6  
Old 05-18-2003
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.
# 7  
Old 05-18-2003
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Have a static IP for net0

Hi, Here is what I get within Solaris. huamin@SOL11I:~$ ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 net0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2 inet 0.0.0.0 netmask... (24 Replies)
Discussion started by: HuaMin
24 Replies

2. Programming

Static variables in C++

Are the following equivalent? static int df, dl, du, count; static int df; static int dl; static int du; static int count; (7 Replies)
Discussion started by: kristinu
7 Replies

3. Programming

Even the Static cURL Library Isn't Static

I'm writing a program which uses curl to be run on Linux PCs which will be used by a number of different users. I cannot make the users all install curl on their individual machines, so I have tried to link curl in statically, rather than using libcurl.so. I downloaded the source and created a... (8 Replies)
Discussion started by: BrandonShw
8 Replies

4. UNIX for Dummies Questions & Answers

How to tell if i am using DHCP or Static

Hey guys , YEs this is probably silly for most but i am new to this forum and solaris . i am curious to know if the ip address we have for our solaris server is static or dhcp . how can i tell ? will ifconfig -a tell me this ? or other commands? Thanks in advance (1 Reply)
Discussion started by: xdrivex
1 Replies

5. Linux

Could static library include static library?

I have some static library(libxxx.a libyyy.a). And I want to generate my library(libzzz.a), libzzz.a will use libxxx.a and libyyy.a I wan't my application only use libzzz.a, (means libzzz.a had include libxxx.a, libyyy.a), how can I do that? Thank you. example: I have zzz.c. I do ... (4 Replies)
Discussion started by: freemagic
4 Replies

6. IP Networking

I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP

hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first. ... (0 Replies)
Discussion started by: dlwoaud
0 Replies

7. Shell Programming and Scripting

How to static the average value

Hi all, Sorry I make a mistake,the title should be "How to statistic the average value " I do five times about "mv 123 to 456" and do five times about "mv 456 to 123" As we know,"time" can get the real usr sys value, I want to get the average real,usr,sys of "mv 123 to 456" and "mv 456 to... (4 Replies)
Discussion started by: yanglei_fage
4 Replies

8. UNIX for Dummies Questions & Answers

Static Route

Hi, Request you to please tell me the command or the process to add the static route in redhat linux. Thanks in Advance. Regards Arun (2 Replies)
Discussion started by: Arun.Kakarla
2 Replies

9. IP Networking

static route ?

Hi, I have a machine that sits on 10.2 network. I need to ssh from this to another box that is on both 10.125 & 10.140 VLANs what should I need to do? Thanks! (3 Replies)
Discussion started by: chaandana
3 Replies

10. Programming

Static

What does this command exactly do cc -static example.c (6 Replies)
Discussion started by: wojtyla
6 Replies
Login or Register to Ask a Question