Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 438
  • Last Modified:

how can i set fix ipaddress indebian

How can i set fix ip address in debian what file and where is it
0
teera
Asked:
teera
  • 2
  • 2
  • 2
  • +1
2 Solutions
 
fpintosCommented:
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
 
sundeepgopalCommented:

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
 
sundeepgopalCommented:
sorry fpintos ...we gave the same solution at a gap of 4 mins...coincidence hehehe
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
fpintosCommented:
No need to be sorry... I got in before you.... :-)
0
 
ravenplCommented:
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
 
orestyle1Commented:
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
 
orestyle1Commented:
You will also want to run this command:

/etc/init.d/networking restart

This will cause the changes to take effect
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now