Pages

Monday, March 26, 2018

CSMA | Computer Networks

CSMA(Carrier sense multiple access)

CSMA(Carrier sense multiple access)

Csma is nothing but before transferring the packets from one host to another host it first senses the channel[i.e whether the channel is in ideal state or busy state]

If it is ideal then it can use the channel

If it is busy we have 3 persistent techniques

    1)1-Persistent
    2)Non-Persistent
    3)P-Persistent

In addition it has no Acknowledgement concept

Vulnerability time=Tp

Possibility of collision occurs as every device sends first bits without knowing other channels

As we discussed earlier if channel is busy then we have 3 techniques listed above

1)1-Persistent

It will continuously sense channel until station comes to know that channel is idle[i.e free]

Possibility of collision is more as two or more stations transfer packets[i.e all hosts think that as channel is free every host will start sending their packets

2)Non-persistent

Station will wait for random amount of time and then it senses the channel

reduces Efficiency as we cant access channel even if it is in idle state

3)P-Persistent

The p-persistent strategy combines the advantage of other two approaches[i.e],
a)It reduces the chance of collision
b)It improves efficiency

The Difference between pure aloha and csma is
a)Only sends first bit in csma
b)No ack concept in csma
c)Before transferring frames it will first sense channel whether it is ideal or busy

Your Name :

Your Email: (required)

Your Message: (required)


Differences between Connection less and connection oriented | Computer Networks

Differences between connection less and connection oriented

Communication can be established in two ways between two or more devices that are connection-oriented and connection-less. Network layers can offer these two different types of services to its predecessor layer for transferring data. Connection-oriented services involves the establishment and termination of the connection while connection-less services doesn’t require any connection creation and termination processes for transferring data.

BASIS OF COMPARISION CONNECTION-ORIENTED CONNECTION-LESS
Connection requirement Necessary Not Necessary
Reliability Ensures reliability not guaranteed
Congestion congestion control can be easily achieved Very Difficult to control congestion as we dont know which path it travels
Transfering mode implemented using circuit switching and virtual circuit implemented using packet switching
lost data retransmission capable of being done i.e retransmission not possible
Quality of service Quality of service can be achieved quality of service cant be achieved
state information each router will be maintaining state information
each router does not have any state information
resource allocation need to be allocated no prior allocation of the resource is required
direction all need to travel in same path each packet will be routed independently
Circuit setup circuit setup is required no circuit setup
Your Name :

Your Email: (required)

Your Message: (required)


Saturday, March 24, 2018

Domain Name System | computer networks

Domain Name System

Domain Name System

For Example we know that People are Good at remembering host names rather than remembering ip numbers[i.e For Example if we want to browse in google search engine we obviously type www.google.com but this dns server converts that host names to ip addresses

Therfore Simply we can say that Dns Is a server which map host names to ipaddresses

The way how dns works is illustrated in the below image

DNS server is Used as Follows

->TO map a name onto an IP address,an application calls a library procedure called resolver

->The resolver sends a query containing the name to local dns server,which looks up the name and returns a response containing the ip address to the resolver which then returns to caller[who has requested].

->The query and response messages are sent as UDP packets

The Dns NameSpace

The names must be unique as the ipaddresses are unique.and namespace is designed in hierarchical manner,where each name has several parts

The First part defines the nature of the organisation [i.e the root node] The second part defines the name of the organisation similar to top domains,and third part defiens departments int he organisation.

The tree can have 128 levels[i.e 0 to 127] 0 is for root node

each node in a tree is a domain name,which is a string with a maximum of 63 characters.The root label is empty string as it is 0 level

In the above figure microsoft.com com is a label and microsoft which is a child of com is a label

Domain Name

each node has a domain name. a full domain anme is a sequence of labels seperated by dots(.).the domain names are always read from node up to the root.
let us consider a example that illustrates about label and domain name.

First thing is domain names are case insensitive so com|Com|COM are supported

Full path name must not exceed 255 characters

the internet is divided into 250 top level domains wher each domain covers many hosts,each domain is partitioned into subdomains and these are further partitioned

the top level domains has two types

->Generic domains in which it defines registered organisations example:->.com,.gov,.edu

->country domain section uses two character country abbreviations example us for united states ,and in for india

Domain Resource Records

Every domain whethter it is a single host or a top level domain can have a set of resources associated with it,When a resolver gives a domain name to dns what it gets back are resources records associated with that name.

A resource record is of five parts

The Domain name tells the domain to which this record applies

The time to live field gives an indication of how stable the record is.information with highly stable is assigned a larger value

the third field of every resource record is the class.for internet info it will be always set to 1.

The SOA record provides the name of the primary source information

the most important record type is the A(address).it holds 32 bit IPV4 address

Hierarchy of Name Servers

the information contained in the domain name space must be stored as it is unreliable to have just one computer to sore such huge amount of data.[as it is responding to requests all over the world places a heavy load on the system

the solution to this problems is distribute the information among many computers called dns servers

As we know about root servers [whose zone contain whole tree]

dns has two servers:primary and secondary servers

primary for creating,maintaining and updating the zone file

secondary servers loads informaton about a zone from primary memory

Name Resolution

The process of looking at a name and finding address is called name resolution

the name can be solved in 2 ways

1.Iterative query

2.recursive query

Iterative query

For example we have a root node and it is sub divided into .com,.gov,.edu.co.in etc.. and .com is subdivided into facebook and facebook is divided into messages and if .edu is divided into stanford university and it is subdivided into ms, if ms needs the ipaddress of messages which is in facebook the local dns server first asks ms it says it doesnt know about messages and again local server asks stanford even it states it doesnt have the address and again it asks .edu it says the same reason and it asks root node it says i do have the address with .com so it asks .com it states go to facebook it may have the address it asks facebook for messages address and finally it asks messages adddress,this is Iterative query as local server is requesting all sub domains and root node for its requested address but in case of reccursive query the local server asks ms about messages address and ms will ask for stanford and stanford will ask for.edu and .edu will ask for root node and root asks .com and .com asks facebook and facebook asks messages through this way local server is not required for every iteration.

Iterative query

Reccursive query

Your Name :

Your Email: (required)

Your Message: (required)


Classless Addressing Problems | Computer Networks

Classless Addressing Problems | Computer Networks

Classless Addressing

->To Reduce the Wastage of IP Addresses and give most Organisations Access to Internet,Classless addressing was Designed and implemented.

The Internet Authorities impose three main restrictions on this classless addressing,Those are Listed Below..

1.A block of Address Must be contiguos,Similarly like an array [contiguos-Next or together in sequence]

2.The number of Addresses should be in power of 2.

3.First address in a Block Should be Evenly Divisible by number of addresses in a block.

Mask

Mask Is used to define the block of addresses,In Classless Adressing Mask Ranges in between 0 to 32.

For Example:- If 205.17.37.38/28 is the block of Address in which 205.17.37.38 defines one of the addresses and /28 defines the mask.and the block of addresses will be separated by periods i.e dots(.).

CIDR(Classless Inter Domain Routing)

CIDR is nothing but the block of addresses and masks.[i.e used to find first and last address].

Let us Know few CIDR's in the below image but this is not neccessary

So Let us find the first and last address of given block of addresses with masks

Example:- 205.17.37.38(block of address)
28 is mask

As we all know that mask ranges from 0-32
Subtract that given mask with 32

So now if we subtract (32-28) we get 4.

First Convert Those given block of addresses into binary format

so we get 205.17.37.38 as(transformed into binary) 11001101 00010001 00100101 00100110(note that these are not separated by periods i.e is dots

Set Right foremost bits to zeros i.e as we got 4 from subracting masks i.e(32-28) [we must set right foremost bits i.e last 4 bits will be tranformed to zeros]

So now we get the first address as 11001101 00010001 00100101 00100000[last 4 bits changed to zero]
so the converting them into decimal we get 205.17.37.32[and this is our first address]

So now to find last address we need to set those right foremost four bits to one'si.e we get those block of address as 11001101 00010001 00100101 00101111 in which if it is converted into binary we get 205.17.37.47[this is the last address

So inorder to find for how many systems we can generate ipaddresses is subtract first address and last address.
in the above example we got first and last addresses as 32 and 47 so(32-47) we get 16.

so finally we can know that for 16 systems we can generate ip addresses

If you wanna try another example try it for Below question

205.16.39.37/27

Your Name :

Your Email: (required)

Your Message: (required)