Академический Документы
Профессиональный Документы
Культура Документы
IP Address Classes
A classful network is a network addressing architecture used in the Internet from 1981 until
the introduction of Classless Inter-Domain Routing in 1993. The method divides the address
space for Internet Protocol Version 4 (IPv4) into five address classes by address range. All IP
addresses are placed in a particular class based on the decimal values of their first octets. In
the first octet, an IP address can start with a decimal value between 1 and 255.
Size of
Total
Class Leading network Size of rest Number Addresses addresses Start End address
bits number bit field of networks per network in class address
bit field
7
Class A 0 8 24 2 224 231 0.0.0.0 127.255.255.255
Class E not
(reserved) 1111 defined not defined not defined not defined 228 240.0.0.0 255.255.255.255
that network. This division is used as the basis of traffic routing between IP networks and for
address allocation policies. Classful network design for IPv4 sized the network address as one or
more 8-bit groups, resulting in the blocks of Class A, B, or C addresses. Classless Inter-Domain
Routing allocates address space to Internet service providers and end users on any address bit
boundary, instead of on 8-bit segments. In IPv6, however, the interface identifier has a fixed size of
64 bits by convention, and smaller subnets are never allocated to end users.
Subnet Mask
A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a
network into two or more networks is called subnetting.
Example:
Here network prefix 12.34.158 and host address is 5. Furthermore corresponding network has a subnet
mask 255.255.255.0 therefor this network can have IP addresses from 12.34.158.0 - 12.34.158.255. As
the subnet mas is of 24 bit any particular IP in this network can also be written as 12.34.158.XXX / 24.
To get the host address the logical AND operation is performed on IP address with subnet mask.
Routing:
A router is a networking device that forwards data packets between computer networks.
Routers perform the traffic directing functions on the Internet. A data packet is typically
forwarded from one router to another through the networks that constitute the internetwork
until it reaches its destination node.
Gateways:
In telecommunications, the term gateway refers to a piece of networking hardware that
has the following meaning:
Step 2: Configure the DHCP so that it assigns IPs to end devices leaving 2 IPs at
the beginning subnetwork IP block.
Step 3: Configure the DHCP server to setup gateway IP
Step 4: Configure Router’s 2 First Ethernet IP address same as the respective
subnetwork’s default gateway.
Step 5: Turn on First Ethernet ports of router
Step 6: Use PDU too to verify connection between to two subnetworks
In Router 1
//Interface Fastethernet0/0 [in global configuration mode]
Router>en
Router#conf t // configure terminal
Router(config)#hostname R1
R1(config)#interface fastethernet 0/0 [or, int f0/0]
R1(config-if)#ip address 10.0.0.1 255.0.0.0 [or, ip add 10.0.0.1 255.0.0.0]
R1(config-if)#no shutdown
R1(config-if)#exit
In Router 2
Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#interface fastethernet 0/0 [….]
R2(config-if)#ip address 30.0.0.1 255.0.0.0 [….]
R2(config-if)#no shutdown
R2(config-if)#exit
Prepared by Farah Hossain
In Router R1
R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2 //for static routing
OR,
R1(config)#router rip
R1(config)#network 10.0.0.0 //for RIP
router-config R1(config)#network 20.0.0.0
same R1(config)#exit
same
In Router R2
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1 //for static routing
OR,
R2(config)#router rip
same
R2(config)#network 20.0.0.0 //for RIP
R2(config)#network 30.0.0.0
same
R2(config)#exit
same
Home task:
1. Write the CLI instructions to configure the two routers in exercise 3. Let’s assume left
and right network of the two routers has network prefixes respectively “192.168.1.0/8” 12.34.155.0/24
and “192.168.2.0/8”. 12.34.157.0/24
2. Suppose, an IP address is “192.168.1.0”. Subnet this in such a way that exactly 4 192.168.1.2/24
hosts are needed; no more, no less. What should be the subnet mask?
Reading References:
1. https://en.wikipedia.org/wiki/Subnetwork
2. https://en.wikipedia.org/wiki/Router_(computing)
3. https://en.wikipedia.org/wiki/Gateway_(telecommunications)
Prepared by Farah Hossain
Prepared by Farah Hossain
Prepared by Farah Hossain