What is the fucntion of /etc/networks (In Debian 1.3.0) ?

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Jeremy Mathe » Mon, 24 Nov 1997 04:00:00



Other than as a lookup table for the route command...

That is, I note that when I do route, it displays names for all the
"Destinations" except for one - that is, for the base of my local LAN (setup
with IP Masq).  That address is 192.168.0.0

If I edit /etc/networks and add a line like:

        LocalLAN        192.168.0.0

Then when I do route, it looks pretier.  But I am afraid to do this, because
I don't know what other scripts/programs may be accessing this file.

AFAIR, RedHat does use the networks file in its initialization scripts, but
I don't think that Debian does.  Are there any other side effects?

************************************************************************
There.  Are you happy?  We want you to be happy.


          hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Neil Cher » Mon, 24 Nov 1997 04:00:00


On Sun, 23 Nov 1997 17:18:55 GMT,


>Other than as a lookup table for the route command...

The networks file is there to make various command output easier to
read.  The command reads the networks file and replaces references
to the Network number with its name.

Quote:>If I edit /etc/networks and add a line like:
>    LocalLAN        192.168.0.0

Please don't take this as a criticism but the above is partial wrong.
198.168.x.y is a Class C network (has a mask of 255.255.255.0) which
means your LocalLAN chould be 192.168.x.0 where x is the 3rd octet of
your network address. I know it's being picky but as you learn more
about TCP/IP you'll understand why you have to be picky.

--
Neil Cherry

If you need to contact me via email please use this email address to

(DELETE the L before my name)

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by A » Mon, 24 Nov 1997 04:00:00


Quote:>That is, I note that when I do route, it displays names for all the
>"Destinations" except for one - that is, for the base of my local LAN (setup
>with IP Masq).  That address is 192.168.0.0

>If I edit /etc/networks and add a line like:

>    LocalLAN        192.168.0.0

>Then when I do route, it looks pretier.  But I am afraid to do this, because
>I don't know what other scripts/programs may be accessing this file.

If you do a "route add -net <somenet>", Debian will check this file to
find the "name" of it. AFAIK, no other programs use this during the
boot process. Its safe for you to put that line in there; in fact
I'm not sure if you even need to put anything in there unless you
want it to look pretty. lThe script you *should* concern yourself with
is /etc/init.d/network, that's where you do all your ifconfig
and route commands that actually initialize the newtork.

Hope this helps,
--Anindya

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Tor Slettne » Mon, 24 Nov 1997 04:00:00


    Jeremy> If I edit /etc/networks and add a line like:
    Jeremy>       LocalLAN         192.168.0.0

    Neil> Please don't take this as a criticism but the above is
    Neil> partial wrong.

Actually, it is perfectly acceptable.

    Jeremy> 198.168.x.y is a Class C network (has a mask of
    Jeremy> 255.255.255.0) which means your LocalLAN chould be
    Jeremy> 192.168.x.0 where x is the 3rd octet of your network
    Jeremy> address.

And if x=0, you get the above.  The network address is then
192.168.0.0.

No hostnames within that network should be 0 (or 255), though.  The
router, for one, should probably be 192.168.0.1.

    Jeremy> I know it's being picky but as you learn more about TCP/IP
    Jeremy> you'll understand why you have to be picky.

And this was probably being even more picky.  Many people prefer using
the 192.168.1.0 network to avoid these confusions.  So be it.

-tor

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Jeremy Mathe » Tue, 25 Nov 1997 04:00:00



...

Quote:>Please don't take this as a criticism but the above is partial wrong.
>198.168.x.y is a Class C network (has a mask of 255.255.255.0) which
>means your LocalLAN chould be 192.168.x.0 where x is the 3rd octet of
>your network address. I know it's being picky but as you learn more
>about TCP/IP you'll understand why you have to be picky.

Yup.  And in my case, x == 0.

************************************************************************
La plus belle fille du monde ne peut
donner que tout ce qu'elle a.


          hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Rob van der Putte » Tue, 25 Nov 1997 04:00:00


Hi there

Op 23 Nov 1997, Tor Slettnes schreef:

Quote:> And this was probably being even more picky.  Many people prefer using
> the 192.168.1.0 network to avoid these confusions.  So be it.

One is not suposed to use 192.168.0.0 or 192.168.255.0
They will work though.

BTW, A,B and C networks have been abolished years ago.
You can only tell the size of a network bij looking at its netmask.

Regards,
Rob

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Jaap Lu » Tue, 25 Nov 1997 04:00:00


On Sunday 23 November Jeremy Mathers wrote to All:

 JM> Then when I do route, it looks pretier.  But I am afraid to do this,
 JM> because I don't know what other scripts/programs may be accessing this
 JM> file.

It's just an alias file like /etc/hosts. Whatever other programs access the
file, they should all consider it an alias file and not expect anything else.

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Neil Cher » Wed, 26 Nov 1997 04:00:00





>    Jeremy> If I edit /etc/networks and add a line like:
>    Jeremy>       LocalLAN         192.168.0.0

>    Neil> Please don't take this as a criticism but the above is
>    Neil> partial wrong.

>Actually, it is perfectly acceptable.

DOH!

I've been build too many networks! Tor you're absolutely correct.
The 192.168.0.0 network entry is correct if your host address is
192.168.0.x (where x is 1 - 254). As a side issue an entry of
192.168.255.0 would be valid for a network whose host address is
192.168.255.x (where x is 1 - 254).

Quote:

>    Jeremy> 198.168.x.y is a Class C network (has a mask of
>    Jeremy> 255.255.255.0) which means your LocalLAN chould be
>    Jeremy> 192.168.x.0 where x is the 3rd octet of your network
>    Jeremy> address.

>And if x=0, you get the above.  The network address is then
>192.168.0.0.

>No hostnames within that network should be 0 (or 255), though.  The
>router, for one, should probably be 192.168.0.1.

Yea, that what I meant ;-} (really it was). The way I explain it to
people outside the network industry is the the 0 host is the wire
number and the 255 host is a broadcast number (really both are
broadcast numbers).

--
Neil Cherry

If you need to contact me via email please use this email address to

(DELETE the L before my name)

 
 
 

What is the fucntion of /etc/networks (In Debian 1.3.0) ?

Post by Juergen Hein » Wed, 26 Nov 1997 04:00:00



>On Sunday 23 November Jeremy Mathers wrote to All:

> JM> Then when I do route, it looks pretier.  But I am afraid to do this,
> JM> because I don't know what other scripts/programs may be accessing this
> JM> file.

>It's just an alias file like /etc/hosts. Whatever other programs access the
>file, they should all consider it an alias file and not expect anything else.

Wrong ... see man getnetbyname() and friends.

Have a nice day,
Juergen

--
\ Real name     : Juergen Heinzl     \       no flames      /

  \ Phone Private : +49 0911-4501186   \                  /

 
 
 

1. Debian: No network with /etc/network/interfaces

Hi:

Just starting a Debian 3.0r0 install from scratch.
Network: DSL is bridged with static IP.

I've read the man pages on the interfaces file but cannot
get it to work.  Instead, I need to issue the folowing
two commands before I can ping anything except localhost:

ifconfig eth0 aaa.bbb.ccc.ddd up netmask 255.255.255.0
route add default gw aaa.bbb.ccc.1 dev eth0

where, aaa.bbb.ccc.ddd is my static ip, and aaa.bbb.ccc.1
the ip of the DSL modem/gateway.

Here are the relevant, but non-functional
lines in /etc/network//interfaces:

iface eth0 inet static
  address aaa.bbb.ddd.ccc
  netmask 255.255.255.0
  gateway aaa.bbb.ddd.1

Any idea what could be broken?

I get nowhere with those lines in /etc/network/interface
and using the command ifup -a.  If there is no resolution
to this, where in the boot sequence should I put the
ifconfig and route commands?  (I tried adding a script
with those commands in /etc/network/if-up.d
with no succes either)

Thanks in advance for any and all advice.

|\|.

================================================================================

Hey you know something people?                      They won't go for no more
I'm not black, but there's a whole lotsa times      Great Midwestern hardware store
I wish I could say I'm not white.                   Philosophy that turns away
(1965, Frank Zappa in Trouble Every Day             From those who aren't afraid to say
 -> Freak Out)                                      What's on their mind -- The left behinds
                                                    Of The Great Society.
                                                    (1965, Frank Zappa in Hungry Freaks, Daddy
                                                     -> Freak Out)

2. not listening for calling name

3. I am not able to find the file /etc/networks

4. KA9Q/Linux Docu

5. Debian: doc for /etc/network/interfaces, ifup, ifdown

6. tcp queston

7. /etc/init.d/network not used in debian?

8. Remapping keypad in MetroX?

9. RH vs. SW vs. Debian etc., etc.

10. Netscape plug-ins, helper files, Acrobat etc.

11. A debian APT question, I am new at this

12. I am not impressed with Debian so far.