LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2009, 08:38 AM   #1
vlyamtse
Member
 
Registered: Apr 2007
Posts: 54

Rep: Reputation: 15
another ipv4 question


Is there any significance in "host 0" ip address like xxxx.xxxx.xxxx.0? For example 18.26.4.0/32 ?
 
Old 09-03-2009, 09:32 AM   #2
CmdoColin
Member
 
Registered: Jul 2009
Posts: 31

Rep: Reputation: 17
Depends how it is used. I *think* if you are using Classless Inter-Domain Routing - you can use all the addresses. I have to say I've never actually tried to use .0

I suppose in theory it would work as long as all devices on the network would allow it. Cisco kit the command would be "ip classless"

Just a thought - you are asking about IP v4. Are you actually asking about the subnet ID? This is very much apart of varible length subnet masking. As an address it cannot be used.

Last edited by CmdoColin; 09-03-2009 at 09:39 AM.
 
Old 09-03-2009, 10:03 AM   #3
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
A .0 address represents an entire subnet as the network identifier address. It can't be used nor can .255 which represents the subnet mask in anything below /24 (i.e. /24 - /32) addresses. In practice, they aren't really used at all. Also, a network with a /32 will have exactly 1 host on it and wouldn't be of much use (it isn't even a network in my mind, but I guess technically it is).

The IPv4 Cheat Sheet will tell you how many addresses can be on a subnet.

HTH

Forrest
 
Old 09-03-2009, 10:26 AM   #4
CmdoColin
Member
 
Registered: Jul 2009
Posts: 31

Rep: Reputation: 17
I know the subnet ID isn't a usable address normally with Variable Length Subnet Masking VLSM - so as an example:

/29 address range:

X.X.X.32/29

The subnet ID is X.X.X.32
Usable addresses are X.X.X.33 - X.X.X.38
The broadcast is X.X.X.39

But is it possible to actually use the subnet ID and broadcast address? I'm sure I once had a device on a network that was a X.X.X.255. Would this only be possible with a /23 or lower mask address range?
 
Old 09-03-2009, 10:30 AM   #5
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
If you set your subnet mast to 255.255.(non-255number).0, then I believe it is possible to use them, but in practice, nobody really does (possibly to prevent a problem if they need to later split their subnets).

Forrest
 
Old 09-03-2009, 02:45 PM   #6
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
There is a certain amount of confusion here. You need to remember that there is a difference between an ip subnetwork, and a route. A subnetwork represents a set of hosts who have ip addresses that reside in a common IP network range. A route is a pointer to a network.

A network, would be say 192.168.1.0/24. The first possible address of 192.168.1.0 is reserved as the network identifier and would not be assigned as a host address although it may occasionally appear as a source address in a packet under certain circumstances. Likewise the last address in the range .255 is reserved as the broadcast address. Packets sent to this address are considered to be a subnet broadcast which should be received by all members of the ip network. Configuring this address as a host ip clearly leads to all sorts of confusion as packets sent to it would be received by everyone else.

192.168.1.0/24 is perfectly valid as a route however, as it points the way to the network as a whole.

What also causes confusion is that what sets the range of address that a network consists of is the shared subnet mask.
So if we change the above to 192.168.1.0/25 then the defined network address range becomes 192.168.1.0 to 192.168.1.127.
As before the first address is the network .0 and the last is the broadcast now .127

192.168.1.255 is now the broadcast address of a separate network 192.168.1.128/25 which ranges from 192.168.1.128 (network) to 192.168.1.255(broadcast).

Its simple really.

A 255.255.255.255 mask or /32 in CIDR notation, identifies a network that has only one host and tends to be used for loopback addresses. You might uses one on, say, a Cisco router for a tunnel. If your tunnel terminates to a physical port address and that port goes down, your tunnel drops even though you may have alternates routes to the same box. Advertising a loopback interface, which is virtual and so never goes down, means that you never lose sight of the peer address, unless the router becomes isolated.

Using variable subnets is very common, I have customer using for instance 255.255.248.0. What this means is that you have one ip subnet that has 8*256 addresses, for example 10.1.0.0 (network) to 10.1.7.255 (broadcast). Now another confusion arises here as theoretically 10.1.1.0 is a valid host address, by the above rules, as is 10.1.3.255. These addresses are rarely used though as they tend to confuse people, and certainly in the early days of variable length subnet masking different manufacturers would handle this situation in different ways and things would get messy.

So generally you would not use those examples where the last digit is 0 or 255.

You can however use a zero in the network portion of the address. So 10.1.0.1 255.255.248.0 is a perfectly valid host address.

The rules for ip are explained well on wikipedia and it links to the relevant RFC's if you want to look at the actual standards.
 
  


Reply



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
ipv4 syntax question vlyamtse Linux - Networking 1 09-02-2009 10:00 PM
IPv6 vs IPv4 jiml8 Programming 2 12-22-2008 10:53 AM
IPv4 not there??? Goblin82 Linux - Networking 4 03-03-2006 07:07 PM
ipv4 vs. ipv6 radix Linux - Security 2 09-17-2003 01:39 PM
IPv4 Question RecoilUK Linux - Networking 4 11-04-2001 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:47 PM.

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