f



what is the significance of 0.0.0.0

is this the default gateway of whole internet.
or is this the default gateway of a whole class A ip addresses.

or is this a network address of a particular sub-net.
please explain it pragmatically
with regards
0
10/4/2010 12:53:08 PM
comp.os.linux.networking 15677 articles. 3 followers. Post Follow

5 Replies
1595 Views

Similar Articles

[PageSpeed] 0

novice wrote:

> is this the default gateway of whole internet.
> or is this the default gateway of a whole class A ip addresses.
> 
> or is this a network address of a particular sub-net.
> please explain it pragmatically
> with regards

Written that way, it's nothing more than an IP address.

0
pk (435)
10/4/2010 1:09:27 PM
On 10/04/2010 02:53 PM, novice wrote:
> is this the default gateway of whole internet.
> or is this the default gateway of a whole class A ip addresses.
> 
> or is this a network address of a particular sub-net.
> please explain it pragmatically
> with regards

It's an invalid IP address.

What 0.0.0.0 actually MEANS depends on the program you're using it with.

-- 
Linards Ticmanis
0
ticmanis (776)
10/4/2010 1:25:23 PM
On Oct 4, 8:53=A0am, novice <rajat123si...@gmail.com> wrote:
> is this the default gateway of whole internet.
> or is this the default gateway of a whole class A ip addresses.
>
> or is this a network address of a particular sub-net.
> please explain it pragmatically
> with regards

Depending on where you got the 0.0.0.0 from, it can have different
meanings.

In a socket(7) call, it generally means "all addresses", as in "bind
to all addresses on this system" (bind(2))

In netstat(8), it generally means "any address", as in "this
connection receives data from any address on this system".

In other programs or syscalls, it means other things.

What context are you concerned about?
--
Lew Pitcher
Master Codewright & JOAT-in-training   | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
----------      Slackware - Because I know what I'm doing.
------
0
lpitcher2 (882)
10/4/2010 2:12:19 PM
On Oct 4, 8:53=A0am, novice <rajat123si...@gmail.com> wrote:
> is this the default gateway of whole internet.
> or is this the default gateway of a whole class A ip addresses.
>
> or is this a network address of a particular sub-net.
> please explain it pragmatically
> with regards

Depending on where you got the 0.0.0.0 from, it can have different
meanings.

In a socket(7) call, it generally means "all addresses", as in "bind
to all addresses on this system" (bind(2))

In netstat(8), it generally means "any address", as in "this
connection receives data from any address on this system".

In other programs or syscalls, it means other things.

What context are you concerned about?
--
Lew Pitcher
Master Codewright & JOAT-in-training   | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
----------      Slackware - Because I know what I'm doing.
------
0
lpitcher2 (882)
10/4/2010 2:12:24 PM
novice <rajat123singh@gmail.com> writes:

> is this the default gateway of whole internet.
> or is this the default gateway of a whole class A ip addresses.
>
> or is this a network address of a particular sub-net.
> please explain it pragmatically
> with regards

You really ought to have your question in the text, not just the
subject.  Anyway, I'm guessing you're seeing the 0.0.0.0 in a routing
table.  Here's an abbreviated one:

diamond:~(1)$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.42     0.0.0.0         UG    0      0        0 eth0

If I want to send a packet to 192.168.1.42, then the kernel ANDs (this
is binary arithmetic) 192.168.1.42 with 255.255.255.0 (the Genmask from
the first entry in the routing table) to get 192.168.1.0.  Since this
matches the destination in the first entry in the routing table, no
gateway is used (because of 0.0.0.0 listed) and the packet is put out on
the interface eth0.

If I want to send a packet to 1.2.3.4, then the kernel ANDs 1.2.3.4 with
255.255.255.0 (again from the first entry of the routing table) to get
1.2.3.0.  Since this does not match 192.168.1.0, the first entry in the
routing table is not used.  Then the kernel ANDs 1.2.3.4 with 0.0.0.0
(the Genmask from the second entry in the routing table) to get 0.0.0.0.
Since this matches the destination in the second entry of the routing
table, 192.168.1.42 is used as a gateway, and the packet is put out on
the interface eth0.

Does this make sense?

Scott
-- 
Scott Hemphill	hemphill@alumni.caltech.edu
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear
0
hemphill (223)
10/6/2010 8:44:08 PM
Reply: