Presentation is loading. Please wait.

Presentation is loading. Please wait.

Supporting Protocols and Technologies in TCP/IP Suites

Similar presentations


Presentation on theme: "Supporting Protocols and Technologies in TCP/IP Suites"— Presentation transcript:

1 Supporting Protocols and Technologies in TCP/IP Suites
Asst. Prof. Chaiporn Jaikaeo, Ph.D. Computer Engineering Department Kasetsart University, Bangkok, Thailand Adapted from the notes by Lami Kaya and lecture slides from Anan Phonphoem © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. © The McGraw-Hill Companies, Inc.

2 Outline Address Resolution Protocol (ARP)
Internet Control Message Protocol (ICMP) Dynamic Host Configuration Protocol (DHCP) Network Address Translation (NAT)

3 Address Resolution Protocol (ARP)

4 Address Resolution Recall the forwarding process
Forwarding uses IP addresses A MAC address is needed to communicate with the next hop IP must translate the next-hop IP address to a MAC address The translation process is known as address resolution Address resolution is local to a network

5 Address Resolution One computer can resolve the address of another computer only if both computers attach to the same physical network Resolve Resolve Resolve Resolve

6 ARP RFC 826 - Address Resolution Protocol
ARP maps any network level address (such as IP) to its corresponding data link address (such as Ethernet) Supporting protocol in data link layers Not data link layer protocol itself

7 ARP Protocol Station 1 is looking for MAC add of IP 158.109.33.200 1 2
4 ARP request I’m looking for IP ARP request

8 ARP Protocol Station 3 (IP 158.109.33.200) responses 1 2 3 4
ARP response I’m IP My physical address is A-C2-23 ARP response

9 Conceptual Address Boundary

10 ARP Cache Sending an ARP request for each datagram is inefficient
Three frames traverse the network for each datagram ARP request, ARP response, and the data datagram itself ARP cache is used to reduce network traffic ARP saves the information from a response so it can be used for subsequent packets The software does not keep the information indefinitely Instead, ARP maintains a small table of bindings in memory

11 ARP from Command Prompt
entry in ARP table C:\> arp -a ( ) at 0:0:e8:15:cc:c $ ping garnet.cpe.ku.ac.th : router.cpe.ku.ac.th ( ) at 0:0:c:6:13:4a cc.cpe.ku.ac.th ( ) at 2:60:8c:2e:b5:8b

12 Error Reporting Mechanisms

13 Error Reporting Mechanisms
IP problems Best effort Data can be lost, duplicate, delay, out-of-order Error detection of IP checksum if error, discard frame (cannot send back error message – no trust in the header) IP requires additional helpers Internet Control Message Protocol (ICMP)

14 ICMP RFC 792 IP supporter For error generating
Transmission problem Time to live (TTL) exceed Destination unreachable etc. Serve as useful diagnostic tools ping, traceroute

15 ICMP ICMP error messages never generates due to:
ICMP error messages themselves Broadcast/Multicast (prevent broadcast Storms) What are Broadcast Storms ? A large number of broadcast frames transmitted nearly simultaneous LAN may freeze!

16 ICMP encapsulation frame hdr Frame data IP hdr IP data type code ……...
e.g. Ethernet IP hdr IP data contain protocol 0x01 (ICMP) type code ……... indicate error type

17 Ethernet Frame Containing ICMP packet
DA T IP header Type SA Code Other info. Frame (Ethernet) Header IP Header ICMP 8 Echo request Echo reply Type Code Description 11 Time exceed 3 Port unreachable

18 ICMP header type - relevant ICMP message
code - more detail information checksum - covers ICMP header/data (not IP header) type: code: checksum:16 Content specific

19 ICMP Messages

20 Diagnostic Tools: ping
ping request ping reply Generate an ICMP echo request Receive the ICMP echo reply All TCP/IP node is supposed to implement ICMP and respond to ICMP echo

21 ping command (#1) Send a single echo request / wait for a reply
Resend another request if no reply (1 sec.) Repeat until receive at least one reply or stop after time out > ping iwing.cpe.ku.ac.th iwing.cpe.ku.ac.th is alive > ping happy.cpe.ku.ac.th no answer from happy.cpe.ku.ac.th

22 ping command (#2) Send an echo request message every seconds
Records the time it takes for each reply Every echo request contains a unique sequence number to match replies and request Record round-trip timing Perform packet lost statistics

23 ping example $ ping iwing.cpe.ku.ac.th
PING iwing.cpe.ku.ac.th ( ) from : 56(84) bytes of data. Warning: time of day goes back, taking countermeasures. 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=0 ttl=252 time=1.187 msec 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=1 ttl=252 time=601 usec 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=2 ttl=252 time=594 usec 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=3 ttl=252 time=594 usec 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=4 ttl=252 time=585 usec 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=5 ttl=252 time=590 usec 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=6 ttl=252 time=584 usec 64 bytes from iwing.cpe.ku.ac.th ( ): icmp_seq=7 ttl=252 time=587 usec --- iwing.cpe.ku.ac.th ping statistics --- 8 packets transmitted, 8 packets received, 0% packet loss round-trip min/avg/max/mdev = 0.584/0.665/1.187/0.198 ms

24 ping as debugging tools
What we get from ping? Timing information Connection reliability Destination is reachable (routable) IP layer is functional, but no guarantee for other higher layer protocols

25 ping results No response Lost packet (significant when >2-3%)
Target host inactive or no connection Lost packet (significant when >2-3%) Transmission error on WAN/LAN Overloading bridges/routers Varying round-trip time host/network overloading No lost and round-trip time is reasonably constant Congratulations! That’s all we want.

26 Diagnostic Tools: traceroute
Command to determine the active route to a destination address How does it work? send a UDP messages to an unused port on the target host with ttl=1 router decrease ttl to 0, it has to return an ICMP time exceed message traceroute sets ttl =2 and retransmits, this time go one more hop ttl++ until UDP messages reach the destination. the target returns an ICMP service unavailable because there is no UDP port service.

27 How traceroute works? UDP(TTL =1) Destination unused port #

28 How traceroute works? UDP(TTL =1) ICMP(time exceed) TTL = 0

29 How traceroute works? TTL = 0 ICMP(time exceed) UDP(TTL =1)

30 How traceroute works? UDP(TTL =8) UDP(TTL =9) ICMP(port unreachable)

31 Traceroute example $ traceroute iwing.cpe.ku.ac.th
traceroute to iwing.cpe.ku.ac.th ( ), 30 hops max, 38 byte packets 1 fe-cpegw2-server ( ) ms ms ms 2 gb-cpegwbb-cpegw ( ) ms ms ms 3 gb-cpec4k6-cpec6k ( ) ms ms ms 4 iwing ( ) ms ms ms

32 Traceroute example $ traceroute www.umass.edu
traceroute to ( ), 30 hops max, 38 byte packets 1 fe-cpegw2-server ( ) ms ms ms 2 gb-cpegwbb-cpegw ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms 9 S1-1.R00.LA-POP.uni.net.th ( ) ms ms ms ( ) ms ms ms 11 snvang-losang.abilene.ucaid.edu ( ) ms ms ms 12 dnvrng-snvang.abilene.ucaid.edu ( ) ms ms * 13 kscyng-dnvrng.abilene.ucaid.edu ( ) ms ms ms 19 nox300gw1-PEER-NoX-UMASS nox.org ( ) ms ms ms 20 lgrc-rt gw.umass.edu ( ) ms ms ms 21 lgrc-rt gw.umass.edu ( ) ms ms ms 22 * * * 23 * * *

33 Dynamic Host Configuration Protocol (DHCP)

34 DHCP Allows a computer to join a new network and obtain networking parameters automatically IP address Subnet mask Default router (gateway) address DNS server's address etc. The concept has been termed plug-and-play networking

35 DHCP Message Format

36 DHCP DISCOVER (Broadcast)
DHCP Operation DHCP Server Client Boot DHCP DISCOVER (Broadcast) DHCP OFFER DHCP REQUEST DHCP ACK 36

37 DHCP Discover Message Broadcast by clients

38 DHCP Offer Message Sent directly to client

39 Assigned Address Types
We can configure a DHCP server to supply two types of addresses: Permanently assigned addresses Typically assigned to servers A pool of dynamic addresses to be allocated on demand Typically assigned to arbitrary hosts

40 Address Leasing DHCP issues a lease on the address for a finite period
Thus allows a DHCP server to reclaim addresses When a lease expires, a host can choose to relinquish the address or renegotiate with DHCP to extend the lease If approved, a computer continues to operate without any interruption If a server denies an extension request, the host must stop using the address 40

41 DHCP Relay Agents DHCP discover messages are broadcast locally
These messages are not forwarded by routers Router DHCP Server New client DHCP DISCOVER Assuming all networks are /24

42 Example: DHCP Relay Agents
Each network may be equipped with a DHCP relay Typically built into a router Router & DHCP Relay DHCP Server New client 2 DHCP DISCOVER (Unicast) 1 DHCP DISCOVER Assuming all networks are /24

43 Example: DHCP Relay Agents
Each network may be equipped with a DHCP relay Typically built into a router Router & DHCP Relay DHCP Server New client 3 DHCP OFFER 5 4 DHCP OFFER Client accepts IP Assuming all networks are /24

44 Example: DHCP Relay Agents
Each network may be equipped with a DHCP relay Typically built into a router Router & DHCP Relay DHCP Server New client 8 DHCP ACK 7 DHCP REQUEST 6 DHCP REQUEST DHCP ACK 9 Assuming all networks are /24

45 Network Address Translation (NAT)

46 Network Address Translation
NAT – Network Address Translation A function that translates the address of datagrams into a new address Typically, original address is private (unroutable) New address is public and routable

47 Private Addresses Internet routers will not route packets whose destination addresses fall within these ranges 47

48 Address Translation Table:
Basic NAT Operation Address Translation Table: Inside Outside NAT Router SA = DA = SA = DA = SA = DA = SA = DA =

49 Address Translation Table:
Address Pooling SA = DA = NAT Router SA = DA = SA = DA = SA = DA = Address Translation Table: Inside Outside :

50 Advantages of Using NAT
Eliminates need to reassign addresses when changing to a new ISP Protects network security Balances load Preserves IP addresses SA = DA = SA = DA = SA = DA = SA = DA =

51 Port Translation Single public IP address is mapped to multiple hosts in a private network In this case, NAT router modifies the port numbers for outgoing traffic Known as NAPT or PAT

52 Address Translation Table:
NAPT Operation Address Translation Table: Inside Outside :2322 :4511 NAT Router SA = :2322 DA = :80 SA = :4511 DA = :80 SA = :80 DA = :2322 SA = :80 DA = :4511

53 NAT/NAPT for Home Users
Wireless router has NAT/NAPT functionality built in Along with DHCP and switch functionalities Map all IP addresses to single routable address Wireless Router Internet DSL/Cable Modem


Download ppt "Supporting Protocols and Technologies in TCP/IP Suites"

Similar presentations


Ads by Google