Unit - 3
Network Layer
Q1) Write short note on network layer service?
A1)
Network Layer Service
The third layer of OSI model is the Network Layer. It handles these service request from transport layer and forwards the service request to data link layer. It translates the logical addresses into physical addresses It determines the route from the source to destination and manage the traffic problems such as switching, routing and controls the congestion of data packets. The main role of the network layer is to move the packets from sending host to the receiving host.
The services by Network layer includes
- Guaranteed delivery
- Guaranteed delivery with bounded delay
- In-order packet delivery
- Guaranteed minimal bandwidth
- Guaranteed maximum jitter
- Security services
Q2) Write short note on packet switching?
A2)
Packet Switching
Packet switching is a network switching technique which is connectionless. The message is divided and grouped into number of units called packets that are individually routed from source to destination. There is no need to establish a dedicated circuit for communication.
Fig. Packet Switching
Q3) Define circuit switching?
A3)
Circuit Switching
This scheme provides a dedicated (virtual) circuit per call or session. The resources on the links (e.g., link bandwidth, switch capacity) all the way on the path between the communicating entities are reserved (in both directions) for a session and these resources are not shared with any other sessions. That means, via circuit switching, there is an upper limit to the number of sessions that can be supported over a network. This gives circuit switched sessions a guarantee on the session quality (circuit-like performance), just like the session quality guaranteed by a phone connection, to some degree at least (e.g., when you are close enough to the nearest cell tower). In order to be able to give such guarantees, your phone operator will not admit the call if the needed resources are not free. This is the same reason why it is difficult to make cellular phone calls at a concert or stadium where there are a lot of active calls using the same cell tower.
Q4) Explain classful addressing?
A4)
Class A IPv4 addresses
Class A IPv4 addresses are specifically used for large networks. The left-most bit of the left most octet of Class A network is reserved as "0". The first octet of Class A IPv4 address identifies the Network and remaining three octets identify the host in that particular network (Network.Host. Host.Host). The 32 bits of a Class A IPv4 address can be represented as
Oxxxxxxx . Xxxxxxxx. Xxxxxxxx. Xxxxxxxx.
The minimum possible value for leftmost octet in binaries is 00000000 (decimal equivalent is 0) and the maximum possible value for the leftmost octet is 01111111 (decimal equivalent is 127).
Therefore, In Class A IPv4 address, leftmost octet must have a value between 0-127 (0.X.X.Xto 127.X.X.X). The network 127.0.0.0 is known as loopback network. The IPv4 address 127.0.0.1is used by host computer to send message back to itself. It is commonly used for troubleshooting and network testing.
They need an IPv4 addresses that is unique to particular network. 10.0.0.0 network belongs to Class A is reserved for private use and can be used inside any organization.
Class B IPv4 addresses
Class B IPv4 addresses are mainly used for medium-sized networks. Two left most bits of the left-most octet of a Class B network is reserved as "10". The first two octets of a Class B IPv4 address is used to identify Network and the remaining two octets are used to identify host in that particular network (Network-Network. Host.Host).
The 32 bits of a "Class B" IPv4 address can be represented as 1 Oxxxxxx . Xxxxxxxx. Xxxxxxxx. Xxxxxxxx.
The minimum possible value for the left-most octet in binaries is 10000000 (decimal equivalent is 128) and the maximum possible value for the left most octet is 10111111 (decimal equivalent is 191). Therefore, for Class B IPv4 address, left-most octet must have a value between 128-191 (128.X.X.X to 191.X.X.X).
Class C IPv4 addresses
Class C IPv4 addresses used for small to mid-size businesses. Three left-most bits of the left most octet of a Class C network is reserved as "110". The first three octets of a Class C IPv4 address is used to identify the Network and the remaining one octet is used to identify the host in that particular network (Network-Network. Network-Host).
The 32 bits of a Class C IPv4 address can be represented as 11 Oxxxxx. Xxxxxxxx. Xxxxxxxx. Xxxxxxxx.
The minimum possible value for the left-most octet in binaries is 11000000 (decimal equivalent is 192) and the maximum possible value for the left most octet is 11011111 (decimal equivalent is 223).
Therefore, for a "Class C" IPv4 address, left-most octet must have a value between 192-223 (192.X.X.X to 223.X.X.X). Networks starting from 192.168.0.0 to 192.168.255.0 are reserved for private use.
Class D IPv4 addresses
Class D IPv4 addresses known as multicast IPv4 addresses. Multicasting refers to a technique used to send packets from one device to various devices, without any packet duplication. In multicasting, one packet is sent from a source and is replicated as needed in the network to reach as many end-users as necessary. Four left-most bits of the left most octet of a Class D network is reserved as "1110". The other 28 bits are used to identify the multicast group (group of computers the multicast message is intended for). The minimum possible value for the left most octet in binaries is 11100000 (decimal equivalent is 224) and the maximum possible value for the left most octet is 11101111 (decimal equivalent is 239).
Therefore, for a Class D IPv4 address, left-most octet must have a value between 224-239 (224.X.X.X to 239.X.X.X).
Class E IPv4 addresses
Class E is used for experimental purposes and cannot assign these IPv4 addresses to your devices. Four left most bits of the left-most octet of a "Class E" network is reserved as "1111". The minimum possible value for the left-most octet in binaries is 11110000 (decimal equivalent is 240) and the maximum possible value for the left-most octet is 11111111 (decimal equivalent is 255). Therefore, for a "Class E" IPv4 address, left most octet must have a value between 240-255 (240.X.X.X to 255.X.X.X).
Q5) Define NAT?
A5)
Network Address Translation (NAT)
NAT is a router function where IP addresses (and possibly port numbers) of IP datagrams are replaced at the boundary of a private network.
• NAT is a method that enables hosts on private networks to communicate with hosts on the Internet
• NAT is run on routers that connect private networks to the public Internet, to replace the IP address-port pair of an IP packet with another IP address-port pair.
NOTE-NAT device has address translation table
Basic operation of NAT
Q6) What do you mean by Pooling of IP addresses?
A6)
• Scenario: Corporate network has many hosts but only a small number of public IP addresses.
• NAT solution: Corporate network is managed with a private address space NAT device, located at the boundary between the corporate network and the public Internet, manages a pool of public IP addresses. When a host from the corporate network sends an IP datagram to a host in the public Internet, the NAT device picks a public IP address from the address pool, and binds this address to the private address of the host
Q7) Explain various classes range?
A7)
Q8) Define ARP?
A8)
Address Resolution Protocol (ARP)
For communication, the host needs Layer-2 (MAC) address of destination machine which belongs to same broadcast domain or network. The MAC address is physically burnt into Network Interface Card (NIC) of the machine which never changes.
While the IP address on public domain is rarely changed. If NIC changes MAC address also changes. Hence, for Layer-2 communication takes place and mapping between the two is required.
Fig. ARP
To know the MAC address of remote host on broadcast domain the computer that wishes to initiate communication sends out ARP broadcast message asking “Who has this IP address? In broadcast all hosts on the network segment receive this packet and process it. ARP packet contains IP address of destination host, the sending host wishes to talk to. When host receives an ARP packet destined to it, it replies back with its own MAC address. Once the host gets the destination MAC address it can communicate with remote host using Layer-2 link protocol. This MAC to IP mapping is saved to ARP cache of sending and receiving hosts.
If they want to communicate, they refer to their respective ARP cache. Reverse ARP is a mechanism where the host knows the MAC address of remote host but to communicate it requires IP address.
Q9) Explain RARP?
A9)
RARP (Reverse Address Resolution Protocol)
If the host wants to know its IP address, then it broadcast the RARP query packet that contains its physical address to the entire network.
A RARP server on the network recognizes the RARP packet and responds back with the host IP address. The protocol used to obtain IP address from server is known as Reverse Address Resolution Protocol.
The message format of RARP protocol is similar to ARP protocol.
Q10) Explain ICMP?
A10)
ICMP (Internet Control Message Protocol)
The ICMP is a network layer protocol used by hosts and routers to send notifications of IP datagram problems back to the sender. ICMP uses echo test/reply to check whether the destination is reachable and responding. ICMP handles both control and error messages, but the main function is to report the error but not to correct them.
An IP datagram contains the addresses of both source and destination, but it does not know the address of the previous router through which it has been passed. Due to this reason, ICMP can only send the messages to the source, but not to the immediate routers.
ICMP protocol communicates the error messages to the sender. ICMP messages cause the errors to be returned to the user processes.
ICMP messages are transmitted within IP datagram.
Fig- 20bytes ICMP
Q11) Write short note on DVR?
A11)
Distance Vector Routing
A distance-vector routing (DVR) protocol requires that a router inform its neighbours of topology changes periodically. Historically known as the old ARPANET routing algorithm (or known as Bellman-Ford algorithm).
Bellman Ford Basics - Each router maintains a Distance Vector table containing the distance between itself and ALL possible destination nodes. Distances, based on a chosen metric, are computed using information from the neighbours’ distance vectors.
Q12) Explain link state routing?
A12)
Link State Routing:
Link state routing is a technique in which each router shares the knowledge of its neighbourhood with every other router in the internetwork. The three keys to understand the Link State Routing algorithm:
o Knowledge about the neighbourhood: Instead of sending its routing table, a router sends the information about its neighborhood only. A router broadcast its identities and cost of the directly attached links to the routers.
o Flooding: Each router sends the information to every other router on the internetwork except its neighbours. This process is known as Flooding. Every router that receives the packet sends the copies to all its neighbours. Finally, each and every router receives a copy of the same information.
o Information sharing: A router sends the information to every other router only when the change occurs in the information.
Link State Routing has two phases:
Reliable Flooding
o Initial state: Each node knows the cost of its neighbours.
o Final state: Each node knows the entire graph.
Route Calculation
Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to all nodes.
o 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.
o The Dijkstra's algorithm is an iterative, and it has the property that after kth iteration of the algorithm, the least cost paths are well known for k destination nodes.
Q13) Explain path vector routing?
A13)
Path Vector Routing:
Path Vector Routing is routing algorithm in unicast routing protocol of network layer, and it is useful for interdomain routing.
The principle of path vector routing is similar to that of distance vector routing. It assumes that there is one node in each autonomous system that acts on behalf of the entire autonomous system is called Speaker node. The speaker node in an AS creates a routing cable and advertises to the speaker node in the neighboring ASs
A speaker node advertises the path, not the metrics of the nodes, in its autonomous system or other autonomous systems.
Fig-Vector Routine
It is the initial table for each speaker node in a system made four ASs. Here Node Al is the speaker node for ASI, Bl for AS2, Cl for AS3 and Dl for AS4, Node Al creates an initial table that shows Al to A5 and these are located in ASl, it can be reached through it A speaker in an autonomous system shares its table with immediate neighbours, here Node Al share its table with nodes Bl and Cl, Node Cl share its table with nodes Al, Bl and Dl, Node Bl share its table with nodes Al and Cl, Node Dl share its table with node C1
If router Al receives a packet for nodes A3, it knows that the path is in ASl, but if it receives a packet for Dl, it knows that the packet should go from ASl, to AS2 and then to AS3, then the routing table shows that path completely on the other hand if the node Dl in AS4 receives a packet for node A2, it knows it should go through AS4, AS3, and ASl
Q14) Define OSPF?
A14)
OSFP: Open Shortest Path First
Another interior routing protocol OSPF divides an autonomous system into areas n to handle routing efficiently and in a timely manner.
OSPF works
A collection of networks, hosts, and routers all contained within an autonomous system. Thus, an autonomous system can be divided into many different areas All networks inside an area must be connected
Routers inside an area flood the area with routing information Each area has a special router called area border routers n Summarize the information about the area and sent it to other areas.
Among the area inside an autonomous system is a special area called backbone n All of the areas inside an AS must be connected to the backbone The routers inside the backbone are called the backbone routers n A backbone router can also be an area border router
If the connectivity between a backbone and an area is broken n A virtual link must be created by the administration. Each area has an area identification n The area identification of the backbone is zero.
Fig- OSPF
Metrics
OSPF allows the administrator to assign a cost, called the metric, to each route o Metric can be based on a type of service and Minimum delay and Maximum throughput. A router can have multiple routing tables n Each based on a different type of service.
Q15) Write about MANET in detail?
A15)
Mobile Ad Hoc Networks (MANET)
- Host movement frequent
- Topology change frequent
- No cellular infrastructure Multi hop wireless links.
- Data must be routed via intermediate nodes.
Need of MANET
Setting up of fixed access points and backbone infrastructure is not always viable Infrastructure may not be present in a disaster area or war zone Infrastructure may not be practical for short range radios; Bluetooth (range ~ 10m) Ad hoc networks. Do not need backbone infrastructure support are easy to deploy Useful when infrastructure is absent, destroyed or impractical
Application
Personal area networking cell phone, laptop, ear phone, wrist watch Military environments soldiers, tanks, planes Civilian environments taxi cab network meeting rooms sports stadiums boats, small aircraft Emergency operations search and rescue policing and fire fighting
Q16) What is AODV?
A16)
Ad-Hoc On Demand Vector Routing protocol (AODV)
It is a reactive or on-demand routing protocol. It is an extension of dynamic source routing protocol (DSR) and it helps to remove the disadvantage of dynamic source routing protocol. In DSR, after route discovery, when the source mobile node sends the data packet to the destination mobile node, it also contains the complete path in its header. In this as the network size increases, the length of the complete path also increases and the data packet’s header size also increases which makes the whole network slow. Hence, AODV Routing protocol came as solution to it. The main difference lies in the way of storing the path, AODV stores the path in the routing table whereas DSR stores it in the data packet’s header itself. It also operates in two phases in the similar fashion: Route discovery and Route maintenance.
Q17) Explain DSR?
A17)
Dynamic Source Routing protocol (DSR):
It also is a reactive or on-demand routing protocol. In this type of routing, the route is discovered only when it is required or needed. The process of route discovery occurs by flooding the route request packets throughout the mobile network.
Phases:
Route Discovery:
This phase determines the most optimal path for the transmission of data packets between the source and the destination mobile nodes.
Route Maintenance:
This phase performs the maintenance work of the route as the topology in the mobile ad-hoc network is dynamic in nature and hence, there are many cases of link breakage resulting in the network failure between the mobile nodes.
Q18) What do you mean by next generation IP?
A18)
Next Generation IP
Requirements for Next Generation IP
- Must provide more network addresses.
- Must provide for efficient route aggregation.
- Must adapt to mobile devices connecting with a multiplicity of datalink
methods with a minimum of network overhead. - Must adapt to emerging home-entertainment-network market
- Must interoperate smoothly with IP4 during transition period, which could last for many years.
IPng features
128-bit address, giving a total address space of 2128 possible addresses.
Q19) Explain network layer performance?
A19)
Network Layer Performance
Network performance is measured in two fundamental ways:
- Bandwidth (also called throughput)
- Latency (also called delay).
- The bandwidth of a network is given by the number of bits that can be
transmitted over the network in a certain period of time. - For example, a network might have a bandwidth of 10 million bits/second
(Mbps), meaning that it is able to deliver 10 million bits every second. - Bandwidth is literally a measure of the width of a frequency band. For
example, legacy voice-grade telephone lines supported a frequency band ranging from 300 to 3300 Hz; it was said to have a bandwidth of 3300 Hz - 300 Hz = 3000 Hz. - If you see the word bandwidth used in a situation in which it is being
measured in hertz, then it probably refers to the range of signals that can be accommodated.
Q20) Write Short note on IPV4?
A20)
IPv4 addresses
IPv4 addresses 32-bit binary addresses which is divided into 4 octets used by the Internet Protocol OSI Layer 3 for delivering packet to a device located in same or remote network. MAC address known as Hardware address is a globally unique address which represents the network card that cannot be changed. IPv4 address refers to a logical address, a configurable address which is used to identify which network this host belongs to and the network specific host number.
An IPv4 address consists of two parts.
Network part
Host part
An example of IPv4 address is 192.168.10.100, which is actually
11000000.10101000.00001010.01100100.
For Each network, consists of two addresses one address is used to represent the network and one address is used for broadcast.
Network address is an IPv4 address where all host bits are "0".
Broadcast address is an IPv4 address where all host bits are "1".
In a network, the first IPv4 address is the network address and the last IPv4 address is the broadcast address. All the usable IPv4 addresses in any IP network are between network address and broadcast address. There are five IPv4 address Classes and certain special addresses.
o The second performance metric, latency, corresponds to how long it takes a message to travel from one end of a network to the other.
Latency consists of three components.
Speed-of-light propagation delay
o This delay occurs because including bit on a wire, can travel faster than the speed of light. If you know the distance between two points, you can calculate the speed-of-light latency, Time
o Amount of time it takes to transmit a unit of data. This is a function of the network bandwidth and the size of the packet in which the data is carried.
Queue:
o There may be queuing delays inside the network, since packet switches generally need to store packets for some time before forwarding them on an outbound link.
Hence, we define the total latency as
Latency = Propagation + Transmit + Queue
Propagation = Distance Z Speed Of Light
Transmit = Size Z Bandwidth