DataComm and TCP IP

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

IP Address

 Each host on a TCP/IP network is uniquely identified


at the IP layer with an address.
 An Internet Protocol (IP) address specifies the
location of a host or client on the Internet.
 How we remember it?
 By Domain Name
 www.ntc.net.np
 www.nepalnews.com

20 Data Communication & TCP/IP 10/31/2020


IPv4 Address Format

21 Data Communication & TCP/IP 10/31/2020


IPv4 Address: Network, Bcast
 All 0s in the host ID indicates the NETWORK
itself.
 All 1s in the host ID indicates the BROADCAST
address.

203.251.7.0 168.126.0.0

203.251.7.255 168.126.255.255

203.251.7.0000 0000 168.126.0000 0000.0000 0000


203.251.7.1111 1111 168.126.1111 1111.1111 1111
22 Data Communication & TCP/IP 10/31/2020
Classful Addresses - History
 Historical
 Less optimal
 Obsoleted by VLSM

23 Data Communication & TCP/IP 10/31/2020


Subnetting
 Classless way of managing IP addresses into
networks and hosts
 Length of subnet from left to right, all one’s as subnet
mask
 Example
 1.1.64.0, Mask 255.255.255.192 (/26)
 Start at 1.1.64.0
 End at 1.1.64.63
 62 hosts, 1 network, 1 broadcast

24 Data Communication & TCP/IP 10/31/2020


IPv4 Header

25 Data Communication & TCP/IP 10/31/2020


IPv4 Header - Details

26 Data Communication & TCP/IP 10/31/2020


Network Layer - Routing
 Selection of appropriate path from source to
destination.
 Best path from a set of possible paths
 Static routing – predefined routing, does not change
as per network status
 Dynamic routing – routing information changes as
per the change in network status

27 Data Communication & TCP/IP 10/31/2020


28 Data Communication & TCP/IP 10/31/2020
Network – Routers
 Routers operate in network layer
 Responsible for routing packets to appropriate
network interface or exit based on the routing policy
 Maintain routing tables to make decision
 Routing tables can be formed dynamically or
statically

29 Data Communication & TCP/IP 10/31/2020


 Routers are like intersections
 Switches like streets

30 Data Communication & TCP/IP 10/31/2020


Routing – Static and Dynamic
 Static Routing
 Based on permanently defined routes
 Need manual intervention to change
 Not scalable for large networks
 Dynamic
 Automatically built up by dynamic routing processes
 Change as per the network connectivity and availability
 Scalable for large networks

31 Data Communication & TCP/IP 10/31/2020


Static Routing
 Hard-written routes
 For example: some static route entries in Cisco router
 Ip route 1.1.1.128 255.255.255.192 202.70.65.34
 Ip route 0.0.0.0 0.0.0.0 202.70.65.18 (default gateway)
 Ip route 192.168.1.0 255.255.255.0 serial 0
 Some static route entries from unix machine
 Route add –net default gw 202.70.64.7
 Rolute add –net 1.1.82.0 netmask 255.255.255.248 gw
1.1.64.48

32 Data Communication & TCP/IP 10/31/2020


Dynamic Routing
 Handled by specific routing protocols
 Routing protocols run as specific processes in
routers or router-supporting systems (e.g. zebra in
linux, in.routed in unix, linux)
 Two types
 Distance Vector Routing Protocol
 Link State Routing Protocols

33 Data Communication & TCP/IP 10/31/2020


Autonomous System
 Autonomous systems (AS) are basically independent
network entities with their own internal routing policy
independent of external world, even though they are
connected to the external world
 AS Numbers: ID of an AS. 2-byte (in future 4-byte)
numbers assigned by the Internet registries
 Routing among different AS are connected by
Exterior Gateway Protocols such as BGP

41 Data Communication & TCP/IP 10/31/2020


Inter-AS Routing – BGP
 BGP is the main technology behind the scalability,
manageability and control of the Internet routing
 Run between different AS
 Based on route advertisements and traffic flow as
per the route advertisements
 Can control sending and receiving of advertizements
 Get traffic only to the destinations advertized

42 Data Communication & TCP/IP 10/31/2020


Viewing Routing Information
 Router
 Show ip route <static> <ospf> <bgp> …
 Unix
 Netstat –rn
 Windows
 Netstat –rn
 Route print

43 Data Communication & TCP/IP 10/31/2020


Routers
 The infrastructure of the Internet, along with telecom
media
 Receiving, analyzing, forwarding packets
 Based on source/destination addresses
 As per the defined or collected routing information
 Added features - traffic policies, access control,
filtering

44 Data Communication & TCP/IP 10/31/2020


Routers & Data Delivery
 Each intervening
router is concerned
up to layer 3 of the
packet travelling
through it from source
to destination

45 Data Communication & TCP/IP 10/31/2020


Routing – Node by node switching

46 Data Communication & TCP/IP 10/31/2020


Data Flow across TCP/IP Stack

47 TCP/IP Network Model 10/31/2020


Routing Summary
 L3 activity
 Responsible for delivery of packets across multiple
nodes, multiple paths, multiple networks
 Can be static and dynamic
 Different routing protocols for routing inside and
autonomous system and with other autonomous
systems.

49 Data Communication & TCP/IP 10/31/2020


Transport Layer
Five basic services:
 Segmenting upper-layer application data
 Establishing end-to-end operations
 Sending segments from one end host to another end host
 Ensuring data reliability
 Providing flow control

50 Data Communication & TCP/IP 10/31/2020


Transport Layer
 Corresponds to the transport layer of OSI model

51 Data Communication & TCP/IP 10/31/2020


52 Data Communication & TCP/IP 10/31/2020
Transport Layer
 Provides transparent data transfer between end
systems
 Controls reliability of data transfer
 Flow control
 Segmentation
 Error control
 Examples: TCP, UDP,

53 Data Communication & TCP/IP 10/31/2020


Transport – Reliability
 Transport can be reliable and non-reliable
 Reliable – ensures that data packets from source
reach the destination
 Retransmissions
 May be slower
 Also called connection-oriented
 Example: TCP

54 Data Communication & TCP/IP 10/31/2020


Transport – Reliability
 Unreliable – does not ensure that data packets reach
the destination
 No retransmissions
 Also called connectionless
 Depends upon upper layers for reliability
 Can be faster than connection-oriented
 Example: UDP (User Datagram Protocol)

55 Data Communication & TCP/IP 10/31/2020


Transport – TCP/UDP
 TCP and UDP are the most prominent and widely
used example of transport layer technologies.
 Examples
 TCP: HTTP, FTP, SMTP, POP3, IMAP
 UDP: DNS, SNMP, TFTP
 Each has different ‘ports’ to distinguish different
services

56 Data Communication & TCP/IP 10/31/2020


Transport - Ports
 Ports are basically registry-level identifiers of
different services that use the network
 Ports can be well-defined (defined by international
standards bodies) or not
 Example: TCP port 80 is well-known port for HTTP,
UDP port 53 is well-known port for DNS
 However, these services are not restricted to these ports
only

58 Data Communication & TCP/IP 10/31/2020


IP Address vs. Port Numbers
 Destination IP defines
the host
 After the host has been
selected:
the port number defines
one of the processes on
this host

59 Data Communication & TCP/IP 10/31/2020


Ports and Multiplexing
 Transport
ports allow
multiplexing of
different
applications
on the
common
network
 Socket

60 Data Communication & TCP/IP 10/31/2020


Transport Mux & Demux …

 Extending host-to-host delivery to process-to-process


delivery
 Transport layer de/multiplexes several processes on the
transport layer protocol (TCP, UDP)

61 Data Communication & TCP/IP 10/31/2020


L4 – Process to Process Delivery

 Several processes (application programs) can run on both the source and
the destination host
 Two communicating processes are in client-server relationship
 Client – a process on the local host
 Server – a process at the remote host

62 Data Communication & TCP/IP 10/31/2020


Ports – More Examples
 TCP
 SMTP – 25, PoP3 – 110, IMAP – 143, HTTP – 80,
HTTPS – 443, FTP – 21, Telnet – 23, SSH – 22
 UDP
 DNS – 53
 More ports ---- IANA
 http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

63 Data Communication & TCP/IP 10/31/2020


Ports vs IP Address vs MAC
 L2 Address: MAC, L3 Address: IP Address
 L4 Address: Ports
 Well-known and dynamic
 Client generally use dynamic port whereas servers use
registered, well-known ports

ephemeral (dynamic) well-known


port number port number
64 Data Communication & TCP/IP 10/31/2020
IP Address vs Transport Port
 Destination IP defines the
host
 After the host has been
selected:
the port number defines
one of the processes on
this host

65 Data Communication & TCP/IP 10/31/2020


TCP Header

66 Data Communication & TCP/IP 10/31/2020


TCP Header - Explained

67 Data Communication & TCP/IP 10/31/2020


TCP – Bytes and Segments
 TCP at the sending site gathers bytes into a
packet called a segment
 TCP adds a header to each segment and
delivers it to IP for transmission
 Segments can arrive out of order
 Size of the segment varies

68 Data Communication & TCP/IP 10/31/2020


TCP – Flow Control
 It is the control of the number of bytes that are
transmitted. Changes as per the buffer availability in
sender and receiver.

 This is sender buffer.


 If no transfer window is set, all is transmitted.

69 Data Communication & TCP/IP 10/31/2020


TCP Flow Control …
 But, if the receiver buffer is full, the excess bytes
coming from sender are simply dropped
 Retransmission needed.
 To avoid such retransmission, window mechanism is
used.
 Window size is generally the smallest among the
maximum supported by both sender and receiver.

70 Data Communication & TCP/IP 10/31/2020


Summary
 Transport Layer
 Flow control
 Reliability
 Connectionless/connection-oriented

77 Data Communication & TCP/IP 10/31/2020


Things to remember
 IP Addresses
 Network addresses, host addresses, gateways, DHCP
 Routing
 Static, dynamic
 Ports (Transport Layer)
 MAC addresses (Data Link layer)
 DNS
 Mail (SMTP, POP)
 Web (HTTP, HTTPS)
 Network Address Translation / Proxy

80 Data Communication & TCP/IP 10/31/2020


Ref Books for Networking

81 Data Communication & TCP/IP 10/31/2020


Textbook for Security

82 Data Communication & TCP/IP 10/31/2020


??

83 Data Communication & TCP/IP 10/31/2020


Thank You

85 Data Communication & TCP/IP 10/31/2020

You might also like