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
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.
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
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. ------
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. ------
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