I'M taking a Linux/Unix admin course from the Oreilly online school. But I'M having a hard time understanding tcp/ip section, it's really making my head spin. Here is some of the lesson, could someone please help clear this up for me? thanks.

Network, Broadcast, and Subnets
Let's give ourselves a class C network of 192.168.1.xxx. Two of the addresses are automatically used up--the network address of and the broadcast address of The network address is used when referring to the network itself, and the broadcast address is used to refer to all of the hosts on that network. This means you can have 254 hosts on the network. That's quite a few hosts to connect on the same IP network! We need a way to split up the network into smaller parts.
All classes also have what's called a subnet mask. By default a class C network has a subnet mask of (Note that the "on" bits are the same ones represented by red x's in the table above.) In fact, this default mask is really the only thing the old class structure is used for anymore. By changing the subnet mask, we can split up the large IP network into two or more smaller networks. The subnet mask is then used to determine which portion of an IP address defines the network and which defines the host. Let's look at our network again:
11111111 11111111 11111111 00000000 subnet mask (
11000000 10101000 00000001 00000001 ip address of the first host (
Now let's split it into two subnets instead of one. We'll do this by converting one of the host bits into an additional network bit. The new subnet mask would be as follows:
11111111 11111111 11111111 10000000 (
But now, we have two networks and two broadcast addresses as well. This is because the green number, although part of the network portion, can be either a one or a zero. For the network addresses, all of the host bits are 0 and for the broadcast addresses, all of the host bits are 1.
11000000 10101000 00000001 00000000 1st network address (
11000000 10101000 00000001 01111111 1st broadcast address (

11000000 10101000 00000001 10000000 2nd network address (
11000000 10101000 00000001 11111111 2nd broadcast address (
The subnet mask is useful because when coupled with a host IP address, it provides all of the necessary information about a subnet. Let's say we're given the following pair:
subnet mask:
host address:
The subnet mask lets us determine the network and host parts of the IP address. From this IP address and subnet mask, we know the network and broadcast addresses for all of the subnets, as well as which subnet contains the host (which happen to be the second set from above).
The subnet mask is like a filter telling us which parts are for the network and which are for the hosts. But why not just give the IP address and network address? Isn't that enough to describe it? Not really.
network address:
host address:
From this pair we know that the host is on the network. However, there is no way of knowing whether that network is split into multiple subnets or not. We don't know if is on the same subnet as

Don't get discouraged, most people feel the same way when encountering subnetting for the first time - it is probably the most difficult networking subject. Have a look at these:

learn-networking.com - how to subnet a network
cisco.com - IP Addressing and Subnetting for New Users
subnetmask.info - Networking Calcuclators
faqs.org - Linux Network Administrator's Guide

Hope this helps.

Thanks for the help user422. And I love that profile pic.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.