Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how can i set fix ipaddress indebian

Posted on 2006-06-15
7
Medium Priority
?
431 Views
Last Modified: 2010-04-20
How can i set fix ip address in debian what file and where is it
0
Comment
Question by:teera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 2

Expert Comment

by:fpintos
ID: 16918024
You can set fix IP address for ethernet interface "eth0" at:

/etc/sysconfig/network-scripts/ifcfg-eth0

You will have one config file per ethernet interface

The content looks like the following for FIX ip address:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.6.255
IPADDR=192.168.6.204
NETMASK=255.255.255.0
NETWORK=192.168.6.0
ONBOOT=yes

Hope this help.
0
 
LVL 3

Expert Comment

by:sundeepgopal
ID: 16918031

steps
1) go to /etc/sysconfig/network-scripts
2) cp ifcfg-eth0 ifcfg-etho.bak ( just backup the file in case if you mess up anything)
3) vi ifcfg-eth0
    change the  BOOTPROTO= static      
------------------------------------------------------------                      
 DEVICE=eth0
BOOTPROTO=static
HWADDR=04:60:9F:79:2E:6C
IPADDR=xxx.xxx.xx.xx                                              An example of how the file looks like
NETMASK=255.255.252.0
ONBOOT=yes
TYPE=Ethernet
----------------------------------------------------------------
Also give the ipaddr in case if you want to change it


0
 
LVL 3

Expert Comment

by:sundeepgopal
ID: 16918042
sorry fpintos ...we gave the same solution at a gap of 4 mins...coincidence hehehe
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Expert Comment

by:fpintos
ID: 16918082
No need to be sorry... I got in before you.... :-)
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 800 total points
ID: 16918104
Guys - the Q was about debian !
Mine config looks this way
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.167.1
netmask 255.255.255.0
network 192.168.167.0
broadcast 192.168.167.255
gateway 192.168.167.254
0
 
LVL 1

Assisted Solution

by:orestyle1
orestyle1 earned 600 total points
ID: 16922678
Debian keeps this information in the /etc/network/interfaces

Easy way to edit is aptitude joe

then joe /etc/network/interfaces

Modify the file, do a ctl-k-x

Here is a link to a great Debian Help site

http://www.debianhelp.co.uk/network.htm

cheers
0
 
LVL 1

Expert Comment

by:orestyle1
ID: 16922703
You will also want to run this command:

/etc/init.d/networking restart

This will cause the changes to take effect
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question