Many questions in one and not so easy to refer to different sections as there are multiple numbered lists...
CIDR notation (Classless Inter-Domain Routing) is an alternate method of representing a subnet mask. It is simply a count of the number of network bits (bits that are set to 1) in the subnet mask.
Indeed, this is the information it contains.
Meaning that a CIDR in this form 10.0.0.0/30 means that
- The networkID is 10.0.0.0 and the subnet mask 255.255.255.253
Actually 10.0.0.0 and netmask 255.255.255.252, but I get the impression that you probably have the right idea regarding this part even if the numbers were wrong here.
And regarding the question, yes, this is all that it means.
(It's not necessarily used with a network id specifically, it can be any address depending on the context. Just like you can specify eg a host address with netmask, depending on the context.)
- The subnet has tow host addresses (10.0.0.1 and 10.0.0.2 ) and one broadcast address 10.0.0.3
I suppose, yes. The information it directly conveys (see 1), has the same implications regardless if it's written as 10.0.0.0/30 or network: 10.0.0.0, netmask: 255.255.255.252.
- Does the CIDR mean anything else than the two points mentioned above ? and What is the default gateway address in this case ?
No, it doesn't mean anything else.
Just like your netmask version of the same information, it doesn't say anything about what address might be the default gateway (if such a thing is even relevant).
The following notations confuses me. Sometimes I see
- 10.0.0.2/30, 10.0.0.3/30 (for instance, IP 10.0.0.3 exits in the two networks )
- or 10.0.0.0/30 and 10.0.0.0/8
- Wouldn't there be an intersection between networks in this case, in other words, meaning same IP addresses exit in two different networks?
There are several aspects to consider here:
You can trivially rephrase this second block of questions using "netmask notation" if you like (as per 1 in the previous set of questions). I don't know if that might change anything regarding your understanding of the scenarios that you are describing?
Either way, as I see it, there is nothing specific to CIDR notation going on here.
When you say 10.0.0.2/30, 10.0.0.3/30 these might well refer to addresses in the exact same network if that fits the context.
Your example uses RFC1918 addresses, which is fine if that is what is part of the scenario that you ask about. But these private addresses are duplicated in many networks across the world, meaning there's nothing strange about these private addresses being used in different/conflicting ways in separated networks.
You wouldn't generally want the same IP address being used on two different network links in the same network (the RFC1918 situation is a factor here, with reuse in separated networks as per the above), but do keep in mind that the notation is also used in other contexts than just on-link addresses.
Example: Maybe on router1 you route 10.0.0.0/16 to router2, and router2 then might have 10.0.0.0/24 on one network link and 10.0.1.0/24 on another.
Addresses in both these /24 networks match the 10.0.0.0/16 route, but there is no conflict there; eg 10.0.0.7 exists in exactly one place and 18.104.22.168 exists in exactly one (other) place.