0% found this document useful (0 votes)
321 views22 pages

CS378: Computer Networks Lab: Topic 01: Overview

This document provides an overview of computer networks and networking concepts such as the TCP/IP protocol stack, networking code organization, naming and addressing conventions, packet encapsulation and forwarding, common diagnostic tools like tcpdump and Wireshark, and miscellaneous tips for a computer networks lab course. Key topics covered include the layers of the TCP/IP model, domain name resolution, IP and MAC addresses, port numbers, packet header formats, packet sniffing, and ensuring equitable participation during lab exercises.

Uploaded by

Aaizah Wani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
321 views22 pages

CS378: Computer Networks Lab: Topic 01: Overview

This document provides an overview of computer networks and networking concepts such as the TCP/IP protocol stack, networking code organization, naming and addressing conventions, packet encapsulation and forwarding, common diagnostic tools like tcpdump and Wireshark, and miscellaneous tips for a computer networks lab course. Key topics covered include the layers of the TCP/IP model, domain name resolution, IP and MAC addresses, port numbers, packet header formats, packet sniffing, and ensuring equitable participation during lab exercises.

Uploaded by

Aaizah Wani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

CS378: 

Computer Networks Lab

Topic 01: Overview

Slides borrowed from:
Kameswari Chebrolu
Department of CSE, IIT Bombay
Inside Computer

  2
Internet protocol stack
● Application: supporting network applications
– FTP, SMTP, HTTP
● Transport: process­process data transfer application
5
– TCP, UDP
transport
● Network: routing of datagrams from source to  4
destination
network
– IP, routing protocols 3

● Link: data transfer between neighboring  network  link
elements 2

– PPP, Ethernet physical
1
● Physical: bits “on the wire”

  3
Networking Code Organization
HTML Browser, Email Clients

● Most applications are 
implemented as user space 
processes.
● Protocols are implemented in 
the system kernel
– Socket layer
– Protocol layer
– Interface layer

4
Network Configurations Files
● When a host is configured to boot locally, network configuration 
parameters are stored in files.
● When the system boots up, parameters are read from the files 
and used to configure the daemons and the network interface.
● A parameter may be changed by editing the corresponding 
configuration file.
● Examples: 
– /etc/hosts

– /etc/services
– /etc/network/interfaces
5
Naming and Addressing
● Uniquely identify processes in different computers for 
communications. www.cse.iitb.ac.in
● Domain name
application application
● Port number
transport transport
● IP address
● MAC address network
Host A network
Host A

link link

Asterix.iitb.ac.in
physical physical

6
How to figure out the addresses of the corresponding host?
Domain Name
● A user friendly name to identify a host
●  Domain Name System (DNS): resolves a domain name to the 
corresponding IP address.
● Example:
– www.cse.iitb.ac.in → 59.162.23.130 (outside world)

– www.cse.iitb.ac.in →10.105.1.3 (inside IITB)
● A host first contacts its local DNS server to get the mapping
– host needs to know the local DNS server address 
(specified in configuration file)

7
IP Address
● Each interface in a host is assigned an IP address.
● IPv4, 32 bits, dotted­decimal notation

 IPv6, 128-bit address

8
Media Access Control Address
● Apart from IP address, each interface in a host also has a 
hardware address (MAC address)
● Ethernet MAC address is 48 bits long
– E.g 00:18:F3:96:C2:A7
● ARP protocol is used to translate an IP address to MAC 
address

9
Port Numbers
● Address for the application layer user process.
● Port Number field specified in TCP or UDP header.
● Well­known port numbers
– 1 to 255: Internet wide services
– 256 to 1023: preserved for Unix specific services
–  1024 and up: ephemeral port numbers
– Port 80 is associated with http (web server)
– Port 25 is associated with email

10
Encapsulation
● The application data is sent down
● Each layer adds a header to the data (PDU) from its higher layer.

11
Multiplexing and Demultiplexing
● Different higher layer protocols can use the service by the same lower 
layer protocol.

12
Application Header
● Example: Show  Email Header

13
UDP Header Format

0 16 32

14
TCP Header Format
0 16 32

15
IP Header Format
● Size: 20 bytes without options.
0 16 32

16
Ethernet Frame Format
 Source Ethernet (MAC) Address
 Destination Ethernet Address
 Frame Type: used to identify the payload
 CRC: used for error control

17
Packet Sniffer
● Sniffs messages being sent/received from/by your 
computer
● Store and display the contents of the various protocol 
fields in the messages
● Passive program
– never sends packets itself
– no packets addressed to it
– receives a copy of all packets (sent/received)
18
Packet Sniffer Structure

19
Diagnostic Tools
● Tcpdump
– E.g tcpdump -enx host 10.129.41.2 -w exe3.out
● Wireshark
– wireshark ­r exe3.out

http://openmaniak.com/tcpdump.php
http://openmaniak.com/tcpdump.php

20
Screen Shot

21
Miscellaneous Stuff
● Time is tight: Don't loiter, get on with the task asap
● Discuss with partner to ensure both understand what is 
being done
● Take turns (both need to learn what is happening)
● Each student reports “self” and “partner's” contribution to 
the lab
– Reality check via exam
– Total marks weighed accordingly

You might also like