Presentation is loading. Please wait.

Presentation is loading. Please wait.

EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao

Similar presentations


Presentation on theme: "EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao"— Presentation transcript:

1 EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao wenbing@ieee.org

2 2 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Outline Reminder –Lab#5: Wednesday –Wiki project initial draft due Manchester Encoding The Ethernet MAC Sublayer Protocol The Binary Exponential Backoff Algorithm Switched Ethernet ARP and DHCP

3 3 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Manchester Encoding Binary encoding –Hard to distinguish 0 bit (0-volt) from idle (0-volt) –Requires clocks of all stations synchronized Manchester encoding and differential Manchester encoding

4 4 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Ethernet Frame Structure Preamble: for clock synchronization –First 7 bytes with pattern 10101010, last byte with pattern 10101011 –The two consecutive 1 ’ s indicate the start of a frame How can the receiver tell the end of the frame? –No current on the wire ( interesting discussion at http://www.tomshardware.com/forum/19951-42-detecting-length-ethernet-frame) http://www.tomshardware.com/forum/19951-42-detecting-length-ethernet-frame >= 64 bytes Not considered as part of the header!

5 5 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Ethernet Frame Structure Destination address: 6 bytes (48 bits) –Highest order bit: 0 individual, 1 multicast; all 1 ’ s broadcast –Frames received with non-matching destination address is discarded Type/Length: type of network layer protocol (or length of payload) Pad – used to produce valid frame >= 64 bytes Checksum – 32-bit cyclic redundancy check

6 6 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Ethernet MAC Sublayer Protocol Uses 1-persistent CSMA/CD Binary exponential backoff Provides unreliable connectionless service

7 7 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao CSMA with Collision Detection If two stations start transmitting simultaneously, both detect collision and stop transmitting Monitor collision while sending –Minimum time to detect collision => minimum frame length

8 8 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Minimum Time to Detect Collision To ensure the sender can detect collision –All frames must take more than 2  to send so that transmission is still taking place when the noise burst gets back to the sender

9 9 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Randomization and Binary Exponential Backoff Time divided into slots –Length of slot = 2  = worst-case round-trip propagation time –To accommodate longest path, slot time = 512 bit times = 51.2  sec (10Mbps Ethernet) => min frame length: 51.2  sec X 10 Mbps = 512 b = 64 byte Binary exponential backoff

10 10 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Randomization and Binary Exponential Backoff After 1 st collision, station picks 0 or 1 at random, waits that number of slots and tries again After 2 nd collision, station picks 0,1,2,3 at random, waits that number of slots and tries again …. After i-th collision, station picks 0,1, …,2 i -1 at random, … If 10 <= i < 16, station picks 0,1, …,2 10 -1 at random If i=16, controller reports failure to computer Why randomization is needed?

11 11 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Ethernet Performance Binary exponential backoff results in –Low delay when few stations collide –Reasonable delay for collision resolution when many stations collide When other factors are fixed, channel efficiency decreases when –Network bandwidth increases –Cable length increases –Number of stations increases –Frame length decreases

12 12 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Ethernet Performance Efficiency of Ethernet at 10 Mbps with 512-bit slot times

13 13 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Switched Ethernet Switch – contains a high-speed backplane and room for typically 4 to 32 plug-in line cards, each containing 1-8 connectors –Possibly each card forms its own collision domain, or –Full-duplex operation if each input port is buffered

14 14 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao ARP – Address Resolution Protocol How do IP addresses get mapped onto data link layer addresses, such as Ethernet?

15 15 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao ARP Optimization ARP result is cached (step 5 in figure) When A wants to communicate with B, A includes its IP-to-Ethernet mapping in the ARP packet so that B knows the mapping right away (step 3 in figure) Have every machine broadcast its mapping when it boots, so that everyone else knows the mapping To accommodate changes, entries in the ARP cache time out after a few minutes

16 16 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao ARP: How to Handle Remote Traffic Proxy ARP – A router is configured to answer ARP requests on one of its networks for a host on another network

17 17 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao ARP – Exercise Node 1 wants to send a packet to node 4what will be returned by ARP? Node 1 wants to send a packet to node 2, what will be returned by ARP?

18 18 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao RARP – Reverse Address Resolution Protocol RARP - Allows a newly-booted diskless- workstation (e.g., X terminal) to broadcast its Ethernet address and ask for its IP address –RARP server responds to a RARP request with the assigned IP address 32-bit Internet address 48-bit Ethernet address ARP RARP

19 19 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Limitations of RARP RARP uses a link-layer broadcast, RARP requests are not forwarded by routers, therefore, an RARP server must be present on every network The only thing returned by the RARP server is the IP address

20 20 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao BOOTP – Bootstrap Protocol BOOTP – uses UDP –A client broadcasts to 255.255.255.255 –The source IP address is set to 0.0.0.0 if client does not know its own IP address yet –Port number: 67 for server, 68 for client BOOTP drawbacks –Requires manual configuration of tables mapping IP address to Ethernet address at the BOOTP server Replaced by DHCP

21 21 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Dynamic Host Configuration Protocol Allow host to dynamically obtain its IP address from network server when it joins network –IP address assignment is lease-based (to cope with client failure, also enables reuse of addresses) –Can renew its lease on address in use DHCP overview (UDP is used for communication) –Host broadcasts “DHCP discover” msg –DHCP server responds with “DHCP offer” msg –Host requests IP address: “DHCP request” msg –DHCP server sends address: “DHCP ack” msg

22 22 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao DHCP Replay A DHCP relay agent can be configured on each LAN The agent stores the IP address of the DHCP server and forward the request to the server

23 23 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao DHCP with Replay Agent To find its IP address, a newly-booted machine broadcasts a DHCP Discover packet The DHCP relay agent on its LAN receives all DHCP broadcasts On receiving a DHCP Discover packet, the agent sends the packet as a unicast packet to the DHCP server, possibly on a distant network

24 24 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Exercise An IP packet to be transmitted by Ethernet is 60 bytes long. Is padding needed in the Ethernet frame, and if so, how many bytes?

25 25 Spring Semester 2009EEC-484/584: Computer NetworksWenbing Zhao Exercise Consider building a CSMA/CD network running at 1 Gbps over a 1-km cable. The signal speed in the cable is 200,000 km/sec. What is the minimum frame size?


Download ppt "EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao"

Similar presentations


Ads by Google