unit v inter-networking

33
UNIT V INTER-NETWORKING

Upload: keren

Post on 14-Feb-2016

35 views

Category:

Documents


0 download

DESCRIPTION

UNIT V INTER-NETWORKING. OVERVIEW. Principles – Repeaters – Bridges Routers – Gateways – other devices Routing algorithms – Distance Vector routing – Link state routing TCP/IP - Protocol structure - Internet Protocol - Transmission control Protocol - Applications. - PowerPoint PPT Presentation

TRANSCRIPT

UNIT V INTER-NETWORKING

UNIT VINTER-NETWORKING

OVERVIEWPrinciples Repeaters Bridges Routers Gateways other devices Routing algorithms Distance Vector routing Link state routing TCP/IP - Protocol structure -Internet Protocol - Transmission control Protocol - Applications Repeaters ,Bridges ,Routers , Gateways

RepeatersRepeaterExtends distance limitation on networks (both voice and data)Filters noiseRegenerates signalsFor twisted pair wire, repeaters are placed every 100 meters

Repeaters

Repeaters are very simple devices. They allow a cabling system to extend beyond its maximum allowed length by amplifying the network voltages so they travel farther.Repeaters are nothing more than amplifiers and, as such, are very inexpensive.Repeaters can only be used to regenerate signals between similar network segments.For example, we can extend an Ethernet 10Base2 network to 400 meters with a repeater. But cant connect an Ethernet and Token Ring network together with one.The main disadvantage to repeaters is that they just amplify signals. These signals not only include the network signals, but any noise on the wire as well.Eventually, if you use enough repeaters, you could possibly drown out the signal with the amplified noise. For this reason, repeaters are used only as a temporary fix.

Repeaters

Repeaters

Bridges,RoutersBridgeConnects two LANs using same protocolSingle path between LANsMinimal sophisticationRouterConnects multiple LANs using same protocolChoice of paths between LANsMainstay of internetworking

BridgesThey join similar topologies and are used to divide network segments.For example, with 200 people on one Ethernet segment, the performance will be mediocre, because of the design of Ethernet and the number of workstations that are fighting to transmit. If you divide the segment into two segments of 100 workstations each, the traffic will be much lower on either side and performance will increase.If it is aware of the destination address, it is able to forward packets; otherwise a bridge will forward the packets to all segments. They are more intelligent than repeaters but are unable to move data across multiple networks simultaneously. Unlike repeaters, bridges can filter out noise.The main disadvantage to bridges is that they cant connect dissimilar network types or perform intelligent path selection. For that function, you would need a router.

Bridges

RoutersRouters are highly intelligent devices that connect multiple network types and determine the best path for sending data.The advantage of using a router over a bridge is that routers can determine the best path that data can take to get to its destination.Like bridges, they can segment large networks and can filter out noise. However, they are slower than bridges because they are more intelligent devices; as such, they analyze every packet, causing packet-forwarding delays. Because of this intelligence, they are also more expensive.Routers are normally used to connect one LAN to another.Typically, when a WAN is set up, there will be at least two routers used.

Routers

SwitchConnects multiple LAN segments using the same protocolConnections may use twisted pair, coaxial cable, or fiber optics wiringFaster than bridgesEnables simultaneous communication between multiple network segments

Switch

A network switch is a computer networking device that connects network segments. Low-end network switches appear nearly identical to network hubs, but a switch contains more "intelligence" (and a slightly higher price tag) than a network hub. Network switches are capable of inspecting data packets as they are received, determining the source and destination device of that packet, and forwarding it appropriately. By delivering each message only to the connected device it was intended for, a network switch conserves network bandwidth and offers generally better performance than a hub.A vital difference between a hub and a switch is that all the nodes connected to a hub share the bandwidth among themselves, while a device connected to a switch port has the full bandwidth all to itself.For example, if 10 nodes are communicating using a hub on a 10-Mbps network, then each node may only get a portion of the 10 Mbps if other nodes on the hub want to communicate as well. . But with a switch, each node could possibly communicate at the full 10 Mbps.

Switch

GatewayGatewayConnects multiple LANs using any protocolVery sophisticatedSupports todays internet by providing access points to several networksHubConnects nodes to a networkSometimes acts as repeaterRouting AlgorithmsDetermining the path(route)5212313521BACEDF

source hostdestination hostfirst-hop routerdefault routersource routerdestination routerleast-cost pathRouting AlgorithmThe algorithm used for the routing protocols defines the following processes:Mechanism for sending and receiving routing information.Mechanism for calculating the best paths and installing routes in the routing table. Mechanism for detecting and reacting to topology changes.Routing Algorithm classification

2 main classes:Centralizedall routers have complete topology, link cost infolink state algorithmsDistributed: Each router knows link costs to neighbor routers onlydistance vector algorithms20A Link-State Routing AlgorithmDijkstras algorithm

Link costs known to all nodes

computes least cost paths from one node (source) to all other nodesgives forwarding table for that node

iterative: after k iterations, know least cost path to k dest.s21Dijkstras Algorithm1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 7 8 Loop 9 find w not in N' s.t. D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N' Notation:c(x,y): link cost from node x to y; = if not direct neighborsD(v): current value of cost of path from source to dest. vuyxwvz221311253522Dijkstras algorithm: example (2) uyxwvzResulting shortest-path tree from u:vxywz(u,v)(u,x)(u,x)(u,x)(u,x)destinationlinkResulting forwarding table in u:23Distributed: Distance VectorTo find D, node S asks each neighbor XHow far X is from DX asks its neighbors comes back and says C(X,D)Node S deduces C(S,D) = C(S,X) + C(X,D)S chooses neighbor Xi that provides min C(S,D)

Later, Xj may find better route to DXj advertizes C(Xj,D)All nodes update their cost to D if new min found24Distance Vector Algorithm Bellman-Ford Equation (dynamic programming)Definedx(y) := cost of least-cost path from x to y

Then

dx(y) = min {c(x,v) + dv(y) }

where min is taken over all neighbors v of xvxyv2v125Bellman-Ford example uyxwvz2213112535Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4Node that achieves minimum is nexthop in shortest path forwarding tableB-F equation says:26Distance Vector: link cost changesLink cost changes:if DV changes, notify neighbors xz1450y1At time t0, y detects the link-cost change, updates its DV, and informs its neighbors.

At time t1, z receives the update from y and updates its table. It computes a new least cost to x and sends its neighbors its DV.

At time t2, y receives zs update and updates its distance table. ys least costs do not change and hence y does not send any message to z.

When can it get complicated ?27Distance Vector: link cost changesLink cost changes:Y thinks Zs best cost is 5Thus C(y,x) = 5 + 1 = 6Announces this costZ thinks C(z,x) = 6 + 1

Poissoned reverse: If Z routes through Y to get to X :Z tells Y its (Zs) distance to X is infinite (so Y wont route to X via Z)will this completely solve count to infinity problem?

xz1450y6028Comparison of LS and DV algorithmsMessage complexityLS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors onlyconvergence time variesSpeed of ConvergenceLS: O(n2) algorithm requires O(nE) msgsmay have oscillationsDV: convergence time variesmay be routing loopscount-to-infinity problemRobustness: what happens if router malfunctions?LS: node can advertise incorrect link costeach node computes only its own tableDV:DV node can advertise incorrect path costeach nodes table used by others error propagate thru network

29

BellmanFord algorithmTheBellmanFord algorithmcomputes single-sourceshortest pathsin aweighted digraph.For graphs with only non-negative edge weights, the fasterDijkstra's algorithm also solves the problem.Thus, BellmanFord is used primarily for graphs with negative edge weights. The algorithm is named after its developers,Richard BellmanandLester Ford, Jr

AlgorithmBellmanFord is based ondynamic programmingapproach. In its basic structure it is similar toDijkstra's Algorithm, but instead ofgreedilyselecting the minimum-weight node not yet processed to relax, it simply relaxesallthe edges, and does this |V|1 times, where |V| is the number of vertices in the graph.The repetitions allow minimum distances to propagate accurately throughout the graph, since, in the absence of negative cycles, the shortest path can visit each node at most only once. Unlike the greedy approach, which depends on certain structural assumptions derived from positive weights, this straightforward approach extends to the general case.Finding negative cyclesWhen the algorithm is used to find shortest paths, the existence of negative cycles is a problem, preventing the algorithm from finding a correct answer. However, since it terminates upon finding a negative cycle, the Bellman-Ford algorithm can be used for applications in which this is the target to be sought - for example incycle-cancellingtechniques innetwork flowanalysis.DisadvantagesIt does not scale well.Changes innetwork topologyare not reflected quickly since updates are spread node-by-node.Count to infinity(if link or node failures render a node unreachable from some set of other nodes, those nodes may spend forever gradually increasing their estimates of the distance to it, and in the meantime there may be routing loops).