1 / 45

Data and Computer Communications

Data and Computer Communications . Internet Protocols . Network Architecture Features. Addressing Packet size Access mechanism Timeouts Error recovery Flow control Routing User access control Connection based or connectionless. Connectionless Internetworking. Advantages Flexibility

valencia
Download Presentation

Data and Computer Communications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data and Computer Communications Internet Protocols

  2. Network Architecture Features • Addressing • Packet size • Access mechanism • Timeouts • Error recovery • Flow control • Routing • User access control • Connection based or connectionless

  3. Connectionless Internetworking • Advantages • Flexibility • Robust • No unnecessary overhead • Unreliable • Not guaranteed delivery • Not guaranteed order of delivery • Packets can take different routes • Reliability is responsibility of next layer up (e.g. TCP)

  4. IP Operation Go to Router X MAC address for Router X IP PDU Encapsulated with LAN protocol Encapsulated with X.25 protocol

  5. Design Issues • Routing • Datagram lifetime • Fragmentation and re-assembly • Error control • Flow control

  6. Routing • End systems and routers maintain routing tables • Indicate next router to which datagram should be sent • Static • May contain alternative routes • Dynamic • Flexible response to congestion and errors • Source routing • Source specifies route as sequential list of routers to be followed

  7. Datagram Lifetime • Datagrams could loop indefinitely • Consumes resources • Transport protocol may need upper bound on datagram life • Datagram marked with lifetime • Time To Live field in IP • Once lifetime expires, datagram discarded (not forwarded) • Hop count • Decrement time to live on passing through a each router • Time count • Need to know how long since last router

  8. Fragmentation and Re-assembly • Different packet sizes • When to re-assemble • At destination • Results in packets getting smaller as data traverses internet • Intermediate re-assembly • Need large buffers at routers • Buffers may fill with fragments • All fragments must go through same router • Inhibits dynamic routing

  9. IP Fragmentation (1) • IP re-assembles at destination only • Uses fields in header • Data Unit Identifier (ID) • Identifies end system originated datagram • Source and destination address • Protocol layer generating data (e.g. TCP) • Identification supplied by that layer • Data length • Length of user data in octets

  10. IP Fragmentation (2) • Offset • Position of fragment of user data in original datagram • In multiples of 64 bits (8 octets) • More flag • Indicates that this is not the last fragment

  11. Fragmentation Example Application data IP header is the same as origin TCP header is not duplicated – More is the same as original

  12. Internet Protocol (IP) • Part of TCP/IP • Used by the Internet • Specifies interface with higher layer • e.g. TCP • Specifies protocol format and mechanisms • IPv4 • addresses are 32 bits wide • Its header is 20 bytes at minimum • Uses doted-decimal notation (e.g. 43.23.43.56) • IPv6 • Provides larges address domain; addresses are 128 bits wide • Multiple separate headers are supported • Handles audio and video; providing high quality paths • Supports unicast, multicast, anycast

  13. Dealing with Failure • Re-assembly may fail if some fragments get lost • Requires buffer • Need to detect failure – but how? • Re-assembly time out • Assigned to first fragment to arrive • If timeout expires before all fragments arrive, discard partial data • Use packet lifetime (time to live in IP) • If time to live runs out, kill partial data

  14. Source address Destination address Protocol Recipient e.g. TCP Type of Service Specify treatment of data unit during transmission through networks Identification Source, destination address and user protocol Uniquely identifies PDU Needed for re-assembly and error reporting Send only Parameters (1)

  15. IP Packet Format - TTL • TTL (time-to-live) refers to the number of router hops the IP packet is allowed before it must be discarded. • Each router that receives a packet subtracts one from the count in the TTL field. • When the count reaches zero, the router detecting it discards the packet and sends an Internet Control Message Protocol (ICMP) message back to the originating host

  16. IP Datagram Frame Frame Address IP Address Data IP Header • The IP datagram contains data and IP address • The IP datagram is encapsulated in a frame with physical address • The header changes as the frame goes from one network domain to the next

  17. Encapsulated IP Packet in Ethernet Frame Ethernet Frame Carrying IP Packet MAC and Associated IP address

  18. Protocol Analyzer Display: 0000 00 00 C0 A0 51 24 00 C0 93 21 88 A7 08 0045 08 0010 00 5A DC 28 00 00 FF 01 88 08 C0 99 B8 01 C0 99 0020 B8 03 2a B4 DD ….. Encapsulated IP Packet in Ethernet Frame Ethernet Frame Carrying IP Packet An Ethernet frame containing IP information has 08 00 in its type field IP starting with 45Hex indicates IPv4 with standard length of 20 bytes IP starting with 4F Hex indicates IPv4 with standard length of 60 bytes Remember: 24=16; 45= 0100 0101= One Byte Example: 99 is one byte 1001 1001

  19. IP Addressing • Two address types • Physical address (the frame has the physical address) • Embedded in the hardware (NIC, e.g., 00 00 11 00 11 33) • Also called the Media Address Control (MAC) address • Logical • IP datagram contains the logical IP address • To transport IP packets both physical and IP addresses must be known • Static address resolution • Dynamic address resolution • How to map physical and IP addresses • Local tables of IP addresses • Centralized directory • Address resolution mechanism • Address resolution mechanisms • ARP (address resolution protocol) – IP48 bit Ethernet address • RARP (reverse) address resolution protocol are used to convert MAC to IP address and vice versa

  20. IP Addressing – IPv4 • A network address is divided into Netid and Hostid • IP Address classification • (number of hosts per network) * Some values are reserved!

  21. IP Addressing Classification Network Address Host Address Multicast Address Network Address Host Address Reserved for Internet research Network Address Host Address

  22. Example of IP Addressing Q1: Determine the network address for the following IP addresses: 1- 84.42.58.11 (84 = 54 Hex = 0101 0100)  Netid=84.0.0.0  Class A  Hostid=0.42.58.11 2- 144.54.67.5 (144 = 90 Hex = 1001 0000)  Netid=144.62.0.0  Class B  Hostid=0.0.67.5 Q2: What type of IP address classification will a large organization with 1000 individual users in 150 dispersed buildings use?  Class B

  23. IP Routing Protocols • Routing packets requires having knowledge about the network • Partial (know your own neighbors) • Full (know the entire network elements) • Retrieving network information (network discovery protocols) • RIP (routing information protocol): routing based on the least number of hops • OSPF (open shortest path first): Routing based on number of hops, link speed, congestion

  24. TCP/IP Stack Protocol • Bridge • IS used to connect two LANs using similar LAN protocols • Address filter passing on packets to the required network only • OSI layer 2 (Data Link) • Router • Connects two (possibly dissimilar) networks • Uses internet protocol present in each router and end system • OSI Layer 3 (Network)

  25. 00 10 00 00 Subnets and Subnet Masks • Each LAN assigned subnet number • Site looks to rest of internet like single network • Host portion of address partitioned into subnet number and host number • Local routers route within subnetted network • Subnet mask indicates which bits are subnet number and which are host number • Allow arbitrary complexity of internetworked LANs within organization • Insulate overall internet from growth of network numbers and routing complexity

  26. Routing Using Subnets

  27. Masking 3-bit subnet IP Address of B: 192.228.17.57 00 1|1 10 01 IP Address of A: 192.228.17.33 00 1|0 00 01 IP Address of X: 192.228.17.32 00 1|0 00 00 Subnet mask: 255.255.255.224 11 10 00 00 5-bit host Note: if we XOR IP Address of B & Subnet Mask We will have: 00 11 10 01 XOR 00 10 00 00 = 00 01 10 01 Host number is 25  00 01 10 01; 192  1100 0000, hence, Class C network (8-bit host/subnet) ! NetId SubNetId Host

  28. Why Change IP? • Address space exhaustion • Two level addressing (network and host) wastes space • Network addresses used even if not connected to Internet • Growth of networks and the Internet • Extended use of TCP/IP • Single address per host • Requirements for new types of service

  29. IP v6 Header vs. IPV4 Note: IPv5 used for Stream Protocol- IP-layer protocol that provides end-to-end guaranteed service across a network. Features: Extended address space Improved option mechanism Dynamic address assignment Multicasting and anycasting Flow routing 128 bits 128 bits

  30. Internet Addressing • Over half million networks are connected to the Internet • Network numbers are managed by ICNN (Internet Corporation for Assigned Names and Numbers) - http://www.icann.org/ • Delegates part of address assignments to regional authorities • IP addresses are given to ISPs and companies • IP addresses are based on dotted decimal notation: 192.41.7.32 • IP address 0.0.0.0 refer to machine’s own network when it is being booted (This host) • 255.255.255.255 broadcast on the LAN • 127.x.y.z reserved for loopback testing

  31. More about subnets…. • Routers can be connected to multiple LANs • LANS are divided into subnets each identified by a subnet mask: 255.255.252.0 (… 1111 1100 0000 0000)  32-10=22 to identify the subnet! • Mask: netID + SunnetID or /22 (subnet mask is 22 bit long) • Subnets are not visible outside the network • Example: Assume subnet mask is 255.255.252.0/22 • Subnet 1: 130.50.4.1 • Subnet 2: 130.50.8.1 …000010|00 00000001 • Subnet 3: 130.50.12.1 …000011|00 00000001 • Assume a packet’s destination is 130.50.15.6 which subnet does it belong to? • Mask: … 1111 11|00 0000 0000 • Adrs: … 0000 11|11 0000 0110 • Hence: the packet must go to Subnet 3

  32. Classes and subnets… • Classful routing is not very efficient • Having IP address classes creates issues • Addresses can be under utilized (Class A) • Addresses can be over utilized (Class C) • Management of addresses may be difficult • Organizations can grow! • Classless InterDomain Routing (CIDR) • Allocate remaining IP addresses in variable-sized block; no regard to class! • Use 32-bit mask! • Uses a single routing table

  33. Classless Routing - Example What happens if a packet has an address of 194.24.17.4? Where does it go? O: ….1111 0000 0000 0000 AND 0001 0001 0000 0100  …. 0001 0000 0000 0000 (194.24.16.0) How do you represent class B using CIDR? 16-bit NetID + 16-bit HostID  /16

  34. Network Address Translation (NAT) • Addresses are growing! What is the solution? • Use IPV6 • Use NAT • NAT: • Allows using one IP address per company • Internally new nodes can be added! • How?

  35. NAT Operation • IP reserved addresses • 10.x.y.z • 172.16.x.y • 192.168.x.y • Receiving a packet from the Internet • Sender • Add IP address • TCP will have the destination port (0-1023) • The port determines which server on the remote (destination) side to process the packet • NAT box: • Using the PORT address in TCP, change the IP address to a designated address (10.0.01) • Sending a packet into the Internet • NAT box: • Changes 10.0.0.1 to 198.60.42.12 • 198.60.42.12

  36. NAT Issues… • Addresses are not unique: many 10.0.0.1! • NAT controls are the incoming and outgoing packets – reliability! • NAT accesses TCP and IP layers – layers should work independent of one another • NAT only allows TCP/IP or UDP/IP • NAT does not support applications which insert the IP address in the body (FTP or H.323)

  37. Internet Control Protocols • IP protocol only deal with the data transfer • We need control protocol to check the network • ICMP, ARP, RARP, BOOTP, HDCP

  38. Internet Control Message Protocol (ICMP) • ICMP error messages are used by routers and hosts to tell a device that sent a datagram about problems encountered in delivering it • Used to test the network • Messages are encapsulated in the IP packet • Has many message types Code field is used for subtypes

  39. ARP (address resolution protocol) • Exploits broadcast property of a LAN • Each host on LAN maintains a a table of IP subnetwork addresses • If the address can not be found ARP broadcasts a request • Shouting: Who know about this IP address? • Other hosts listen and reply • The reply includes IP address and MAC • Any interested host can learn about the new information

  40. ARP Example • Assume 1 is sending a message to 2 (rose@sonoma.edu) • Sonoma.edu is the host • Host 1 sends a message to Domain Name System (DNS): what is the IP address for Sonoma.edu?  192.31.65.5 • What is the MAC address for 192.31.65.5? Use ARP broadcast! • Host 2 respond: it is E2 • Host 1 maps IP and MAC; encapsulate the IP message in the Ethernet frame and send it • Cashing can enhance ARP operation

  41. ARP Example • Assume 1 is sending a message to 4 (rose@sonoma.edu) • Sonoma.edu is the host • Host 1 sends a message to Domain Name System (DNS): what is the IP address for Sonoma.edu?  192.31.65.5 What is the MAC address for 192.31.65.5? ARP cannot pass through the router! • Two choices: • Reconfigure routers to response to ARP (Proxy ARP) • Send the message to the LAN router (E3)F1F34 – Each router looks are the IP address and passes it to the next node using the routing table

  42. RARP and BOOTP • Reverse ARP translates the Ethernet address to IP address • A diskless machine when it is booking can ask: My MAC is 12.03.23.43.23.23; what is my IP? • RARP broadcasts the question (destination address is all one) • Not passed through the router! • Each LAN needs a RARP server! • Bootstrap protocol uses UDP and forwards over routers • Mapping must be done manually in each router! • Uses one server but harder to implement!

  43. Dynamic Host Configuration Protocol • DHCP allows many and automatic configuration • Replaces BOOTP and RARP • DHCP sends a DISCOVER Packet • What is the IP address for this MAC? • Even when an IP address is assigned, how long is it good for? • Before the IP address is removed find another IP address….called Leasing

  44. Remember… • This is My MAC; what is my IP address? RARP / DHCP • This is the destination host name, what it is IP address? DNS Server • This is the IP address, what is your` MAC address? ARP

  45. References • Tanenbaum • Tomasi Text Book • Comer Text book

More Related