Internet (IP) Addresses Naming every interface!
Naming Naming every interface in the world is not easy Networks evolved from vendors with DIFFERENT naming schemes. Use the same scheme compilers use to solve the one language … many processors issue –compilers translate one language -> specific CPU/OS –translate from universal machine address to vendor specific machine address IP addresses are that universal naming scheme
What does an IP address look like? Internet agency responsible for allocation 4 byte value ( for each value –e.g first byte determines what KIND of address –Class A: Class As –Class B: Class Bs –Class C: Class Cs Others have reserved use
Examples Class B Class A Class C
Interpreting the Address Think of the address as having 2 parts: NETWORK : HOST Which network? Which specific interface on that network
Class #BytesNet#Nets #BytesHost#Host A x10 6 B 2 16, x10 3 C 3 2x Class B Class A Class C EXAMPLES Any address in the internet can immediately be classified in that manner to determine which network and which host. Some “networks” are too big, so subnetting is used.
Subnet Configuration
ORIGINALLY:Network:Host With SUBNETTING:Network:Subnet:Host
Subnets The “internet” is not aware of subnets Doesn’t care! Internal configuration within an IP network. Used for further segmentation –performance –security –as before with bridges
What does the “outside” internet do? Only examine standard Class A/B/C designation to determine network (first number) Route all messages in the network to the same destination What does the “inside” internet do? Use internal (extra) info to determine subnetting Has the freedom to manage the addresses with additional flexibility
Subnet Masks
So exactly how does the subnet concept work First define what a mask is. Apply the mask to determine what subnet the address is on. Use that to determine how to route the message (later)
Masks a means of selecting bits Lots of examples of this. One is determining Class A from Class B and Class C addresses. 0xxxxxxx -> These value are all less than 128 (0-127). 10xxxxxx -> These values are between xxxxx -> These values are between A mask will enable one to select specific bits. In this example It will enable determination of a class A/B/C address.
Background.. Logical and Consider a BITWISE and operation: Consider a slightly different view: Mask Value Ones let the value through Zeros stop the value
How do masks work? Define a mask to select the bits you want. Then and the mask with the value. To determine if Class C, the mask would be ( 195) Mask 192 Yes this is Class C Mask 128 ( 130) No.. this is Class B
So how does this impact setting up a subnet? The fundamental question is how does one determine to which subnet an address belongs. Apply the subnet mask to the address and what is left indicates which subnet the address indicates.
Example Typical class B mask: Typical class B address:
Apply the mask Result -> Given the IP address, this calculates the corresponding subnet address. This mask is a typical Class B subnet approach. It’s NOT the only one.
Now what? Now we can answer the question: “What subnet is this address on?” This will be a fundamental element of routing Recall that subnet masks are only used internal to the address (inside CNU) Used to allow flexibility for internal routing configurations Not relevant outside the network –outside x for CNU