Wednesday, May 15, 2013

Ip Addressing Tutorial - Network Address, Mask (Interactive, optic Animation 3)

Q1. What is network address?
Answer: We can view network and host addresses in two ways:
1) Network-Id and Host-Id

An Ip address is made of two parts, the left part is network Id, the right part is host Id.

Mask

For example, in 100.3.4.5, if 100 is a network Id, then 3.4.5 is a host Id. If 100.3 is network Id, then 4.5 is a host Id.

2) Network-address and host-address. Let's look at two examples:

Ip-address Network-Id Host-Id Network-address Host-address Mask
100.4.5.6/8 100 4.5.6 100.0.0.0 100.4.5.6 /8
150.1.2.3/16 150.1 2.3 150.1.0.0 150.1.2.3 /16
Note: Network mask is presented as /m where m is a 2-digit decimal estimate between 8~31.
Note: Ip, network, and host addresses are usually presented with masks.

Q2. What is mask?
Answer. Ip uses network mask to break up a 32-bit Ip-address into network-Id and host-Id. Network-address is made of network-Id bits on the left and 0 bits on the right.

For example, for 150.1.2.3/16, 16 is the network mask, 150.1 is network-Id, 150.1.0.0/16 is network-address, 2.3 is host-Id, 150.1.2.3/16 is host-address. Network-address is used by routers to forward packets. Host address is used to distinguish hosts in the same network.

Q3. Why network addresses?
Answer: When numbers are too many, we use hierarchical buildings to carry on them. For example, telephone estimate are structured as.

For example, 086.021.1234.5678 is a estimate in China, Shanghais. The voice message is switched by country code, city code, and prefix. Structured phone numbers are much easier to switch than flat 10-digit phone numbers.

Internet faces a similar situation. There are nearly 4.2 billion addresses (Ip has 32 bits. Or 2^32 individual addresses.) Routers use routing tables to foreword packets. Obviously, it's much easier for router to handle structured addresses than 4 billion flat ones.

Ip's solution is to use network-addresses to forward packets, not individual ones. Network mask breaks an address into a network-Id and a host-Id. Routing tables use network addresses, not Ip addresses.

For example,
- 100.0.0.0/8 network has 16,777,216 addresses. In a routing table, (100.0.0.0/8, next hop interface) says: forward packets with the same destination network to the same next hop interface.
- 150.1.0.0/16 network has 65,536 addresses. In a routing table, (150.1.0.0/16, next hop interface) takes care of forwarding 65,536 individual addresses in 150.1.0.0/16 network.
- 150.1.0.0/16 network has 65,536 Ip addresses. In a routing table, (150.1.0.0/16, next hop interface) takes care of forwarding 65,536 individual address in 150.1.0.0/16 network.
- 222.111.44.0/24 has 256 Ip addresses. In a routing table, (222.111.44.0/24, next hop interface) forwards 256 Ip addresses in 222.111.44.0 network to the next hop interface.

Q4. How gift mask in decimal?
Answer. gift mask the same way as Ip address. For example.
/8 is presented as 255.0.0.0.
/16 is presented as 255.255.0.0.
/24 is presented as 255.255.255.0

Q5. Why mask distance is many of 8 but?
Answer: There are two type of Ip addressing schemes: classful and classless. What we've talked so far is classful. Classless Ip address can use mask of any length. See next tutorials for details.

This narrative is the Faq of an interactive animation. You can play this animation listed under External links.

Ip Addressing Tutorial - Network Address, Mask (Interactive, optic Animation 3)

0 comments:

Post a Comment