* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Document
Survey
Document related concepts
Airborne Networking wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Computer network wikipedia , lookup
Deep packet inspection wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Dynamic Host Configuration Protocol wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Routing in delay-tolerant networking wikipedia , lookup
Internet protocol suite wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Transcript
Departamento de Tecnología Electrónica Some of these slides are copyrighted by: Chapter 3 TCP/IP Architecture Advance Features Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. TCP/IP Architecture Advanced Features 1 Chapter 3: Network Layer. Associated Protocols Chapter goals: understand congestion control in TCP understand advanced principles behind network layer services: • • • • • address translation routing (path selection) network layer error control IPv4 address dynamic configuration Advanced topics: IPv6. TCP/IP Architecture Advanced Features 2 Chapter 2 outline 3.1 TCP congestion control 3.2 Address Translation: NAT 3.3 Routing in the Internet 3.4 IPv4 error control: ICMP 3.5 IPv4 address dynamic configuration: DHCP 3.6 IP version 6 RIP OSPF BGP TCP/IP Architecture Advanced Features 3 Chapter 2 outline 3.1 TCP congestion control 3.2 Address Translation: NAT 3.3 Routing in the Internet 3.4 IPv4 error control: ICMP 3.5 IPv4 address dynamic configuration: DHCP 3.6 IP version 6 RIP OSPF BGP TCP/IP Architecture Advanced Features 4 Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control! manifestations: lost packets (buffer overflow at routers) long delays (queuing in router buffers) TCP/IP Architecture Advanced Features 5 Causes/costs of congestion Host A Two tx: lIN = Sending rate lOUT = Receiving rate C= Router capability Host B lout lin : original data unlimited shared output link buffers Queue theory large delays when congested maximum achievable throughput TCP/IP Architecture Advanced Features 6 Causes/costs of congestion: Supposition: Tx retx lost packets Now, lIN is not tx -> higher rate lIN’ Congestion costs: more work (retx) unneeded retransmissions: link carries multiple copies of pkt Host A Host B lout lin : original data unlimited shared output link buffers TCP/IP Architecture Advanced Features 7 Causes/costs of congestion Two tx and the same dest Supposition: congestion in the router between A and dest Another cost of congestion: when a packet is dropped, any upstream transmission capacity used for that packet was wasted Host A lin : original data lout l'in : original data, plus retransmitted data finite shared output link buffers Host B TCP/IP Architecture Advanced Features 8 Causes/costs of congestion Congestion costs: a summary Big delays when the incoming rate to a router is near to the link capability. The tx must retx the lost segments due to the router overflow. Unnecessary BW is used for the retx of duplicated copies of segments (due to delays). Upstream transmission capacity used for a packet is wasted when it is discarded. TCP/IP Architecture Advanced Features 9 Approaches towards congestion control Two broad approaches towards congestion control: Network-assisted congestion control: End-end congestion control: no explicit feedback from network congestion inferred from end-system observed loss, delay approach taken by TCP routers provide feedback to end systems E.g. single bit indicating congestion TCP/IP Architecture Advanced Features 10 TCP Congestion Control Host A sender limits Host B Host A Host B LastByteSent-LastByteAcked CongWin How does sender timeout transmission: perceive congestion? X loss loss event = timeout or 3 duplicate acks TCP sender reduces rate (CongWin) after loss event timeout X time lost ACK scenario time Resending a segment after triple duplicate ACK TCP/IP Architecture Advanced Features 11 TCP congestion control: additive increase, multiplicative decrease (AIMD) Approach: increase transmission rate (window size), Saw tooth behavior: probing for bandwidth congestion window size probing for usable bandwidth, until loss occurs additive increase: increase CongWin by 1 MSS every RTT until loss detected multiplicative decrease: cut CongWin in half after loss congestion window 24 Kbytes 16 Kbytes 8 Kbytes time time TCP/IP Architecture Advanced Features 12 TCP Congestion Control: details three phases: Roughly, rate = CongWin Bytes/sec RTT When connection begins, CongWin = 1 MSS Example: MSS = 500 bytes & RTT = 200 ms initial rate = 20 kbps slow start (SS) Congestion avoidance (CA): e.g. AIMD Fast recovery (FR) First two are compulsory in TCP, while the last one is recommendable TCP/IP Architecture Advanced Features 13 TCP Slow Start available bandwidth may Host B RTT be >> MSS/RTT When connection begins, increase rate exponentially fast until first loss event initial rate is slow but ramps up exponentially fast Host A time TCP/IP Architecture Advanced Features 14 Congestion avoidance After 3 dup ACKs: CongWin is cut in half window then grows linearly But after timeout event: CongWin instead set to 1 MSS; window then grows exponentially to a threshold, then grows linearly Philosophy: 3 dup ACKs indicates network capable of delivering some segments timeout indicates a “more alarming” congestion scenario TCP/IP Architecture Advanced Features 15 Summary: TCP Congestion Control When CongWin is below Threshold, sender in slow-start phase, window grows exponentially. When CongWin is above Threshold, sender is in congestion-avoidance phase, window grows linearly. When a triple duplicate ACK occurs, Threshold set to CongWin/2 and CongWin set to Threshold. When timeout occurs, Threshold set to CongWin/2 and CongWin is set to 1 MSS. Note: TCP version varies the way congestion control is applied. For example, TCP Tahoe always reduces Congestion Window to its initial value after a loss event. Meanwhile, in TCP Reno, all the congestion phases take place. Transport Layer Advanced Features 16 Chapter 2 outline 3.1 TCP congestion control 3.2 Address Translation: NAT 3.3 Routing in the Internet 3.4 IPv4 error control: ICMP 3.5 IPv4 address dynamic configuration: DHCP 3.6 IP version 6 RIP OSPF BGP TCP/IP Architecture Advanced Features 17 Address Translation: NAT Problem: limited number of IP addr. Solutions o Subnetting o Private IP addr • 10.0.0.0/8 • 172.16.0.0/12 • 192.168.0.0/16 • 169.254.0.0/16 TCP/IP Architecture Advanced Features 18 Address Translation: NAT Private IP addr: how can the dest know whose is the private IP addr? Solution: NAT (Network Address Translation) o Mechanism used to modify the IP addr inside pkts o Allows private IP addr (inside networks) communication with public IP addr (outside networks) o NAT routers must keep a NAT table with translation in both directions TCP/IP Architecture Advanced Features 19 NAT basic functioning NAT Router has one or more IP addr for NAT -> for translating private IP into public IP NAT Router modifies “Source IP addr” field in the IP header & stores matching public & pvt addr in the NAT Table Dest responds to modified addr NAT Router searches on its NAT Table & matches public & pvt addr, sending the pkt to the pvt IP Source addr 192.168.1.10 Dest addr 150.214.141.20 Source addr Dest addr 150.214.141.2 150.214.141.20 IP packet IP packet Inside network Outside network NAT Router 192.168.1.1 150.214.141.1 NAT Table Host A 192.168.1.10 Source addr 150.214.141.20 Dest addr Host Z 150.214.141.20 150.214.141.2 IP packet TCP/IP Architecture Advanced Features 20 Types of NAT Dynamic NAT Static NAT NAPT (Network Address Port Translation) TCP/IP Architecture Advanced Features 21 Dynamic NAT Translation is unidirectional Traffic comes from the inside network Translation is temporary Once public IP addr is not in use, it is deleted from NAT Table Source addr 192.168.1.10 Dest addr 150.214.141.20 Source addr Dest addr 150.214.141.2 150.214.141.20 IP packet IP packet Inside network Outside network NAT Router 192.168.1.1 150.214.141.1 NAT Table Private IP 192.168.1.10 Public IP 150.214.141.2 Host A 192.168.1.10 Source addr 150.214.141.20 Host Z 150.214.141.20 Dest addr 150.214.141.2 IP packet Source addr 150.214.141.20 Dest addr 150.214.141.2 IP packet TCP/IP Architecture Advanced Features 22 Dynamic NAT Advantage Saves public IP addr Disadvantage Traffic always initiated from the inside network -> does not allow servers Source addr 192.168.1.10 Dest addr 150.214.141.20 Source addr Dest addr 150.214.141.2 150.214.141.20 IP packet IP packet Inside network Outside network NAT Router 192.168.1.1 150.214.141.1 NAT Table Private IP 192.168.1.10 Public IP 150.214.141.2 Host A 192.168.1.10 Source addr 150.214.141.20 Host Z 150.214.141.20 Dest addr 150.214.141.2 IP packet Source addr 150.214.141.20 Dest addr 150.214.141.2 IP packet TCP/IP Architecture Advanced Features 23 Static NAT Translations are in the NAT Table since routers are configured Communication may be initiated by both the inside & the outside networks Public IP addr must be known (via DNS) by the hosts in the outside network Source addr 192.168.1.10 Dest addr 150.214.141.20 Source addr Dest addr 150.214.141.2 150.214.141.20 IP packet IP packet Outside network Inside network NAT Router 192.168.1.1 150.214.141.1 NAT Table Private IP 192.168.1.10 Public IP 150.214.141.2 static Host A 192.168.1.10 Source addr 150.214.141.20 Host Z 150.214.141.20 Dest addr 150.214.141.2 IP packet Source addr 150.214.141.20 Dest addr 150.214.141.2 IP packet TCP/IP Architecture Advanced Features 24 Static NAT Advantage Allows servers Disadvantage One public IP addr per pvt IP addr… but both dynamic & static NAT may be used together Source addr 192.168.1.10 Dest addr 150.214.141.20 Source addr Dest addr 150.214.141.2 150.214.141.20 IP packet IP packet Outside network Inside network NAT Router 192.168.1.1 150.214.141.1 NAT Table Private IP 192.168.1.10 Public IP 150.214.141.2 static Host A 192.168.1.10 Source addr 150.214.141.20 Host Z 150.214.141.20 Dest addr 150.214.141.2 IP packet Source addr 150.214.141.20 Dest addr 150.214.141.2 IP packet TCP/IP Architecture Advanced Features 25 NAPT Transport-Layer Port Identifiers are used Several pvt IP addr may be translated into a unique public IP addr Source addr Source port Host A 192.168.1.11 192.168.1.11 1576 Dest addr Dest port 150.214.141.19 80 Source addr Source port 150.214.141.2 IP packet 1576 Dest addr 150.214.141.19 Dest port Host Y 150.214.141.19 80 IP packet NAPT Router 192.168.1.1 150.214.141.1 Inside network Outside network NAPT Table Host B 192.168.1.12 Source addr Source port 192.168.1.12 1576 IP packet Private IP local 192.168.1.11:1576 local 192.168.1.12:1576 Public IP global 150.214.141.2:1576 global 150.214.141.2:1577 Dest addr Source addr Source port 150.214.141.20 Dest port 21 150.214.141.2 1577 Dest addr 150.214.141.20 Host Z 150.214.141.20 Dest port 21 IP packet TCP/IP Architecture Advanced Features 26 About NAT Not every app work properly when going through a NAT router (e.g, BOOTP) Difficult to follow the traffic that goes through several NAT routers NAT increases router processing time NAPT is a type of NAT -> there are also dynamic NAPT & static NAPT. Both may also be used together TCP/IP Architecture Advanced Features 27 Chapter 2 outline 3.1 TCP congestion control 3.2 Address Translation: NAT 3.3 Routing in the Internet 3.4 IPv4 error control: ICMP 3.5 IPv4 address dynamic configuration: DHCP 3.6 IP version 6 RIP OSPF BGP TCP/IP Architecture Advanced Features 28 Routing in the internet Network layer functions Addressing Routing Routing: finding the BEST route Which route? Best route depends on different criteria: # of hops, transfer rate, load of a link, cost, reliability… Different routes • Link breakage • Slow links TCP/IP Architecture Advanced Features 29 Routing in the internet Concept: Autonomous System (AS) AS: IP networks with a common routing management Two types of protocols IGP (Interior Gateway Protocols): define routing inside an AS. (RIP, OSPF…) EGP (Exterior Gateway Protocols): define routing between different AS. TCP/IP Architecture Advanced Features 30 Routing in the internet Important concepts about routing: Virtual circuit vs datagrama Packet flow Unicast Broadcast Multicast Unicast routing algorithms Static Adaptive • Centralized • Isolated • Distributed TCP/IP Architecture Advanced Features 31 Routing in the internet Two approaches in routing Virtual circuit • Route is established in connection start Datagram • Rcvr addr is inside every packet Which route? TCP/IP Architecture Advanced Features 32 Virtual circuit vs. Datagram Virtual circuit Error & flow control; order maintenance Connection oriented Datagram Each packet is an independent unit • Dest addr in every packet • Packets may arrive disordered to dest • No error or flow control • Three phases: establishment, transfer & termination Advantages • Efficiency • QoS Advantages • More simple • No connection -> better for short-time tx • More reliable • Better for heterogeneous networks TCP/IP Architecture Advanced Features 33 Packet flow Unicast Broadcast Multicast TCP/IP Architecture Advanced Features 34 Unicast Individual flows: one tx, one rx A 4 flows 2 flows B C D E F TCP/IP Architecture Advanced Features 35 Broadcast one tx, everyone rx A 1 flow 1 flow B C D E F TCP/IP Architecture Advanced Features 36 Multicast one flow, only desired rx A 1 flow 1 flow B C D E F TCP/IP Architecture Advanced Features 37 Unicast routing Objective Carry pkts from sender to receiver Network-layer routing Hierarchic addressing: first finds network & the host Routing algorithm Router calculates the way of routing Routing algorithm features Correct Simple Robust Fair Optimum TCP/IP Architecture Advanced Features 38 Routing algorithms Router Network device that interconnects networks & implements routing algorithm Routing algorithm decides which interface is correct Routing Engine Routing Table Input gateways Router Output gateways TCP/IP Architecture Advanced Features 39 Routing algorithms Classification Static routing Adaptive routing • Centralized • Isolated • Distributed: most used on the internet (RIP/OSPF) TCP/IP Architecture Advanced Features 40 Static Routing Does not consider current network condition Routes are determined before starting network service Advantages Simple Good results for constant traffic and network topology Disadvantages Not suitable for networks with changing topology Not suitable for big networks -> not scalable TCP/IP Architecture Advanced Features 41 Adaptive Routing Decisions based on Current topology Network condition (congested links) Better than static routing but more difficult to implement Three subgroups Centralized Adaptive Routing Isolated Adaptive Routing Distributed Adaptive Routing TCP/IP Architecture Advanced Features 42 Centralized Adaptive Routing Routing Control Center (RCC) Nodes (routers) send info about their condition to RCC List of neighbour nodes Queue length Use of links RCC Receives the information Calculates optimum route for every two nodes Calculates routing table for every node Distributes tables to nodes Disadvantages RCC & links to RCC -> bottlenecks Inaccurate calculation TCP/IP Architecture Advanced Features 43 Isolated Adaptive Routing No info interchange between nodes Decisions based only on local info -> simple Example Flooding TCP/IP Architecture Advanced Features 44 Distributed Adaptive Routing Used on the internet Two subgroups Distance vector algorithms • Decisions based on the information received from neighbour nodes • E.g. RIP (Routing Information Protocol) Link state algorithms • All the nodes know the state of the network • Some time to propagate changes • E.g. OSPF (Open Shortest Path First) TCP/IP Architecture Advanced Features 45 RIP: Routing Information Protocol Routing Information Protocol (RIP) – RFC 1058 (RIP), RFC 1723 (RIPv2): Routing Protocol (applicationlayer protocol over UDP – port 520 -) Used for interior routing inside an AS RIPv2 is identical to RIP, but with two extensions: Allows CIDR Authentication mechanism Metric: hop counts Maximum number of hops -> 15 Better for homogeneous networks Routing table distance vector-based Routing table updates: Periodic updates: via broadcast (in RIPv2: multicast to 224.0.0.9) Updates when network topology changes TCP/IP Architecture Advanced Features 46 RIP: Routing Information Protocol RIP functioning Update from neighbour N arrives to a router R: Networks known by N, and not by R, are included in R’s routing table. If N knows a better route for a network known by both, R’s routing table is updated Metric (# of hops) is increased by one Router R publishes information increasing in one unit what it is introduced in its routing table. Update messages tx to neighbours. Two ways • Not using split horizon technique: Updates are sent to all the neighbours. • Using split horizon technique. Updates sent to all the neighbours, except to those who informed about the best route. TCP/IP Architecture Advanced Features 47 RIP: Routing Information Protocol RIP timers Routing-update timer: 30 seconds – random time Route-timeout timer: after timeout -> invalid route Route-flush timer: after timeout -> deletes route from enrouting table TCP/IP Architecture Advanced Features 48 RIP: Routing Information Protocol RIP message Command Request (1) Response (2): most common (updates) Version: v1 or v2 RIP version 2: most important field -> subnet mask -> allows CIDR (subnetting) TCP/IP Architecture Advanced Features 49 OSPF: Open Shortest Path First Open Shortest Path First (OSPF) Used for interior routing inside an AS Larger networks than RIP (usually) Open protocol (RFC 2328) TCP/IP Architecture Advanced Features 50 OSPF: Basic Foundations Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) Link state routing protocol Updates disseminated to entire Dijkstra algorithm to find the BEST route A router builds a graph Graph weights are configured by the network administrator All equal to 1 (similar to RIP) Inversely proportional to BW (usual criterium) Any criteria may be fixed AS (via flooding) Changes in topology Periodically (once every 30 min, at least) carried in OSPF messages directly over IP (rather than TCP or UDP) -> protocol field: 89 Link connectivity is checked by HELLO msgs for neighbours TCP/IP Architecture Advanced Features 51 OSPF advanced features (not in RIP) security: all OSPF messages authenticated For each link, multiple cost metrics for different TOS hierarchical OSPF in large domains. TCP/IP Architecture Advanced Features 52 OSPF header Checksum: error control Authentication Value Type 1 HELLO 2 Database description 3 Link state request 4 Link state update 5 Link state ACK TCP/IP Architecture Advanced Features 53 BGP: Border Gateway Protocol Problem: Different IP networks do not have to use same routing protocol Two types of protocols IGP (Interior Gateway Protocols): define routing inside an AS. (RIP, OSPF…) EGP (Exterior Gateway Protocols): define routing between different AS. BGP (Border Gateway Protocol): most common EGP (RFC 4271) TCP/IP Architecture Advanced Features 54 BGP: Main features BGP provides each AS means to: 1. Obtain subnet reachability information from neighboring ASs. 2. Propagate reachability information to all ASinternal routers. allows subnet to advertise its existence to rest of Internet TCP/IP Architecture Advanced Features 55 BGP: Main features Every AS: ASN = Autonomous System Number) Inside every AS -> AS routing protocol Outside AS -> “border router”: border routers in different AS exchange their routing tables BGP works over TCP (port 179) TCP/IP Architecture Advanced Features 56 BGP: Example TCP/IP Architecture Advanced Features 57 Chapter 2 outline 3.1 TCP congestion control 3.2 Address Translation: NAT 3.3 Routing in the Internet 3.4 IPv4 error control: ICMP 3.5 IPv4 address dynamic configuration: DHCP 3.6 IP version 6 RIP OSPF BGP TCP/IP Architecture Advanced Features 58 ICMP: Internet Control Message Protocol used by hosts & routers to communicate network-level information error reporting: unreachable host, network, port, protocol warnings from routers or receivers network-layer above IP: ICMP msgs carried in IP datagrams (but ICMP is not a transport-layer protocol!) all the nodes using IP must have ICMP implemented ICMP msgs are only created for the first IP fragment TCP/IP Architecture Advanced Features 59 ICMP: Internet Control Message Protocol Message format ICMP msgs carried in IP datagrams • Protocol field = 1 in IP header • Source IP addr = host sending ICMP msg Type 0 3 3 3 3 5 8 11 Code 0 0 1 2 3 0 0 0 description echo reply (ping) dest. network unreachable dest host unreachable dest protocol unreachable dest port unreachable ICMP redirect echo request (ping) TTL expired TCP/IP Architecture Advanced Features 60 ICMP: Internet Control Message Protocol Ping Sends data pkt and waits for a response Based on Type 8 and Type 0 ICMP messages Functions: • Check host connectivity • Ping sends pkts with unique seq numbers – Detection ofduplicate, reordered and eliminated pkts • Ping use cheksums in every pkt – Detection of corrupted pkts • Ping allows RTT (Round Trip Time) calculation • Ping allows the detection of other ICMP messages. TCP/IP Architecture Advanced Features 61 ICMP: Internet Control Message Protocol Ping Echo request and echo reply 1 byte 1 byte 2 bytes +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Code | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Id | Sequence number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type: 8 (Echo request) or 0 (Echo reply) Code: 0 Id: number of identificación (optional) Sequence number (optional) TCP/IP Architecture Advanced Features 62 ICMP: Internet Control Message Protocol Ping Syntax ping [options] destination_host Options -w timeout Timeout in milliseconds to wait for each reply. -i TTL Time To Live. -v TOS Type Of Service. -a Resolve addresses to hostnames. -n count Number of echo requests to send. -t Ping the destination host until interrupted. To see statistics and continue type Control-Break; To stop type Control-C. -l size Send buffer size. -f Set Don't Fragment flag in packet (IPv4-only). -r count Record route for count hops (IPv4-only). -s count Timestamp for count hops (IPv4-only). -j host_list Loose source route along host_list (IPv4-only). -k host_list Strict source route along host_list (IPv4-only). destination_host The name of the remote host -R Use routing header to test reverse route also (IPv6-only). -S srcaddr Source address to use (IPv6-only). -4 Force using IPv4. -6 Force using IPv6 TCP/IP Architecture Advanced Features 63 ICMP: Internet Control Message Protocol Tracert (Trace route) Source sends echo requests to dest • First has TTL =1 • Second has TTL=2, etc. When nth datagram arrives to nth router: • Router discards datagram • And sends to source an ICMP message (type 11, code 0) • Message includes name of router& IP address Stopping criterion Echo request eventually arrives at destination host Destination returns echo reply When source gets this ICMP, stops. Tracert does this 3 times per router TCP/IP Architecture Advanced Features 64 ICMP: Internet Control Message Protocol Tracert (Trace route) Echo request TTL = 3 Echo request TTL = 2 Echo request TTL = 1 Echo request TTL = 2 Echo request TTL = 1 X X Echo request TTL = 4 Echo request TTL = 3 ICMP message TTL exceeded (type 11) ICMP message ICMP message TTL exceeded (type 11) TTL exceeded (type 11) Echo request TTL = 1 X Echo request TTL = 2 Echo request TTL = 1 Echo reply TCP/IP Architecture Advanced Features 65 ICMP: Internet Control Message Protocol Destination unreachable (type 3) Most usual code values (causes) • Code 1: host unreachable • Code 3: port unreachable • Code 4: fragmentation needed TCP/IP Architecture Advanced Features 66 ICMP: Internet Control Message Protocol ICMP Redirect (type 5) useful when there are some possible gateways Steps NETWORK A Router A (2) (1) Router B Packet is sent to default gateway Default gateway sends packet to router B Default gateway sends ICMP redirect to host (3) NETWORK B TCP/IP Architecture Advanced Features 67 Chapter 2 outline 3.1 TCP congestion control 3.2 Address Translation: NAT 3.3 Routing in the Internet 3.4 IPv4 error control: ICMP 3.5 IPv4 address dynamic configuration: DHCP 3.6 IP version 6 RIP OSPF BGP TCP/IP Architecture Advanced Features 68 Dynamic Address Configuration Address configuration static dynamic: automatic and more efficient Dynamic Address Configuration Protocols RARP: Reverse Address Resolution Protocol BootP: Bootstrap Protocol DHCP: Dynamic Host Configuration Protocol TCP/IP Architecture Advanced Features 69 Dynamic Address Configuration RARP RARP: Reverse Address Resolution Protocol Given a MAC, an IP address is assigned Messages have the same structure as ARP ones RARP is limited and, thus, obsolete. TCP/IP Architecture Advanced Features 70 Dynamic Address Configuration BootP BootP Protocol: Bootstrap Protocol Used to obtain IP automatically (generally in boot process) Not usually utilized for Dynamic Address Configuration, as DHCP is an improved version of BootP. BootP process Host determines its own MAC Host sends its IP to server’s port 67 (0.0.0.0 if doesn’t know its IP and 255.255.255.255 if doesn’t’ know the server’s one) Server searches host’s MAC in a configuration file Server fills server’s and host’s IPs in UDP datagram and sends it to client’s port 68 Host saves its IP and boots TCP/IP Architecture Advanced Features 71 Dynamic Address Configuration BootP message Code: BootPRequest & BootPReply Transaction id HW address: e.g. MAC Server host name (server does not need to be in the same broadcast domain) Boot file name Vendor specific area • Magic cookie: shows the kind of optional info below • A critical field for DHCP TCP/IP Architecture Advanced Features 72 Dynamic Address Configuration DHCP Dynamic Host Configuration Protocol (DHCP) – RFC 2131: Capable of automatically assign reusable (IP address leasing) Based on BootP, standardizing Vendor Specific Area field in BootP PDU (312 bytes). 3 mechanisms for the assignment of IP addresses: • Automatic assignment: – DHCP assigns a permanent IP address to the host. • Dynamic assigment: – DHCP assigns an IP address for a limited period of time -> automatic reuse of nonneccessary IP addresses • Static assignment: – IP address assigned by network administrator TCP/IP Architecture Advanced Features 73 Dynamic Address Configuration DHCP message Same as BootP message except options field (312 bytes) instead of Vendor Specific Area • First four bytes: magic cookie -> 99.130.83.99 (means DHCP). • Different options. Most important below – 50: requested IP address – 51: IP address lease time – 53: type of DHCP message TCP/IP Architecture Advanced Features 74 Dynamic Address Configuration DHCP cycle Besides: 1. DHCP DISCOVER: tries to find a DHCP Server. 2. DHCP OFFER: the server/s offers an IP address 3. DHCP REQUEST: the client requests some parameters (generally the ones oferred by the server) 4. DHCP ACK: server ACK • DHCP RELEASE: releases IP address • DHCP DECLINE. The offered IP is in use • DHCP INFORM: requests some configuration parameters • DHCP NAK: if server does not accept request 1 Note: Basic cycle is executed if an 2 IP address is not available. Other way, only half the cycle take place. 3 DHCP Client (port 68) 4 DHCP Server (port 67) TCP/IP Architecture Advanced Features 75 Dynamic Address Configuration Other DHCP features A router may be a DHCP server BootP Relay: when the server is not in the same client’s broadcast domain Gratuitous ARP: ARP request by the client of its own IP. Checks if the assigned IP is busy. Option 50: client requests a fixed IP Option 51: IP address lease time Maximum DHCP message size: 576 bytes TCP/IP Architecture Advanced Features 76 Chapter 2 outline 3.1 TCP congestion control 3.2 Address Translation: NAT 3.3 Routing in the Internet 3.4 IPv4 error control: ICMP 3.5 IPv4 address dynamic configuration: DHCP 3.6 IP version 6 RIP OSPF BGP TCP/IP Architecture Advanced Features 77 IPv6 Initial motivation: 32-bit address space completely allocated. Basic changes: 128-bit address space • E.g: 2002:96d6:8ddc::96dc:6301 (the bits remaining are zeros) header format helps speed processing/forwarding 40-byte header (fixed size) Other changes based on previous experience on IPv4 TCP/IP Architecture Advanced Features 78 IPv6 header Version: 6 Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). Payload length: data field length Next header: identify upper layer protocol for data Hop limit: analog to IPv4 TTL field Src & Dest addr: 128 bytes TCP/IP Architecture Advanced Features 79 Changes from IPv4 Checksum: removed entirely to reduce processing time at each hop Fragmentation: removed from IPv6, also to reduce processing time Options: allowed, but outside of header, indicated by “Next Header” field ICMPv6: new version of ICMP additional message types, e.g. “Packet Too Big” TCP/IP Architecture Advanced Features 80 Transition from IPv4 to IPv6 Not all routers can be upgraded simultaneous no D Day How does the internet operate with mixed IPv4 and IPv6 routers? Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers TCP/IP Architecture Advanced Features 81