ECE 4450:427/527 - Computer Networks Spring 2014

46
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 6.1: Internetworking Dr. Nghi Tran (ECE- University of Akron) ECE 4450:427/527 Computer Networks 1

description

ECE 4450:427/527 - Computer Networks Spring 2014. Dr. Nghi Tran Department of Electrical & Computer Engineering. Lecture 6.1: Internetworking. Internetworking: Discussions. Up to now, we have learned how to Connect one node to another Connect one node to an existing network, e.g. Ethernet - PowerPoint PPT Presentation

Transcript of ECE 4450:427/527 - Computer Networks Spring 2014

Page 1: ECE 4450:427/527 - Computer Networks Spring 2014

ECE 4450:427/527 - Computer NetworksSpring 2015

Dr. Nghi TranDepartment of Electrical & Computer Engineering

Lecture 6.1: Internetworking

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 1

Page 2: ECE 4450:427/527 - Computer Networks Spring 2014

Internetworking: Discussions

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 2

• Up to now, we have learned how to• Connect one node to another• Connect one node to an existing network,

e.g. Ethernet• “Last-mile” link: Connect to a modest

number of node together: Ethernet 1024 nodes, point-to-point: 2 nodes

• Next, we will learn how to build networks of global scale: How to interconnect different types of links and networks: Internetworking

Page 3: ECE 4450:427/527 - Computer Networks Spring 2014

Internetworking: Discussions

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 3

• For Internetworking, we shall look at few sub-problems:• Interconnect links of the same type: Switches• We consider an important of class switch: Bridges to

interconnect Ethernet segments.• We also look a way to interconnect disparate networks

and links: Gateways, or now mostly known as routers. We shall focus on the IP

• Once we are able to interconnect a whole lot of links and networks with switches and routers, we will look at a way to find a suitable path, or route through a new working:• Paths that are efficient, loop free, etc.: Routing

Page 4: ECE 4450:427/527 - Computer Networks Spring 2014

Internetworking: Our Goal

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 4

• Understanding the functions of switches, bridges and routers

• Discussing Internet Protocol (IP) for interconnecting networks

• Understanding the concept of routing

Page 5: ECE 4450:427/527 - Computer Networks Spring 2014

Switch

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 5

– A mechanism that allows us to interconnect links to form a large network

– A multi-input, multi-output device which transfers packets/frames from an input to one or more outputs

– How about Hub/Repeater?

Page 6: ECE 4450:427/527 - Computer Networks Spring 2014

Switching Topology

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 6

• A switch implements a star topology• Switches are MIMO devices

• Ports are numbered

Page 7: ECE 4450:427/527 - Computer Networks Spring 2014

Properties

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 7

– Even though a switch has a fixed number of inputs and outputs, which limits the number of hosts that can be connected to a single switch, large networks can be built by interconnecting a number of switches

– Adding a new host to the network by connecting it to a switch does not necessarily mean that the hosts already connected will get worse performance from the network

Page 8: ECE 4450:427/527 - Computer Networks Spring 2014

Properties

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 8

The last claim cannot be made for the shared media network (discussed in Chapter 2)– It is impossible for two hosts on the same Ethernet to

transmit continuously at 10Mbps because they share the same transmission medium

– Every host on a switched network has its own link to the switch

• So it may be entirely possible for many hosts to transmit at the full link speed (bandwidth) provided that the switch is designed with enough aggregate capacity

Page 9: ECE 4450:427/527 - Computer Networks Spring 2014

Primary Job

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 9

• A switch’s primary job is to receive incoming packets on one of its links and to transmit them on some other link– This function is referred as switching and forwarding

Page 10: ECE 4450:427/527 - Computer Networks Spring 2014

Switches

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 10

• Link-layer device: smarter than hubs, take active role– store, forward Ethernet frames– examine incoming frame’s MAC address,

selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment

• transparent

• plug-and-play, self-learning

Page 11: ECE 4450:427/527 - Computer Networks Spring 2014

Properties

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 11

• hosts have dedicated, direct connection to switch

• switches buffer packets• Ethernet protocol used on each

incoming link, but no collisions; full duplex– each link is its own collision

domain• switching: A-to-A’ and B-to-B’

simultaneously, without collisions – not possible with dumb hub

A

A’

B

B’

C

C’

switch with six interfaces(1,2,3,4,5,6)

1 23

45

6

Allows multiple simultaneous transmissions

Page 12: ECE 4450:427/527 - Computer Networks Spring 2014

Example: Institutional Network

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 12

to externalnetwork

router

IP subnet

mail server

web server

Page 13: ECE 4450:427/527 - Computer Networks Spring 2014

Switching and Forwarding

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 13

• How does a switch decide which output port to place each packet on?– It looks at the header of the packet for an

identifier that it uses to make the decision– Two common approaches

• Datagram or Connectionless approach• Virtual circuit or Connection-oriented approach

– A third approach source routing is less common

Page 14: ECE 4450:427/527 - Computer Networks Spring 2014

Datagram/Connectionless

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 14

• Assumptions– Each host has a globally unique address, i.e. MAC– There is some way to identify the input and output

ports of each switch• We can use numbers• We can use names

Page 15: ECE 4450:427/527 - Computer Networks Spring 2014

Datagram/Connectionless

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 15

• Datagrams– Key Idea

• Every packet contains enough information to enable any switch to decide how to get it to destination

– Every packet contains the complete destination address

Page 16: ECE 4450:427/527 - Computer Networks Spring 2014

Datagram/Connectionless

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 16

• No dedicated connection between communicating hosts: Packets may follow independent paths to the destination

• Packets are sent to the switch at any time (no contention)

• Source is not aware of the state of the destination

• Less prone to switch failures if alternative paths exist

Page 17: ECE 4450:427/527 - Computer Networks Spring 2014

Example

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 17

An example network

• To decide how to forward a packet, a switch consults a forwarding table (sometimes called a routing table)

Page 18: ECE 4450:427/527 - Computer Networks Spring 2014

Forwarding Table

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 18

Destination Port-------------------------------------A 3B 0C 3D 3E 2F 1G 0H 0

Forwarding Table for Switch 2

• Entry: MAC address of host, port/interface to reach host: looks like a routing table!

• Q: how are entries created, maintained in switch table?

Page 19: ECE 4450:427/527 - Computer Networks Spring 2014

Switch: Self-Learning

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 19

• switch learns which hosts can be reached through which interfaces– when frame received, switch

“learns” location of sender: incoming LAN segment

– records sender/location pair in switch table

A

A’

B

B’

C

C’

1 23

45

6

A A’

Source: ADest: A’

MAC addr interface

Switch table (initially empty)

A 1

Page 20: ECE 4450:427/527 - Computer Networks Spring 2014

Switch: Frame Filtering/Forwarding

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 20

When frame received:

1. record link associated with sending host2. index switch table using MAC dest address3. if entry found for destination

then { if dest on segment from which frame arrived

then drop the frame else forward the frame on interface indicated } else flood

forward on all but the interface on which the frame arrived

Page 21: ECE 4450:427/527 - Computer Networks Spring 2014

Self-Learning/Forwarding Example

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 21

A

A’

B

B’

C

C’

1 23

45

6

A A’

Source: ADest: A’

MAC addr Port TTL

Forwarding table (initially empty)

A 1

A A’A A’A A’A A’A A’

• Frame destination unknown: flood

A’ A

Destination A location known:

A’ 4

selective send

Page 22: ECE 4450:427/527 - Computer Networks Spring 2014

Interconnecting Switches

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 22

• switches can be connected together

A

B

Q: sending from A to G - how does S1 know to forward frame destined to F via S4 and S3?

A: self learning! (works exactly the same as in single-switch case!)

S1

C D

E

FS2

S4

S3

H

I

G

Page 23: ECE 4450:427/527 - Computer Networks Spring 2014

Multi-Switch Forwarding Tables

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 23

Suppose C sends frame to I, I responds to C

A

B

S1

C D

E

FS2

S4

S3

H

I

G

1

2

Q: show switch tables and packet forwarding in S1, S2, S3, S4

Page 24: ECE 4450:427/527 - Computer Networks Spring 2014

Datagram/Connectionless: Summary

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 24

Characteristics of Connectionless (Datagram) Network– A host can send a packet anywhere at any time, since any

packet that turns up at the switch can be immediately forwarded (assuming a correctly populated forwarding table)

– When a host sends a packet, it has no way of knowing if the network is capable of delivering it or if the destination host is even up and running

– Each packet is forwarded independently of previous packets that might have been sent to the same destination.

• Thus two successive packets from host A to host B may follow completely different paths

– A switch or link failure might not have any serious effect on communication if it is possible to find an alternate route around the failure and update the forwarding table accordingly

Page 25: ECE 4450:427/527 - Computer Networks Spring 2014

Virtual Circuit Switching

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 25

– Uses the concept of virtual circuit (VC)– Also called a connection-oriented model– First set up a virtual connection from the source host to the

destination host and then send the data

Page 26: ECE 4450:427/527 - Computer Networks Spring 2014

Virtual Circuit (VC) Switching

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 26

Two-stage process– Connection setup– Data Transfer

• Connection setup– Establish “connection state” in each of the switches between the

source and destination hosts– The connection state for single connection consists of an entry in the

“VC table” in each switch through which the connection passes

Page 27: ECE 4450:427/527 - Computer Networks Spring 2014

VC Table

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 27

One entry in the VC table on a single switch contains– Incoming VC identifier (VCI) (identifies the connection per link)– Outgoing VC identifier (VCI) (possibly different that the incoming)– Incoming interface (different than the VC Identifier, similar to a port)– Outgoing interface (different than the VC identifier, similar to a port)

• The semantics for one such entry is– If a packet arrives on the designated incoming interface and that packet

contains the designated VCI value in its header, then the packet should be sent out the specified outgoing interface with the specified outgoing VCI value first having been placed in its header

Incoming Interface

Incoming VC Outgoing Interface

Outgoing VC

2 5 1 11

Page 28: ECE 4450:427/527 - Computer Networks Spring 2014

VC Connection Setup

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 28

•Permanent VC (PVC): Administrator sets up a permanent connection and configures VC table

•Switched VC (SVC): The host signals to the switches in order to establish a VC, dynamically.

Page 29: ECE 4450:427/527 - Computer Networks Spring 2014

PVC

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 29

Let’s assume that a network administrator wants to manually create a new virtual connection from host A to host B– First the administrator identifies a path through the network from A to B

Page 30: ECE 4450:427/527 - Computer Networks Spring 2014

PVC

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 30

The administrator then picks a VCI value that is currently unused on each link for the connection– For our example,

• Suppose the VCI value 5 is chosen for the link from host A to switch 1

• 11 is chosen for the link from switch 1 to switch 2• So the switch 1 will have an entry in the VC table

Incoming Interface

Incoming VC Outgoing Interface

Outgoing VC

2 5 1 11

Page 31: ECE 4450:427/527 - Computer Networks Spring 2014

PVC Example

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 31

Incoming Interface Incoming VCI Outgoing Interface Outgoing VCI

2 5 1 11Switch

1

Incoming Interface Incoming VCI Outgoing Interface Outgoing VCI

3 11 2 7Switch

2

Incoming Interface Incoming VCI Outgoing Interface Outgoing VCI

0 7 1 4Switch

3

Page 32: ECE 4450:427/527 - Computer Networks Spring 2014

Data Transfer Stage

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 32

Page 33: ECE 4450:427/527 - Computer Networks Spring 2014

SVC Example

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 33

• A sends setup msg to switch 1 indicating the address of B

• Switch 1 setups incoming/outgoing interfaces and VCIs

• Connection setup msg is forwarded like a datagram to switch 2

• Switch 2 repeats the setup process

• Once data stage is over, connection is torn down

Page 34: ECE 4450:427/527 - Computer Networks Spring 2014

SVC: Observations

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 34

•Delay?

•Overhead (in terms of address)?

•A switch/link failure?

•How to get set up message to B?

Page 35: ECE 4450:427/527 - Computer Networks Spring 2014

Bridges

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 35

• Bridges are special switches that interconnect Ethernet networks

• Act as simple nodes on each Ethernet• What is Forwarding Table for this Bridge?

Page 36: ECE 4450:427/527 - Computer Networks Spring 2014

Problem with Flooding

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 36

Page 37: ECE 4450:427/527 - Computer Networks Spring 2014

Why Loop?

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 37

• How does an extended LAN come to have a loop in it?– Network is managed by more than one administrator

• For example, it spans multiple departments in an organization• It is possible that no single person knows the entire configuration of the

network– A bridge that closes a loop might be added without anyone knowing

– Loops are built into the network to provide redundancy in case of failures

• Solution– Distributed Spanning Tree Algorithm

Page 38: ECE 4450:427/527 - Computer Networks Spring 2014

Preliminaries on Graph

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 38

V1

V3

V2

V4

V5 V6

Path: {V1, V3, V4}

Vertex

Edge

• Graph G(V, E) : Collection of vertices and edges– V: Set of vertices– E: Set of edges, e(x, y) = 1, if x, y connected, 0 otherwise

• Path: sequence of vertices with an edge between subsequent vertices (can be defined as sequence of edges as well)

Page 39: ECE 4450:427/527 - Computer Networks Spring 2014

Connected Graph

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 39

•A graph is said to be connected, if there is a path from any node to any other node

V1

V3

V2

V4

V5 V6

V1

V3

V2

V4

V5 V6

Page 40: ECE 4450:427/527 - Computer Networks Spring 2014

(A)Cyclic Graph

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 40

V1

V3

V4

V5 V6

V1

V3

V4

V5 V6

Cyclic graph Tree

• Cycle: a path with the same first and last vertex• Cyclic graph: A graph that contains at least one cycle• Acyclic graph: A graph with no cycles• Tree: An acyclic connected graph (spanning tree, spans all vertices)• Forest: A disconnected acyclic graph (a graph with many trees)

Page 41: ECE 4450:427/527 - Computer Networks Spring 2014

Mapping Extended LAN to Graph

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 41

• Think of the extended LAN as being represented by a graph that possibly has loops (cycles)

• A spanning tree is a sub-graph of this graph that covers all the vertices but contains no cycles– Spanning tree keeps all the vertices of the original graph but throws out

some of the edges

Example of (a) a cyclic graph; (b) a corresponding spanning tree.

Page 42: ECE 4450:427/527 - Computer Networks Spring 2014

Mapping Extended LAN to Graph

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 42

• Bridges and LANs become vertices, ports become edges• Goal: Make a tree that spans only LANs (red vertices): Spanning

Tree Algorithm

B3

A

B5B7

B

K

FB1

B2

B6 B4 J

H

I

G

E

C

D

Page 43: ECE 4450:427/527 - Computer Networks Spring 2014

Spanning Tree Algorithm

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 43

• Each bridge has a unique identifier• Pick bridge with smallest ID, make it the root of

the tree

FB1 HG

ED

Page 44: ECE 4450:427/527 - Computer Networks Spring 2014

Spanning Tree Algorithm

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 44

• Compute shortest path (in terms of hops) from each bridge to root

B3

A

B5B7

B

K

FB1

B2

B6 B4 J

H

I

G

E

C

D

Page 45: ECE 4450:427/527 - Computer Networks Spring 2014

Spanning Tree Algorithm

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 45

•Each LAN remains connected to the bridge with shortest path to the root. In case of a tie use smallest ID

B3

A

B5B7

B

K

FB1

B2

B6 B4 J

H

I

G

E

C

D

Page 46: ECE 4450:427/527 - Computer Networks Spring 2014

Distributed Spanning Tree: Message Exchange

Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 46

Initially, all bridges consider themselves as rootsBroadcast on all ports ID, root bridge, and distance to rootIf bridge hears a message from another bridge with smaller ID it adjusts root/distance, and forwardsEx., Let (Y, d, X) denote (root, distance, bridge ID)

B3 receives (B2, 0, B2)B3 accepts B2 as rootB3 adds one on its distance to B2, and fwds to B5 (B2, 1, B3)B2 accepts B1 as root and updates B3 with (B1, 1, B2)B5 accepts B1 as root and updates B3 with (B1, 1, B3)B3 accepts B1 as root, and note that both B2, B5 are closer to root in both ports. Hence, B3 blocks all ports