1 / 20

CMPT 371

CMPT 371. Data Communications and Networking Ethernet, ARP. Evolution of Ethernet: 1. Early 1980’s: “DIX” Ethernet. 1985: Ethernet 802.3: 10 Mbps Uses 1 persistent CSMA /CD on a bus. Truncated exponential backoff 1995: Fast Ethernet 802.3u: 100 Mbps

tadeo
Download Presentation

CMPT 371

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. CMPT 371 Data Communications and Networking Ethernet, ARP

  2. Evolution of Ethernet: 1 • Early 1980’s: “DIX” Ethernet. • 1985: Ethernet 802.3: 10 Mbps • Uses 1 persistent CSMA/CD on a bus. • Truncated exponential backoff • 1995: Fast Ethernet 802.3u: 100 Mbps • Uses CSMA/CD on twisted pair star with central hub • OR switching on twisted pair star with switching hub • Frame structure same as 802.3, including maximum frame size • Faster transmission time reduces transmission time of frame • For CSMA/CD frame transmission time ≈ round trip travel time, which is now shorter. Reduces maximum length of medium

  3. Evolution of Ethernet: 2 • 1998: Gigabit Ethernet 802.3z: 1 Gbps • Maintains same structure and procedures • New physical layers defined to support higher rate • Uses CSMA/CD or switching hubs • Increase minimum frame size to 512 bytes (from 64) to give long enough frame for CSMA/CD at 1 Gbps. • Frame padded if it is shorter (Carrier Extension) or multiple short frames are sent at once (Frame Bursting) • 2002: Gigabit Ethernet 802.3ae: 10 Gbps • Maintains frame structure or supports SONET(optical) • Too fast for CSMA/CD, uses switching hubs only • Competes with ATM (developed for telephone system) • Originally optical fibre, now also works on twisted pair

  4. History of Ethernet growth

  5. MAC Frame • Preamble: 8 octets of alternating 1’s and 0’s used to establish synchronization. 7 octets of 10101010 a final octet of 10101011 Used to indicate the start of the frameand synchronize sender and receiver clocks (variation in hardware) • Destination address (DA): address of the station for which the frame is intended (MAC address of interface, 6 bytes) • Source address (SA): The address of the station that sent the frame (6 bytes, 48 bits) PREAMBLE Destination address Source Address Type CRC DATA IP DATAGRAM

  6. MAC Frame • Length/Type: Length of the LLC data field (<1500 octets), or the type of protocol (if not 802.3) • Pad: added to make sure the transmission time of the packet is at least as long as the propagation time through the network (required for efficient use of CSMA/CD). Minimum length is 46 bytes • FCS: 32 bit CRC PREAMBLE Destination address Source Address Type DATA IP DATAGRAM CRC

  7. Framing • Need to identify the beginning of a frame • Need to synchronize arriving packet and receivers clock • Preamble may be used. Look for a specific series of bits or bytes • When that series of bits or bytes is found interpret it a the beginning of a frame • A problem occurs if the series of bits occurs within the data • How do we tell the difference between the start of the frame and the data with the same pattern? • The answer is bit stuffing or byte stuffing. Modify the data so that it cannot be mistaken for the framing sequence but can be reconstructed in its original form at the destination

  8. HDLC: bit stuffing • (making flag pattern 01111110 unique to the flag), after any sequence of five 1’s in the data insert a 0 • Original Pattern 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0 • After Bit Stuffing 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 • Problem with bit Stuffing on a channel with errors . Flag Flag transmitted Bit inverted Flag Flag Flag Flag Flag Flag received Flag Flag Flag Flag Flag Flag transmitted Bit inverted Flag Flag received

  9. Scope of MAC addresses • MAC addresses are used within a particular LAN or LAN segment only • The internet interface (network card) on each machine has a MAC address • For Ethernet the address is associated with a unique Ethernet address (48 bit address) at the time of manufacture. • Sometimes can be set after manufacture • Other types of LAN (using different MAC protocols) have their own types of addresses that may have different lengths from the Ethernet address

  10. Ethernet interface + addresses • Within an Ethernet the interface to each host is assigned an Ethernet address (usually when manufactured) • The Ethernet address belongs to the interface, not the host, if the interface is replaced the Ethernet address will change • 48 bit Ethernet addresses can indicate one interface, a network broadcast address or a multicast address. • The interface to a host will extract from the network packets with the Ethernet address of the interface itself, the Ethernet network broadcast address of the network to which the interface is attached, or any Ethernet multicast addresses selected by the host.

  11. Sending an Ethernet frame • The IP packet arrives in the MAC layer • A MAC layer (Ethernet) header is added • This header includes the source and destination Ethernet address • The host knows its own Ethernet address so it can insert the source Ethernet address • The host must determine the Ethernet destination address corresponding to the next hop destination. • Determining the Ethernet destination address based on the next hop IP destination address is called address resolution or address translation

  12. Address Resolution / Translation • A router attached to the Ethernet will determine / translate IP addresses to the Ethernet unicast multicast or broadcast addresses, recognizable by the interfaces • For unicast determine Ethernet address using ARP (Address Resolution Protocol) • For multicast translate IP multicast address: the lowest 23 bits of the IP multicast address is placed in the special Ethernet address 01.00.5e.00.00.00 (Not a unique mapping as IP has 28 significant bits)

  13. Address Translation (4) 5 22 225 125 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 01 00 5E The first four bits of the IP address are fixed (they indicate a multicast address) The next 5 bits (dark blue) are not used in the Ethernet address Therefore there are 25 = 32 IP addresses with the same Ethernet broadcast address

  14. ARP and sending a packet • The IP packet arrives in the MAC layer • A MAC layer (Ethernet) header is added including the know source Ethernet address • The host needs the Ethernet destination address, use ARP to find that address • If ARP already knows the Ethernet destination address it can be inserted and the packet can be sent • If ARP does not already know the Ethernet destination address ARPmust first find the Ethernet address

  15. Unicast Addresses: Data Link Layer • If the packet is coming from outside the LAN it will arrive through a router. Its source Ethernet address will be the router’s Ethernet address • If the packet is coming from another host on the LAN then the source Ethernet address will be that host’s • If we are delivering the packet on a LAN we will also need the hardware address (data link layer address, MAC address, Ethernet …), to use in the MAC header as the destination address. Use ARP to find it!

  16. Entries in the ARP cache • Entries in the ARP cache are static or dynamic. • Static entries are entered by the administrator and stay in the cache until removed • Dynamic entries are added to the cache when the local host tries to send a packet to a destination host on the LAN • When a dynamic entry is added to the cache a timer is set to indicate the lifetime of that entry • When the two hosts communicate, each host updates (reinitializes) the timer corresponding to the entry for the other host in its own ARP cache • When the timer expires the entry is removed

  17. Why use Dynamic Entries • MAC addresses of hosts may change over time • Replacement of a network card (interface) will result in a changed MAC address • Interface may no longer be reachable • Host may be turned off or disconnected • Interface may be disabled • Interface may fail • New hosts/interfaces may be added to the network • Cache should not grow forever as new hosts are added

  18. Using ARP • ARP (address resolution protocol) facilitates mapping of physical addresses to IP addresses for all hosts on the LAN (exceptions discussed later) • The host will keep a table called the ARP cache that will contain mappings from MAC to IP addresses • When the host wishes to send a packet it will look in the ARP cache for an entry corresponding to the desired destination host’s IP address. • If there is an entry it will send to the indicated MAC address • If no entry exists an new entry must be added to the ARP cache

  19. Adding new entries -ARP cache • If no entry in the ARP cache corresponds to the IP address of the destination of the packet to be sent the packet will be queued or dropped and an ARP request will be sent • The ARP request is broadcast to the LAN • All hosts on the LAN receive the request • The host with IP address corresponding to the destination IP address of the packet • Will respond with a ARP reply unicast to the source • Will add/update the entry for the source to its ARP cache

  20. Sending a packet to an IP address From the TCP/IP Guide

More Related