LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-26-2012, 08:46 PM   #1
gurl4sh25
Member
 
Registered: Apr 2006
Distribution: SuSE, RedHat, Fedora, CentOS, BSD
Posts: 115

Rep: Reputation: 15
Forcing to use a static ip address


Hi All, I have a Linux Machine, and I want to configure it to use this static ip address 192.168.2.1. For some reason it does not accept and link could not be up saying there's another host is running with this IP.

As I have limited access to the network, and I cannot unplug the network and configure the server, Is there anyway to configure it by force and disregard any ip conflicts?

I know that ip conflict is not good and would create issues, but main question is, is it possible? How do i do this?
 
Old 01-26-2012, 09:01 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
x.x.x.1 is by default the gateway address. It is likely the address of your router.

You could use x.x.x.2 to x.x.x.254. If this is a home router, I would check the DHCP settings of the router. Most of them reserve a block of addresses for static and are configured to assign DHCP above that block. For my router, DHCP starts with x.x.x.100 to above. (This is a configurable setting.)

If it's not a home router, check with the IS Dept.

Last edited by frankbell; 01-26-2012 at 09:04 PM.
 
Old 01-26-2012, 09:11 PM   #3
gurl4sh25
Member
 
Registered: Apr 2006
Distribution: SuSE, RedHat, Fedora, CentOS, BSD
Posts: 115

Original Poster
Rep: Reputation: 15
Hi frankbell, thanks for the reply. I do know that I can use other ip on that subnet. What I'm trying to do is use one specific ip and force it to.

Knowing that I dont have any access on the network and physical access on that server. Right now what I have is iLO to the server itself. So was thinking if is it possible to configure it on the OS side, forcing an ip address. I've done research, something to do with the bad arp broadcast, was thinking to disable the arp on the server if possible but problem is i don't know how.
 
Old 01-27-2012, 11:18 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I configure all of my servers with static IPs, never had a problem with any of them "rejecting" it because of a duplicate. They'll hold onto the IP even if the network cable is unplugged or the router is on a different subnet, they don't care.

This is how I do it:
1) Uninstall NetworkManager (it ALWAYS screws things up for me)
2) Find the ifcfg file for the device I'm interested in, usually in /etc/sysconfig/network-scripts/ifcfg-eth0
3) Modify the file to look something like this:
Code:
DEVICE=eth0
HWADDR=00:25:90:56:8E:5F
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
IPADDR=192.168.1.132
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
NETWORK=192.168.1.0
TYPE=Ethernet
DNS1=68.87.85.98
DNS2=68.87.69.146
IPV6INIT=no
USERCTL=no
PREFIX=24
Swapping out DEVICE with your device name, HWADDR with your MAC, IPADDR, GATEWAY, NETMASK, and NETWORK to match your setup, and DNS1/2 to match your DNS servers. The above file is from a Fedora 16 system, other distros might want the file to look different.

Last edited by suicidaleggroll; 01-27-2012 at 11:21 AM.
 
1 members found this post helpful.
  


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
setting static IP on linux PCs with no static IP address from internet provider? solvetek Linux - Networking 1 10-22-2011 08:04 AM
Forcing static linking of shared libraries raghu_rao Linux - Newbie 8 01-14-2009 07:34 AM
Set IP address to static from DHCP assigned address jborn Linux - Networking 4 02-02-2007 08:38 PM
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 03:35 AM
postfix: forcing rewrite of 'To' address when sending imraven Linux - Software 4 06-15-2006 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration