CN Unit 2
CN Unit 2
CN Unit 2
- used to uniquely identify a host within a local network (function of the Data-Link
layer)
The first six hexadecimal digits of a MAC address identify the manufacturer of the
physical network interface Organizational Unique Identifier (OUI)
The last six digits uniquely identify the host itself, and are referred to as the host ID
The scalability limitations of Layer-2 hardware addresses are mitigated using logical
addresses
Logical Addressing
Internetwork Packet
Exchange (IPX) and Internet Protocol (IP)
Internet Protocol
158 . 80 . 164 .3
First Octet Second Octet Third Octet Fourth
Octet
Each octet is an 8-bit number, resulting in a 32-bit IP
address
10.0.0.0 CLASS A
129.10.0.0 CLASS B
192.168.10.0 CLASS C
238.20.10.0 CLASS D
Hosts and Networks
Types of IPv4 Addresses
• Public and Private IPv4 Addresses
– Private addresses are not routed over the Internet
– Private Addresses:
• 10.0.0.0/8 or 10.0.0.0 to10.255.255.255
• 172.16.0.0 /12 or 172.16.0.0 to 172.31.255.255
• 192.168.0.0 /16 or 192.168.0.0 to 192.168.255.255
• Special User IPv4 Addresses
– Loopback addresses
• 127.0.0.0 /8 or 127.0.0.1 to 127.255.255.254
– Link-Local addresses or Automatic Private IP Addressing (APIPA) addresses
• 169.254.0.0 /16 or 169.254.0.1 to 169.254.255.254
– TEST-NET addresses
• 192.0.2.0/24 or 192.0.2.0 to 192.0.2.255
• Classless Addressing
– CIDR
– Allocated IPv4 addresses based on prefix length
• Assignment of IP Addresses
Networks
SUBNET MASK
Subnet Mask
192.168.20.1 255.255.0.0
The above IP address has a subnet mask of 255.255.0.0. The subnet mask
follows two rules:
IP Address: 11000000.10101000.000010100.00000000
Subnet Mask: 11111111.11111111.00000000.00000000
Creates multiple logical networks that exist within a single Class A, B, or
C network
If you do not subnet, you will only be able to use one network from your
Class A, B, or C network, which is unrealistic
Each data link on a network must have a unique network ID, with every
node on that link being a member of the same network
Benefits of Subnetting
3) Simplified management
What’s the broadcast address for each subnet (always the number right
before the next subnet)?
What are the valid hosts (the numbers between the subnet number and
the broadcast address)?
Practice Example #1B: 255.255.128.0 (/17)
Network 172.16.0.0
Subnets? 21 = 2
Hosts? 215– 2 = 32,766 (7 bits in the third octet, and 8 in the fourth)
performed in the third octet, so the subnet numbers are really 0.0 and 128.0
Valid hosts?
Practice Example #2B: 255.255.240.0 (/20)
Network 172.16.0.0
•Valid hosts?
Networks
VARIABLE LENGTH SUBNET MASK
Variable Length Subnet Mask (VLSM)
In FLSM all subnets use same subnet mask, this lead to inefficiencies.
All things considered, situation, some subnets may require vast number of host
addresses while other may require just couple of locations.
For instance, assume that you are a network administrator at Software
Company. Company has three departments connected with wan links.
Development department has 74 computers.
Production department has 52 computers.
Administrative department has 28 computers.
All departments are connected with each other via wan link. Production
Each wan link requires two IP addresses. Department
52 Computers
Development
Department
74 Computers
Administrative Department
52 Computers
With FLSM, we have two choice to accumulate this,
either purchase a class B IP address
or
purchase at least two Class C IP addresses
First choice (purchase a class B IP address)
Subnetting of this address would give us 128 subnets and 510 hosts in each
subnet.
Our network requires only 6 subnets and 160 addresses.
We would have to pay for 65356 addresses while you need only 160 addresses.
Every IP address adds more dollars in company bill. Would you consider this
address space for company?
Second choice (purchase at least two Class C IP addresses)
192.168.1.0/25
192.168.2.0/26
Subnetting of first address 192.168.1.0/25 would give us 2 subnets and 126 hosts
in each subnet.
Collectively we are getting 6 subnets and 500 hosts from these two address
spaces.
We are still wasting more than 300 IP address, and we would have to purchase
two address spaces.
Variable Length Subnet Mask
VLSM is a process of breaking down subnets into the smaller subnets, according to the
need of individual networks
VLSM Subnetting
Find the largest segment. Segment which need largest number of hosts
address
Do Subnetting to fulfill the requirement of largest segment
Assign the appropriate subnet mask for the largest segment
For second largest segments, take one of these newly created subnets and
apply a different, more appropriate, subnet mask to it
Assign the appropriate subnet mask for the second largest segment
Repeat this process until the last network
How about we comprehend it with above case. Our organization requires 6
subnets and 160 hosts
Step 1:- Oder all segments according the hosts requirement (Largest to
smallest).
192.168.1.0/25
Segment Development
Requirement 74
CIDR /25
Subnet mask 255.255.255.128
Network ID 192.168.1.0
First hosts 192.168.1.1
Last hosts 192.168.1.126
Broadcast ID 192.168.1.127
Step 4 :- Do subnetting for second largest segment from next available subnet. Next
segment requires 52 host addresses. Subnetting of /25 has given us two subnets with 128
hosts in each, from that we have assigned first subnet to development segment. Second
segment is available, we would do subnetting of this.
192.168.1.0/26
Segment Production
Requirement 52
CIDR /26
Subnet mask 255.255.255.192
Network ID 192.168.1.128
First hosts 192.168.1.129
Last hosts 192.168.1.190
Broadcast ID 192.168.1.191
Networks
NETWORK DEVICES
Network Interface Card (NIC)
NIC stands on first place. Without this device, networking cannot be done.
This is also known as network adapter card, Ethernet Card and LAN card
A NIC converts parallel data stream into serial data stream and vice versa
serial data stream is get converted in parallel data stream.
Types of NICs
Ethernet HUB :- In this type of HUB all ports have RJ-45 connectors.
Combo HUB :- In this type of HUB ports have several different types of
connectors such RJ-45, BNC, and AUI.
For Example a HUB which has four ports. Ports share everything. One port
received data signal from its connected device. It will make three copies of data
signal from HUB and give one copy to each port. Receiver port doesn’t need a
Active HUB:- It also forwards the data signal from all
ports except the port on which signal arrived. But before
forwarding, it improves quality of data signal by
amplifying it. Due to this added features active HUB
is also known as repeaters.
Bridge
Without segmentation all these nodes will share same collision domain that
will bring down overall network performance.
Bridge has per port collision domain which means if a port faces collision,
other ports will not effect from this collision.
Basic function of Bridge are following :-
•Break a large network in smaller segments.
•Join different media types such as UTP with fiber optic.
•Join different network architectures such as Ethernet with Token Ring.
Local Bridge :- This bridge connects two LAN segments directly. In Ethernet
Implementation it is known as Transparent bridge. In Token Ring network it is
called Source-Routed bridge
Remote Bridge :-
This bridge connects with another
bridge over the WAN link.
Wireless Bridge :- This bridge connects with another bridge without wiring
between them.
In OSI Layer model Bridge works at physical layer and data link layer.
•In bridge forward decision are made through the software which slow down
overall performance of network
•Bridges use age old technology which is not capable to fulfill the requirement
of modern networks effectively
Just like Hub and Bridge, switch is also used to connect multiple computers
together in a LAN segment.
Switches available with 4,8,12,24,48,64 ports.
Each switch port has a separate collision domain.
Switch works at layer two in OSI Layer model.
At layer two data signals are formatted in frames.
When a switch receives frame, it checks FCS (Frame checksum sequence) field
in it.
Switch process the frame only if it is valid.
All invalided frames are automatically dropped.
All valid frames are processed and forwarded to their destination MAC
address.
Switches support three methods of switching
In this method Switch only read first six bytes from frame after the preamble.
These six bytes are the destination address of frame.
This is a hybrid version of Store and Forward method and Cut and Through
method.
It takes goodies from both methods and makes a perfect method for switching.
It checks first 64 bytes of frame for error. It processes only those frames that
have first 64bytes valid.
Any frame less than 64 bytes is known as runt. Runt is an invalid frame type.
Router is a layer three device which forwards data packet from one logical
network segment to another.
Router forwards packets on the bases of their destination address. For this router
keeps record of the path that packets can use as they move across the network.
To connect two different media types such as UTP and fiber optical.
To connect two different network architectures such as token ring and Ethernet.
To connect LAN network with Telco company’s office (Known as DTE device).