1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture why packet switching? ...

40
1 Songwu Lu/UCLA CS118/3-14-2002 Computer Networking: the overall picture why packet switching? What’s in a packet: –header: contains all the information needed for data delivery layered network protocol architecture: why layering? –Divide and conquer Switch 2 Switch 1 Packet (carries destination address) header data Efficient resource sharing Flexible delivery
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture why packet switching? ...

Page 1: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

1 Songwu Lu/UCLACS118/3-14-2002

Computer Networking:the overall picture

why packet switching?

What’s in a packet: –header: contains all the information needed for data

delivery

layered network protocol architecture: why layering?–Divide and conquer

Switch 2Switch 1

Packet(carriesdestinationaddress)

header data

Efficient resourcesharingFlexible delivery

Page 2: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

2 Songwu Lu/UCLACS118/3-14-2002

On Final Exam

TAs will give additional review lectures Office hours next week:

–Monday, 1-2pm–Tuesday, 1-3pm–Thursday, 1-3pm

For your current standing in the class, check with your TA

You can bring two (8x11) sheets into the final exam

Page 3: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

3 Songwu Lu/UCLACS118/3-14-2002

Materials to be covered

Main focus (about 80%):–Chapters 4 and 5

Additional chapters (about 20%):–Chapter 6–Chapter 3

Page 4: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

4 Songwu Lu/UCLACS118/3-14-2002

Exam Format

Multiple choices:–Which of the following error detection algorithms

can guarantee 100% error detection?–(A)CRC; (B) Internet Checksum; © both CRC

and checksum; (D) two-dimensional parity; (E) none of the above

Short Q & A:–Does a host know the local DNS server by its

DNS name? Or by its IP address? Or by its Ethernet address? Explain

Page 5: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

5 Songwu Lu/UCLACS118/3-14-2002

Exam Format

Standard Problem solving–Given a network topology, compute the minimum

cost path from the source to the destination by applying the distance vector routing algorithm

Page 6: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

6 Songwu Lu/UCLACS118/3-14-2002

Computer Networking:the overall picture

why packet switching?

What’s in a packet: – header: contains all the information needed for data

delivery layered network protocol architecture: why

layering?– Divide and conquer

Switch 2Switch 1

Packet(carriesdestinationaddress)

header data

Efficient resourcesharingFlexible delivery

Page 7: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

7 Songwu Lu/UCLACS118/3-14-2002

What are the layers?

Network layer: transmit packets from one host to another host in the Internet–issues: routing, switching, multicast

Internet Protocol (IP):deliver packets hosthost–IP packet format–packet fragmentation and reassembly–delivery by encapsulation–IP addresses: class-based addresses, subnetting,

CIDR

Page 8: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

8 Songwu Lu/UCLACS118/3-14-2002

More protocol layers

link layer: send data frames between directly connected nodes–framing–bit error detection (parity check, checksum, CRC)–media-access-control (MAC): –Ethernet, token ring–Hubs, bridges, and switches

Higher layers above network layer–transport protocols:reside in end hosts only–application protocols

Page 9: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

9 Songwu Lu/UCLACS118/3-14-2002

Ethernet frame

IP packet

TCP packet

header tail

IP hdr

TCP hdr

DATA

DATA

DATA

DATA

Layered protocol implementation

A protocol defines: the format of message exchanged

between peer entities the actions taken on receipt of the

message

What’s in the header: all the information,and only the information that’s needed for the protocol’s functionality

Page 10: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

10 Songwu Lu/UCLACS118/3-14-2002

Network layer design

Network service model Routing IPv4 and IPv6 Multicast routing

Page 11: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

11 Songwu Lu/UCLACS118/3-14-2002

Network Service Model

Datagram vs. virtual circuit–What is the difference?–What kind of service model the Internet is using?–What are the cons and pros of Internet service

model?–Is it appropriate to support data / multimedia?

How can we realize connection-oriented services and connection-less services?–At the network layer–At the transport layer

Page 12: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

12 Songwu Lu/UCLACS118/3-14-2002

Network routing

routing protocol: distributed way to compute shortest path to all destinations

distance-vector routing protocol–A node’s update includes a list of [destination,

distance] pairs for all destinations that A knows of

–send routing updates to neighbor nodes only

link-state routing protocol–A node’s update includes a list of [neighbor, link

distance] pairs for all its links–routing updates are flooded to the entire network

Page 13: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

13 Songwu Lu/UCLACS118/3-14-2002

What you need to know about routing algorithms?

Given a topology with link cost, how to compute the minimum cost path from a given source to a given destination ?

– apply distance vector routing algorithm– apply link state routing algorithm

On distance vector routing:– What does it mean “good news travels fast”?– What is the “count-to-infinity” problem?– What are the fixes to count-to-infinity problem? Can they

solve the problem completely?

Comparisons between DV and LS routing:– Message complexity, convergence speed, robustness

Page 14: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

14 Songwu Lu/UCLACS118/3-14-2002

More on routing

On virtual circuit routing:–What is shortest path first routing?–What is least loaded path routing?–What is maximum free circuit routing?

Why do we need hierarchical routing over the Internet? –two reasons:

Page 15: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

15 Songwu Lu/UCLACS118/3-14-2002

An example for Distance Vector routinginitial state at each node

A

G

H

D

F

1

2 3

2

4

1

1

2 3

4

4

B 1 BC ?D ?E ?F ?G ?

Dst Dis Nex

H 2 H

A's routing table

A 1 AC 2 CD ?E ?F ?G ?

Dst Dis Nex

H 3 H

B's routing table

A ?B 2 BD 1 DE 1 EF ?G ?

Dst Dis Nex

H ?

C's routing table

A ?B ?C 1 CE ?F 4 FG ?

Dst Dis Nex

H ?

D's routing table

B CA ?B 2 BC 1 CD ?F 3 FG 2 GH ?

E's routing table

E

Page 16: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

16 Songwu Lu/UCLACS118/3-14-2002

Routing table after one update

B 1 BC 3 BD ?E ?F ?G ?H 2 H

A's routing table after receiving an update from B

B's routing table after receiving an update from C

A 1 AC 2 CD 3 CE 3 CF ?G ?H 3 H

B 1 BC ?D ?E ?F ?G ?

Dst Dis Nex

H 2 H

A's routing table

A 1 AC 2 CD ?E ?F ?G ?

Dst Dis Nex

H 3 H

B's routing table

A ?B 2 BD 1 DE 1 EF ?G ?

Dst Dis Nex

H ?

C's routing table

A ?B 2 BC 1 CD ?F 3 FG 2 GH ?

E's routing table

B 3 BD 1 DE 1 EF 4 EG 3 EH 2 H

C's routing table after receiving an update from E

A ?

Page 17: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

17 Songwu Lu/UCLACS118/3-14-2002

An example for link state protocol:A's topology table

A

G

H

D

F

1

2 3

2

4

1

1

2 3

4

4

B C

E

0 1 2 0 0 0 0 0

A B C D E F G H

0

ABCDEFGH 0

0 1 31 0 2 3 0 0 0 0

A B C D E F G H

0

ABCDEFGH 0

After update from B

0 1 21 0 2 3

0 0

1 0 3 2 0

A B C D E F G H

0

ABCDEFGH 0

After updatefrom E

Page 18: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

18 Songwu Lu/UCLACS118/3-14-2002

A

G

HF

1

2 3

2

4

1

1

2 3

4

4

B C

E

0 1 21 0 2 3 2 0 1 1 1 0 4 1 0 3 2 4 3 0 4

A B C D E F G H

2 4 0 4

ABCDEFGH 2 3 4 0

After A has received an update from every other node

D

Page 19: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

19 Songwu Lu/UCLACS118/3-14-2002

An example for Dijkstra Algorithm

G

HF

1

2 3

2

4

1

1

2 3

4

4

B C

E

DA

(0) {A}, AB=1, AC=, AD=, AE=, AF=, AG=, AH=2

(2) {A, B, H}, Nh=H, update: AC=3, AD=, AE=, AF=, AG=AH+HG=6

(1) {A, B}, Nb= B, update: AC=AB+BC=3, AD=, AE=, AF=,

AG=, AH=2

(3) {A, B, H, C}, Nc=B, update: AD=AC+CD=4, AE=AC+CE=4,

AF=, AG=6(4) {A, B, H, C, D}, Nd=B, update: AE=4, AF=AD+DF=8, AG=6

(5) {A, B, H, C, D, E}, Ne=B, update: AF=AE+EF=7, AG=6

(6) {A, B, H, C, D, E, G}, Ng=B, update: AF=7

(7) {A, B, H, C, D, E, G, F} Nf=B

0 1 3 4 4 7 6 2A B C D E F G H

A

Page 20: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

20 Songwu Lu/UCLACS118/3-14-2002

Internet Protocol (IP)

Relation between IP & network layer–IP is responsible for host -to-host packet

delivery, normally through a chain of IP routers–physical networks do the real work of getting

packets from one IP node to the next

understand IPv4 addressing–IP address structure

» two-level hierarchy• Network ID + host ID

» class-based address: Class A, B, C, D

» subnetting

Page 21: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

21 Songwu Lu/UCLACS118/3-14-2002

CIDR: Classless InterDomain Routing

assign network addresses by blocks of contiguous IP addresses, in a form of

<IP address, mask>–mask identifies block size, must be power of 2–example: allocation of 4 class-C address blocks 192.4.16.0192.4.19.255, <192.4.16.0, 255.255.252.0>, or 192.4.16/22

11000000000001000001000000000000 11000000000001000001001111111111

192 4 16 0 192 4 19 255

11111111111111111111110000000000

255 255 252 0

Page 22: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

22 Songwu Lu/UCLACS118/3-14-2002

Forwarding IP Packets

hosts decide whether the destination is on the same network, if not, send packet to a default router

routing: IP router looks up the forwarding table to determine the next hop to forward the packet to–routers may also use a default router for far-

away destinations address translation: mapping an IP

address to physical network address: ARP packet encapsulation and decapsulation

when crossing each physical network

Page 23: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

23 Songwu Lu/UCLACS118/3-14-2002

IPv4 Header

What is the purpose for each header field?–For example, why do we need TTL? Why do we

need Options?

IP Fragmentation and reassembly:–Given a large IP packet passing through a small-

packet network, how does fragmentation work? The reassembly process?

–Where do we reassembly the fragments? Why?

On ICMP: how does traceroute work?

Page 24: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

24 Songwu Lu/UCLACS118/3-14-2002

Internet routing

What is the main difference between RIP and BGP?

How do we further reduce the routing table size?–Default route

Page 25: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

25 Songwu Lu/UCLACS118/3-14-2002

IPv6

What header fields are available in both IPv4 and IPv6?

What are the new fields in IPv6 header? Why do we need them?

Comparison btw IPv4 and IPv6 Does IPv6 allow fragmentation or not? If

not, how does IPv6 handle the case of small-packet-network?

Page 26: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

26 Songwu Lu/UCLACS118/3-14-2002

Transition from IPv4 to IPv6

What is dual-stack solution? On tunneling:

how does tunneling work?What is the advantage? Incrementally deploy new

protocols: IPv6, IP multicast, etc….

Page 27: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

27 Songwu Lu/UCLACS118/3-14-2002

IP Multicasting

IP multicast service model–each group identified by an IP mcast address–members can be anywhere–members may join and leave any time

How to map IP mcast addr to a link-layer mcast addr (not in the exam)–place the low-order 23 bits of IP mcast addr to

the lower 23 bits of Ethernet mcast addr: 01.00.5E.00.00.00

IGMP protocol–hosts report group membership to a local router

Page 28: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

28 Songwu Lu/UCLACS118/3-14-2002

IGMP A query router in each link querier periodically polls the link on receipt of query message, hosts set a

random timer for each mcast group it belongs to

when timer expires, send a report to group G others in G hear the report and stop the timers joining: send reports immediately leaving: send a leave msg, and querier sends

group-specific queries again

Page 29: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

29 Songwu Lu/UCLACS118/3-14-2002

More on IGMP

Why do we need a timer in IGMP? Does IGMP know how many active

receivers in each multicast group? Why? How does IGMP handle:

–An existing member’s departure–A new member join–A failing receiver

Page 30: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

30 Songwu Lu/UCLACS118/3-14-2002

Multicast routing

distance vector mcast routing (DVMRP)–reverse path broadcast: only broadcast over

output interfaces if the input interface is on the shortest path to the source S

» You have to know this !

–pruning and grafting–Given a topology, know how to apply RPF to

solve the problem

Mbone:–use IP tunneling to connect mcast routers

Page 31: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

31 Songwu Lu/UCLACS118/3-14-2002

Link layer design

Error detection Framing: byte stuffing MAC protocols Bridges, hubs

Page 32: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

32 Songwu Lu/UCLACS118/3-14-2002

Error detection

Parity bit, 2D parity bit–Can they detect all error cases?

CRC–What is the main idea of CRC?–What is the advantage to use CRC?

Page 33: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

33 Songwu Lu/UCLACS118/3-14-2002

MAC protocols

What are the three MAC protocol families?

What protocols to use for the following scenarios?– wired voice, wireless data, ftp over wired

network

Compare TDMA and token-based protocol Compare Aloha, slotted Aloha, and

CSMA/CD

Page 34: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

34 Songwu Lu/UCLACS118/3-14-2002

More on MAC

CSMA/CD:– What is carrier sensing?– How to do collision detection?– Can carrier sensing avoid collisions completely? Why?

Wireless MAC (802.11)– What is hidden terminal problem?– Why do we need RTS-CTS?– Why do we need ACK?

Taking turns– How can we design a protocol to provide the best of both

worlds: channel partitioning and random access?

Page 35: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

35 Songwu Lu/UCLACS118/3-14-2002

Ethernet Address and ARP

Compare ethernet address with IP address

The detailed operations of ARP If the underlying network does not have a

broadcast medium, can we still use ARP? Design a solution so that ARP can work in

point-to-point link scenarios. The steps to send a datagram to a node

off the LAN

Page 36: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

36 Songwu Lu/UCLACS118/3-14-2002

Ethernet

Ethernet MAC:–What is BEB? Why use it?–What is the capture effect?

Page 37: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

37 Songwu Lu/UCLACS118/3-14-2002

Connecting LANs

Compare hubs, bridges and routers The exact operations of bridge learning

algorithm (bridge filtering and forwarding) Why do we need to build spanning trees?

What failure happens, what to do? Wireless Ethernet MAC:

–What is hidden terminal problem?–Does wireless Ethernet MAC implement collision

detection? Why?–The steps in 802.11 MAC, how RTS-CTS helps?

Page 38: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

38 Songwu Lu/UCLACS118/3-14-2002

Multimedia networking

What is the new requirement to support multimedia?

On client-side buffering:–How does it solve the jitter problem?

How do the FEC and the interleaving work? What is the difference between guaranteed

service and controlled load service?

Page 39: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

39 Songwu Lu/UCLACS118/3-14-2002

ON TCP

How does TCP handle reliable transfer?–What are the fundamental mechanisms?–How do they work?

How does TCP perform flow control? How does TCP perform congestion

control? How does TCP estimate its RTT and

retransmission timeout (RTO)?

Page 40: 1 Songwu Lu/UCLACS118/3-14-2002 Computer Networking: the overall picture  why packet switching?  What’s in a packet: –header: contains all the information.

40 Songwu Lu/UCLACS118/3-14-2002

What you can do in the future? Networking will be (already is in some

sense) the next big wave of computer and information technology It is just the end of the beginning merging key industry sectors: PC &

handheld devices, communications, and even system control (automobile etc.)

It is time for you to think about making your personal landmark for the emerging technology

How to do it: doing the right thing at the right time in a right way