LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-22-2011, 07:14 AM   #1
solvetek
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.

question
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: 192.168.1.6 -> This changes alot, I would like to convert to static
default gateway: 192.168.1.1

-------------------------
linux box 2
-------------------------
computer os: centos 5.7 64-bit
hostname: laptop.localdomain
current ip eth0: 192.168.1.4 -> This changes a lot , I would like to convert to static
default gateway: 192.168.1.1
 
Old 10-22-2011, 08:04 AM   #2
macemoneta
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: 326Reputation: 326Reputation: 326Reputation: 326
What you need to do is to check the IP range for DHCP in your cable modem. For example, if it's set to 192.168.1.2 -> 192.168.1.50 pick a couple of addresses outside the range. For example, 192.168.1.51 and 192.168.1.52. Configure your two PCs to use those static addresses, with the same netmask (for example, 255.255.255.0) and gateway.
 
  


Reply


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


All times are GMT -5. The time now is 04:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration