Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign a fixed IP address in a LAN

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Hi all

Client has a Microsoft Windows Network and wishes to add a linux server hosting a website to the existing LAN.

Is it possible to assign a fixed IP address, such as 192.168.0.30 to the linux server?

Should there be a power failure, port forwarding on the router should not be affected as the linux server would always be restarted first and not be assigned a random IP address as it otherwise might be.

TIA

FAQ184-2483​
Chris [pc2]
PDFcommander.com
motrac.co.uk
 
Chris, glad you found the answer yourself, and posting what seems like a solution for you...

generally, there is no problem in assigning Static IP's, in LANs, as long as they are free...

In any LAN I ever designed, I always use the static IPs for servers and storage devices, this is to ensure that they are always found at the same addresses, when there is a power outage. I map all the storage drives by IP, even more so in a LINUX LAN, and have kept that even in Windows or mixed LANs...




Ben
"If it works don't fix it! If it doesn't use a sledgehammer..."
How to ask a question, when posting them to a professional forum.
Only ask questions with yes/no answers if you want "yes" or "no"
 
I would add a word of caution to this, because networks are an evolving thing and one little change upstream can make sweeping changes across the network.

Normally in your router you have your network setup - 192.168.x.x for example, netmask, etc... You set the router (or DHCP server) up to assign addresses automatically. Usually as part of this setup you will have a starting IP address for DHCP auto assignment, such as 192.168.0.50, and an ending IP address, such as 192.168.0.200 or specify a maximum number of connections (such as 150 computers) that would result in a practical end to the DHCP IP block. When you choose static IPs for your network you should assign IP addresses that are above (such as 192.168.0.201) or below (such as 192.168.0.49) your DHCP block. Then no matter what happens to your network no other computer will ever accidentally 'crash' into your server IP because it is outside the range of IP addresses that can be assigned.

Then it doesn't matter if you add another switch in the network, move cables, or the power fails - your server will always be in a safe place.

Keep in mind that if you want to be able to access the server from outside of your network you would have to forward port 80 in your router (or whatever port your server is listening on) to the server's IP address or create some other route from outside.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top