Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

Computer Networks - Notes, Videos, MCQs & PPTs

Created by: Cstoppers Instructors

Computer Science Engineering (CSE) : Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

The document Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev is a part of the Computer Science Engineering (CSE) Course Computer Networks - Notes, Videos, MCQs & PPTs.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)

1. INTRODUCTION TO NETWORKS

 

1. Network Definition

  • A network can be defined as two or more computers connected together in such a way that they can share resources. The purpose of a network is to share resources.

A resource may be:

  • A file
  • A folder
  • A printer
  • A disk drive
  • Or just about anything else that exists on a computer

 

  • A network is simply a collection of computers or other hardware devices that are connected together, either physically or logically, using special hardware and software, to allow them to exchange information and cooperate. Networking is the term that describes the processes involved in designing, implementing, upgrading, managing and otherwise working with networks and network technologies

 

Advantages of networking.

  • Connectivity and Communication
  • Data Sharing
  • Hardware Sharing
  • Internet Access
  • Internet Access Sharing
  • Data Security and Management
  • Performance Enhancement and Balancing
  • Entertainment

2. NETWORK ARCHITECTURE

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

Layered system with alternative abstractions available at a given layer

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

 

Protocols

  • Protocol defines the interfaces between the layers in the same system and with the layers of peer system
  • Building blocks of a network architecture
  • Each protocol object has two different interfaces
    • service interface: operations on this protocol
  • peer-to-peer interface: messages exchanged with peer
  • Term “protocol” is overloaded
  • specification of peer-to-peer interface
  • module that implements this interface

 

Interfaces

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

  • Protocol Specification: prose, pseudo-code, state transition diagram
  • Interoperable: when two or more protocols that implement the specification accurately
  • IETF: Internet Engineering Task Force
 

3. OSI ARCHITECTURE

 

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

Description of Layers

 

Physical Layer

  • Handles the transmission of raw bits over a communication link

Data Link Layer

  • Collects a stream of bits into a larger aggregate called a frame
  • Network adaptor along with device driver in OS implement the protocol in this layer
  • Frames are actually delivered to hosts

Network Layer

  • Handles routing among nodes within a packet-switched network
  • Unit of data exchanged between nodes in this layer is called a packet

The lower three layers are implemented on all network nodes

Transport Layer

  • Implements a process-to-process channel
  • Unit of data exchanges in this layer is called a message

Session Layer

  • Provides a name space that is used to tie together the potentially different transport streams that are part of a single application

Presentation Layer

  • Concerned about the format of data exchanged between peers

Application Layer

  • Standardize common type of exchanges

 

The transport layer and the higher layers typically run only on end-hosts and not on the intermediate switches and routers

 

Internet Architecture

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

  Three main features

  • Does not imply strict layering. The application is free to bypass the defined transport layers and to directly use IP or other underlying networks
  • An hour-glass shape – wide at the top, narrow in the middle and wide at the bottom. IP serves as the focal point for the architecture
  • In order for a new protocol to be officially included in the architecture, there needs to be both a protocol specification and at least one (and preferably two) representative implementations of the specification

Application Programming Interface

  • Interface exported by the network
  • Since most network protocols are implemented (those in the high protocol stack) in software and nearly all computer systems implement their network protocols as part of the operating system, when we refer to the interface “exported by the network”, we are generally referring to the interface that the OS provides to its networking subsystem
  • The interface is called the network Application Programming Interface (API)
  • Interface exported by the network
  • Since most network protocols are implemented (those in the high protocol stack) in software and nearly all computer systems implement their network protocols as part of the operating system, when we refer to the interface “exported by the network”, we are generally referring to the interface that the OS provides to its networking subsystem
  • The interface is called the network Application Programming Interface (API)
  • Socket Interface was originally provided by the Berkeley distribution of Unix

Now supported in virtually all operating systems

  • Each protocol provides a certain set of services, and the API provides a syntax by which those services can be invoked in this particular OS

 

Socket

Socket Family

  • PF_INET denotes the Internet family
  • PF_UNIX denotes the Unix pipe facility
  • PF_PACKET denotes direct access to the network interface (i.e., it bypasses the TCP/IP protocol stack)
  • Socket Type
  • SOCK_STREAM is used to denote a byte stream
  • SOCK_DGRAM is an alternative that denotes a message oriented service, such as that provided by UDP 

Creating a Socket

int sockfd = socket(address_family, type, protocol);

  • The socket number returned is the socket descriptor for the newly created socket

 int sockfd = socket (PF_INET, SOCK_STREAM, 0);

 int sockfd = socket (PF_INET, SOCK_DGRAM, 0);

  •  The combination of PF_INET and SOCK_STREAM implies TCP

Bind

  •  Binds the newly created socket to the specified address i.e. the network address of the local participant (the server)
  • Address is a data structure which combines IP and port

Listen

  • Defines how many connections can be pending on the specified socket

Accept

  • Carries out the passive open
  • Blocking operation
  • Does not return until a remote participant has established a connection
  • When it does, it returns a new socket that corresponds to the new established connection and the address argument contains the remote participant’s address

 

Client

o     Application performs active open

o     It says who it wants to communicate with

 

Client invokes

  •  int connect (int socket, struct sockaddr *address, int addr_len)

 Connect

  •  Does not return until TCP has successfully established a connection at which application is free to begin sending data
  • Address contains remote machine’s address

 4. NETWORK PERFORMANCE

 ·         Bandwidth

  • Width of the frequency band
  • Number of bits per second that can be transmitted over a communication link
  • 1 Mbps: 1 x 106 bits/second = 1x220 bits/sec
  • 1 x 10-6 seconds to transmit each bit or imagine that a timeline, now each bit occupies 1 micro second space.
  • On a 2 Mbps link the width is 0.5 micro second.
  • Smaller the width more will be transmission per unit time.

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

transmitted at a particular bandwidth can be regarded as having some width:

a.    bits transmitted at 1Mbps (each bit 1 μs wide);

b.    bits transmitted at 2Mbps (each bit 0.5 μs wide).

  • Latency = Propagation + transmit + queue 
  • Propagation = distance/speed of light 
  • Transmit = size/bandwidth 
  • One bit transmission => propagation is important 
  • Large bytes transmission => bandwidth is important Delay X Bandwidth 
  • We think the channel between a pair of processes as a hollow pipe 
  • Latency (delay) length of the pipe and bandwidth the width of the pipe 
  • Delay of 50 ms and bandwidth of 45 Mbps
    50 x 10-3seconds x 45 x 106bits/second
    2.25 x 106bits = 280 KB data.

 

Relative importance of bandwidth and latency depends on application For large file transfer, bandwidth is critical  For small messages (HTTP, NFS, etc.), latency is critical Variance in latency (jitter) can also affect some applications (e.g., audio/video conferencing)

How many bits the sender must transmit before the first bit arrives at the receiver if the sender keeps the pipe full

Takes another one-way latency to receive a response from the receiver

If the sender does not fill the pipe—send a whole delay × bandwidth product’s worth of data before it stops to wait for a signal—the sender will not fully utilize the network

Infinite bandwidth

RTT dominates

Throughput = TransferSize / TransferTime

TransferTime = RTT + 1/Bandwidth x TransferSize

Its all relative

 1-MB file to 1-Gbps link looks like a 1-KB packet to 1-Mbps link

 

5. DIRECT LINK NETWORKS 

  • Gives the upper bound to the capacity of a link in terms of bits per second (bps) as a function of signal-to-noise ratio of the link measured in decibels (dB).
  • C = Blog2(1+S/N)
    • Where B = 3300 – 300 = 3000Hz, S is the signal power, N the average noise.
    • The signal to noise ratio (S/N) is measured in decibels is related to dB = 10 x log10(S/N). If there is 30dB of noise then S/N = 1000.
    • Now C = 3000 x log2(1001) = 30kbps.
  • All practical links rely on some sort of electromagnetic radiation propagating through a medium or, in some cases, through free space
  • One way to characterize links, then, is by the medium they use
    • Typically copper wire in some form (as in Digital Subscriber Line (DSL) and coaxial cable),
    • Another important link characteristic is the frequency
    • Measured in hertz, with which the electromagnetic waves oscillate
    • Distance between the adjacent pair of maxima or minima of a wave measured in meters is called wavelength
    • Speed of light divided by frequency gives the wavelength.
    • Frequency on a copper cable range from 300Hz to 3300Hz; Wavelength for 300Hz wave through copper is speed of light on a copper / frequency
    • 2/3 x 3 x 108 /300 = 667 x 103 meters.
    • Placing binary data on a signal is called encoding.
    • Modulation involves modifying the signals in terms of their frequency, amplitude, and phase.
    • Optical fiber (as in both commercial fiber-to-the home services and many long-distance links in the Internet’s backbone), or Air/free space (for wireless links)

 

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev 

Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!

Dynamic Test

Content Category

Related Searches

Important questions

,

past year papers

,

Previous Year Questions with Solutions

,

Sample Paper

,

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

,

Free

,

shortcuts and tricks

,

Extra Questions

,

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

,

Data Communication (Part - 1) Computer Science Engineering (CSE) Notes | EduRev

,

pdf

,

Objective type Questions

,

mock tests for examination

,

Exam

,

practice quizzes

,

video lectures

,

Viva Questions

,

Semester Notes

,

Summary

,

ppt

,

MCQs

,

study material

;