Solved

how can i set fix ipaddress indebian

Posted on 2006-06-15
7
343 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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 2

Expert Comment

by:fpintos
Comment Utility
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
Comment Utility

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
Comment Utility
sorry fpintos ...we gave the same solution at a gap of 4 mins...coincidence hehehe
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

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

Accepted Solution

by:
ravenpl earned 200 total points
Comment Utility
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
Comment Utility
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
Comment Utility
You will also want to run this command:

/etc/init.d/networking restart

This will cause the changes to take effect
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now