130 likes | 242 Views
This lecture covers key concepts in networking, including the operation and responsibilities of switches, the structure of Internet Protocol (IP), and the fundamentals of routing and TCP. Students are expected to revisit sections 4.1 and 4.2 to 5.2 in the reading materials, which provide essential insights into the best-effort service model and global addressing techniques. Additionally, the initiation of Project 2 is discussed, encouraging collaborative work. Key technical terms such as fragmentation, reassembly, and address translation via ARP are also introduced, vital for mastering network communications.
E N D
Internetworking COS 461 Spring 2003 CS 461
Mechanics • Today: finish switches, cover IP • Should have read 4.1 • Wednesday: Routing and TCP • Read 4.2-4.4, 5.1-5.2 • Projects: begin Project 2 • Can be done in pairs • Speak up soon if you want alternate projects CS 461
Outline Best Effort Service Model Global Addressing Scheme CS 461
Network 1 (Ethernet) H7 R3 H8 H2 H1 H3 Network 4 (point-to-point) Network 2 (Ethernet) R1 R2 H4 Network 3 (FDDI) H5 H6 H1 H8 TCP TCP R1 R2 R3 IP IP IP IP IP FDDI PPP ETH ETH ETH FDDI PPP ETH IP Internet • Concatenation of Networks • Protocol Stack CS 461
0 4 8 16 19 31 TOS Length V ersion HLen Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Pad Options (variable) (variable) Data Service Model • Connectionless (datagram-based) • Best-effort delivery (unreliable service) • 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 CS 461
Fragmentation and Reassembly • Each network has some MTU • Design decisions • 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 CS 461
Start of header Ident = x Offset = 0 0 Rest of header 1400 data bytes Start of header Ident = x 1 Offset = 0 H1 R1 R2 R3 H8 Rest of header 512 data bytes Start of header ETH IP (1400) FDDI IP (1400) PPP IP (512) ETH IP (512) Ident = x 1 Offset = 512 PPP IP (512) ETH IP (512) Rest of header PPP IP (376) ETH IP (376) 512 data bytes Start of header Ident = x 0 Offset = 1024 Rest of header 376 data bytes Example CS 461
7 24 A: 0 Network Host 14 16 B: 1 0 Network Host 21 8 C: 1 1 0 Network Host Global Addresses • Properties • globally unique • hierarchical: network + host • Dot Notation • 10.3.2.4 • 128.96.33.81 • 192.12.69.77 CS 461
Datagram Forwarding • Strategy • every datagram contains destination’s address • if connected to destination network, then forward to host • if not directly connected, then forward to some router • forwarding table maps network number into next hop • each host has a default router • each router maintains a forwarding table • Example (R2) Network Number Next Hop 1 R3 2 R1 3 interface 1 4 interface 0 CS 461
Address Translation • Map IP addresses into physical addresses • destination host • next hop router • Techniques • encode physical address in host part of IP address • table-based • ARP • 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 CS 461
ARP Details • Request Format • 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 • Notes • table entries timeout in about 10 minutes • update table with source when you are the target • update table if already have an entry • do not refresh table entries upon reference CS 461
0 8 16 31 Hardware type = 1 ProtocolT ype = 0x0800 HLen = 48 PLen = 32 Operation SourceHardwareAddr (bytes 0 – 3) SourceHardwareAddr (bytes 4 – 5) SourceProtocolAddr (bytes 0 – 1) SourceProtocolAddr (bytes 2 – 3) T argetHardwareAddr (bytes 0 – 1) T argetHardwareAddr (bytes 2 – 5) T argetProtocolAddr (bytes 0 – 3) ARP Packet Format CS 461
Internet Control Message Protocol (ICMP) • Echo (ping) • Redirect (from router to source host) • Destination unreachable (protocol, port, or host) • TTL exceeded (so datagrams don’t cycle forever) • Checksum failed • Reassembly failed • Cannot fragment CS 461