Unit Iii
Unit Iii
Logical Addressing
Physical address Logical address
A physical address is a unique identifier given to A logical address is a unique address assigned to each
network interfaces for communication over a physical networked device to identify its location and enable
network segment. routing.
MAC address IP address
Physical address can uniquely identify devices and It is used in the Network layer
deliver data packets accurately. Data link layer.
Used for network Security Can handle no. of nodes.
easily spoofed Vulnerable to attacks.
Physical address cannot traverse through routers. Traverse through routers.
• 2 types:
• IPV4
• IPV6
INTERNET PROTOCOL
IPV4 and IPV6
Logical Addressing
• INTERNET PROTOCOL:
• An IP address (Internet Protocol address) is a unique identifier assigned to each
device connected to a network that uses the Internet Protocol for communication. It
serves two main purposes:
• Identification: It uniquely identifies a device on a network.
• Location Addressing: It indicates where a device is located within a network, making data routing
possible.
Logical Addressing
• IPV4:
• It uses a set of four numbers, separated by periods (like 192.168.0.1), to give each
device a unique address.
• This address helps data find its way from one device to another over the internet.
• It as the primary version brought into action for production within the ARPANET in
1983.
• IP version four addresses are 32-bit integers which will be expressed in decimal
notation. Example- 192.0.2.126 could be an IPv4 address.
Logical Addressing
• An IPv4 address consists of series of four eight-bit binary numbers which are separated
by decimal point.
• Example:
• 104.244.42.129 - 01101000.11110100.00101010.10000001
• An IPv4 address consists of 32 bit (binary digit), grouped into four section of known as
octets or bytes.
• Each octet has 8 bits and this bits can be represented only in 0 or 1 form.
• Since each octet has 8 bits, it can represent 256 numbers ranging from o to 255.
• In Class A, the network ID is determined by the remaining 7 bits, while the first bit in higher
order bits of the first octet is always set to 0. There are a total of 27 networks in Class A,
which equals 128 network addresses and 2 24 – 2 = 16,777,214 host addresses.
Logical Addressing
• Class B:
• An IP address is assigned to networks range from small sized to large sized.
• Class B networks are those that range in size from small to large networks
and are given an IP address.
• There are 16 bits in the Network ID.
• There are 16 bits in the host ID.
• The network ID is determined by the remaining 14 bits, with the higher
order bits of the first octet always set to 10. The Host ID is found in the
remaining 16 bits.
• There are 214 networks in Class B, which equates to 16384 network
addresses.
Logical Addressing
• Class C: An IP address is assigned to networks that are small sized.
• There are 24 bits in the Network ID.
• There are 221 networks in all, which equals 2097152 network addresses.
• Class D:IP address are reserved for multicast address and does not possess
subnetting.
Logical Addressing
• Class E
• An IP address is used for the future use and for the research and
development purposes and does not possess any subnetting.
• In every network, the host ID is determined by the remaining bits, with the
higher order bits of the first octet always set to 1111.
Logical Addressing
IPV6
• IPv6 uses 128-bit addressing, which can support 340 trillion addresses.
• IPv6 improves addressing and routing of network traffic.
• IPv6 is based on specifications from the Internet Engineering Task Force
(IETF).
• Pv6 provides a much larger address pool than IPv4, allowing more devices
to connect to the internet.
• IPv6 provides additional security to support the growth of connected
devices.
SUBNETTING
Subnetting
• Subnetting:
• Process of dividing a large network into smaller networks called subnets.
• It is a way to split a large network into smaller networks so that devices present in
one network can transmit data more easily.
• Why subnetting?
• Without subnetting, all devices share the same network, and all 256 IP
addresses are available to everyone.
• IP Waste, Security risk, Performance Issues.
Subnetting
• Drawbacks of classful addressing:
• The disadvantage is that networks were usually too big or too small for most
organizations to use, because only three sizes were available.
• Within a decade after the invention of the Domain Name System (DNS), the classful
network method was found not scalable.
• Routing protocols were revised to carry not just IP addresses, but also their subnet
masks.
Subnetting
• Subnet mask:
• A subnet mask is a 32-bit number used in IP addressing to separate the network
portion of an IP address from the host portion.
• It helps computers and devices determine which part of an IP address refers to the
network they are present, and which part refers to their specific location or address
within that network.
Subnetting - CIDR
• The CIDR number comes from the number of ones in the subnet mask when
converted to binary.
• Dynamic routing - Routing tables are automatically maintained based on information from routing
protocols.
• Default routing - routing technique in which a router is configured to transmit packets to a default
route that is, a gateway or next-hop device if no specific path is defined or found.
Routing
Static Routing Dynamic Routing
In static routing routes are user-defined. In dynamic routing, routes are updated according to the topology.
Static routing does not use complex routing algorithms. Dynamic routing uses complex routing algorithms.
Static routing provides high or more security. Dynamic routing provides less security.
Static routing is implemented in small networks. Dynamic routing is implemented in large networks.
In static routing, additional resources are not required. In dynamic routing, additional resources are required.
In static routing, failure of the link disrupts the rerouting. In dynamic routing, failure of the link does not interrupt the rerouting.
Less Bandwidth is required in Static Routing. More Bandwidth is required in Dynamic Routing.
Another name for static routing is non-adaptive routing. Another name for dynamic routing is adaptive routing.
Distance vector Routing (DVR)
• Bellman – ford algorithm/adaptive routing/ iterative routing/ dynamic
routing protocol.
• Determines best path. Have routing table. Share routing info.
A 12 B
9
4 1
2
D C
Destin Distan Next Destin Distan Next Destin Distan Next Destin Distan Next
ation ce router ation ce router ation ce router ation ce router
A 0 A A 12 A A 9 A A 4 A
B 12 B B 0 B B 1 B B ∞ B
C 9 C C 1 C C 0 C C 2 C
D 4 D D ∞ - D 2 D D 0 D
Distance vector Routing (DVR)
Destin Distan Next Destin Distan Next Destin Distan Next Destin Distan Next
ation ce router ation ce router ation ce router ation ce router
A 0 A A 12 A A 9 A A 4 A
B 12 B B 0 B B 1 B B ∞ B
C 9 C C 1 C C 0 C C 2 C
D 4 D D ∞ - D 2 D D 0 D
A 12 B
4 9 1
A B D 2 C D
C
Destin Distan Next Destin Distan Next Destin Distan Next Destin Distan Next
ation ce router ation ce router ation ce router ation ce router
A 0 A A 7 C,D A 6 D A 4 A
B 7 D,C B 0 B B 1 B B 3 C
C 6 D C 1 C C 0 C C 2 C
D 4 D D 3 C,D D 2 D D 0 D
Distance vector Routing (DVR)
• Example 2: Destin Distan Next Destin Distan Next Destin Distan Next
ation ce router ation ce router ation ce router
A 0 A A 1 A A 2 A
B 1 B B 0 B B 5 B
1 C 2 C C 5 C C 0 C
A B
Destin Distan Next Destin Distan Next Destin Distan Next
2 5 ation ce router ation ce router ation ce router
C A 0 A A 1 A A 2 A
B 1 B B 0 B B 3 A,B
C 2 C C 3 A,C C 0 C
• Advantages of Distance Vector routing • Disadvantages of Distance Vector routing
• Shortest Path : Distance Vector Routing finds the shortest
path for data to travel in a network. • Slower
• Usage : It is used in local, metropolitan, and wide-area • Create more traffic
networks. • Periodic updates are required even if no change in
• Easy Implementation : The method is simple to set up network
and doesn’t require many resources.
Link State Routing
• Link-state routing uses link-state routers to exchange messages.
• Link state routing is a technique in which each router shares the knowledge of its neighborhood with
every other router i.e. the internet work. The three keys to understand the link state routing algorithm.
• Knowledge about the neighborhood - share the neighborhood information
instead of routing table.
• Flooding - Each router sends the information to every other router on the
internetwork except its neighbors. Every router that receives the packet
sends the copies to all the neighbors.
• Information Sharing - A router send the information to every other router
only when the change occurs in the information.
Link State Routing
• Link state routing has two phase:
• Reliable Flooding: Initial state – Each node knows the cost of its neighbors. Final state- Each node
• Route Calculation : Each node uses Dijkstra’ s algorithm on the graph to calculate the optimal routes
to all nodes. The link state routing algorithm is also known as Dijkstra’s algorithm which is used to
find the shortest path from one node to every other node in the network.
Objective - Find the shortest route from source router to all other routers in the network.