Network Layer Packet and Packet Header Encapsulation

Total Page:16

File Type:pdf, Size:1020Kb

Network Layer Packet and Packet Header Encapsulation Network Layer DNS Where are we now? application socket API Computer Networks transport network link physical Lecture 6: IPv4, CIDR, ICMP Previously . the Internet is a packet switched network: • data is parceled into packets • each packet carries a destination address • each packet is routed independently Packet and Packet Header Encapsulation Each protocol has its own “envelope” Protocols are rules (“syntax” and “grammar” ) • each protocol attaches its header to the packet GoverninG communication between nodes • so we have a protocol wrapped/encapsulated inside another protocol • each layer of header contains a protocol de-multiplexinG field to identify the “packet handler” Just as with the postal system, the “content” you want source the next layer up, e.G., to send must be put into an envelope and the M application H M transport • protocol number t H H M envelope must be addressed n t network H H H M • port number l n t link physical Hl Hn Ht M H H H M link l n t The “envelope” in this case is the packet header physical switch The format of a packet header is part of the protocol packet not package H H M H H destination n t network n t M message H H H M H H H M M application l n t link l n t For the Internet, the network-layer protocol is the seGment Ht M transport physical dataGram/packet H H M n t network Internet Protocol (IP) H H H M frame l n t link router physical IPv4 Packet Header Format Packet ForwardinG 4 bits 4 bits 8 bits 16 bits Goal: deliver packets throuGh routers from source to hdr len Type of Service destination usually IPv4 version (bytes) (TOS) Total lenGth (bytes) • source node puts destination address in packet header 3-bit Identification flags 13-bit FraGment Offset • each router node on the Internet: routinG alGorithm upper layer protocol 20-byte • looks up destination address to whom payload is Time to Header Live (TTL) Protocol Header Checksum local forwardinG table delivered, e.G., ICMP in its routinG/forwardinG table dest address output link (1), UDP (17), TCP (6) • we’ll study several path selection 0100 3 Source IP Address 0101 2 (i.e., routinG) alGorithms 0111 2 1001 1 Destination IP Address • sends the packet to the next hop destination towards the destination address in e.g. timestamp, packet’s header record route, Options (if any) • routes may chanGe durinG session 1 source route 0111 • analoGy: drivinG, askinG directions 3 2 Payload (e.g., TCP/UDP packet, max size?) IPv4 AddressinG: Introduction Flat vs. Hierarchical AddressinG 4 223.1.1.1 Flat addressinG: 1 2 IPv4 address: 32-bit 2 2 223.1.2.1 • each router needs 10 entries 3 2 identifier for host/router 223.1.1.2 in its routinG table 4 - 223.1.1.4 223.1.2.9 5 5 6 6 interface 7 7 223.1.2.2 8 2 223.1.1.3 223.1.3.27 Hierarchical addressinG: 9 7 10 2 interface (if): connection • hosts only need to know the 11 2 between host/router and default router, usually its physical link 223.1.3.1 223.1.3.2 border router • each border router keeps in • routers typically have 3.1 its routinG table: 2.* 2.1 multiple interfaces 223.1.1.1 = 11011111 00000001 00000001 00000001 1.* 1.1 • addresses of all hosts within its own • 4.* 2.1 host may have 223 1 1 1 network 3.2 3.2 3.3 3.3 multiple interfaces • next hop address of other networks 3.4 3.4 (Cf. forwardinG table stores the outGoinG interface number) IPv4 AddressinG Subnets Independent of physical hardware address A network can be further 223.1.1.1 32-bit number represented as dotted decimal: 223.1.2.1 divided into subnets 223.1.1.2 • for ease of reference 223.1.1.4 223.1.2.9 • each # is the decimal representation of an octet What makes a subnet ? 223.1.2.2 223.1.1.3 223.1.3.27 Divided into two parts: • the IP addresses of all LAN • network prefix, globally assigned interfaces within a subnet • route to network first have the same network 223.1.3.1 223.1.3.2 • host ID, assigned locally 12 34 158 5 prefix 00001100 00100010 10011110 00000101 • hosts within a subnet can Network (24 bits) Host (8 bits) a network consistinG of 3 subnets Example: 12.34.158.0/24 physically reach each other without interveninG router is a 24-bit network prefix with 28 host addresses Classfull Addresses Classfull Addresses For the example network prefix: 12.34.158.0/24 Problems: • how many hosts can the network have? 1. everybody wanted a Class B address (the Goldilock problem) 2. address space usaGe became inefficient What is a Good partition of the 32-bit address 3. routinG table explosion 4. and then, address space became scarce… space between the network and host parts? • by 1992, half of Class B had been allocated, would have been exhausted by 3/94 Historically . classfull addresses: Class A: 0[10]*, very large /8 blocks (e.g., MIT has 18.0.0.0/8) Solution: Class B: 10[10]*, large /16 blocks (e.G,. UM has 141.213.0.0/16) Make network portion of address arbitrary lenGth, Class C: 110[10]*, small /24 blocks (e.g., AT&T Labs has determined by a prefix mask 192.20.225.0/24) • uses two 32-bit numbers to represent a network address Class D: 1110[10]*, multicast Groups • network address = IP address & prefix mask Class E: 11110[10]*, reserved for future use Classless InterDomain Routing (CIDR) CIDR: Hierarchical Address Allocation Usually written as a.b.c.d/x, where x is number of Prefixes are key to Internet routinG scalability bits in the network portion of the address: 12.4.0.0/15 • address allocation by ICANN, ARIN/RIPE/APNIC and by ISPs • IP address: routinG protocols and packet forwardinG based on prefixes 12.4.0.0 00001100 00000100 00000000 00000000 • today, routinG tables contain ~150,000-200,000 prefixes prefix mask: 12.0.0.0/16 255.254.0.0 11111111 11111110 00000000 00000000 12.1.0.0/16 12.3.0.0/24 : network prefix for hosts 12.2.0.0/16 12.3.1.0/24 : : 12.3.0.0/16 : Another example (not at octet boundary!): : 12.3.254.0/24 12.0.0.0/8 : 200.23.16.0/23 : 12.253.0.0/19 network host : 12.253.32.0/19 prefix part 12.253.64.0/19 11001000 00010111 00010000 00000000 12.253.0.0/16 12.253.96.0/19 12.253.128.0/19 12.254.0.0/16 12.253.160.0/19 12.253.192.0/19 CIDR: Route AGGreGation LonGest Prefix Match: Hierarchical addressinG allows efficient More Specific Routes advertisement of routinG information: ISPs-R-Us has a more specific route to Organization 1 Organization 0 200.23.16.0/23 Organization 0 Organization 1 200.23.16.0/23 “Send me anythinG 200.23.18.0/23 with addresses “Send me anythinG beginninG Organization 2 with addresses 200.23.16.0/20” Organization 2 beginning 200.23.20.0/23 . Fly-By-NiGht-ISP 200.23.16.0/20” . 200.23.20.0/23 . Fly-By-NiGht-ISP . Internet . Internet Organization 7 . 200.23.30.0/23 Organization 7 200.23.30.0/23 ISPs-R-Us “Send me anythinG with addresses ISPs-R-Us “Send me anythinG beginning with addresses 199.31.0.0/16” Organization 1 beginning 199.31.0.0/16 or 200.23.18.0/23” 200.23.18.0/23 Packet ForwardinG Summary Special IPv4 Addresses ForwardinG is destination-based: Network identification: • 0s on host part, e.G. ,141.212.0.0 (cannot be used to send packets) • packet has a destination address forwardinG table Directed broadcast: • router identifies lonGest-matchinG prefix 4.0.0.0/8 • 0xffff on host part, e.G., 141.212.255.255 4.83.128.0/17 destination 12.0.0.0/8 • broadcast to all hosts on a network (e.G., 141.212) (not implemented) ForwardinG table: 12.34.158.5 12.34.158.0/24 • maps each IP prefix to next-hop link(s) 126.255.103.0/24 Limited broadcast: • 0xffffffff, received by all hosts on LAN, not forwarded beyond LAN • entries can be statically confiGured outgoing link • e.G., “map 12.34.158.0/24 to Serial0/0.1” Serial0/0.1 This computer: • 0.0.0.0 used at startup to solicit IP address with RARP (deprecated) But, this doesn’t adapt to That is where routinG Loopback address: • failures protocols come in… • 127.*.*.* (usually 127.0.0.1), named localhost • new equipment [more on routinG later • packets sent to localhost traverse down the kernel networkinG code • the need to balance load to the network layer and back up to the application without traversinG in the term] the network, useful for testinG networkinG code • … Internet Control MessaGe Protocol Internet Control MessaGe Protocol ICMP is used by hosts and routers to communicate Type Code Description network-level information 0 0 echo reply (pinG) • error reportinG: unreachable host, network, port, protocol 3 0 dest network unreachable • echo request/reply (used by ping) 3 1 dest host unreachable • ICMP error message does not triGGer another ICMP messaGe 3 2 dest protocol unreachable 3 3 dest port unreachable ICMP runs on network-layer, but “above” IP: 3 4 fraG needed but DF set • ICMP messaGes are carried inside IP dataGrams 3 6 dest network unknown 8 bits 8 bits 16 bits 3 7 dest host unknown 8 0 echo request (pinG) ICMP messaGe format: type code checksum 9 0 route advertisement 10 0 router discovery The first 8 bytes of IP dataGram causinG error 11 0 TTL expired 12 0 bad IP header Traceroute and ICMP Traceroute and ICMP How to discover the routers alonG a path? When ICMP messaGe arrives back at the source, source calculates round-trip time (RTT) Source sends a series of UDP packets to destination • first 3 packets have TTL set to 1, spaced 3 secs apart StoppinG criterion: • next 3 packets have TTL set to 2, etc.
Recommended publications
  • IP Datagram ICMP Message Format ICMP Message Types
    ICMP Internet Control Message Protocol ICMP is a protocol used for exchanging control messages. CSCE 515: Two main categories Query message Computer Network Error message Programming Usage of an ICMP message is determined by type and code fields ------ IP, Ping, Traceroute ICMP uses IP to deliver messages. Wenyuan Xu ICMP messages are usually generated and processed by the IP software, not the user process. Department of Computer Science and Engineering University of South Carolina IP header ICMP Message 20 bytes CSCE515 – Computer Network Programming IP Datagram ICMP Message Format 1 byte 1 byte 1 byte 1 byte VERS HL Service Total Length Datagram ID FLAG Fragment Offset 0781516 31 TTL Protocol Header Checksum type code checksum Source Address Destination Address payload Options (if any) Data CSCE515 – Computer Network Programming CSCE515 – Computer Network Programming ICMP Message Types ICMP Address Mask Request and Reply intended for a diskless system to obtain its subnet mask. Echo Request Id and seq can be any values, and these values are Echo Response returned in the reply. Destination Unreachable Match replies with request Redirect 0781516 31 Time Exceeded type(17 or 18) code(0) checksum there are more ... identifier sequence number subnet mask CSCE515 – Computer Network Programming CSCE515 – Computer Network Programming ping Program ICMP Echo Request and Reply Available at /usr/sbin/ping Test whether another host is reachable Send ICMP echo_request to a network host -n option to set number of echo request to send
    [Show full text]
  • Lesson 1 Key-Terms Meanings: Internet Connectivity Principles
    Lesson 1 Key-Terms Meanings: Internet Connectivity Principles Chapter-4 L01: "Internet of Things " , Raj Kamal, 2017 1 Publs.: McGraw-Hill Education Header Words • Header words are placed as per the actions required at succeeding stages during communication from Application layer • Each header word at a layer consists of one or more header fields • The header fields specify the actions as per the protocol used Chapter-4 L01: "Internet of Things " , Raj Kamal, 2017 2 Publs.: McGraw-Hill Education Header fields • Fields specify a set of parameters encoded in a header • Parameters and their encoding as per the protocol used at that layer • For example, fourth word header field for 32-bit Source IP address in network layer using IP Chapter-4 L01: "Internet of Things " , Raj Kamal, 2017 3 Publs.: McGraw-Hill Education Protocol Header Field Example • Header field means bits in a header word placed at appropriate bit place, for example, place between bit 0 and bit 31 when a word has 32-bits. • First word fields b31-b16 for IP packet length in bytes, b15-b4 Service type and precedence and b3-b0 for IP version • Chapter-4 L01: "Internet of Things " , Raj Kamal, 2017 4 Publs.: McGraw-Hill Education IP Header • Header fields consist of parameters and their encodings which are as per the IP protocol • An internet layer protocol at a source or destination in TCP/IP suite of protocols Chapter-4 L01: "Internet of Things " , Raj Kamal, 2017 5 Publs.: McGraw-Hill Education TCP Header • Header fields consist of parameters and their encoding which are as
    [Show full text]
  • Solutions to Chapter 2
    CS413 Computer Networks ASN 4 Solutions Solutions to Assignment #4 3. What difference does it make to the network layer if the underlying data link layer provides a connection-oriented service versus a connectionless service? [4 marks] Solution: If the data link layer provides a connection-oriented service to the network layer, then the network layer must precede all transfer of information with a connection setup procedure (2). If the connection-oriented service includes assurances that frames of information are transferred correctly and in sequence by the data link layer, the network layer can then assume that the packets it sends to its neighbor traverse an error-free pipe. On the other hand, if the data link layer is connectionless, then each frame is sent independently through the data link, probably in unconfirmed manner (without acknowledgments or retransmissions). In this case the network layer cannot make assumptions about the sequencing or correctness of the packets it exchanges with its neighbors (2). The Ethernet local area network provides an example of connectionless transfer of data link frames. The transfer of frames using "Type 2" service in Logical Link Control (discussed in Chapter 6) provides a connection-oriented data link control example. 4. Suppose transmission channels become virtually error-free. Is the data link layer still needed? [2 marks – 1 for the answer and 1 for explanation] Solution: The data link layer is still needed(1) for framing the data and for flow control over the transmission channel. In a multiple access medium such as a LAN, the data link layer is required to coordinate access to the shared medium among the multiple users (1).
    [Show full text]
  • Ipv6-Ipsec And
    IPSec and SSL Virtual Private Networks ITU/APNIC/MICT IPv6 Security Workshop 23rd – 27th May 2016 Bangkok Last updated 29 June 2014 1 Acknowledgment p Content sourced from n Merike Kaeo of Double Shot Security n Contact: [email protected] Virtual Private Networks p Creates a secure tunnel over a public network p Any VPN is not automagically secure n You need to add security functionality to create secure VPNs n That means using firewalls for access control n And probably IPsec or SSL/TLS for confidentiality and data origin authentication 3 VPN Protocols p IPsec (Internet Protocol Security) n Open standard for VPN implementation n Operates on the network layer Other VPN Implementations p MPLS VPN n Used for large and small enterprises n Pseudowire, VPLS, VPRN p GRE Tunnel n Packet encapsulation protocol developed by Cisco n Not encrypted n Implemented with IPsec p L2TP IPsec n Uses L2TP protocol n Usually implemented along with IPsec n IPsec provides the secure channel, while L2TP provides the tunnel What is IPSec? Internet IPSec p IETF standard that enables encrypted communication between peers: n Consists of open standards for securing private communications n Network layer encryption ensuring data confidentiality, integrity, and authentication n Scales from small to very large networks What Does IPsec Provide ? p Confidentiality….many algorithms to choose from p Data integrity and source authentication n Data “signed” by sender and “signature” verified by the recipient n Modification of data can be detected by signature “verification”
    [Show full text]
  • Transport Layer Chapter 6
    Transport Layer Chapter 6 • Transport Service • Elements of Transport Protocols • Congestion Control • Internet Protocols – UDP • Internet Protocols – TCP • Performance Issues • Delay-Tolerant Networking Revised: August 2011 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 The Transport Layer Responsible for delivering data across networks with the desired Application reliability or quality Transport Network Link Physical CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Transport Service • Services Provided to the Upper Layer » • Transport Service Primitives » • Berkeley Sockets » • Socket Example: Internet File Server » CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Services Provided to the Upper Layers (1) Transport layer adds reliability to the network layer • Offers connectionless (e.g., UDP) and connection- oriented (e.g, TCP) service to applications CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Services Provided to the Upper Layers (2) Transport layer sends segments in packets (in frames) Segment Segment CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Transport Service Primitives (1) Primitives that applications might call to transport data for a simple connection-oriented service: • Client calls CONNECT, SEND, RECEIVE, DISCONNECT • Server calls LISTEN, RECEIVE, SEND, DISCONNECT Segment CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice
    [Show full text]
  • 1. Ipv4 Sites Reaching Global Ipv4 Internet
    1. IPv4 Sites Reaching Global IPv4 Internet Private IPv4 Internet IPv4 NAT • Keep IPv4 service as unchanged as possible, even without enough addresses • Single global IPv4 address shared across more than one subscriber SP IPv6 Network Private Tunnel for IPv4 (public, private, port-limited, etc....) IPv4 Internet IPv4 • Scenario #2 - Service Providers Running out of Private IPv4 space • IPv4 / IPv6 encapsulations/tunnels • Tunnels setup by DHCP, Routing, etc. between a GW and Router • Wherever the NAT lands, it is important that the user keeps control of it • Provides a path to delivering IPv6 SP IPv6 Network Tunnel for IPv4 (public, private, port-limited, etc....) IPv4 Internet • Scenario #3a “Wireless Greenfield” • IPv4 / IPv6 encapsulations/tunnels • Tunnels setup between a host and a Router • IPv4 binding for host applications, transport over IPv6 • Wherever the NAT lands, it is important that the user keeps control of it 3 - 5 Translation Options IPv6 Internet IPv4 Internet IPv6 IPv4 My IPv6 Network IPv6 Internet IPv4 Internet • “Scenario #3” • NAT64/DNS64.... - Stateful, DNSSEC Challenges, DNS64 location, etc. My IPv6 Network IPv6 Internet IPv4 Internet • “Scenario #5” • IVI - NAT-PT..... Expose only certain IPv6 servers, etc. MY IPv4 Network IPv6 Internet IPv4 Internet • “Scenario #4” • NAT64 - 1:1, Stateless, DNSSEC OK, no DNS64 MY IPv4 Network IPv6 Internet IPv4 Internet • Already solved by existing transition mechanisms?? (teredo, etc). Scenarios 1 - 5 1. IPv4 Sites Reaching Global IPv4 Internet Private IPv4 Internet IPv4 NAT • Keep IPv4 service as unchanged as possible, even without enough addresses • Single global IPv4 address shared across more than one subscriber 2. Service Providers Running out of Private IPv4 space ISP Private IPv4 Private Network IPv4 IPv4 Internet • Service Providers with large, privately addressed, IPv4 networks • Organic growth plus pressure to free global addresses for customer use contribute to the problem • The SP Private networks in question generally do not need to reach the Internet at large 3.
    [Show full text]
  • OSI Model and Network Protocols
    CHAPTER4 FOUR OSI Model and Network Protocols Objectives 1.1 Explain the function of common networking protocols . TCP . FTP . UDP . TCP/IP suite . DHCP . TFTP . DNS . HTTP(S) . ARP . SIP (VoIP) . RTP (VoIP) . SSH . POP3 . NTP . IMAP4 . Telnet . SMTP . SNMP2/3 . ICMP . IGMP . TLS 134 Chapter 4: OSI Model and Network Protocols 4.1 Explain the function of each layer of the OSI model . Layer 1 – physical . Layer 2 – data link . Layer 3 – network . Layer 4 – transport . Layer 5 – session . Layer 6 – presentation . Layer 7 – application What You Need To Know . Identify the seven layers of the OSI model. Identify the function of each layer of the OSI model. Identify the layer at which networking devices function. Identify the function of various networking protocols. Introduction One of the most important networking concepts to understand is the Open Systems Interconnect (OSI) reference model. This conceptual model, created by the International Organization for Standardization (ISO) in 1978 and revised in 1984, describes a network architecture that allows data to be passed between computer systems. This chapter looks at the OSI model and describes how it relates to real-world networking. It also examines how common network devices relate to the OSI model. Even though the OSI model is conceptual, an appreciation of its purpose and function can help you better understand how protocol suites and network architectures work in practical applications. The OSI Seven-Layer Model As shown in Figure 4.1, the OSI reference model is built, bottom to top, in the following order: physical, data link, network, transport, session, presentation, and application.
    [Show full text]
  • Internet Protocol Suite
    InternetInternet ProtocolProtocol SuiteSuite Srinidhi Varadarajan InternetInternet ProtocolProtocol Suite:Suite: TransportTransport • TCP: Transmission Control Protocol • Byte stream transfer • Reliable, connection-oriented service • Point-to-point (one-to-one) service only • UDP: User Datagram Protocol • Unreliable (“best effort”) datagram service • Point-to-point, multicast (one-to-many), and • broadcast (one-to-all) InternetInternet ProtocolProtocol Suite:Suite: NetworkNetwork z IP: Internet Protocol – Unreliable service – Performs routing – Supported by routing protocols, • e.g. RIP, IS-IS, • OSPF, IGP, and BGP z ICMP: Internet Control Message Protocol – Used by IP (primarily) to exchange error and control messages with other nodes z IGMP: Internet Group Management Protocol – Used for controlling multicast (one-to-many transmission) for UDP datagrams InternetInternet ProtocolProtocol Suite:Suite: DataData LinkLink z ARP: Address Resolution Protocol – Translates from an IP (network) address to a network interface (hardware) address, e.g. IP address-to-Ethernet address or IP address-to- FDDI address z RARP: Reverse Address Resolution Protocol – Translates from a network interface (hardware) address to an IP (network) address AddressAddress ResolutionResolution ProtocolProtocol (ARP)(ARP) ARP Query What is the Ethernet Address of 130.245.20.2 Ethernet ARP Response IP Source 0A:03:23:65:09:FB IP Destination IP: 130.245.20.1 IP: 130.245.20.2 Ethernet: 0A:03:21:60:09:FA Ethernet: 0A:03:23:65:09:FB z Maps IP addresses to Ethernet Addresses
    [Show full text]
  • Medium Access Control Layer
    Telematics Chapter 5: Medium Access Control Sublayer User Server watching with video Beispielbildvideo clip clips Application Layer Application Layer Presentation Layer Presentation Layer Session Layer Session Layer Transport Layer Transport Layer Network Layer Network Layer Network Layer Univ.-Prof. Dr.-Ing. Jochen H. Schiller Data Link Layer Data Link Layer Data Link Layer Computer Systems and Telematics (CST) Physical Layer Physical Layer Physical Layer Institute of Computer Science Freie Universität Berlin http://cst.mi.fu-berlin.de Contents ● Design Issues ● Metropolitan Area Networks ● Network Topologies (MAN) ● The Channel Allocation Problem ● Wide Area Networks (WAN) ● Multiple Access Protocols ● Frame Relay (historical) ● Ethernet ● ATM ● IEEE 802.2 – Logical Link Control ● SDH ● Token Bus (historical) ● Network Infrastructure ● Token Ring (historical) ● Virtual LANs ● Fiber Distributed Data Interface ● Structured Cabling Univ.-Prof. Dr.-Ing. Jochen H. Schiller ▪ cst.mi.fu-berlin.de ▪ Telematics ▪ Chapter 5: Medium Access Control Sublayer 5.2 Design Issues Univ.-Prof. Dr.-Ing. Jochen H. Schiller ▪ cst.mi.fu-berlin.de ▪ Telematics ▪ Chapter 5: Medium Access Control Sublayer 5.3 Design Issues ● Two kinds of connections in networks ● Point-to-point connections OSI Reference Model ● Broadcast (Multi-access channel, Application Layer Random access channel) Presentation Layer ● In a network with broadcast Session Layer connections ● Who gets the channel? Transport Layer Network Layer ● Protocols used to determine who gets next access to the channel Data Link Layer ● Medium Access Control (MAC) sublayer Physical Layer Univ.-Prof. Dr.-Ing. Jochen H. Schiller ▪ cst.mi.fu-berlin.de ▪ Telematics ▪ Chapter 5: Medium Access Control Sublayer 5.4 Network Types for the Local Range ● LLC layer: uniform interface and same frame format to upper layers ● MAC layer: defines medium access ..
    [Show full text]
  • The Internet Protocol, Version 4 (Ipv4)
    Today’s Lecture I. IPv4 Overview The Internet Protocol, II. IP Fragmentation and Reassembly Version 4 (IPv4) III. IP and Routing IV. IPv4 Options Internet Protocols CSC / ECE 573 Fall, 2005 N.C. State University copyright 2005 Douglas S. Reeves 1 copyright 2005 Douglas S. Reeves 2 Internet Protocol v4 (RFC791) Functions • A universal intermediate layer • Routing IPv4 Overview • Fragmentation and reassembly copyright 2005 Douglas S. Reeves 3 copyright 2005 Douglas S. Reeves 4 “IP over Everything, Everything Over IP” IP = Basic Delivery Service • Everything over IP • IP over everything • Connectionless delivery simplifies router design – TCP, UDP – Dialup and operation – Appletalk – ISDN – Netbios • Unreliable, best-effort delivery. Packets may be… – SCSI – X.25 – ATM – Ethernet – lost (discarded) – X.25 – Wi-Fi – duplicated – SNA – FDDI – reordered – Sonet – ATM – Fibre Channel – Sonet – and/or corrupted – Frame Relay… – … – Remote Direct Memory Access – Ethernet • Even IP over IP! copyright 2005 Douglas S. Reeves 5 copyright 2005 Douglas S. Reeves 6 1 IPv4 Datagram Format IPv4 Header Contents 0 4 8 16 31 •Version (4 bits) header type of service • Functions version total length (in bytes) length (x4) prec | D T R C 0 •Header Length x4 (4) flags identification fragment offset (x8) 1. universal 0 DF MF s •Type of Service (8) e time-to-live (next) protocol t intermediate layer header checksum y b (hop count) identifier •Total Length (16) 0 2 2. routing source IP address •Identification (16) 3. fragmentation and destination IP address reassembly •Flags (3) s •Fragment Offset ×8 (13) e t 4. Options y IP options (if any) b •Time-to-Live (8) 0 4 ≤ •Protocol Identifier (8) s e t •Header Checksum (16) y b payload 5 •Source IP Address (32) 1 5 5 6 •Destination IP Address (32) ≤ •IP Options (≤ 320) copyright 2005 Douglas S.
    [Show full text]
  • The OSI Model: Understanding the Seven Layers of Computer Networks
    Expert Reference Series of White Papers The OSI Model: Understanding the Seven Layers of Computer Networks 1-800-COURSES www.globalknowledge.com The OSI Model: Understanding the Seven Layers of Computer Networks Paul Simoneau, Global Knowledge Course Director, Network+, CCNA, CTP Introduction The Open Systems Interconnection (OSI) model is a reference tool for understanding data communications between any two networked systems. It divides the communications processes into seven layers. Each layer both performs specific functions to support the layers above it and offers services to the layers below it. The three lowest layers focus on passing traffic through the network to an end system. The top four layers come into play in the end system to complete the process. This white paper will provide you with an understanding of each of the seven layers, including their functions and their relationships to each other. This will provide you with an overview of the network process, which can then act as a framework for understanding the details of computer networking. Since the discussion of networking often includes talk of “extra layers”, this paper will address these unofficial layers as well. Finally, this paper will draw comparisons between the theoretical OSI model and the functional TCP/IP model. Although TCP/IP has been used for network communications before the adoption of the OSI model, it supports the same functions and features in a differently layered arrangement. An Overview of the OSI Model Copyright ©2006 Global Knowledge Training LLC. All rights reserved. Page 2 A networking model offers a generic means to separate computer networking functions into multiple layers.
    [Show full text]
  • SOCKS Protocol Version 6
    SOCKS Protocol Version 6 draft-olteanu-intarea-socks-6-08 Vladimir Olteanu IETF 106 What’s new ● DNS provided by SOCKS ● Options for Happy Eyeballs at the proxy Clients need DNS-like features ● A and AAAA – LD_PRELOAD for non-SOCKS-aware apps: gedaddrinfo() separate from connect() – Happy Eyeballs: need to do queries separately ● TXT – ESNI ● MX, Service Binding, etc. – <Insert future use case here> Providing DNS-like features ● Individual SOCKS options (removed in -08) – Have to keep up with use cases – Duplicate DNS functionality – Until -07: A, AAAA, PTR ● Having the client use DNS – Hard to convey policies: resolver IPs, plaintext / over TLS / over HTTPS etc., maybe credentials, etc. – Provide a DNS proxy Why not separate DNS from SOCKS? Client Proxy Server HTTP/SOCKS :1080 HTTP :80 DNS :53 Why not separate DNS from SOCKS? Client Proxy Server HTTP/SOCKS :1080 HTTP :80 DNS :53 WHICH TOR CIRCUIT? ● Need context for DNS query – Otherwise: privacy leaks, suboptimal CDN use DNS provided by SOCKS ● Clients make CONNECT request to 0.0.0.0:53 – Proxy needn’t provide a valid bind address ● Plaintext DNS over SOCKS (opt. over TLS) – TCP by default: SOCKS + UDP more cumbersome to use ● Implementation in Sixtysocks – Run separate DNS proxy locally – Translate 0.0.0.0:53 to 127.0.0.1:53 Happy Eyeballs ● RFC 8305: resolve and connect to a server using both IPv4 and IPv6, keep only one connection – Failover from IPv6 to IPv4 – Better responsiveness if one is faster ● Clients can implement Happy Eyeballs locally – Have DNS + CONNECT Happy Eyeballs:
    [Show full text]