510 likes | 698 Views
Network Addressing and Layer 3 internetworking . BSAD 141 Dave Novak Sources : Network + Guide to Networks, Dean 2013. Outline. Concept of internetworking Why TCP/IP is important The TCP/IP model Intro to IP address IP –vs- MAC Address resolution (revisited) ARP Connectionless service
E N D
Network Addressing and Layer 3 internetworking BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013
Outline • Concept of internetworking • Why TCP/IP is important • The TCP/IP model • Intro to IP address • IP –vs- MAC • Address resolution (revisited) • ARP • Connectionless service • IP datagram • Encapsulation
Compatibility and Protocols • Ensure networking components (hardware and software) work together with respect to networking • Compatibility issues on LANs are typically easier to address because a single entity is generally in control of the LAN • Same/similar technologies or solutions are implemented
Compatibility and Protocols • Why is this not necessarily the case off the LAN?
Compatibility and Protocols • Interface – the logical connection between hardware and software components • Physical – hardware to hardware • Cables physically connecting serial ports on a device • NIC plugging into expansion slot on motherboard • Logical – software to software • Browser (IE) communicating with OS (Win XP) • Application software (Excel) collecting data from large DBMS (Oracle)
Compatibility and Protocols • Cross between physical and logical – hardware to software (vice versa) • Specific OS drivers interfacing with NIC • OS kernel interfacing with CPU
Compatibility and Protocols • Protocol • May be proprietary or open • May be sanctioned by standards making organizations or market driven
Compatibility and Protocols • For every interface one or more protocols are generally supported • Hardware to hardware • Software to software • Hardware to software / software to hardware • The sum of all protocols employed in a device is typically called the protocol stack
Internetworking • Individual proprietary networking technologies designed to fit specific set of constraints • Based on vendor preferences • Based on different technologies • No single technology is best for all needs
Motivation for internetworking • Internetworking utilizes both hardware and software to provide universal service among heterogeneous networks • Universal service
Motivation for internetworking • Large organization with diverse requirements need may need / use multiple physical networks • Different networking technologies may be incompatible because they use different data link protocols • Frame formats • Addressing schemes • Access methods
TCP/IP • Historically, network protocol stacks designed to work with only one specific (layer 2) network technology or certain types / brands of hardware • SNA works with IBM networks / hardware • VINES works with Banyan networks • TCP/IP designed to work “on top of” or “along with” any layer 2 network technology • Allow data transfer across heterogeneous networks
Achieving universal service • TCP/IP stack allows different networks to communicate • Different types of hardware • Different LAN technologies and frame formats • Different addressing schemes • Internet protocol stack (TCP/IP) provides the illusion of a single seamless communication system
Internetworking concept • Hosts perceive a seamless network • Functions as though using all • same technologies • In reality: • Many different, unrelated physical networks and technologies
Keep in mind • Early networks constrained by the requirement of homogeneity • TCP/IP creates the illusion that devices are operating on one, big, seamless network • In reality, it is not – hundreds of thousands of separate networks using different frame formats and addressing schemes
Layering and TCP/IP • 7 layer OSI model predates TCP/IP • Layer for internetworking protocols does not exist in OSI • “Fit” into the existing model at layer 3 • Layer 5, the Session Layer is much less important in the internetworking (TCP/IP) world
Layering and TCP/IP • TCP and UDP explicitly addresses session management
Layer 4 Application Layer 3 Transport Layer 2 Internet Layer 1 Link Layering and TCP/IP • TCP/IP layering model – Internet layering model or Internet reference model • 4 or 5 layers (depending on book)
Mapping between OSI and TCP/IP OSI Model TCP/IP Model Application = layer 7 Presentation = layer 6 Application = layer 4 Session = layer 5 Transport = layer 4 Transport = layer 3 Network = layer 3 Internet = layer 2 Data link = layer 2 Link = layer 1 Physical = layer 1
IP: Internet Protocol • An internetwork is a networking abstraction created by software • Addresses, packet formats, and delivery techniques independent of physical hardware • Keeping layering in mind, how does IP allow communication over heterogeneous networks?
Keep in mind • Network (software) addresses and MAC (hardware) addresses use different formats • Different networking technologies use different MAC (hardware) addresses • The specific layer 2 protocols, frame formats, etc. are unique for different physical networks • Ethernet MAC address is different from the MAC addresses for token passing hardware
Keep in mind • Using IP, computers on two completely different physical networks can communicate even though neither physical network is inherently capable of: • Translating the MAC address of the other network • Recognizing the frame format of the other network • How is this done?
Encapsulation • Wrapping data in a specific protocol header • When an IP datagram is encapsulated, the entire datagram is placed into the payload area of a specific frame format
IP addressing scheme • Unique 32-bit number (version 4) • Contains both IP address for source and destination • You have to know the IP address of the recipient • How do we get the IP address?
IP addressing scheme • Divided into 2 parts • Prefix – indicates the network number • Suffix – indicates the specific device • Network numbers assigned globally • Suffixes can be assigned locally
IP Addresses • IP addressing - assign high-level protocol addresses to hosts and routers • Individual hosts are not responsible for translating remote IP addresses • How is a URL converted to IP? • How is FQDN converted to IP? • How is MAC mapped to IP? • How can packet generated on Ethernet LAN be formatted to transmit over T1 link?
IP Addresses • Routers map between the MAC addresses and IP addresses on the LAN they serve • Routers would not necessarily understand other address formats – depends on router configuration • IP addresses are abstract addresses created by software EXPLICITLY for routing packets over large heterogeneous networks
Routers • Basic hardware component used to connect heterogeneous networks • Router has: • Memory • Processor • Separate I/O interface for each network to which it connects • Network treats router like computer
Address resolution • Translation or mapping of IP address to MAC address • 3 important points about address resolution • 1) • 2) • 3)
B A C D Address resolution Application on hostA sends data to application on host B Application on host A sends data to application on host D R R R R R R
Address resolution protocol • TCP/IP suite Address Resolution Protocol (ARP)/ RARP • The protocol responsible for mapping IP –to- MAC and vice versa • Reverse ARP (RARP) MAC to IP • Ensures devices agree on how to resolve addresses
Address –vs- name resolution • How is address resolution different from name resolution?
How does ARP work? • 1) Sending device adds destination IP to packet at Internet layer – “becomes” an IP datagram • 2) Examines ARP table for IP –to- MAC mapping • 3) If table has mapping, the destination MAC address is added to the frame header the IP datagram is encapsulated in the frame and the frame is sent • 4) If no mapping in table, sending device broadcasts ARP request for destination MAC address • 5) If local (same subnet), destination device directly responds 4) • 6) If remote (different subnet), default gateway router responds with its MAC address
ARP message format • There is not a fixed ARP format used for all communication • ARP messages are encapsulated in a hardware frame • ARP is a protocol in the TCP/IP stack • Both ARP and IP messages are dynamic • Why is this relevant?
Does ARP create a lot of traffic? • Software on devices extracts and saves ARP information in temporary memory • ARP binding table is managed in cache – temporary storage where old table entries are replaced by newer ones • If table runs out of space it begins deleting older entries • Stores entries for short period of time: 15 – 30 minutes • ARP 1st searches cache for binding info before using network
Does ARP create a lot of traffic? • How is this information relevant with respect to the locality of reference principle?
ARP and the OSI model • Some sources claim ARP resides on layer (2) of the OSI model • Others claim ARP resides on layer (3) of the OSI model • Best way to think about ARP is that it is a protocol that bridges interface between layers 2 and 3 • ARP is the protocol in the TCP/IP stack that is responsible for address resolution
ARP and the OSI model • ARP forms an important conceptual boundary between physical network interface (layer 2) and higher layers (layers 3 and up) in the OSI model • Higher layer protocols and applications use IP address, mapping between IP and MAC is performed at Network Interface • ARP hides details of physical addressing, allowing software in higher layers to use the IP address
Connectionless service • Protocols are only aware of “activities”, services, and/or functions at the layer they work • Specific networking functions are handled at different layers of the OSI • Applications and protocols that work at upper layers (5-7) don’t know anything about lower layers (1-4) • Why is this important and beneficial with respect to application design?
Connectionless service • TCP/IP stack includes protocols for both connectionless and connection-oriented service • Connectionless • Connection-oriented
Connectionless service • Four characteristics of connectionless service: • 1) No delay for connection setup • 2) Sender doesn’t know if packets are successfully delivered • 3) Packets can be forwarded independently • 4) Overhead is high for each packet
Concept of virtual packets • Internet communication relies on a hardware-independent packet format known conceptually as a virtual packet • Virtual packet = IP datagram in TCP/IP
IP datagram • Generic, universal packet format that can be used on an internetwork • Same general format as hardware frames in terms of having: • 1) Header • 2) Payload
IP datagram • Size of IP datagram payload is variable • The sending application selects payload of datagram • Why is a variable IP datagram payload important in the context of internetworking usage? • This is true of Ethernet frames as well
IP datagram (IP v4) • IP Datagram can contain • Min of 1 byte excluding header • Max of 64 KB including header • IP Datagram header is fixed size (20 bytes) • Contains IP address of sender • IP address of receiver • Frame header contains MAC addresses
Best-effort delivery • IP datagrams are described as a connectionless, best-effort service • The IP makes a best-effort at delivering the packet, but doesn’t address: • 1) Duplication • 2) Out-of-order delivery • 3) Corrupt data • 4) Packet loss • Additional protocols handle these errors
Transmission over internet Each physical network may be different. Consequently, the datagram may be encapsulated in different size frames as it travels across the Internet Example: H1 may be an Ethernet frame. H2 may be an FDDI frame. H3 may be a token ring frame
Datagram transmission • Router prepares datagram for transmission by stripping off any frame associated with the originating LAN • Hosts and routers store IP datagram in memory with no additional header • When datagram sent across a physical network, it is encapsulated in a frame corresponding to the specific layer 2 technology used on that network • Size of frame header (an whether or not a trailer is included) depends on underlying network technology • Headers do NOT accumulate – they are discarded after use
D A C B Token Ring LAN Ethernet LAN #1 R1 R4 R3 R2 R5 A transmits to D • 1) A checks ARP table no mapping broadcasts ARP request not local, so R1 responds • with its MAC • 2) IP datagram at A is encapsulated in Ethernet frame (with R1’s MAC address in frame header) • frame is sent to R1 3) R1 knows destination (D) is not local examines routing table to determine next hop strips off all frame information related to Ethernet LAN #1 sends IP datagram to next hop 4) Simplified: all routers understand IP address in IP header and eventually the IP datagram is forwarded to edge router R5 5) R5 consults routing table and recognizes that IP address for D is local (on it’s LAN) 6) Encapsulates IP datagram in token ring frame and puts the frame on the LAN with destination MAC address 7) The frame is passed around the ring when D sees the frame recognizes it’s MAC address pulls the frame and caches data until it can be processed