Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-22-2011, 07:14 AM   #1
LQ Newbie
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
setting static IP on linux PCs with no static IP address from internet provider?

I am connected to the internet via cable modem. I have a 4 port router plugged into the cable modem. I have 2 linux PCs connected to the the router. They are networked together and both have internet access. I would like to set static IP addresses on both linux boxes so that I do not have to change /etc/hosts when DHCP changes their IP.

Is this possible set static IPs with the network I have? My cable modem is from Cablevision Optium online and does not have a static ip. Do I need a static IP address from the cable company to set static IPs on my linux boxes.

linux box 1
computer os: centos 5.7 64-bit
hostname: server.localdomain
current ip eth0: -> This changes alot, I would like to convert to static
default gateway:

linux box 2
computer os: centos 5.7 64-bit
hostname: laptop.localdomain
current ip eth0: -> This changes a lot , I would like to convert to static
default gateway:
Old 10-22-2011, 08:04 AM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
What you need to do is to check the IP range for DHCP in your cable modem. For example, if it's set to -> pick a couple of addresses outside the range. For example, and Configure your two PCs to use those static addresses, with the same netmask (for example, and gateway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] how to setting a static ip address on slackware64 13 wubai Slackware 5 11-12-2012 07:21 PM
[SOLVED] Setting a dns-server on a static ip address. jdkaye Debian 3 06-24-2011 10:58 PM
Setting a static IP address thedp Slackware 4 05-02-2008 01:09 PM
Setting up a static I.P. address partyk1d24 Linux - Networking 13 12-29-2005 06:23 AM
Linux, Internet Radio and Static IP address webwolf70 Linux - Software 5 03-10-2005 01:10 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration