Beruflich Dokumente
Kultur Dokumente
192.168.1.2
Internet
192.168.1.2 45.12.12.12
WiFi
Gateway
192.168.1.3
WiFi Gateway hosts
a number of networking
functions and services
192.168.1.4
2
Assumption
Internet User
Binary representation
Windows/Linux Fluency
3
Client-Server Interaction
Internet
Library
Application Layer
wireless) connectivity between adjacent
nodes in the form of electrical/optical Transport
Kernel
Programming Interface
signals. Network
Link layer – enables exchange of link layer
(API)
frames with adjacent nodes
Adapter
Link
Library
Application Layer
Kernel
Programming Interface
Application Layer – enables Application Network
(API)
specific Request/Response exchange
Adapter
Link
... Transport
ARP IP Wireshark
Network
Ethernet
Data Link
Note: Application layer is different from application
15
De-multiplexing and Multiplexing
TCP UDP
Applications Applications
Network
Port No TCP UDP
ICMP IGMP
…
IPX IP ARP/RARP Network layer
Ethernet
Incoming/Outgoing Frame
16
Address Filtering
When a message is received from media, a layer compares the destination
address in the message for a match, if there is a match, the message is sent to
the layer above, else it is either discarded or routed
1. Broadcast destination address is always a match
2. Unicast destination address is a match if the receiver’s unicast address is
same as destination address specified in the message
3. Destination Multicast address is a match if the receiving host is participating
in that multicast.
17
Encapsulation and De-Encapsulation
REQ/RES Application Data
Application
Message Application Data
Header Application
Datagram/
segment
UDP Header Application Data+HDR UDP
19
Wireshark Tutorial
Sniffing Frames with Wireshark
Byte Address
Colum
Panel 2 – Frame
ASCII Representation
Encapsulations
Subnet 4 To Internet
192.168.4.
23
Subnet/Link
Hosts and Router ports within a subnet share the
192.168.1
same subnet ID 192.168.2
24
Building Subnet
Subnets are built using Hubs, Bridges, and Switches
Cisco Packet Tracer Demonstration
25
Net Mask
All the nodes of a subnet have the same IP address prefix
This common prefix includes network Id and subnet Id – simply referred to as net
Id in this lecture
The suffix part is referred to as host Id
Netmask is another parameter (IP Address and Gateway are the other seen so far)
associated with a network interface
Using Netmask one can extract/identify Net ID and Host Id from the given IP
address
Find your Netmask and IP address, Identify your Net Id and Host Id
26
Network Adapters & IP Configuration
Using IPCONFIG utility
– list your network
adapters and their IP
Configuration
For Every active adapter
you should see IP
address, Subnet mask,
and Default Gateway
Netmask identifies Net ID and Host ID in IP Address
MAC Address & Gateways
1. Source (client) IP Address
2. Destination (server) IP Address Hop 1
192.168.1
192.168.2
192.168.1.12 192.168.1.7
192.168.1
TFTP Server TFTP Client
Server Client
Install Wireshark on you Laptop
Wireshark is a sniffer tool
It can capture frames that are going through one or more
of your network adapters*
Wireshark is implemented using Winpcap (libpcap)
Start Wireshark and capture frames passing through one
of your active adapters.
Assumption 1: Client-Server on the Same Subnet
Server
Client Client Server
Node
Application Layer Node 192.168.1
Hop 1
Application Layer
192.168.2
Transport Transport
GW 1
192.168.3
Network
Hop 2 Network
192.168.4 GW 2
Link Link
A Congestion! B
35
Route Table of Gateway
Route Table at
Gateway
192.168.1.2 192.168.2.1
1 2 Subnet 2 192.168.2.2
192.168.1.3 Subnet 1 4
Gateway Server
Client 192.168.1 192.168.2
3
115.241.93.10
Internet
36
Connection-Less (CL) Networking
Simple – no setup or tear down procedures
Best effort delivery Subnet Gate Subnet
Server
Client way 192.168.2
Message sequencing is not guaranteed 192.168.1
38
IP Header
Typically, we learn
the operation of a
protocol by
understanding the
protocol header
39
©Hari
Capture a TFTP message with Wireshark; review all the headers in this message
©Hari
UDP Characteristics
Connection-less (best effort) Client Server
Message-oriented protocol Application Application
One message at a time (simplex)
No flow and congestion control UDP … UDP
Error check but no error control
Transport for Multicast and Real Time Network
Multimedia
UDP Messages
©Hari
UDP - Advantages
UDP Transport exposes raw datagram (IP) service to
applications
This is desirable for a number of applications where TCP
TCP Characteristics
Session-based transport layer
Reliable and sequenced delivery
Exchanges Byte Stream
Full Duplex
Supports Flow control and congestion control
Limited to a single stream
No built-in reliability
Timer values may not suit all applications
©Hari
©Hari