cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
810
Views
0
Helpful
2
Replies

Sub-netting and basic concepts about Network

Hello All,

Greetings!

I am new to IP World.

1) I want to know more about the logic behind subnetting?

2) how subnetting is done?

3) what is the logic behind of not using Network ip for hosts or why it is not assigned to hosts?

4) and in case if we can use this Network ip for 1st host in that network and can tell all other hosts that they all comes under that Network IP only and which is assigned to first host? this way can't we save one of the IP from each subnet?

5) why don't we use 0.0.0.0 or what is the logic behind of not using ip address 0.0.0.0 for hosts?

6) why do we require broadcast address ?

7) is it possible to assign network ip as gateway ip ?

8) and what is the complete flow of communication between 2 hosts while communicating using HUB only?

That will be a great help from you, if you could clear these some of my doubts/ quries.

Thanking you in anticipation.

With Best Regards,

Abhinav Rastogi

2 Replies 2

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

#1 The logic behind classful subnetting is simply classful networks often are very wasteful of space.  For example, do you really want to use a whole class C network for a single point-to-point.

#2 That's a bit involved to explain if using a classful routing protocol.

#3 Generally to avoid confusing one for the other.

#4 I'm not 100% sure, but I believe you could use the network prefix IP as a host IP, but again to avoid confusion, it's not normally done, except perhaps for /31 p2p networks.

#5 Again to avoid confusion.  Also, I recall, as some point issue could be confused by using zero subnets, and 0.0.0.0 is also used as default for known destinations.

#6 So hosts can easily identify broadcast packets; conversely help their NICs to ignore packets which they shouldn't be interested in (such as other unicast IPs).

#7 Like #4, I'm not 100% sure, but it might be, as the network gateway is host IP.

#8 Are hosts on same network?  If not, with or without a gateway defined to the hosts, and with or without redirects enabled? 

The questions you pose could fill a book, or at least a chapter!!  

1) I want to know more about the logic behind subnetting?

Originally, IP was divided into classful networks based on the natural breaks in the IP address--first octet, second octet, third octet.  But this scheme provided network engineers with little flexibility and wasted a lot of space.  As it became more and more obvious that the internet was going to outgrow all of the IPv4 addresses, waste became a big issue.  Variable-Length Sub-Networking (VLSM) allows for much more flexibility with network size, as well as allowing network engineers to more actively conserve IP addresses.

For example, what if I just need a network with two host addresses?  The best that classful IP networking could provide is a Class C network and I'd waste 252 addresses.  Using VLSM, I can chose a /30 subnet and have exactly two host addresses.

2) how subnetting is done?

 I would recommend you read the two on VLSM in the CCNA OCG by Wendell Odom.    He explains it in a particularly clear manner.

3) what is the logic behind of not using Network ip for hosts or why it is not assigned to hosts?

The network IP is a designation referring to the entire subnet.  If you assigned that IP address to a host there would be ambiguity as to whether you referred to a host or the whole subnet.  This becomes a particular problem for routing protocols where instructions to get to a subnet might differ from instruction to get to a single host.

4) and in case if we can use this Network ip for 1st host in that network and can tell all other hosts that they all comes under that Network IP only and which is assigned to first host? this way can't we save one of the IP from each subnet?

I'm not certain what you ask with this question, but I'll refer you to the answer of #3.

5) why don't we use 0.0.0.0 or what is the logic behind of not using ip address 0.0.0.0 for hosts?

0.0.0.0 is the designation of the default gateway.  It cannot be used for assignment to a host.

6) why do we require broadcast address ?

Each network reserves a broadcast address so that there is one IP address that can be used to reach every host in the in network.  If there was no broadcast address, then in order to reach every host in the network, each one would have to be individually unicast, and that would waste significant resources in terms of CPU.

7) is it possible to assign network ip as gateway ip ?

A default gateway is configured using the IP address of the next-hop router or the interface pointing towards the default gateway (the IP address of the next-hop router is recommended, for reasons that are outside the scope of this post).  Since you cannot assign the network IP to an interface, you cannot use the network IP as the next-hop for the default gateway.

8) and what is the complete flow of communication between 2 hosts while communicating using HUB only?

Hubs aren't used anymore, having been replaced by switches.  This question isn't really an IP question, but it does highlight the difference between local (L2) forwarding and remote (L3) routing.  Switches these days are usually multi-layer, meaning they handle both L2 and L3, but for the purpose of your question, I'll assume that the switch is L2 only, and handles only intra-network traffic.  (Traffic within one network, versus inter-network traffic which is traffic between networks).

  1. Host 1 (H1) has data to send to Host 2 (H2).  H1 builds an IP packet with H1's IP address as the source IP and H2's IP address as the destination IP.  By comparing IP addresses, H1 can determine that H2 is within the same network, and so H1 builds an Ethernet header/trailer around the IP packet using H1's MAC address as the source MAC and H2's MAC address as the destination MAC.  If H1 doesn't have H2's MAC address, H1 sends out an ARP for it.
  2. H1 forwards the completed Ethernet frame out the appropriate interface (presumably going towards the switch).  SW receives the frame, inspects the destination MAC address.  SW sees that it has an entry in its ARP table for that MAC address and sends the intact frame out the appropriate interface.
  3. H2 receives the frame.

HTH, MM

Review Cisco Networking products for a $25 gift card