41
EECS 122 “Communications Networks” Department of Electrical Engineering and Computer Sciences

EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

EECS 122“Communications

Networks”

Department of Electrical Engineering and Computer Sciences

Page 2: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Table of Contents1. Course Organization2. Introduction3. Applications/Design4. Architecture 15. Models6. Physical Layer7. Ethernet8. 802.119. IP: Network Layer10. Switching and Forwarding11. TCP/UDP: Transport Layer12. Flow and Congestion Control13. WWW/DNS; RTP; etc.14. Socket Programming15. Distributed Algorithms16. Network Security17. Overlay Networks and Peer-to-Peer Networks18. Sensor Networks19. Architecture 2

Page 3: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Communication Networks

These slides are for a one-semester course intended for juniors and seniors in Electrical Engineering or Computer Science.

The course describes the design and operating principles of the Internet and associated technologies.

The following people contributed to this material over many years: JörnAltmann, Kevin Fall, Kevin Lai, Abhay Parekh, Shyam Parekh, Ion Stoica, Jean Walrand. We thank Nick McKeown (Stanford) for some of the slides.

We hope that you will find this material useful for teaching or learning. Please acknowledge the source when you use these slides. Comments welcome at [email protected].

Page 4: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Course Logistics – SP2005Instructors:

Dr. Shyam Parekh: OH TBA; shyam@eecsProf. Jean Walrand: OH TBA; wlr@eecs

TAs:Marghoob Mohiyuddin Daron Spektor

Course Manager:Dr. Shyam Parekh; shyam@eecs

TOC - Logistics

Page 5: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Grading

� Final Exam (25%), Mid-term (15%)� Homework Assignments (25%) – 5 Assignments� Projects (35%)

� Socket Programming (1 Project – Weighted 2x)� OPNET Exercises (5 Assignments)

TOC - Logistics - grading

Page 6: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Projects

� Network Programming� Application of socket programming� Client/Server; Get and manage files; handle

errors

� OPNET� Study protocols through simulation experiments� OPNET environment provided;

Minimize learning curve

TOC - Logistics - Projects

Page 7: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Books� Required Textbook:

L. Peterson & B. Davie,Computer Networks: A Systems Approach, 3rd Ed.

� Other Useful Networking Texts:� A. Tanenbaum, Computer Networks� R. Stevens, TCP/IP Illustrated (vol 1)� S. Keshav, An Engineering Approach to

Computer Networking� Kurose and Ross, Computer Networking� Walrand, Communication Networks, 2nd Ed

TOC - Logistics - Books

Page 8: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Programming� This course will involve programming. Network

programming project will be implemented in C on either Windows or UNIX

� Your work can be done on your “named” account. If you lack one, you may log in as “newacct” on one of the clients listed below:

http://www-inst.eecs.berkeley.edu/clients

TOC - Logistics - Programming

Page 9: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Books on Programming

� S. Maguire, Writing Solid Code� S. Lippman, C++ Primer� R. Stevens, UNIX Network Programming,

Volume 1, 2nd ed.

TOC - Logistics – Books on Programming

Page 10: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Introduction� Network Examples� Network Components � Ethernet� Interconnected LANs� Internetwork� Types of Networks� Internet� Packets� Transport

TOC - Introduction

Page 11: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Network Examples� UCB� Backbone:

� Teleglobe� Global Crossing� Williams

� Regional: Palo Alto� Types of Networks� Internet� Packets� Transport

TOC - Introduction – Network Examples

Page 12: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

UCB

��

��

��

�������� ����������

������������

���

���

������

�����

����

TOC - Introduction – Network Examples - UCB

Page 13: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Backbone� � !��"

TOC - Introduction – Network Examples – Backbone/Teleglobe

Page 14: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Backbone���"#�������$�!����%��# $��

TOC - Introduction – Network Examples – Backbone/Global Crossing

Page 15: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Backbone &$��$#'����''(�$)# $���

TOC - Introduction – Network Examples – Backbone/Williams

Page 16: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Regional �#���� �� *��+

TOC - Introduction – Network Examples – Regional/Palo Alto

Page 17: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Network Components

� Links: carry bits from one place to another (or maybe to many other places)

� Interface: attaches device to link� Switch/router: interconnect links� Host: communication endpoint (workstation, PDA,

cell phone, toaster, tank) – connected to links

TOC - Introduction – Network Components

Page 18: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Links

�$" ��

�# ,����-$ �� ��*$� ���#$��

��#.$#���#"�

&$� � ��

TOC - Introduction – Network Components - Links

Page 19: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Ethernet Network Interface Card

TOC - Introduction – Network Components - NIC

Page 20: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

TOC - Introduction – Network Components – Switch & Router

Telephone Switch Router

Page 21: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Ethernet

� - �� �$��#���)#��� #� *��+�/�0

1 �)-$ ) (� 2��*$ )-�#��3���4("

1 ��� '��$ *2�� �5$) �

TOC - Introduction – Ethernet

Page 22: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Architecture�*$ )-�#��3���4("2

TOC - Introduction – Ethernet - Architecture

Page 23: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

System View

� Ethernet is a broadcast-capable, multi-access LAN� Provides a “Link” service between nodes

� Abstract view:

TOC - Introduction – Ethernet – System View

Page 24: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Interconnected LANs

���$� �)��� ) ��"����( ��

��

��

���� ��

����

���6

TOC - Introduction – Interconnected LANs

Page 25: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Internetwork� Provides message delivery between multiple networks

that may belong to different organizations:

�("� ���("� ��

����������

�.#'%� 2�("� ���7�� *��+��8�����8�%� 5$�(����$� ������7��%�$� 9�������7�����("� ���7������ *��+

TOC - Introduction – Internetwork

Page 26: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Types of Network� Classification 1: Size, Information, Application

� Classification 2: Use, Protocols, Technologies

� Switching� Broadcast vs. Switched� Characteristics� How to switch� Taxonomy

TOC - Introduction – Types of Nework

Page 27: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Classification 1

� Geographical distance� Local Area Networks (LAN): Ethernet, Token ring, FDDI� Metropolitan Area Networks (MAN): DQDB, SMDS� Wide Area Networks (WAN): X.25, ATM, frame relay� Caveat: LAN, MAN, WAN may mean different things:

Service, network technology, networks

� Information type� Data networks vs. telecommunication networks

� Application type� Special purpose networks: airline reservation network,

banking network, credit card network, telephony, CATV� General purpose network: Internet

TOC - Introduction – Types of Nework – Classification 1

Page 28: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Classification 2

� Right to use�Private: enterprise networks�Public: telephony network, Internet

� Protocols:�Proprietary: SNA, AppleTalk�Open: IP

� Technologies�Terrestrial vs. satellite�Wired vs. wireless

TOC - Introduction – Types of Nework – Classification 2

Page 29: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

� Broadcast Network:

Broadcast vs. Switched

�*$ )- �� *��+2

TOC - Introduction – Types of Nework – Switching – Broadcast vs. Switched

Page 30: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

� Broadcast� One to all� Examples: some LANs (Hub-Ethernet, 802.11) � Problem: coordinate the access of all nodes to the

shared communication medium (Multiple Access Problem)

� Switched� One to subset� Examples: WANs (Telephony Network, Internet)� Problem: how to forward information to intended

node(s)� This is done by special nodes (e.g., routers, switches)

running routing protocols

Characteristics

TOC - Introduction – Types of Nework – Switching – Characteristics

Page 31: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

� Circuit-Switched: 1. Set up circuit between two devices2. Exchange information3. Release circuit

� Packet-Switched:� Send packets with source and destination

addresses� Virtual-Circuit Switched:

1. Select path from source to destination (Virtual Circuit)

2. Assign a “label” to that path3. Send packets with that label4. Release Virtual Circuit

{Note: Some VCs are permanent.}

How to Switch?

TOC - Introduction – Types of Nework – Switching – How to Switch?

Page 32: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

� Based on the way in which the nodes exchange information:

Taxonomy

� � %-�� ��������#' �� �#�

�*:;� - �� �� ��

4(";� - �� ���

TOC - Introduction – Types of Nework – Switching – Taxonomy

Page 33: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

The Internet� Overview� Scale

TOC - Introduction – The Internet

Page 34: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Overview� A global network of networks all using a

common protocol (IP, the Internet Protocol)

� Focus of this class� A challenge to understand:

� large scale (10’s of millions of users, 10’s of thousands of networks)

� heterogeneity, irregular topology, decentralized management

TOC - Introduction – The Internet - Overview

Page 35: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Scale

1 �# #�8��'�***:�*:)�'

TOC - Introduction – The Internet - Scale

Page 36: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Packets

� Illustration� Main Ideas

TOC - Introduction – Packets

Page 37: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Illustration

��→ %�� ��

��

��<���<�:::

TOC - Introduction – Packets - Illustration

Page 38: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Main Ideas

� The switches have no memory of packets: scalability

� The network is independent of the applications: flexibility

� The packet formats and addresses are independent of the technology: extensibility

TOC - Introduction – Packets – Main Ideas

Page 39: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Transport)+��*� �!' � ��$�+��-#�$�!

TOC - Introduction – Transport

Page 40: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Acknowledgments

�- �� � $�# $���� ����"#)+�#��#)+��*� �!' � �8��� 5 ���)��� ) �%#)+ �$ �! �:�- ���(�) �(� �� - � ���� �; � �#��'$ �(�#)+��*� �! ��%#)+ �; �=(� � - ��# ��8�$ �� �#��'$��$���:

�- �� � $�# $���� ����"#)+�#��#)+��*� �!' � �8��� 5 ���)��� ) �%#)+ �$ �! �:�- ���(�) �(� �� - � ���� �; � �#��'$ �(�#)+��*� �! ��%#)+ �; �=(� � - ��# ��8�$ �� �#��'$��$���:

TOC - Introduction – Transport - Acknowledgments

Page 41: EECS 122 “Communications Networks”inst.eecs.berkeley.edu/~ee122//sp04/01.pdf · “Communications Networks” ... Overlay Networks and Peer-to-Peer Networks 18. Sensor Networks

Link Sharing�-#� ���$�+�

�- ���(�) ��"#� � - $� �#��'$��$�������*- �� - ��! �#)+��*� �!' � �:�- ��)- ' �� !(�# �� - ��-#�$�!��8�)�''����$�+�

�- ���(�) ��"#� � - $� �#��'$��$�������*- �� - ��! �#)+��*� �!' � �:�- ��)- ' �� !(�# �� - ��-#�$�!��8�)�''����$�+�

TOC - Introduction – Transport – Link Sharing