* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Document
Distributed firewall wikipedia , lookup
Backpressure routing wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Internet protocol suite wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Serial digital interface wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Deep packet inspection wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Computer network wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Network tap wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Packet switching wikipedia , lookup
Airborne Networking wikipedia , lookup
Network Layer —— the core of networking The Network Core mesh of interconnected routers the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks” Network layer functions transport packet from sending to receiving hosts network layer protocols in every host, router Three important functions: path determination: route taken by packets from source to dest. Routing algorithms switching: move packets from router’s input to appropriate router output call setup: some network architectures require router call setup along path before data flows application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical Network Core: Circuit Switching End-end resources reserved for “call” link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required Network Core: Packet Switching each end-end data stream divided into packets • user A, B packets share network resources • each packet uses full link bandwidth • resources used as needed, Bandwidth division into “pieces” Dedicated allocation Resource reservation resource contention: • aggregate resource demand can exceed amount available • congestion: packets queue, wait for link use • store and forward: packets move one hop at a time – transmit over link – wait turn at next link Network core: routing Goal: move data among routers from source to dest. datagram packet network: circuit-switched network: destination address determines call allocated time slots next hop of bandwidth at each routes may change during session link analogy: driving, asking directions fixed path (for call) No notion of call state determined at call setup virtual circuit network: switches maintain lots packet carries tag, tag of per call state determines next hop (what?): resource fixed path (for call) determined allocation at call setup time routers maintain little per-call state; resources not allocated Packet switching vs circuit switching: why? “reliability” – no congestion, in order data in circuit-switching packet switching: better bandwidth use state, resources: packet switching has less state good: less control-plane processing resources along the way More dataplane (address lookup) processing failure modes (routers/links down): packet switching routing reconfigures sub-second timescale; circuit-switching: more complex recovery – need to involve all (downstream) switches on path Virtual circuits “source-to-dest path behaves much like telephone circuit” performance-wise network actions along source-to-dest path call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host ID) every router on source-dest path maintains “state” for each passing connection transport-layer connection only involved two end systems link, router resources (bandwidth, buffers) may be allocated to VC to get circuit-like performance. Virtual circuits: signaling protocols used to setup, maintain teardown VC used in ATM, frame-relay, X.25 not used in today’s Internet application transport 5. Data flow begins network 4. Call connected data link 1. Initiate call physical 6. Receive data application 3. Accept call 2. incoming call transport network data link physical Datagram networks: the Internet model no call setup at network layer routers: no state about end-to-end connections no network-level concept of “connection” packets typically routed using destination host ID packets between same source-dest pair may take different paths application transport network data link 1. Send data physical application transport network 2. Receive data data link physical Datagram or VC network Internet ATM • data exchange among • evolved from telephony computers • human conversation: – “elastic” service, no strict – strict timing, reliability timing req. requirements • “smart” end systems – need for guaranteed (computers) service – can adapt, perform • “dumb” end systems control, error recovery – telephones – simple inside network, – complexity inside complexity at “edge” network • many link types – different characteristics – uniform service difficult Datagram or VC network Routing: Store-and-Forward • Store-and-Forward Packet Switching A host with a packet to send transmits it to the nearest router, either on its own LAN or over a point-to-point link to the carrier. The packet is stored there until it has fully arrived so the checksum can be verified. Then it is forwarded to the next router along the path until it reaches the destination host, where it is delivered. Router Architecture Overview Two key router functions: • run routing algorithms/protocol • forwarding datagrams from incoming to outgoing link Input Port Functions Physical layer: bit-level reception Data link layer: e.g., Ethernet Decentralized switching: • given datagram dest., lookup output port using forwarding table in input port memory • goal: complete input port processing at ‘line speed’ • queuing: if datagrams arrive faster than forwarding rate into switch fabric Three types of switching fabrics Switching Via Memory First generation routers: • traditional computers with switching under direct control of CPU •packet copied to system’s memory • speed limited by memory bandwidth (2 bus crossings per datagram) Input Port Memory Output Port System Bus Switching Via a Bus • datagram from input port memory to output port memory via a shared bus • bus contention: switching speed limited by bus bandwidth • 1 Gbps bus, Cisco 1900: sufficient speed for access and enterprise routers (not regional or backbone) Switching Via An Interconnection Network (CrossBar) • overcome bus bandwidth limitations • Banyan networks, other interconnection nets initially developed to connect processors in multiprocessor • Advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric. • Cisco 12000: switches Gbps through the interconnection network Output Ports • Buffering required when datagrams arrive from fabric faster than the transmission rate • Scheduling discipline chooses among queued datagrams for transmission Output port queueing • buffering when arrival rate via switch exceeds output line speed • queueing (delay) and loss due to output port buffer overflow! Routing Algorithms • The main function of the network layer is routing packets from the source machine to the destination machine. • The routing algorithm is that part of the network layer software responsible for deciding which output line an incoming packet should be transmitted on. • If the subnet uses virtual circuits internally, routing decisions are made only when a new virtual circuit is being set up. • One can think of a router as having two processes inside it. – One of them handles each packet as it arrives, looking up the outgoing line to use for it in the routing tables. This process is forwarding. – The other process is responsible for filling in and updating the routing tables. Routing: Metrics of Algorithms Routing protocol Goal: determine “good” path (sequence of routers) thru network from source to dest. • Graph abstraction for routing algorithms: • graph nodes are routers • graph edges are physical links – link cost: delay, $ cost, or congestion level 5 2 A B 2 1 D 3 C 3 1 5 F 1 E 2 • “good” path: – typically means minimum cost path – other def’s possible Routing: only two approaches used in practice Global: • all routers have complete topology, link cost info • “link state” algorithms: use Dijkstra’s algorithm to find shortest path from given router to all destinations Decentralized: • router knows physically-connected neighbors, link costs to neighbors • iterative process of computation, exchange of info with neighbors • “distance vector” algorithms • a ‘self-stabilizing algorithm’ (we’ll see these later) Routing: Shortest Path Routing • This is a “Global” routing algorithm • The idea is to build a graph of the subnet, with each node of the graph representing a router and each arc of the graph representing a communication line (often called a link). • To choose a route between a given pair of routers, the algorithm just finds the shortest path between them on the graph. Routing: Shortest Path Routing (Cont’d) • Dijkstra's algorithm Routing: Distance Vector Routing • Distance vector routing algorithms operate by having each router maintain a table (i.e, a vector) giving the best known distance to each destination and which line to use to get there. • These tables are updated by exchanging information with the neighbors. • It was the original ARPANET routing algorithm and was also used in the Internet under the name RIP. • each router maintains a routing table indexed by, and containing one entry for, each router in the subnet. This entry contains two parts: the preferred outgoing line to use for that destination and an estimate of the time or distance to that destination. The metric used might be number of hops, time delay in milliseconds, total number of packets queued along the path, or something similar. Routing: Distance Vector Routing (Cont’d) • An example of Distance Vector Routing (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J. Question: How J computes its new route to router G? Routing: Distance Vector Routing (Cont’d) • The Count-to-Infinity Problem – In particular, it reacts rapidly to good news, but leisurely to bad news. (a) A gets Up (b) A turns Down Routing: Hierarchical Routing Our routing review thus far - idealization • all routers identical • network “flat” … not true in practice scale: with 200 million destinations: administrative autonomy • internet = network of networks • can’t store all dest’s in routing tables! • each network admin may want to control routing in its • routing table exchange would own network swamp links! Routing: Hierarchical Routing (Cont’d) • aggregate routers into regions, “autonomous systems” (AS) • routers in same AS run same routing protocol – “intra-AS” routing protocol – routers in different AS can run different intraAS routing protocol gateway routers • special routers in AS • run intra-AS routing protocol with all other routers in AS • also responsible for routing to destinations outside AS – run inter-AS routing protocol with other gateway routers Routing: Hierarchical Routing (Cont’d) • An example of Hierarchical Routing (a) the Topology of network (b) the Full table of 1A (c) the Hierarchical table of 1A Intra-AS and Inter-AS routing C.b a C Gateways: B.a A.a b A.c d A a b c a c B b •perform inter-AS routing amongst themselves •perform intra-AS routers with other routers in their AS network layer inter-AS, intra-AS routing in gateway A.c link layer physical layer Intra-AS and Inter-AS routing C.b a Host h1 C b A.a a Inter-AS Internet: BGP routing between B.a A and B Host h2 c A.c a b B d c b A Intra-AS routing within AS A Intra-AS routing within AS B Internet: OSPF, IS-IS, RIP Addressing • What’s an address? – identifier that differentiates between me and someone else, and also helps route data to/from me • Real world examples of addressing? – mailing address – office #, floor, etc – different “levels of addressing” – Phone# Addressing: network layer • IP address: 32-bit identifier for host, router interface • interface: connection between host, router and physical link – router’s typically have multiple interfaces – host may have multiple interfaces – IP addresses associated with interface, not host, router 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.1.3 223.1.2.9 223.1.3.27 223.1.2.2 223.1.3.2 223.1.3.1 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 IP Addressing • IP address: – network part (high order bits) – host part (low order bits) • What’s a network ? (from IP address perspective) – device interfaces with same network part of IP address – can physically reach each other without intervening router 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.1.3 223.1.2.9 223.1.3.27 223.1.2.2 LAN 223.1.3.1 223.1.3.2 network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address)