Skip to main content

Computer Network | Subnetting

Maintaining a big network and providing security to such giant networks is always a hectic task.

Where the division of networks or subnetting makes things easier.

When you have to reach to a process running in a computer of a different network, there are three things to be identified.

  1. Identify the network.

    Firs the main network ID then the subnet ID. As deeper the subnetting, the identification time will become even more complex.

  2. Identification of Host
  3. Identification of Process

Let's subnet (Network ID) in to two (where Directed Broadcast Address(DBA) :

This network has 256(232-24) IPs.

Subnet-1 : ( DBA-S1 : )

Subnet-2 : ( DBA-S2 : )

The similarity of nework ID of first subnet and directed broadcast ID of second network to those of the main network is obviously indicates that network division.

The top level router will redirect the data to main network when it sees the main network id.

Then the router below that level decides to which subnet(1 or 2) of the network the data should reroute.

  • Network ID is a relative term w.r.t. router.
  • If the router is over the level of concern of main network the network ID point to main network.
  • else it will point to subnet.

Every subnetting reduces two IPs from the network, one for network ID and other for directed broadcast ID.

When the Subnet Masks of all the Subnets are same it is called Fixed Length Subnet Masking

An interface is the connection between to networks.

A routing table at every node lists, network ID, corresponding subnet mask and interface.

If a IP is giving any ID in the list it will mask with deful mask({of defalut NID}

Over masking an IP if it gives same network ID of the corresponding entry in routing table, the interface in that entry will be using to send the data.


Popular posts from this blog

Operating Systems | Scheduling Algorithms : Round Robin

Round RobinFeatures : Most popular algorithm of allPractically implementableImplementable with basic data structures like queueExtremely lesser starvationOptimum efficiency can be set by controlling time quantumThe round robin algorithm will continuously switch between processes if a process in CPU (under execution) exceeds a time limit set by OS called time quantum.Flow Chart :Scheduler allocated process to for execution.CPU starts monitoring the execution time right after from allocation.If the process completes its execution before exceeding time quantum, OS forwards the process to termination state.else, the processes gets preempted once the time quantum limit exceeded and if the process finished at this moment, OS moves the process to termination state, else it moves to ready queue and iterates over the whole process listed above.Example : Consider the following table of processes and calculate completion time, turn around time and waiting time using Round Robin algorithm.Assumpt…

Operating Systems | Scheduling Algorithms : SJF

Shortest Job First(SJF)SJF algorithm schedules the shortest job(low burst time) available on main memory at the time of context switching in ready state . It can be either preemptive or non-preemptive depending on the nature of scheduler.Since the SJF select the job which is shorted among available jobs on main memory, Non-preemptive SJF algorithm will have larger waiting time if a job with longer burst time get scheduled first. In short SJF is also vulnerable to Convoy EffectTo find shortest process among min-heap would be the best data structure to be usedExample : Consider the following table of processes and calculate completion time, turn around time and waiting time using SJF algorithm with the following assumptions. No preemption.No I/O request will be there from any process.Arrival time is relative to CPU on time.Process NumberATBT103222324442View Answer

The execution of processes can be visualized as follows : By analyzing above representation completion time, turn around ti…

Operating Systems | Concept of shared memory and critical section

While printing your document opened in Adobe Acrobat Reader, if you gave a same command for document opened in Microsoft Word! How will it be?These are the real time situations where two processes competing together for same resources due to improper process synchronization. An unstructured access approval to these resources may lead to a abnormal output or a breach in information security or even it may cause for data loss. In the above case which might be a bunch of over-written papers coming out of the printer connected to that system.

Shared Memory and Critical Section Resources or memory spaces where different processes have access to read, write or update at same time are known as shared memory.And the piece of program which tries to access the shared memory is known as Critical Section. There are situations where an operating system need to handle multiple request from critical sections of various processes in a machine, in order to maintain data consistency in resources