Showing posts with label Networking. Show all posts
Showing posts with label Networking. Show all posts

Monday, 30 March 2015

Differences between Transport layer and Datalink layer

Transport layer works on OSI reference layer 4 and data link on layer2.
Transport layer is used to communicate between 2 different processes on internet. They identify the processes based on the port number. But data link layer operates on very lower layer and used to communicate between 2 different machines. They uses mac addresses to communicate.

Both protocols required to establish a connection between 2 processes on internet. First data link layer will establish a connection to a remote machine. Once the connection is successful i.e if 2 hosts are able to communicate then process level communication will be achieved by transport layer. Essesntially data link layer will understand the mac address of remote machine, but transport layer will understand the port number of remote machine.

Note: Actullay internet layer(IP layer) will be used to establish a connection, I used above to understand the difference between mentioned protocols better.

Tuesday, 24 March 2015

How to do a screen share wiht Linux Terminal Bash using Screen

How to do a screen share wiht Linux Terminal Bash using Screen :

1) Create a screen
 screen
2) list the all available screens using below command
 screen -list
3) Now you can see all available screens, use the desired screen name on other client
 screen -x <name>

Here is the one example :


# screen
# screen -list
There is a screen on:
        9025.pts-4.Ubuntu-Server        (Tuesday 24 March 2015 06:57:53  IST)  (Attached)

use the 9025.pts-4.Ubuntu-Server name on other server like this

# screen -x 9025.pts-4.Ubuntu-Server

That's it.

Thursday, 20 November 2014

capturing Network Packets using Wireshark | Wireshark capture on Specific Port

We can capture traffic of Specific port using wireshark Here is the Filter that we need to Use.

tcp.port eq 5061
Above i am trying to capture data through port number 5061 and protocal is TCP 

Tuesday, 28 October 2014

Size of Empty UDP and TCP Packet

Size of Empty UDP and TCP Packet :

Size of Ethernet frame - 24 Bytes
Size of IPv4 Header (without any options) - 20 bytes
Size of TCP Header (without any options) - 20 Bytes
So total size of empty TCP datagram - 24 + 20 + 20 = 64 bytes

Size of UDP header - 8 bytes
So total size of empty UDP datagram - 24 + 20 + 8 = 52 bytes

What might be misleading when looking at the structure of an Ethernet frame [see further reading], 
is that without payload the minimum size of an Ethernet frame would be 18 bytes: Dst Mac(6) + Src Mac(6) + Length (2) + Fcs(4), 
adding minimum size of IPv4 (20) and TCP (20) gives us a total of 58 bytes.

What has not been mentioned yet is that the minimum payload of an ethernet frame is 46 byte,
so the 20+20 byte from the IPv4 an TCP are not enough payload! This means that 6 bytes have to be padded, 
thats where the total of 64 bytes is coming from.

18(min. Ethernet "header" fields) + 6(padding) + 20(IPv4) + 20(TCP) = 64 bytes

Tuesday, 17 June 2014

Hub vs Switch vs Router Explained | Difference Between Hub,switch,Router by Thegeekstuff

Most of the systems you are working on might be connected to a hub, or switch, or router. Probably you never thought about those networking devices, how they work, and the differences between them.
In this article, we’ll explain the core technical differences between these networking devices.
Hubs :
  • Hubs, also known as repeaters, are network devices that can operate on layer-1 (I.e. the physical layer) to connect network devices for communication.
  • Hubs cannot process layer-2 or layer-3 traffic. Layer-2 deals with hardware addresses and layer-3 deals with logical (IP) addresses. So, hubs cannot process information based on MAC or IP addresses.
  • Hubs cannot even process data based on whether it is a uni-cast, broadcast or multi-cast data.
  • All that a hub does is that it transfers data to every port excluding the port from where data was generated.
  • Hubs work only in half duplex mode I.e. a device connected to a hub can either send or receive data at a given time.
  • If more than one device sends out data simultaneously then data collisions happen.
  • In case of a collision, a hub rejects data from all the devices and signals them to send data again. Usually devices follow a random timer after which data is sent again to hub.
  • Hubs are prone to collisions and as more and more devices are added to set up of multiple hubs, the chances of collisions will increase and hence the overall performance of network will go down.

Switches :

  • Switches are network devices that operate on layer-2 of OSI model of communication.
  • Switches are also known as intelligent hubs.
  • Switches operate on hardware addresses to transfer data across devices connected to them.
  • The reason switches are known as intelligent hubs is because they build address table in hardware to keep track of different hardware addresses and the port to which each hardware address is associated.
  • The reason why they are compared to hubs because a switch, when started fresh, acts just like a hub. Suppose there are 3 devices connected to a switch. Lets call these devices as deviceA, deviceB and deviceC. Now, after a fresh start, if deviceA sends out a message to deviceB then just like a hub, switch will send it out to each port. But, it will store the hardware address and corresponding port in its hardware table. This means that whenever any other device will send any packet destined to deviceA then switch will act intelligently and send it to the correct port and not to all the ports. This way as more and more interaction takes place, the hardware table of switch grows and after a certain period of time switch becomes full blown intelligent version of a hub.
  • Switches are often confused with bridges. Though both of them are mostly similar with major difference being that a switch forwards data at wire speed as it uses special hardware circuits known as ASICs.
  • Switches, unlike hubs, support full duplex data transfer communication for each connected device.
  • As layer 2 protocols headers have no information about network of data packet so switches cannot forward data based or networks and that is the reason switches cannot be used with large networks that are divided in sub networks.
  • Switches can avoid loops through the use of spanning tree protocol.

Routers :

  • Routers are the network devices that operate at Layer-3 of OSI model of communication.
  • As layer-3 protocols have access to logical address (IP addresses) so routers have the capability to forward data across networks.
  • Sometimes routers are also known as layer-3 switches.
  • Routers are far more feature rich as compared to switches.
  • Routers maintain routing table for data forwarding.
  • Earlier, routing was slower as compared to switching. This was because of the fact that routing table lookup time was considerably high. The reason for this was that the complete packet was fetched into software buffers and then further operations were carried on it.
  • Today, operations are done in hardware which has reduced the latency a lot and hence routers are not considered slower than switches today.
  • Routers have lesser port densities as compared to switches.
  • Routers are usually used as a forwarding network elements in Wide Area Networks.

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

© 2014 VOIP4Learn. WP themonic converted by Bloggertheme9. Powered by Blogger.
TOP