Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSS432: Internetworking 1 CSS432 Internetworking Textbook Ch4.1 Professor: Munehiro Fukuda Augmented by Rob Nash.

Similar presentations


Presentation on theme: "CSS432: Internetworking 1 CSS432 Internetworking Textbook Ch4.1 Professor: Munehiro Fukuda Augmented by Rob Nash."— Presentation transcript:

1 CSS432: Internetworking 1 CSS432 Internetworking Textbook Ch4.1 Professor: Munehiro Fukuda Augmented by Rob Nash

2 Internetworks Large scale & highly heterogeneous  Bad enough that it needs to host billions of users  But, we have to consider every type of physical network hardware Even those not yet invented? CSS432: Internetworking 2

3 IP on Scale and Heterogeneity While there are many ways to dissect and tear apart the design decisions of the “I”nternet… The Internet is the only networking technology to face such scale and disparity (a perfect case study)  Ok, and IPX, but not to the same degree! CSS432: Internetworking 3

4 Another Layer of Abstraction VMs abstract OSes from Hardware DirectX abstracts graphics programmers from various video card drivers IP abstracts upper level protocols from the differences in FDDI, Ethernet, RPR, …  Runs on both routers and hosts CSS432: Internetworking 4

5 5 IP Internet Interconnected Collection of Networks  Viewed as a simple logical network  Routers: nodes interconnecting networks Protocol Stack  IP on all nodes (both hosts and router)  TCP and UDP on top of IP R2 R1 H4 H5 H3 H2 H1 Network 2 (Ethernet) Network 1 (Ethernet) H6 Network 3 (FDDI) Network 4 (point-to-point) H7R3H8 R1 ETH FDDI IP ETH TCP R2 FDDI PPP IP R3 PPP ETH IP H1 IP ETH TCP H8 Identical frame Identical datagram Identical datagram Identical packet

6 CSS432: Internetworking 6 Service Model Global addressing  IP address Best-effort delivery (unreliable service)  Connectionless (datagram-based)  packets are lost  packets are delivered out of order  duplicate copies of a packet are delivered  packets can be delayed for a long time Datagram format  Version: IPv4/IPv6  HLen: header length in ints Maximum header length?  TOS: type of service (priority queue in routers)  Length: packet length in bytes Maximum packet size?  TTL: time to live (#hops)  Protocol: TCP, UDP  Checksum  SourceAddr: source IP address  DestinationAddr: destination IP address VersionHLen TOSLength IdentFlagsOffset TTLProtocolChecksum SourceAddr DestinationAddr Options (variable) Pad (variable) 048161931 Data preambledest addrsrc addr0x0800CRC frame type Ex. Ethernet

7 CSS432: Internetworking 7 Fragmentation and Reassembly Each network has some MTU (maximum transmission unit)  To check each interface of your computer: netstat –i ifconfig Strategy  fragment when necessary (MTU < Datagram)  try to avoid fragmentation at source host  re-fragmentation is possible  fragments are self-contained datagrams  use CS-PDU (not cells) for ATM  delay reassembly until destination host  do not recover from lost fragments

8 CSS432: Internetworking 8 Example Ident = xOffset = 0 Start of header 0 Rest of header 1400 data bytes Ident = xOffset = 0 Start of header 1 Rest of header 512 data bytes Ident = xOffset = 512 Start of header 1 Rest of header 512 data bytes Ident = xOffset = 1024 Start of header 0 Rest of header 376 data bytes

9 CSS432: Internetworking 9 Discussions How can we detect if a given datagram has lost some fragments? Who will take care resending a datagram which could not be reassembled previously due to its fragment droppings?

10 CSS432: Internetworking 10 Global Addresses Properties  globally unique  hierarchical: network + host Dot Notation  Class A 1.0.0.1 – 126.255.255.254 (0.0.0.0 – 0.255.255.255, 1.0.0.0, 126.255.255.255, and 127.0.0.0 – 127.255.255.255 reserved)  Class B 128.0.0.1 – 191.255.255.254  Class C 192.0.0.1 – 223.255.255.254 NetworkHost 724 0 A: NetworkHost 1416 10 B: NetworkHost 218 110 C:

11 CSS432: Internetworking 11 Datagram Forwarding Algorithm If ( datagram’s dest network# == network# of network interface x ) deliver it to the destination host over interface x else if ( datagram’s dest network# == network# of a next hop router y) deliver it to the router y else deliver it to its default router Example Network#Next hop 1Interface0 2R2 3 4Interface1 Network#Next hop 1R3 2R1 3Interface1 4Interface0 Network#Next hop 1R2 2Interface1 3Interface0 4R2 R1R2R3 R1 R2 R3 H1 H8 Network 4 Network 3 Network 2 Network 1 i/f 0 i/f 1

12 CSS432: Internetworking 12 Static Configuration for Cisco Routers hostname router1 ! interface ethernet 0 ip address 172.16.1.1 255.255.255.0 ! interface ethernet 1 ip address 172.16.2.1 255.255.255.0 ! ip route 172.16.3.0 255.255.255.0 172.16.1.2 ip route 172.16.4.0 255.255.255.0 172.16.1.2 ip route 172.16.5.0 255.255.255.0 172.16.1.2 Router 2 Router 1 Router 3 172.16.3.0/24 172.16.1.0/24 172.16.4.0/24 172.16.2.0/24172.16.5.0/24 Eth2: 172.16.5.1Eth1: 172.16.3.1 Eth0: 172.16.3.2 Eth1: 172.16.4.1 Eth0: 172.16.1.2 Eht0: 172.16.1.1 Eth1: 172.16.2.1

13 CSS432: Internetworking 13 Address Translation Map IP addresses into physical addresses  destination host  next hop router Techniques  encode physical address in host part of IP address Ph a = f( IP a ) or IP a =f -1 (Ph a )  Pha: 0010 0001 0100 1001 => 128.96.33.81 Problems  Class C has only 8 bits to indicate a host  Ethernet has 48 bits to present a host address  table-based Resolution through dynamic binding Address Resolution Protocol  table of IP to physical address bindings  broadcast request if IP address not in table  target machine responds with its physical address  table entries are discarded if not refreshed

14 CSS432: Internetworking 14 ARP Details table entries timeout in about 10 minutes Update table with source when you are the target, otherwise no need to add an entry update table if already have an entry AXBY Response I’m IPb and Phb. You’re IPa and Pha Reuqest I’m IPa and Pha. You’re IPb. How about Ph? AXBY IPPh IPbPhb IPaPha IPPh IPaPha IPbPhb IPPh IPbPhb IPPh IPaPha IPb??

15 CSS432: Internetworking 15 ARP Packet Format TargetHardwareAddr (bytes 2–5) TargetProtocolAddr (bytes 0–3) SourceProtocolAddr (bytes 2–3) Hardware type = 1ProtocolType = 0x0800 SourceHardwareAddr (bytes 4–5) TargetHardwareAddr (bytes 0–1) SourceProtocolAddr (bytes 0–1) HLen = 48PLen = 32Operation SourceHardwareAddr (bytes 0–3) 081631 An ARP packet is carried in a frame header HardwareType: type of physical network (e.g., Ethernet) ProtocolType: type of higher layer protocol (e.g., IP) HLEN & PLEN: length of physical and protocol addresses Operation: request or response Source/Target-Physical/Protocol addresses preambledest addrsrc addr0x0806CRC frame type Ex. Ethernet

16 CSS432: Internetworking 16 RARP: Reverse Address Resolution Protocol Use RARP if a client host is diskless workstation Use the unique MAC address Ask an RARP server about a client IP. Works in the same LAN Retransmit an RARP message after a large delay if it has been lost. Prepare a primary and secondary server. AXBY Response You’re IPa and Pha Request I’m Pha. What’s my IPa? AXBY IPPh IPaPha IPbPhb IPPh IPaPha IPPh ??Pha RARP server IPPh IPaPha IPbPhb RARP server

17 CSS432: Internetworking 17 DHCP Options Boot file name Server host name Client Hardware addr Router IP aaddr Server IP addr Your IP addr Client IP addr FlagsSecs Xid HOPSHLENHtypeOP BOOTP/DHCPUDP headerdatagramFrame addr DHCP relay DHCP server Other network Host Broadcast Unicast DHCP server:  Works as a centralized repository for IPs  Pools available IP addresses  Hands out one to a client on demand  Accessible by sending a DHCPDISCOVER message to an IP broadcast address  Receives a DHCPDISCOVER from a Relay agent connected to a different network (255.255.255.255) Advantages:  Works at a user level  Automatic IP configuration  Save IP addresses  Works across networks.

18 CSS432: Internetworking 18 DHCP Client State Transition INITIALIZE Fig. 23.4 on p453 of Internetworking with TCP/IP REQUEST SELECT RENEW REBIND BOUND Host boots / DHCPDISCOVER to all servers Select offer / DHCPREQUEST to a specific server Receive DHCPOFFER from all servers Receive DHCPACK from the current server Lease reaches 50% expiration / DHCPREQUEST to the current server DHCPACK DHCPNACK Lease reaches 87.5% expiration / DHCPREQUEST to any server DHCPACK DHCPNACK Or Lease expires

19 Another View… http://www.tcpipguide.com/free/t_DHCPGe neralOperationandClientFiniteStateMachin e.htm CSS432: Internetworking 19

20 CSS432: Internetworking 20 Two-Step bootstrap Procedure Diskless Workstation Step 1A: BOOTP request: BOOT FILE NAME=I want to boot “unix” Step 1B: BOOTP reply: Server = mercury, BOOT FILE NAME=“/local/var/bootfiles/xncd19r” Step 2A: TFTP request: request for the image Step 2B: TFTP reply: image returned BOOTP server File server OS Image: Unix Windows

21 CSS432: Internetworking 21 Internet Control Message Protocol (ICMP) (CompanionP) frame header datagram heaader ICMP headerICMP data SrcR1R2R3RK RE Rcv Error occurred Mistakenly routed An error reporting message (ICMP) ICMP type 0-18 Is Src responsible for this ICMP message?

22 CSS432: Internetworking 22 ICMP Message Types Type fieldCode fieldICMP Message TypeApplications 0 and 8Echo reply/requestping 3Destination unreachable 5Redirect (change a route) 110TTL exceededTrace route, 111Fragment reassemble failed

23 CSS432: Internetworking 23 Reviews  IP Internet: Protocol stack, fragmentation/reassembly, IP address, and datagram forwarding  Address translation: ARP, RAPR, and DHCP  ICMP Exercises in Chapter 4  Ex. 4 (fragmentation)  Ex. 13 (ARP)  Ex. 14 (ARP)

24 CSS432: Internetworking 24 More Exercises (not from Our Textbook)  Q1. (DHCP) Consider a host that has a disk and uses DHCP to obtain an IP address. If the host stores its address on disk along with the data the lease expires, and then reboots within the lease period, can it use the same address? Why or why not?  Q2. (DHCP) DHCP mandates a minimum address lease of one hour. Can you imagine a situation in which DHCP’s minium lease causes inconvenience? Explain.


Download ppt "CSS432: Internetworking 1 CSS432 Internetworking Textbook Ch4.1 Professor: Munehiro Fukuda Augmented by Rob Nash."

Similar presentations


Ads by Google