Anda di halaman 1dari 44

Computer Networking top down approach Chapter 1 : When data arrives on a link the switch or router examines a portion

of the data called the header to determine the destination. The link layer: Is responsible for managing the transmission of bits over a link in units called frames.

Network layer: the job of the network layer is to manage the delivery of data from one end system to another in units called datagrams or packets we need an address guaranteed unique over the entire web network for each end system. This called the network address. router : the term router is used for nodes that receive and retransmit datagrams based on the network layer address. Transport layer: the job of transport layer is this final step: o to deliver application layer messages from one application to another in units called segment port: we need an identifier to specify an application at the transport layer this identifier is called port There are two fundamental approaches to moving data through a network of links and switches : Circuit sweitching Packet switching
Page 1 of 44

Circuit switching : The resources needed alonge path like buffers link transmission rate to provide for communication session between the end systems are reserved for the duration of the communication session between the end systems . In the packet switching these resources are not reserved Example for circuit switched : Before the sender can send the information the network must establish a connection between the sendtder and the receiver This is for which the switches on the path between the sender and reciver maintain connection state for the connection. In the jargon of telephony this connection is called circuit

As with circuit switching the packet is transmitted over a series of communication links . but with packet switching the packet is send into the network without reserving any badwidth whatsoever. Sources breaks long message into smaller chunks of data knowns as packets Application layer chapter 2: Key application layer concepts such as Network services required by application Client and servers Processes And transport layer The core of network application development is: writing programs that run on different end systems and communicate with each other over the network developer mostly use these two architecture in modern network application :
Page 2 of 44

client server architecture Or peer to peer Client server : There is allways on host , called server Which services request from many other hosts called clients In the client server architecture , clients do not directly communicate with each other The server has fixed well known address called and IP address Because the server has a fixed well known address and because the server is always On a client can always contact the server by sending a packet to the servers addres . A alrge cluster of hosts some times referred to as data center P2P: There is minimal or no reliance on always on infrastructure serves . Because the peers communicate without passing through a dedicated server the architecture is called peer to peer Hybrid arhitectures : Is the combination of peer to peer and client server P2P advantages: the application combined client and server functionality exelent sustanablity every client brings a matching increment inserver capability P2P disadvantages: Security :

Because of there highly distributed and open nature p2p applications can be a challenge
Page 3 of 44

To secure Application is bit more complex because its both client and server

No controle over availability Quality of the server is all depends on the power of the end systems and band with of the Connection Process on two different end systems communicate with each other by exchanging messages across the computer network. client and server process : for each pair of communicationg process we typically label on of the two processes as the client and the other process as the server for example : with the web a browser is client process and web server is server process with p2p sharing , the peer that is downloading the file is labeld as the client and the peer that is uploading the file is labeled as the server in the context of communication session between a pair of process the process that initiates the communication that is initially contact the other process a the beginning of the session is labeled as the client the process that waits to be contacted to begin the session is the server . socket : the application developer has control of everything on the application layer side of socket but has little control of the transport layer side of the socket a process sends messages into and recives messages from the network through a software interface called socket soket :is the interface between the application layer and the transport layer within a host it is also reffered as the application programming interface or API

Page 4 of 44

the application at the sending side pushes messages through the socket . at the other side of the socket the transport layer protocol has the responsibility of getting the messages to the door of the receiving socket some fetures that transport layer ptotocol has to offer: reliable data transfer one important service that transport layer protocol can potentially provide to an application is process to process reliable data transfer throughput : guaranteed available throughtput at some specified rate elastic application can use of as much or as little throughput as happens to be available for example electronic mail file transfer and web transfers timing : guarantee might be that every bit that the sender pumps into the socket arrives at the recivers socket no more than 100 msec later Security : transport protocol can provide an application with one or more security services for example in the sending host a transport protocol can encrypt all data transmitted by the sending process and in the reciving host the transport layer proctol can decrypt the data before delivering the data to the receiving process Or only the sender and the reipent can read the information

the internet of TCP/IP: makes two transport protocol available to appliocations . UDP TCP

As a application developer for creating a new network application for the internet , one of the first decisions you have to make is whether to use UDP or TCP TCP:
Page 5 of 44

Transmition control protocol : The tcp service model includes a connection oriented service and reliable data transfer service . When an application invokes tcp as its transport protocol the application recives both of these services from TCP o Connection oriented service : Tcp has the client and server exchange transport layer control information with each other before the application level messages begin to flow . this so called handshaking procedure alerts the client and server allowing theme to prepare for an onslaught of packets After that TCP connection is said to exist between the sockets of the two processes. Now they can send message to each other over the conncetion at the same time . When application finishes sending messages it must tear down the connection The service is reffed to as connection orented service rather than a connection

reliable data transfer service : o the communicating process can rely on TCP to deliver all data send without error and in the proper order o When one side send the message to the socket it can now rely that the same stream of bytes to the reciving thesocket with no missing or duplicate bytes.

Byte streem : o all message sent by the application are viewd as one continue streem of byets

UDP SERVUCES: UDP is light waight transport control Providing minimal services Udp is connectionless so there is no handshaking to check the sockets before the two processes start to communicate
Page 6 of 44

Provide unreliable data transfer services For example when udp sends a message through socket there is no guaranteed that the message will ever reach the reciving process

Adressing process : To identify the receiving process two pieces of information need to be specified: To receive messages process must have identifier o The name or address of the host and o An identifier that specifies the reciving process in the destination host o In the internet the host is identified by its IP address o A destination is port number Application layer protocol: Aplication layer protocol: Defines how an applications processes running on different end systems, Pass messages to each other.\ o Types of messages exchange for example request messages and response messages o The syntax of the various message types such as the fields in the message and how the fields are delineated. o The semantics of the fields that is the meaning of the information in the fields o Rules for determining when and how a process sends messages and responds to messages. the webs application layer protocol HTTP defines the format and sequence of the messages that are passed between browser and web server. Therefore http is only one piece of the web application. Application layer protocols : Define how messages are passed between servers
Page 7 of 44

HTTP:

Ho messages are passed between servers and mail readers and How the contents of certain parts of email mssages like a mail message header are to be interpreted. The principle application layer for email is smtp

Application layer protocol Implemented in two programs : o Client o Server program

They talk to each other by exchanging http messages . http defines the structure of these messages and how the client and server exchange the messages. http defines: o how web clients request web pages from web servers and how servers transfer web pages to clients

http uses tcp as its underlying transport protocol http client first initiates a tcp connction with the server. Once the connection is established the browser and the server processes access tcp through their socket interfaces. o Recall tcp : the client side the socket interface is the door between the client process and the tcp conection and on the server side its door between the server process and TCP connection . o How its work: The client send http request messages into its socket interface and recives http responds messages from its socket interface o http is :stateless protocol : means its not remember what client asked earliyer

Http in defult mode is persistent connection Http with non persistent connection :

Page 8 of 44

Each tcp connection is closed after the server sends the object the connection does not persist for other objects. Each tcp connection transports exactly one request message and one response message

http specifications and define only the communication protocol between the client http program and the server http program Persistenc connection: Breand new connction must be established and maintained for each requested object For each of these connections tcp buffers must be allocated and tcp variables must be kept in both the client and server With persistent connections the server leaves the tcp connection open after sending a response Subsequent requests and response between the same client and server can be sent over the same connection One page can be sent over one conection These request for objects can be made back to back without waiting for replies to pending request http clienct oftern use post method when they need to fill out the forms

cookies allows sites to keep track of users . cookies technology has four components: o a cookie header line in the http response message o a cookie header line in the http request message o a cookie file kept on the users end system and managed by the users browser o a back end database at the website Smtp: transfer message from senders mail servers to the recipients
Page 9 of 44

the tcp connection is a direct connection between the hong kong and st server

http transfer files from a web server to a web client typicaly browser ; where smpt transfers files that is email messages from one mail server to another mail server http is manily pull protocol someone loads information on a web server and users use http to pull the information from the server at their convence . smpt is push protocol the sending mail server pushes the file to the receving mail server.in particular the tcp connection is initiated by the machine that wants to send the file. Bittorent : each torrent has an infrastructure node called tracker o tracker keeps track of the peers involved in the torrent when a peer joins a torrent it registers itself with the tracker and periodically informs the tracker that it is still in the torrent. In this manner the tracker keeps track of the peers that are participating in the torrent choked : that is other peers they do not receive any chunks from Alice swarm : bunch of people who wants to get the same file we dont need to download all the files in same time bittorent will divide all the files into the small peaces Chapter 3 Transport layer: Transport layer protocols are implemented in the end systems but not in network routers On the sending side the transport layer converts the messages it receives from a sending application process into transport layer packets known as transport layer segments in internet terminology. A transport protocol can use encryption to guarantee that application messages are not read by intruder even when the network layer cannot guarantee the confidentiality of transport layer. Ip provides logical communication between host Each host has an ip address.
Page 10 of 44

UDP: Extending host to host delivery to process to process delivery is called transport layer multiplexing and demultiplexing Udp and tcp also provide integrity checking by including error detection fields in their segments header. Udp is an unreliable service it does not guarantee that data sent by one process will arrive intact to the destination process. Connectionless : o No handshaking between upp sender and receiver o Each segment handled independently of others It is reliable transfer over UDP when: o Add reliability at application layer o Application specific error recovery Demultiplexing: the job of delivering the data in a transport layer segment to the correct socket is called demultiplexing demultiplexing at receiver side: o use header info to deliver received segments to correct socket how it works: o host receives ip datagrams : each datagram has source ip address and destination ip address each datagram carries one transport layer segment each segment has source destination port number

o host uses ip addresses and port numbers to direct segment to appropriate socket when creating datagram to send into UDP socket must specify : o destination ip address o destination port number Multiplexing:

Page 11 of 44

the job of gathering data chunks at the source host from different sockets encapsulating each data chunk with header information to create segments and passing the segments to the network layer is called multiplexing .

sender side o handle data from multiple sockets o add transport header

Udp check sum provide for error detection That is the check sum is used to determine whether bits within the udp segment have been altered as it moved from source to destination Sender : o puts checksum value into UDP checksum field Receiver : o Compute checksum of received segment o Check if computed checksum equal TCP: TCP socket identified by 4 tuple: o Source ip address o Source port number Destination ip address Destination port number

Chanel with bits error: How to recover from errors : o Acknowledgements : Receiver explicitly tells sender that pkt recovered OK Negative acknowledgements : receiver explicitly tells sender that pkt had errors Sender retransmit pkt on receipt What happens if ack /nak corrupted? o Sender doesnt know what happened at receiver
Page 12 of 44

o Cant just retransmit : there is possible duplicate Handling duplicates : o Sender retransmit current pkt if ack/nak corrupted o Sender adds sequence number to each pkt o Receiver discard ( doesnt deliver up ) the duplicate pkt Midterm prep from slides : Chapter 1 : Host = end systems Transmition rate = bandwidth Protocol = control sending and reciving of msage like tcp/IP/ http Protocols define format order of msgs sent and recived among newrok entites and actions taken on msg transmission recipt . Network edge o Hosts : clients and servers recall that host are end systems Host sends packets of data : Host sending function : o Takes application message o Breaks into smaller chunks known as packets of length L bits o Transmit packet into access network at transmission rate R o Link transmimission rate aka capacity wich is link bandwidth o L/R = time needed to transmit L- bits packet into link . Packet switching : o Hosts break application layer messages into packets o Entire packet mist arrive at router before it can be transmitted on next link Queuing and loss : If arrival rate (in bit) to link exceeds transmission rate of link for a period of time for example from computer to router 100/mps and link to router 1.5 Mbps then: o Packets will queue , wait to be transmitted on link o Packets can be dropped (lost ) if memory fills up
Page 13 of 44

Packet switching Vs circuit switching : Packet switching allows more users to use network The probiblity that 10 user is active for 1/mps is low Packet switching : o Its good for resource sharing o There is possibility of packet delay and loss End systems are connected to internet via access isp (internet service provider) o Access isp in turn must be interconnected o Means that any two hosts can send packets to each other Thtoughput : o Rate (bits/time ) at which bits transferred between sender/reciver Layering : o each layer omplements a service via its own internal layer actions o and its relying on services provided by layer below o application o transport o network o link o physical o application : o supporting network applications : o Transport : o Process data transfer o Network : o Routing of datagrams from source to destination o Link :
Page 14 of 44

ftp smtp http

Tcp and udp

Ip . routing protocols

o Data transfer between neighboring network elements o Physical : o Bits on the wire Chapter 2: Client server architecture : o Server: o Always on host o Permanent ip address o Clients : o Communicate with server o May have dynamic ip address o Do not communicate directly with each other P2p: o Not allways on server o Peers request service from other peers o Peers are intermittently connected and change ip addresses Process communicating : o Process : o Program that running within a host o In same host two process communicating with each other using inter process communication o Process in different hos communicating with each other by exchanging messages Sockets : o Process send or receives msgs from or to its socket o Sockets are like doors to receive messages process must have identifier .
Page 15 of 44

Ethernet 802.111 wifi

o Identifier incudes both IP address and port numbers associated with process on host Data integritiy : o Some app like fire transfer need 100% reliable data Timing o Some applications like interactive games requires low delay to be effective Thoughput o some application requires minimum amount of throughput TCP service : o it is reliable transport between sending and receiving process o Timing o Minimum throughput o Security o There is setup required between client and server process UDP service : o Unreliable data transfer between sending and reciving process o Dosent provide : o Reliability o Flow control o Security Security TCP: o No encryption o Clear text passwords send into socket tranverse internet in clear text o SSL: o Provide encrypted tcp connection o Data integrity
Page 16 of 44

o Does not provide :

o Its in application layer and talk to tcp o When you send a clear text password sent into socket transverse internet encrypted using tcp : o Client initiates tcp connection ( create socket ) to server , port 80 o Server accept tcp connection from client o http messages exchanged between browser http and webserver client o and finally tcp connection close http is stateless meaning o server maintains no information about past client request non-persistent http : o at most one object (like jpg etc) send over TCP connection o after that connection closed o downloading multiple objects requires multiple connections o response time : o RTT: persisten HTTP: o multiple onbjects can be send over one tcp connection between client and server Time for a small packet to travel from client to server and back One rtt to initiate tcp connection o HTTP response time :

isues : non -persistent : o requires 2 rtts per objects two types of http messages : request and response
Page 17 of 44

cookies: o cookies are header line of http response msg o cookies are stored in user host managed by users browser o what cookies good for : o shoping carts o recommendations o user session state web caches: o if many people use a website , that website is stored in cache when another user want to access that data will go to cache and get the website not involved with original server o cache act both as client and server o why we use cache : o reduce response time for client request Electronic mail : o user agent: o as known as mail reader o composing reading or editing reading mail o mail servers: o contains incoming messages for users o msg will be queue of outgoing to be sent o simple mail transfer protocol ( SMTP): o between mail servers to send email messages client : sending mail to mail server server : reciving mail from mail server

o it uses TCP to reliable transfer email message for client to server o direct transfer o three phase of transfer : handshaking transfer of messages closure
Page 18 of 44

o SMPT user persistent connection o Requires hedear and body o Pop 3: o Post office protocol which is for authorization and download o Pop 3 download and keep copies of messages on different clients o Pop 3 stateless across sessions o IMAP: o Internet access protocol ( storing msgs on servers ) o Keep all msg in one places : at server o Allows users to organize msgs P2p application: o Not always on server o Bittorent : o Files are divided into 256kb chunks o Peers in torrent send or receive file chunks o

Chapter 3 : Transport layer: Provide logical communication between application processes running on different hosts Transport protocols run in end systems How to send : o Breaks application messages into segments and then passes to network layer How to receive : o Reassembles segments into messages and then passes to application layer Services that are not available : o Delay guarantees o Bandwidth guarantees
Page 19 of 44

Multiplexing at sender : Handel data from multiple sockets and add transport header

Demutliplexing at receiver: Use the header info to deliver received segments to correct socket

Channels with errors and loss: Underlying channel can also lose packets (data and ack) Checksum sequential number and ack Retransmit will help here but not enough

What should to do: Sender waits reasonable amount of time for ack Retransmit if no ack received in this time In a case when pkt or ack just delayed not lost o Retransmission will be duplicate but because of seq# already handle this o Receiver must specify seq# of pkt being acked Pipelining: Sender allows multiple in flight yet to be ack pkts o Range of sequence numbers must be increased o Buffering at sender or receiver Two types of pipeline protocols: Go back-N o Sender can have up to N unpacked packets in pipeline o Receiver only send cumulative ack o Sender has timer for oldest unacked packet o When timer expires retransmit all unacked packets Ack-only : always send ack for correctly received pkt with highest in-order seq# May generate duplicate acks
Page 20 of 44

o Out-of-order pkt : Discard (dont buffer ) no receiver buffering Re ack pkt with highest in order seq #

Selective repeat o send can have up to N un acked packets in pipeline o receiver send individual ack for each packet o sender maintains timer for each unacked packet o when timer expires retransmit only that unacked packet o receiver individually acknowledges all correctly received pkts o buffers pkts as needed for eventual in order delivery to upper layer o sender only resends pkts for which ack not received o sender timer for each unacked pkt o sender window : N consecutive seq# Limits seq #s of sent , unacked pkts

Tcp over view : Point to point Reliable in order byte stream Pipelined Full duplex data Connection oriented Flow controlled

Congestion: Too many sources sending too much data too fast for network to handle

TCP OVER VEIEW: Tcp provides: multiplexing demultiplexing and error detection Differences of tcp and udp: Udp is connectionless
Page 21 of 44

o No handshaking While tcp is connection oriented o Establish the connection first TCP connection provides for full duplex data transfer Means if there is a process A and host and process B data can flow from A to B at the same time as application level data flows from B to A Also Tcp is point to point means that between a single sender and single receiver which is multicast and transfer of data from one sender to many receivers in a single send operation is not possible with TCP TCP provides reliable data transfer usnign positive ack and timers in much TCP uses pipelining allowing the sender to have multiple transmitted but yet to be acknowledge segments outstanding at any given time TCP provide flow control service : o To is applications by eliminating the possibility of the sender over flowing the receiver buffer o Flow control is thus a speed matching service .matching the rate at which the sender is sending to the rate at which the receiving application is reading o Note that UDP does not provide flow control Recall that when a host sends a segment into a tcp connection it starts a timer; if the timer expires before the host receives an acknowledgment for the data in the segment the host retransmit the segment The time from when the timer is started until when it expires is called the timeout of the timer How long should be timer? o Time out should be larger than the connections round trip time example the time from when a segment is sent until its acknowledged Connection management : before exchange data sender or receiver handshake

Closing the connection: by sending a fin bit =1 Congestion:


Page 22 of 44

Informally too many sources sending too much data too fast for network to handle And the quality of the network will decrees dramatically

Chapter 4 : Network layer : Transform segment from sending to receiving host Network layer in every host : router: o Router: examines header fields in all ip datagrams passing through it Key network layer function: Forwarding : o Move packets from routers input to appropriate router output Routing : o Determine route taken by packets from source to destination Routing algorithm: Determines end to end path through network

Forwarding algorithm: Forwarding table determines local forwarding at this router

Network vs transport layer: Network : between two hosts ( may also involve the routers ) Transport: between two process

Network service model: For individual datagrams: Guaranteed delivery Guaranteed delivery less than 40 msec

For flow of datagrams:


Page 23 of 44

In oreder datagram delivery Guaranteed minimum bandwidth to flow Restrictions on changes in inter packet spacing

IP OR --INTERNET PROTOCOL--: Network links have MTU: max transfer size == largest possible link level frame Ip fragmentation and reassembly: Large ip datagram divided or fragmented in network One datagram becomes several datagrams And will be reassembled only at final destination Here ip header bits will help to indentify the order

IP VER4 addressing: Ip address: 32 bit identifier for every host, router interface What is interface: connection between host/router and physical layer. Each router typically have multiple interfaces Each host has one or two interfaces

Each ip addresses associated with each interface Sub network : ip address : Subnet part : high order bits Host part : low order bits

What is subnetwork : Device interfaces with same sub netpart of ip address Can physically reach each other without intervening router Practice of dividing a network into two or more networks is called sub network

DHCP --Dynamic host configuration protocol:


Page 24 of 44

Goal: allow host to dynamically obtain its ip address from network server when it joins network

Hierarchical addressing: Hierarchical addressing allows efficient advertisement of routing Nat : network address translation : All datagrams leaving the local network have same single source NAT ip address: The network layer has : Routing protocols : o Path selection Ip protocol : o Addressing conventions o Datagram format o Packet handling conventions Icmp protocol : o Error reporting o Router signaling Ip fragmentation, reassembly Each network have MTU : maximum transfer size which is largest possible link level frame Different link have different MTUs Large IP datagram divided or fragmented within network : o In this case one datagram becomes several datagrams o And will be reassembled only at final destination o IP header bits used to identify the order IP Addressing: Ip address : Interface : 32-bit identifier for host and router interface its a connection between host /router and physical link
Page 25 of 44

o Each router have multiple interfaces o Each host typically has one or two interfaces Wired Ethernet interfaces connected by Ethernet switches Wireless wifi interfaces connected by wifi base station Subnet: What is subnet: Device interfaces with same subnet part of ip address

Ip address : Sub net part- high order bits Host part- low order bits

Ip addressing: CIDR : Classless inter Domain Routing Address format : a.b.c.d/x where x is number bits in subnet portion of address DHCP Dynamic host configuration protocol: Dynamically get address from server : which is plug and play Goal : o To allow host to dynamically obtain its ip address from network server when its joins network o DHCP can return more than just allocated ip address on subnet For example : address of first hop router for client Name and ip address of DNS server Network mask

ICANN-- Internet Corporation for Assigned Names and Numbers Internet corporation for assigned Names and numbers :
Page 26 of 44

Allocates addresses Manages DNS Assigns domain names and resolves disputes

NAT -- Network address translation: o All datagrams that leaving the local network have same single source NAT( network address translation ) address : Local network uses just one ip address as far as outside word concerned : o Range of addresses not needed from ISP : just one ip is good enough for all device o Can change addresses of devices in local network without notifying outside world o Can change isp without changing addresses of devices in local network o Devices inside local network not easy to find ip addressee and not visible by outside world ICMP internet control message protocol : Used by host and routers to communicate network level information : Error reporting : o Unreachable host or network or port or protocol Network layer above ip : o Icmp msgs are carried in ip datagrams IPv6 : header format helps speed processing and forwarding Ipv6 datagram format : Fixed length of 40 byte header No fragmentation allowed

iPV6 format : Priority : identify priority among datagrams in flow Flow label: identify datagrams in same flow
Page 27 of 44

Next header : Identify upper layer protocol for data

What other changes from ipv4: Checksum : removed entirely to reduce processing time at each hop Options : allowed but outside of header and indicated by next header field Icmp v6: new version of icmp o Additional message types for example packet too big and etc o Multicast group management function not all routers can be upgraded simultaneously so what should we do ? Tunneling : o Ipv6 datagram carried as payload in ipv4 datagram among ipv4 routers Routing algorithm determines end to end path through network Routing algorithm that finds that least cost path

Forwarding table determines local forwarding at this router Job of inter as routing : Also know as interior gateway protocols Learn which destination are reachable through AS2 which through AS3 Propagate this reachability info to all routers in AS1(the one its in ) and this is job of inter as routing (page 100) Hot poato routing : send packet towards closest of two routers. Routing information protocols : Distance metric and the number of hops should not exceed 15 (max = 15 hops) and each link has cost of 1 Dvs exchange with neighbors every 30 sec in response If no advertisement heard after 180 second then neighbor or link declared dead

Open shortest path first:


Page 28 of 44

Open publicly available Ospf advertisement carries one entry per neighbor Advertisements flooded to entire AS o Carried in ospf messages directly over ip rather than tcp or udp

Ospf advance futures that are not in Routing Information Protocol: Security : all ospf message authenticated to prevent malicious intrusion Multiple same cost paths allowed, only one path in rip

Hierarchical osps : Two level hierarchy : o Local area Link state advertisements only in area o Backbone Area border routers : o Summarize distance to nets in own area advertise to other area border routers Back bone routers : o Run ospf routing limited to backbone Boundary routers : o Connect to other AS BGP border gateway protocol Glue that holds the internet together

Ebgp : obtain subnet reachability information from neighboring Ass IBGP : propagate reachability information to all AS internal routers Bgp route selection : Router may learn about more than 1 route to destination AS, Select ts route based on : o Local preference value attribute o Shortest AS-Path o Closest next hot router
Page 29 of 44

o Additional criteria Bgp massage : BGP message exchanged between peers over TCP connection BGP message : o Open : open TCP connection to peer and authenticates sender o Update : Advertises new path o Keep Alive:keep connection alive in absence of updates and also acks open request o Notification : reports errors in previous message and also used to close the connection Broadcast Routing: Deliver packets from source to all other nodes Source duplication is inefficient so : o Flooding : when node receives broadcast packet sends copy to all neighbors o But there is problem with this : Cycles and broadcast storm Node only broadcast pkt if it hasnt broadcast same packet before no redundant packets received by any node o Flooding control : o Spanning tree:

Pim : protocol independent multicast Not depending on specific routing algorithm Dense : o Grouped members densely packed in close proximity Spare : o Number of network with group members small wrt interconnected networks Extra summery chapter 4: 3 main important network layer functions:
Page 30 of 44

Path determination : o Must determine the route or path taken by packets as they flow from sender to receiver and the algorithm is routing algorithm

Switching : o When a packet arrives at the input to a router the router must move it to the appropriate output link

Call setup : o In analoguse manner , some network layer requires that the routers along the chose path from source to destination handshake with each other in order to setup state before data actually begins to flow this is call setup. The network layer of the internet does not perform any such call setup

Recall virtual circuit : all packets between a given source and destination will take the same path Job of routing algorithm is to find a good path from source to destination A good path is one with lowest cost

Global routing algorithm: has complete information about connectivity and link cost or link state algorithm

Decentralize : 2 different routing algorithm , static or dynamic : Static routing :routers change very slowly over time Dynamic routing : change the routing path as the network traffic loads

Link state algorithm: All cost are known this is happening because all other nodes are broadcast the identities and cost of tots attached links to other nodes DISTANCE VECTOR ROUTING: each node receives some information from one or more of its directly attached neighbors
Page 31 of 44

Link state : in the link state algorithm : All nodes broadcast their link state information to all nodes in the network giving all nodes a common global view of the networks topology. Each node then runs shortest path algorithm using this network topology to determine the least cost path from itself to all other nodes in the network Packets then routing along these least cost paths

Distance vector algorithms: each node communicate only with its directly connected neighbors and exchanging its estimates of its least cost to reach each node in the network node doesnt know the entire least cost path from source to destination

link state and distance vector algorithm dont have hierarchical network topology internet routing has a hierarchy : in each which network layer datagram carries the ip address of the final destination of the datagram . this address us used by a router in forwarding the datagram toward its final destination

in Virtual circuit network each packet of data carries a virtual number which is used by a switch in forwarding the packet of data toward its destination. Forwarding Vs routing: Forwarding : forwarding refers to the per router action of moving a packet arriving at an input port to the appropriate output port routing : routing refers to the process of determining the end to end path that a packet will take through the network BGP is only protocol used to route datagrams amoung autonomus systems and its glue of internet
Page 32 of 44

Tunneling : can be used to connect two routers logically over a pth that contains multiple routers : this allows two ipv6 routers to exchange ipv6 datagrams with each other via router that only speak ipv4 Router hirarculy : there is two big problem : o Scale o Administrative autonomy Both of these prboblems can be soleved by aggregating routers into regions or autonomus System and they have information about each other The routing algorithm running within an autonomous system which is the region is called an intra autonomous system routing protocol Routers that have responsibility of for routing packets to destinations outside the AS is called gateway routers The routing algorithm that gateways use to route among the varuous as as known as inter autonomous system routing protocol The network protocol in internet is ip protocol : Host is end system , when ip in the host wants to send a datagram it passes the datagram to its link the boundary between host and the link is called interface Ip address has two parts: Network Host How to assign a Ip: o Manual configuration By network administrator Is plug and play : A dhcp server in a network receives dhcp request from client and in the case of dynamic address allocation allocates an ip address back to the requesting client uses in LAN and residential
Page 33 of 44

o Dynamic host configuration DHCP

Ipv6 doesnt have fragmentation The maximum amount of data that link layer packet can carry is called the mtu ( maximum transfer unit )

Fragmentation: suppose you receive an ip datagram from one link you check your routing table to determine the outgoing link and this outgoing link has mtu that is smaller than length of the ip datagram the solution is fragment the data in the ip datagram among two or more smaller ip datagrams In ipv4 the job of datagram reassembly in the end systems rather than in the network ICMP : Internet control message protocol : The most typical use of icmp is for error reporting Icmp messages are carried inside ip packets

Intra autonomous system: Routing protocol is used to configure and maintain the routing tables within an autonomus systems Routing information control: Version of rip is uses hop count as cost metric example each link has cost of 1 and limits the max cost to a path 15 Recall that in vector protocols neighboring routers exchange routing information with each other. In the routing information protocol the routing tables are exchanged between neighbors every 30 seconds using rips this is called response message

Page 34 of 44

With each response message containing that hosts routing table entries for up to 25 destination networks. These response messages that containing routing tables are also called advertisement.

Routers send routing information protocol request and response messages to each other via udp

Open shortest path first : Some advance embodied in ospf : o Security : all exchanges between ospf router are authenticated o Multiple same cost path : when multiple paths to destination have same cost ospf allows multiple paths to be used o Different cost metrics for different tos traffic : ospf allows each link to have different costs for type of service ip packets o Integrated support for unicast and multicast routing :multicast ospf provides simple extensions to ospf to provide for multicast routing Backbone: the primary role of the backbone area is to route traffic between the other areas in the AS.

BGP border gateway protocol : Provides the mechanisms to distribute path information among the interconnected autonomous systems , but leave Provides mechanisms for distributing path information It is the protocol which makes core routing decisions on the internet It maintains a table of ip networks or prefixes which designate network reachability among autonomous systems Sends entirely path information to neighbors In bgp the immediate neighbors in the graph of Ass are called peers BGP protocol defines the four types of messages : o Open o Update
Page 35 of 44

o Notification o Keep alive BGP connection inside AS is IBGPinterior broad gateway protocol is routing within organization BGP connection outside AS is EBGPexterior routing protocol is routing between different organization outside of IPV6: Size of the ip address from 32 to 128 Header of 40 instead of 20 3 filed of ipv4 is gone in ipv6: o Fragmentation : No more , if the packet is too big sends a msg that packet is too big via icmp Tcp and udp is handling this part so there is no use of having this Instead of options field is one of possible next headers pointed to from within the ipv6 header . recall that the ICMP protocol is used by ip nodes to report error conditions and provide limited information Tunnelling: suppose two nodes whatnots so communicate with each other A and E A is ipv6 and E is IpV6 too however between theme there are IPV4 we refer to the intervening set of ipv4 routers between two ipv6 routers as tunnel Problem with multicast communication: recall multicast : is the delivery of message or information to a group of destination computers simultaneously in single transmission from the soure.implemented in ip multicast udpuser datagram protocol is using multicast routing how to identify the receivers of a multicast datagram and
Page 36 of 44

o Checksum : o Option :

how to address a datagram sent to these receivers

Internet group management protocol : Multicast routing: Nat : is process of modifying ip address information in ip packet headers while in transit across a traffic routing device in the private network the ip address is different and when it comes out of the privet network then Nat gives the public ip address trace route : is tool for displaying the route path and measuring transit delays of packets across an internet protocol Aggregate routers into regions: autonomous systems Routers in same as run same routing protocol: intra As routing inter As routing : the job is to learn which destinations are reachable through AS2 or AS3 propagate this reachability info to all routers in AS1 this is job of AS routing ebgp : obtain subnet reachable information for neighboring ibgp : propagate reach ability information to all AS internal routers hafer notes : the essential service is to delivery of data from one end system to another end system internet protocol suite chose to implement reliable delivery in the transport layer using TCP Virtual circuit:
Page 37 of 44

the goal of multicast routing then is to find a tree of links that connects all of the routers that have attached hosts belonging to the multicast group . find a tree that connects all routers with already connected host to all multicast groups

in vc network connections are established at the network layer rather than at the transport layer . because routers dedicate resources to a connection vc network can make guarantees of quality of services for a flow of data in connection

in ipv4 there is a field : identification : identification is a unique id for this datagram which is used on the receiving end to reassemble fragments. There are two types of ip addresses : unicast and o over the entire internet a unicast address is associated with exactly one network interface multicast o specifies of unicast ip addresses and the set can change dynamically as systems join and leave the multicast group recall Nat ( to communicate with the global internet a technique called network address translation or NAT is used to map private addresses to globally routable addresses Router: is digital system whose purpose is to forward datagrams from one host to another Router protocol: is used to propagate routing information from one router to another routing protocol software process this information and uses it to define entries in the routers forwarding table the ip forwarding algorithm is used to decide which network interface should be used to transmit an ip datagram the forwarding algorithm uses the information in forwarding table to decide which interface should be used to forward a datagram towards the destination or basically the forwarding algorithm uses the forwarding table to determine the next hop for the datagram
Page 38 of 44

unicast ip : a uncast ip address can be assigned to at most one network interface also you can assignee multi uncast ip address to a one interface but you can not assignee same uncast ip address to another interface summary : forwarding tables hold the information required to forward datagrams from a source to destination routing protocols are used to exchange routing information and update the entries in the forwarding tables. The ip forwarding algorithm examines the entries in the forwarding tables to decide which network interface should be used to transmit a datagram the ip address of the next router also called first hop router or gateway along the route to the destination this field will be null if a destination matching the prefix is on the same subnet and thus can be delivered with no further need for forwarding by a router. Metric in the forwarding table is the number of routers that must forward the datagram before it reaches its destination DHCP : dynamic host configuration protocol : is a network protocol that is used to configure network devices so that they can communicate on an ip network A DHCP client uses the dhcp protocol to acquire configuration information such as an ip address a default route and one more dns server addresses from a dhcp server Then dhcp client then uses this information to configure its host Once the configuration process is complete the host is able to communicate on the internet To route datagrams within an AS routers communicate information using interior gateway protocol Recall AS : an autonomous system AS is group of networks like group of routers under the control of a single administrative entity

Page 39 of 44

A route datagrams between ASs routers will communicate information using an exterior gateway protocol--- EGP To communicate routing information routers use routing protocols Distance vector routing algorithm exchange information in the form of destination and metric pairs , destinations are define in terms of forwarding prefix and the metric is a property of the entire route to the destination

Each router publishes a list of destination and metric pairs and sends theme to adjacent routers Triggered update: augments the requirement for periodic route updates with a requirement that a router send an immediate update when the metric for a route change Routers that relay datagrams from one AS to another are called border or boundary routers. Routers in the interior of an AS are interior routers

Chapter 5 link layer : Nodes are: host s and routers Data link layer has responsibility of transferring datagram from one node to physical adjacent node Packet exchanged by a link layer protocol are called frames and that each link layer frame typically encapsulates one network layer datagram The network layer protocol has the node to node job of moving a network layer datagram over single link in the path Transportation analogy : Example of traveling from Vancouver to Toronto Tourist = datagram Transport segment like Vancouver Torontocity = communication link
Page 40 of 44

Transportation mode like air plane , train =link layer protocol Travel agent who plan the trip = routing algorithm

The basic service of the link layer is to move datagrams from one node to an adjacent node over a single communication link Framing or link access: A frame consist of a data field in which the network layer datagram is inserted and number of header fields A data link protocol specifies the structure of the frame as well as a channel access protocol that specifies the rules by which a frame is transmitted onto the link Mac addresses

Link layer services : Flow control : o Without flow control the receivers buffer can overflow and frames can get lost to prevent the sending node on one side of a link from overwhelming the receiving node on the other side of the link we use flow control Error detection o Can be zero inserted of 1 and this cause by electromagnetic noise o And then there is no need to forward a datagram that has an error o Error detection will detect the presence of one or more errors o Error which caused by signal o And receiver detects presence of errors : Signals sender for retransmit ion or drops frame Error correction o Same as detection and o Error correction is similar to error detection except that receiver can not only detect whether errors have been introduced in the frame but can also determine exactly where in the frame the errors occurred o Receiver identifies and correct the bit error Half duplex and full duplex
Page 41 of 44

o With full duplex transmission both nodes at the ends of a link may transmit packets at the same time o With half duplex nodes at both ends of link can transmit but not at same time Link layer implemented in each and every host Both link layer and transport layer can provide reliable delivery but there reliable delivery are not same as each other o A transport protocol provides reliable delivery between two processes on an end to end basis a o reliable link protocol : provides the reliable delivery service between two nodes connected by a single link And implemented in adapter as known as network interface card

Scenario of adapters communication: Sending side : o Encapsulates datagram in frame o Add the error checking bits like flow control Receiving side : o Looks for errors o Extract datagram and passing it to upper layer at receiving side Two types of network links : o Point to point o A point to point link consists of a single sender on one end of the link and single receiver at the other end of the link o Broadcast link o Can have multiple sending and receiving nodes all connected to the same single shared broadcast channel All nodes are capable of transmitting frames more than two nodes can transmit frames at the same time. When this happens all of the nodes receive multiple frames at the same time that is the transmitted frames collide at all of the receivers
Page 42 of 44

In order to ensure that broadcast change performs useful work when multiple nodes are active it is necessary to somehow coordinate the transmissions of the active nodes, the coordination job is the responsibility of the multiple access protocol Family of CSMA Carrier sensing (if a node transmuting to channel wait until is finish) a node listens to the channel before transmitting this is same as when someone else is speaking wait until they are done , o If a frame from another node is currently being transmitted into the channel a node then waits back off a random amount of time and then again sense the change Collision detection(when is transferring check if others want to transfer) A transmitting node listens to the channel while it is transmitting . if it detects that another node is transmitting an interfering frame it stops transmitting and uses some protocol to determine when it should next to transmit o LAN address is called physical address also called Ethernet address or mac o no two adapters have same address when a node wants to send a datagram to other nodes needs to know the ip and lan address but how does it know ARP is responds with corresponding lab address o so we see that APR resolves an ip address to lan address Framing: we need to be able to tell when a frame starts and ends , this is called framing . Error detection in the link layer: link layer retransmission is the technique of choice to recover from errors either net does not provide reliable delivery contention slot : o is the minimum time interval required for all stations to sense a collision of two frames determined from signal propagation delay and LAN size limit Modern Ethernet :
Page 43 of 44

they do not really use CSMAcareer senesce multiple cast instead modern Ethernets use switched hubs with ports interconnected by a switching fabric capable of high speed data transfer

Switched hub : o a switched hup switches frames between ports just as router switches datagrams between ports but it makes its forwarding decisions based on link layer addresses instead of network layer addresses modern store and forward hubs provide the capability to buffer a frame before forwarding it to the specified output port o one of the futures of modern Ethernet is that the system may never sea collision for efficiency of sending a ip datagram : o a underlying assumption for efficiency is that host will maintain a cache of network layer to link layer address translations . o when a host is ready to send an ip datagram it first checks this cache to see if it already knows the associated link layer address how does APR ( address resolution protocol works :

Page 44 of 44

Anda mungkin juga menyukai