Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Janice Regan, CMPT 128, 2007-2012 0 CMPT 371 Data Communications and Networking Ethernet, ARP.

Similar presentations

Presentation on theme: "© Janice Regan, CMPT 128, 2007-2012 0 CMPT 371 Data Communications and Networking Ethernet, ARP."— Presentation transcript:

1 © Janice Regan, CMPT 128, 2007-2012 0 CMPT 371 Data Communications and Networking Ethernet, ARP

2 Janice Regan © 2005-2013 1 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 Janice Regan © 2005-2013 2 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 Janice Regan © 2005-2013 3 History of Ethernet growth

5 Janice Regan © 2005-2013 4 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 frame and 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 CR C DATA IP DATAGRAM

6 Janice Regan © 2005-2013 5 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 CR C

7 Janice Regan © 2005-2013 6 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 Janice Regan © 2005-2013 7 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 transmitte d received Bit inverted

9 Janice Regan © 2005-2013 8 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 Janice Regan © 2005-2013 9 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 Janice Regan © 2005-2013 10 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 Janice Regan © 2005-2013 11 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) © Janice Regan, 2006-2013 12 11100 0 0 1 00000010 1 00010110111110 1 0101 1 11 0 00000010 1 00010110111110 1 0000 0 01 0 0000000 0 225125 22 5 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 2 5 = 32 IP addresses with the same Ethernet broadcast address

14 Janice Regan © 2005-2013 13 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 ARP must first find the Ethernet address

15 Janice Regan © 2005-2013 14 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 © Janice Regan, 2012 15

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 © Janice Regan, 2012 16

18 Janice Regan © 2005-2013 17 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 © Janice Regan, 2012 18

20 Janice Regan © 2005-2013 19 Sending a packet to an IP address From the TCP/IP Guide

Download ppt "© Janice Regan, CMPT 128, 2007-2012 0 CMPT 371 Data Communications and Networking Ethernet, ARP."

Similar presentations

Ads by Google