LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-17-2011, 07:05 PM   #1
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
configuring static IP: questions about /etc/network/interfaces


I'm following this how-to.

It says to make one's /etc/network/interfaces contents look like this:
Code:
# 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.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
However, I want my machine to have a LAN ip of 192.168.1.3. I know I need to change address, but what about the others? I recall reading a couple are optional but what do these mean anyway?
* netmask
* network
* broadcast
* gateway
???

I've seen them in many different contexts and still don't know what they are for.

Last edited by sneakyimp; 02-17-2011 at 07:05 PM. Reason: forgot how-to link
 
Old 02-17-2011, 07:12 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Based on your information:

Quote:
# 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.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
You might try the following. The gateway could be anything on that /24 subnet (i.e. 192.168.1.0 through 192.168.1.254 ), however it is common to see 192.168.1.1 in your case. You would have to verify that from your router.

Code:
# 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.1.3
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
Regards,

Fordeck
 
Old 02-17-2011, 07:29 PM   #3
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Original Poster
Rep: Reputation: 78
Thanks. Rep++

It would be awful nice to have a simple description of what these items do. I've been googling a bit but still don't have a firm grasp.
 
Old 02-18-2011, 11:03 AM   #4
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Rather than explain it perhaps you can take a look at the following links:

address http://en.wikipedia.org/wiki/IP_address
netmask http://en.wikipedia.org/wiki/Netmask
network:
The network address would be the 1st address in a given subnet. In your case 192.168.1.0, because your subnet consists of address in the range of

192.168.1.0 to 192.168.1.255

or 256 address's.

broadcast:
The broadcast address would be the last address in a given subnet. In your case 192.168.1.255.

gateway: http://en.wikipedia.org/wiki/Default_gateway

I hope this helps your search

Regards,

Fordeck
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Static IP works from ifconfig but not /etc/network/interfaces neilneil2000 Linux - Networking 4 06-03-2008 03:44 PM
configuring network interfaces with udev komuthan Slackware 3 10-08-2006 11:06 AM
linux boot failed after configuring network interfaces in the boot procss domeili2006 Linux - General 1 07-14-2006 06:23 AM
Configuring network interfaces..takes AGES! coolblue Linux - Newbie 6 07-20-2005 08:33 AM
What file does debian use for configuring network interfaces? Royle Debian 2 02-10-2005 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration