TCPIP - PowerPoint PPT Presentation

1 / 46
About This Presentation
Title:

TCPIP

Description:

Name - IP. Host tables. DNS (Domain Name Service) Fully Qualified Domain Name (FQDN) ... Ping Check base layer 3 connectivity ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 47
Provided by: gue48
Category:
Tags: tcpip | check | domain | name

less

Transcript and Presenter's Notes

Title: TCPIP


1
TCP/IP
  • EECE 542
  • Brad Guenther

2
History
  • 1969 ARPANET (Defense Advanced Research Project
    Agency DARPA)
  • Adopted as a military std in 1983, used with BSD
    UNIX
  • ARPANET dissolved/evolved into the Internet

3
TCP/IP Model vs. OSI
4
IP Datagrams
5
Datagram Headers
  • Ver IPv4 0x0100
  • HLEN Header Length 0-15x460 bytes max
  • Serv Type priority, TOS, desired reliability,
    etc
  • T. Length Length of entire datagram (2-bytes)
  • ID Identify fragmented datagrams
  • Flags fragmented or not, 1st , middle, or last
    frag.
  • Frag. Offset pointer designating frag. offset
  • TTL Time to live
  • Protocol Encapsulated upper layer protocol
  • Checksum Checks integrity of header only
  • Src dst Addr 4 bytes each
  • Options info on routing, timing, management,
    etc (variable length)
  • Padding extra 0s to make header a multiple of
    32 bits.
  • Data (Max 64 KB)

6
IP addresses
  • Network portion
  • Host portion
  • Network portion also identifies the class of
    network
  • 0 in MSB -gt Class A, 10 -gt Class B, 110-gt Class
    C, 1110 -gt Multicast (Class D), 1111-gt Reserved
  • Routing based on network portion (network number)
  • Use Netmask (subnetmask) to identify Network and
    Host portion

7
Netmasks
  • Perform a logical AND between IP address and
    Netmask to obtain the network number
  • Example 129.130.40.5/255.255.248.0 -gt Network
    number of 129.130.40.0

8
Another Example
  • 192.168.1.201/255.255.255.252
  • Special Addresses Network Number Broadcast
    address.
  • Routing based on Network Numbers
  • How would the Network number broadcast address
    affect routing? (What do you lose?)

9
Subnets
  • Previous example of 192.168.1.201/255.255.255.252
  • What class of network is this?
  • What is different about this netmask?
  • Rules on borrowing bits At least two, but must
    leave at least two for host bits. Why?

10
Subnet Example
  • I have a Class C network and I need at least 20
    hosts per subnet. (192.168.40.0)
  • How many host bits will I need?
  • What is the maximum number of subnets that I can
    have?
  • What are my usable subnets?
  • What is the usable IP range on each subnet?
  • How many address have I lost?

11
Another Subnet Problem
  • 129.130.40.0/255.255.248.0
  • I have 129.130.40.0/255.255.255.0
  • Default gateway 129.130.47.224
  • How can I subnet myself off and still talk to the
    rest of the world? Where is the main problem?

12
CIDR
  • Classless Interdomain Routing
  • RFC 1519
  • Variable Length Subnetting (any power of 2 rather
    than 28 blocks must have at least 2 subnet
    bits and two host bits)
  • Supernetting Take contiguous blocks of class C
    and advertise a single route!

13
Address Resolution
  • 4 Problems
  • IP -gt MAC
  • MAC -gt IP
  • Name -gt IP
  • IP -gt Name

14
IP -gt MAC Resolution (ARP)
  • Address Resolution Protocol
  • Layer 3
  • Uses Broadcasts
  • Proxy ARP
  • How are duplicate IP addresses identified/dealt
    with?

15
(No Transcript)
16
(No Transcript)
17
MAC -gt IP
  • RARP
  • BootP
  • Used with diskless clients
  • DHCP

18
DHCP
  • Dynamic Host Control Protocol
  • Replaces RARP BOOTP
  • Uses UDP. Why?
  • Client broadcasts looking for DHCP servers
  • Servers responds
  • Server chosen, request broadcast sent
  • Server sends acknowledgement
  • Client sends release when done

19
DHCP Messages
  • DHCPDISCOVER Client broadcast to locate
    available servers
  • DHCPOFFER Server -gt Client offer of config
    parameters
  • DHCPREQUEST Client -gt Server a.) Requesting
    offered params from a particular server (implicit
    decline of other offers), b.) confirm correctness
    of previously allocated address, c.) extending of
    lease
  • DHCPACK Server -gt Client confirmation of
    parameters and committed address
  • DHCPNACK Server -gt Client address incorrect or
    expired
  • DHCPDECLINE Client -gt Server address in use
  • DHCPRELASE Client -gt Server relinquish address
  • DHCPINFORM Client -gt Server asking for local
    config (already has address)

20
Name -gt IP
  • Host tables
  • DNS (Domain Name Service)
  • Fully Qualified Domain Name (FQDN)
  • Hostname vs. Domain Name
  • Distributed Hierarchical System
  • Root Servers
  • TLD Geographical Organizational

21
(No Transcript)
22
IP -gt Name
  • Similar to above, but in reverse
  • Not guaranteed
  • Searches local files and cache
  • Caching controlled by TTL
  • Secondary servers updated based on TTL and serial
    number differences

23
Type of DNS Records
  • NS Name servers
  • A Addresses
  • CNAME Aliases
  • PTR Address To Name (reverse lookups)
  • MX Mail Exchange

24
ICMP
  • Internet Control Message Protocol
  • Sort of a subset of IP
  • Flow Control similar to pause frames only at
    layer 3
  • Error Reporting Destination Unreachable (may be
    sent by router or host itself)
  • Route Redirection
  • Troubleshooting

25
ICMP Troubleshooting
  • Ping Check base layer 3 connectivity
  • Traceroute Uses TTL field to determine where
    communications break down
  • When the TTL reaches zero the router sends an
    ICMP TIME_EXCEEDED back to sender
  • Example

26
IGMP
  • Internet Group Management Protocol
  • Like ICMP somewhat of a subset of IP part of
    the IP implementation on a device
  • Used to report multicast group membership to
    immediately neighboring multicast enabled routers
  • Two main types of messages Membership Query and
    Membership Report

27
Layer 4
  • TCP Connection Oriented
  • UDP Connectionless
  • Both use port numbers to allow Layer 5 to track
    different conversations (sessions) going on at
    the same time
  • Port number IP address gt Socket

28
TCP and UDP Port Numbers
  • Ports lt 1024 considered privileged ports
    (controlled by IANA)
  • Ex 20ftp data, 21ftp, 22ssh, 23telnet,
    25smtp, 80http, 53dns, 69tftp, 123ntp
  • Ports lt 255 gt Public applications
  • Ports 255-1023 gt Commercial apps
  • 1024 and up unregulated (max 65535) these are
    also usually used by the client
  • 1024-49,151 may be registered with IANA

29
UDP
  • User Datagram Protocol
  • Unreliable Best Effort Delivery Relies on
    upper layer protocols to do error detection and
    recovery
  • Where is this usefull?

30
Scenarios Suited to UDP
  • Small amounts of data lower overhead
  • Query-Response applications (response considered
    an ACK)
  • Need fastest possible transfers over reliable
    links

UDP Segment Format
31
TCP
  • Transmission Control Protocol
  • Reliable, Connection-Oriented protocol
  • Uses a 3-way handshake to establish connections
  • Uses sliding windows
  • May require keepalives to keep connection up
  • Connection terminations should be acknowledged by
    both stations FIN flag

32
TCP Segment Format
33
TCP 3-Way Handshake
  • Used to establish connection and synchronize ISNs

34
TCP Sliding Window
  • Provides positive acknowledgement and flow
    control
  • Window sizes are dynamically negotiated between
    hosts and represent the number of BYTES that can
    be sent before an acknowledgement is received
  • Sequence numbers reflect cumulative number of
    bytes of user data sent (but ISN may not be 0).

35
(No Transcript)
36
TCP Sliding Window
  • Best Case Send X bytes, receive ACK X1
  • Send X bytes, receive ACK X-Y?
  • Send X bytes, receive nada?
  • Receive X5, but expecting X?
  • Error Detection based on timers

37
TCP Sliding Window
  • Error correction gt Retransmission
  • Timer too short too many unnecessary
    retransmissions
  • Timer too long must wait a long time before
    retransmitting
  • Retransmission can be handled with a back-off
    algorithm allows timers to be dynamic
  • Many retransmissions may result in smaller window
    size

38
Silly Window Syndrome
  • Sender sending too slowly Nagles Algorithm
  • 1. Send first chunk of data (even if only a byte)
  • 2. Accumulate data and wait for either and ACK or
    until enough data is accumulated to fill max.
    sized segment.
  • Receiver receiving/processing too slowly
  • Can advertise 0 window size OR
  • Delay ACK until ready (shouldnt be more than
    500ms).

39
Congestion Control
  • Pause Frames revisited (Layer 2)
  • Congestion Windows (use smaller of two window
    sizes advertised vs. congestion).
  • Slow Start start sending max segment size with
    congestion window of 1 segment.
  • Each successful ACK up it by 1 more until ½
    window size (ACKs may be combined)
  • Then increase only for each ACK
  • Lost segment knock it down to ½ current size

40
IP Fragmentation
  • How/Why does it happen?
  • Who does it?
  • Who puts it back together?
  • Role of dont fragment flag!?
  • What happens if fragments are received out of
    order?
  • What happens if a fragment is lost?
  • Optimizing with MTU (Ethernet1500 1460 data)

41
IPv6
  • Problems with IPv4 32-bit address space, only
    two layers (network and host), address allocation
    dependent on single organization
  • IPv6 128 bit addresses allocated in
    variable-size segments which can be allocated by
    a combination of ISPs, large enterprises, and
    other entities along the way

42
IPv6 Addresses
  • 123456789ABCDEF0000000000000FEDC
  • 123456789ABCDEF0FEDC
  • IPv4 with IPv6
  • Right justify the IPv4 address
  • Set the preceding 16 bits MSB of IPv4 address
  • 00000FFFF129.130.40.5
  • 00000010.1.2.1

43
IPv6 Address Types
  • Unicast one host
  • Multicast all hosts in multicast group
  • Anycast All or SOME hosts in group
  • Anycasts look like unicasts, but participating
    nodes must advertise their participation. This
    seems to be aimed at routers for table
    maintenance.

44
IPv6 Goals
  • Larger Address Space
  • Better Efficiency Header boundaries, fewer
    headers to process, fragmentation done by sender
    NOT routers
  • Better Security Packet signing, encryption,
  • WORK IN PROGRESS

45
(No Transcript)
46
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com