Solved

how can i set fix ipaddress indebian

Posted on 2006-06-15
7
402 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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 200 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 150 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

734 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