410 likes | 589 Views
Chapter 4 Network Layer. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012. CPSC 335 Data Communication Systems Readings: 4.6.3, 4.7, 4.7.1, 4.7.2 David Nguyen Adapted from Kurose Ross David Kauchak (Stanford University).
E N D
Chapter 4Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith RossAddison-WesleyMarch 2012 • CPSC 335 Data Communication Systems • Readings: 4.6.3, 4.7, 4.7.1, 4.7.2 • David Nguyen • Adapted from Kurose Ross • David Kauchak (Stanford University) Transport Layer
4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Chapter 4: outline Network Layer
Internet inter-AS routing: BGP • BGP (Border Gateway Protocol):the de facto inter-domain routing protocol • “glue that holds the Internet together” • BGP provides each AS a means to: • eBGP: obtain subnet reachability information from neighboring ASs. • iBGP: propagate reachability information to all AS-internal routers. • determine “good” routes to other networks based on reachability information and policy. • allows subnet to advertise its existence to rest of Internet: “I am here” Network Layer
2c 2b 1b 1d 1c 3c BGP message 3a 3b 2a 1a AS1 BGP basics • BGP session:two BGP routers (“peers”) exchange BGP messages: • advertising pathsto different destination network prefixes • exchanged over semi-permanent TCP connections • when AS3 advertises a prefix to AS1: • AS3 promises it will forward datagrams towards that prefix AS3 other networks other networks AS2 Network Layer
4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Chapter 4: outline Network Layer
duplicate creation/transmission duplicate duplicate in-network duplication sourceduplication R1 R2 R3 R4 R1 R2 R3 R4 Broadcast routing • deliver packets from source to all other nodes • source duplication is inefficient: Network Layer
In-network duplication • flooding: when node receives broadcast packet, sends copy to all neighbors • problems: cycles & broadcast storm • controlled flooding: node only broadcasts pkt if it hasn’t broadcast same packet before • node keeps track of packet ids already broadcasted • spanning tree: • no redundant packets received by any node Network Layer
(b) broadcast initiated at D (a) broadcast initiated at A G G D D B A B A E E F F c c Spanning tree • = subset of edges with no cycle that connects all vertices • nodes then forward/make copies only along spanning tree Network Layer
Minimum spanning tree • = subset of edges with no cycle and the lowest weight that connects all vertices • ~ plow snow on roads so that cities stay connected during calamities • Input: An undirected, G=(V,E) • Output: A tree T=(V,E’) where E’ E that minimizes
A B D C E F C F E D B A MST example 1 3 4 4 2 5 4 4 6 1 4 2 5 4
A B D C F E MSTs • Can a MST have a cycle? 1 4 2 5 4 4
A B D C F E MSTs • Can an MST have a cycle? 1 4 2 5 4
Applications? • Connectivity • Networks (e.g. communications) • Circuit desing/wiring • hub/spoke models (e.g. flights, transportation) • Traveling salesman problem?
Prim-Jarnik algorithm to find MST • Developed in 1930 by Czech Jarnik and later independently by American Prim in 1957
Prim-Jarnikalgorithm • Start at some root node and build out the MST by adding the lowest weighted edge at the frontier
E B D C E F A A B D C F Prim-Jarnik 1 3 4 MST 5 4 2 4 4 6
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 4 6 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 4 4 6 6 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 4 4 6 6 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
A B D C E F A C F E D B Prim-Jarnik 1 3 4 MST 5 4 2 4 5 1 4 4 6 4 2 0
legend group member not group member router with a group member router without group member source-based trees Multicast routing: problem statement • deliver packets from source to someother nodes • tree:not all paths between routers used • shared-tree:same tree used by all group members • source-based:different tree from each sender to rcvrs shared tree Network Layer
4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol datagram format, IPv4 addressing, ICMP, IPv6 4.5 routing algorithms link state, distance vector, hierarchical routing 4.6 routing in the Internet RIP, OSPF, BGP 4.7 broadcast and multicast routing Chapter 4: done! • understand principles behind network layer services: • network layer service models, forwarding versus routing how a router works, routing (path selection), broadcast, multicast • instantiation, implementation in the Internet Network Layer
How to get a dream job at big IT companies? Tips based on personal experience and “Cracking the Coding Interview” Google and amazon interview tips! TransportLayer
What questions should you ask the interviewer? • Quality of your questions will be a factor, whether subconsciously or consciously, in their decisions • You can - and should - prepare questions in advance • Doing research on the company or team may help you with preparing questions. TransportLayer
Genuine Questions • These are the questions you actually want to know • “How much of your day do you spend coding?” • “How many meetings do you have every week?” • “What is the ratio of testers to developers to product managers? What is the interaction like? How does project planning happen on the team?” TransportLayer
Insightful Questions • to demonstrate your deep knowledge of programming or technologies • “I noticed that you use technology X.How do you handle problem Y?” • “Why did the product choose to use the X protocol over the Y protocol? I know it has benefits like A, B, C, but many companies choose not to use it because of issue D.” TransportLayer
Passion Questions • to demonstrate your passion for technology • “I’m very interested in scalability. Did you come in with a background in this, or what opportunities are there to learn about it?” • “I’m not familiar with technology X, but it sounds like a very interesting solution. Could you tell me a bit more about how it works?” TransportLayer