Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-31-2005, 10:07 PM
|
#1
|
LQ Newbie
Registered: Aug 2005
Location: Louisville, KY
Distribution: Debian Sarge
Posts: 29
Rep:
|
manually specifying IP address
okay, I remembered looking at a /etc/interfaces file to specify a IP address manually....using subnet, router stuff, etc...
what syntax/entries do i need for this to work?
b
|
|
|
08-31-2005, 10:12 PM
|
#2
|
Senior Member
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170
|
Re: manually specifying IP address
Quote:
Originally posted by bd1308
okay, I remembered looking at a /etc/interfaces file to specify a IP address manually....using subnet, router stuff, etc...
what syntax/entries do i need for this to work?
b
|
Code:
>$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 24.222.0.66 24.222.0.91
The dns-nameservers is not necessary unless you have the resolvconf package installed if you do not then you need to put your nameservers in the file /etc/resolv.conf like this.
Code:
>$ cat /etc/resolv.conf
nameserver 24.222.0.66
nameserver 24.222.0.91
Then use /etc/init.d/networking restart to restart networking with the new settings.
|
|
|
08-31-2005, 10:13 PM
|
#3
|
LQ Guru
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163
Rep:
|
from my /etc/ network/interfaces (notice the bold, you aren't at the right place) :
Code:
iface eth4 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
|
|
|
08-31-2005, 10:18 PM
|
#4
|
LQ Newbie
Registered: Aug 2005
Location: Louisville, KY
Distribution: Debian Sarge
Posts: 29
Original Poster
Rep:
|
okay thanks!
network!!
makes sense now

|
|
|
08-31-2005, 10:27 PM
|
#5
|
LQ Newbie
Registered: Aug 2005
Location: Louisville, KY
Distribution: Debian Sarge
Posts: 29
Original Poster
Rep:
|
did it and it worked! thanks people!
Last edited by bd1308; 08-31-2005 at 10:45 PM.
|
|
|
All times are GMT -5. The time now is 12:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|