ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Similar documents
Border Gateway Protocol (BGP)

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Internet. Organization Addresses TCP/IP Protocol stack Forwarding. 1. Use of a globally unique address space based on Internet Addresses

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

The Interconnection Structure of. The Internet. EECC694 - Shaaban

IP Protocols. ALTTC/Oct

CSCI Computer Networks Fall 2016

CS 3516: Advanced Computer Networks

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

cs144 Midterm Review Fall 2010

Lecture 19: Network Layer Routing in the Internet

Network Model. Why a Layered Model? All People Seem To Need Data Processing

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

internet technologies and standards

CS 457 Lecture 11 More IP Networking. Fall 2011

Master Course Computer Networks IN2097

CSCE 463/612 Networks and Distributed Processing Spring 2018

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

Internet Protocol (IP)

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

Networking: Network layer

Introduction to Information Science and Technology 2017 Networking II. Sören Schwertfeger 师泽仁

Network Layer PREPARED BY AHMED ABDEL-RAOUF

CSC 401 Data and Computer Communications Networks

Network Layer: Control/data plane, addressing, routers

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Review of Important Networking Concepts

CS4450. Computer Networks: Architecture and Protocols. Lecture 20 Pu+ng ALL the Pieces Together. Spring 2018 Rachit Agarwal

Introduction to routing in the Internet

Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

COMP211 Chapter 4 Network Layer: The Data Plane

Network layer: Overview. Network Layer Functions

TCP/IP Networking Basics

IPv4. Christian Grothoff.

Internetworking Part 2

Network Security Fundamentals. Network Security Fundamentals. Roadmap. Security Training Course. Module 2 Network Fundamentals

NAT, IPv6, & UDP CS640, Announcements Assignment #3 released

Homework 3 Discussion

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

Chapter 4 Network Layer: The Data Plane. Part A. Computer Networking: A Top Down Approach

CSC458 Lecture 6. Administrivia. Inter-domain Routing IP Addressing. Midterm will Cover Following Topics (2) Midterm will Cover Following Topics

ROUTING INTRODUCTION TO IP, IP ROUTING PROTOCOLS AND PROXY ARP

CS 3516: Computer Networks

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Internetworking. different kinds of network technologies that can be interconnected by routers and other networking devices to create an internetwork

CSC 401 Data and Computer Communications Networks

ECE 158A: Lecture 7. Fall 2015

ITEC310 Computer Networks II

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

The Network Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

EEC-684/584 Computer Networks

Outline. Addressing on the network layer ICMP IPv6 Addressing on the link layer Virtual circuits

CS4450. Computer Networks: Architecture and Protocols. Lecture 13 THE Internet Protocol. Spring 2018 Rachit Agarwal

Top-Down Network Design

Inter-networking. Problem. 3&4-Internetworking.key - September 20, LAN s are great but. We want to connect them together. ...

Hands-On Network Security: Practical Tools & Methods

End-to-End Communication

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

TCP/IP Networking. Training Details. About Training. About Training. What You'll Learn. Training Time : 9 Hours. Capacity : 12

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

Chapter 4: Network Layer

Da t e: August 2 0 th a t 9: :00 SOLUTIONS

1-1. Switching Networks (Fall 2010) EE 586 Communication and. October 25, Lecture 24

Top-Down Network Design, Ch. 7: Selecting Switching and Routing Protocols. Top-Down Network Design. Selecting Switching and Routing Protocols

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

The Internet. The Internet is an interconnected collection of netw orks.

Internet Control Message Protocol (ICMP)

Auxiliary protocols. tasks that IP does not handle: Routing table management (RIP, OSPF, etc.). Congestion and error reporting (ICMP).

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Computer Networks

Vorlesung Kommunikationsnetze

The Internet Protocol (IP)

Routing. Directly Connected IP Networks. Data link layer routing. ifconfig command

Lecture 8. Network Layer (cont d) Network Layer 1-1

Review for Chapter 4 R1,R2,R3,R7,R10,R11,R16,R17,R19,R22,R24, R26,R30 P1,P2,P4,P7,P10,P11,P12,P14,P15,P16,P17,P22,P24,P29,P30

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Introduction to routing in the Internet

Special expressions, phrases, abbreviations and terms of Computer Networks

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

Lecture 20: Link Layer

Where we are in the Course

IP Addressing & Interdomain Routing. Next Topic

Putting it all together

CMPE 80N: Introduction to Networking and the Internet

Transcription:

ELEC / COMP 177 Fall 2011 Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Homework #6 - Presentation on security/ privacy Topic selection Due Tuesday, Nov 22 nd Slides Due Monday, Nov 28 th Present! Tuesday, Nov 29 th (and Thursday) Project #3 Due Tue, Dec 6 th 2

3

Reached an important milestone in the last class Successfully sent a single IP packet across the global Internet Now know all of the key protocols and standards necessary to accomplish that task Let s review the semester to date 4

7 1 6 6 2 0-1500 0-46 4 Preamble SFD DA SA Type Data Pad CRC Gap Destination MAC address Source MAC address Type (of encapsulated data) The data! Who assigns the source address? Does it contain information on network location? If I just have an Ethernet frame, where can I send data to? 5

How is a Ethernet switch better than a hub? How does a switch learn the location of computers on the network? (what field) What is stored in the forwarding table? MAC address, output port 6

Why can t we use Ethernet for global communication? Broadcasts to find location of computers too much bandwidth to do worldwide Loops Ethernet uses spanning tree to prevent loops Can t have a single root of the Internet! Address contains no information about location on network Would need to have a forwarding table with one entry for every PC on the Internet we want to communicate with i.e. a single worldwide phonebook with no shortcuts! 7

1 byte 1 byte 1 byte 1 byte Version HdrLen Type of Service Total Length Identification Flags Fragment Offset Time- To- Live Protocol Header Checksum Source IP Address Destination IP Address Options and padding (optional) Payload 8

Are IP packets separate from Ethernet frames? Bytes: 7 1 6 6 2 20-60 0-1480 0-26 4 Preamble SFD DA SA 0x0800 IP Headr Data Pad CRC IP Datagram Time- to- live field: what s it used for? 9

Destination MAC Address Destination MAC Address Source MAC Address Source MAC Address Type (0x0800) Total Length Version HdrLen Type of Service Identification Flags Fragment Offset Time- To- Live Protocol Header Checksum Source IP Address Destination IP Address Options and Padding Source IP Address Destination IP Address Options and Padding Payload Payload Ethernet CRC 10

Where does the source IP address come from? DHCP (possibly running on the router) Where does the destination IP address come from? DNS can be used to translate a host name from the user (e.g. www.pacific.edu) into an IP address (e.g. 138.9.110.12) 11

Ethernet switches forward packets based on destination MAC address What do routers forward packets based on? Destination IP address What is in the router s forwarding table? Prefixes, e.g. 138.16.9/24 Next hop IP + exit port What happens if more than one prefix matches the destination IP address? Longest prefix match determines winner 12

Forwarding Move packets from router s input to appropriate router output Longest prefix match (LPM) Routing Determine path (route) taken by packets from source to destination Routing algorithms such as RIP and OSPF 13

Send a single IP packet from Pacific to the main Moscow State University web server My IP: 138.9.253.252 MSU s IP: 93.180.0.18 14

How does this actually work? traceroute to www.msu.ru (93.180.0.18), 30 hops max, 60 byte packets 1 10.10.5.252 (10.10.5.252) [AS65534] 0.679 ms 0.736 ms 0.760 ms 2 10.0.0.93 (10.0.0.93) [AS1] 0.746 ms 0.823 ms 0.929 ms 3 10.0.0.90 (10.0.0.90) [AS1] 0.675 ms 0.695 ms 0.684 ms 4 138.9.253.252 (138.9.253.252) [*] 1.900 ms 1.894 ms 1.885 ms 5 74.202.6.5 (74.202.6.5) [*] 5.580 ms 5.575 ms 5.565 ms 6 nyc2-pr2-xe-1-2-0-0.us.twtelecom.net (66.192.253.150) [AS4323] 79.473 ms 76.655 ms 76.484 ms 7 ae6-2.rt.tc1.sto.se.retn.net (87.245.233.249) [AS9002] 177.970 ms 178.061 ms 178.052 ms 8 GW-RUNNet.retn.net (87.245.249.50) [AS9002] 179.340 ms 179.508 ms 179.369 ms 9 kt12-1-gw.spb.runnet.ru (194.85.40.141) [AS3267] 195.699 ms 195.706 ms 195.709 ms 10 b57-1-gw.spb.runnet.ru (194.85.40.153) [AS3267] 195.688 ms 195.680 ms 195.655 ms 11 m9-1-gw.msk.runnet.ru (194.85.40.133) [AS3267] 195.658 ms 195.643 ms 195.600 ms 12 m9-2-gw.msk.runnet.ru (194.85.40.214) [AS3267] 197.311 ms 194.277 ms 194.209 ms 13 msu.msk.runnet.ru (194.190.255.234) [AS3267] 194.287 ms 194.203 ms 194.611 ms 14 93.180.0.191 (93.180.0.191) [AS2848] 194.248 ms 194.751 ms 194.580 ms 15 93.180.0.187 (93.180.0.187) [AS2848] 194.950 ms 194.936 ms 194.888 ms 16 www.msu.ru (93.180.0.18) [AS2848] 194.633 ms!x 194.527 ms!x 194.776 ms!x 15

1.) Time Warner Telecom 2.) RETN Name 3.) Runnet - State Institute of Information Technologies & Telecommunications 4.) Moscow State University 16

Assume that I know My own MAC address (hardwired on the NIC) My own IP address (assigned via DHCP to be within my local subnet) The subnet mask for my local network The IP address of my gateway router leading outside The IP address of MSU that I want to send a message to 17

What happens first? Compare destination IP with my IP and subnet mask My IP: 138.9.110.104 My subnet mask: 255.255.255.0 Thus, my subnet is 138.9.253/24 Destination IP of 93.180.0.18 is (way!) outside my LAN 18

The destination is outside of my LAN. What happens next? Need to send packet to gateway router What does the Ethernet/IP packet look like? Destination MAC:??? Source MAC: My MAC Destination IP: MSU s IP Source IP: My IP TTL: 64 (a reasonable default) 19

How do I get the MAC address of the router port attached to my LAN? I know my gateway router s IP address Use ARP (Address Resolution Protocol) Who receives my ARP request? Everyone broadcast to all hosts on LAN Who has 138.16.110.1? Tell 138.9.110.104 Who replies to my ARP request? Only the host (if any) with the requested IP address. This should be the router 20

Assume there is an Ethernet switch between you and the router What happens if the switch has seen the MAC address of the router before? Packet is sent out only the port that faces the router What happens if the switch has not seen the MAC address before? Packet is broadcast out all ports Switch always learns (or re- learns) from each packet 21

The packet reaches your gateway router (first router between here and MSU) What does the router do? Verify checksums Longest prefix match on destination IP address What information is returned from router s forwarding table? Next hop IP address (of subsequent router, or final host) Output port 22

Assume the next hop is also connected to this router via Ethernet What do we need to know to send a message to this router? Its MAC address How do we find this? Router does ARP (just like hosts do ARP) 23

How does the router modify the packet when retransmitting? Destination MAC = change to be MAC of next hop Source MAC = change to be MAC of this router Destination IP = unchanged Source IP = unchanged TTL = decrement by 1 Checksum = recalculated 24

This process of re- transmitting a packet repeats for many routers across the network 16 in this example Eventually, however, the next hop in the forwarding table is the actual destination computer Packet has arrived! Is that all the complexity in the Internet? No forwarding tables in the router aren t created by magic! 25

In addition to forwarding packets, routers are busy (asynchronously) calculating least- cost routes to destinations Goal: Have the forwarding table ready by the time your packet arrives with a specific destination What happens if the forwarding table isn t ready, and there is no entry for your destination? Packet is dropped you lose 26

What is an autonomous system? Grouping of routers owned/administered by a single entity Can a company only have a single autonomous system? No, can have multiple AS s Why might I have more than one? Better routing for geography (i.e. North America versus Europe versus Asia) Other reasons 27

AS A AS B AS C BGP BGP Interior Routing Protocol Interior Routing Protocol Interior Routing Protocol Stub AS Transit AS e.g. backbone service provider Stub AS 28

traceroute to www.msu.ru (93.180.0.18), 30 hops max, 60 byte packets 1 10.10.5.252 (10.10.5.252) [AS65534] 0.679 ms 0.736 ms 0.760 ms 2 10.0.0.93 (10.0.0.93) [AS1] 0.746 ms 0.823 ms 0.929 ms 3 10.0.0.90 (10.0.0.90) [AS1] 0.675 ms 0.695 ms 0.684 ms 4 138.9.253.252 (138.9.253.252) [*] 1.900 ms 1.894 ms 1.885 ms 5 74.202.6.5 (74.202.6.5) [*] 5.580 ms 5.575 ms 5.565 ms 6 nyc2-pr2-xe-1-2-0-0.us.twtelecom.net (66.192.253.150) [AS4323] 79.473 ms 76.655 ms 76.484 ms 7 ae6-2.rt.tc1.sto.se.retn.net (87.245.233.249) [AS9002] 177.970 ms 178.061 ms 178.052 ms 8 GW-RUNNet.retn.net (87.245.249.50) [AS9002] 179.340 ms 179.508 ms 179.369 ms 9 kt12-1-gw.spb.runnet.ru (194.85.40.141) [AS3267] 195.699 ms 195.706 ms 195.709 ms 10 b57-1-gw.spb.runnet.ru (194.85.40.153) [AS3267] 195.688 ms 195.680 ms 195.655 ms 11 m9-1-gw.msk.runnet.ru (194.85.40.133) [AS3267] 195.658 ms 195.643 ms 195.600 ms 12 m9-2-gw.msk.runnet.ru (194.85.40.214) [AS3267] 197.311 ms 194.277 ms 194.209 ms 13 msu.msk.runnet.ru (194.190.255.234) [AS3267] 194.287 ms 194.203 ms 194.611 ms 14 93.180.0.191 (93.180.0.191) [AS2848] 194.248 ms 194.751 ms 194.580 ms 15 93.180.0.187 (93.180.0.187) [AS2848] 194.950 ms 194.936 ms 194.888 ms 16 www.msu.ru (93.180.0.18) [AS2848] 194.633 ms!x 194.527 ms!x 194.776 ms!x 29

AS Name 65534 Reserved (private use) Pacific internal net 0 Reserved (non- routed networks) Pacific internal net 18663 University of the Pacific Traceroute didn t resolve this for some reason and reported [*] 4323 Time Warner Telecom 9002 RETN 3267 Runnet - State Institute of Information Technologies & Telecommunications (SIIT&T "Informika") 2848 Moscow State University 30

First AS is Pacific s (AS18663) Do a lookup on the AS http://www.ripe.net/data- tools/stats/ris/routing- information- service https://www.dan.me.uk/bgplookup http://www.peeringdb.com/ Among other places Pacific s gateway(s) to the Internet advertise a BGP prefix (aka subnet) 138.9.0.0/16 31

An advertisement is a promise: If you give me packets destined for IP addresses in this range, I will move them closer to their destination. In this case, we are the destination! This advertisement originates from our AS 32

Pacific buys Internet service from Time Warner (AS4323), which has border routers that speak BGP Pacific s routers talk to their routers, and they learn of our advertisement for 138.9.0.0/16 Now, Time Warner knows how to reach Pacific s IPs We also learn of their advertisements! Both for prefixes originating at those ISPs, and prefixes reachable through those ISPs 33

When Time Warner give our routers their BGP announcements, do we get lots of tiny entries like 138.9.0.0/16? Maybe But, routes can be aggregated together and expressed with smaller prefixes, e.g. 138.0.0.0/8 Reduces communication time plus router CPU and memory requirements 34

Pacific had only 1 announcement Time Warner originates ~1620 announcements (as of Nov 2011) Some are large, e.g. 173.226.0.0/15 Some are small, e.g. 159.157.233.0/24 Time Warner also provides transit to their downstream customers prefixes, including Pacific s prefix Total of ~6563 announcements (as of Nov 2011) We get this full list, as does ever other (BGP- speaking) AS connected to Time Warner 35

Time Warner (AS4323) can move this packet to New York City, where it enters the Equinix Internet Exchange Private location to peer with dozens of other companies Akamai, Amazon, Facebook, Google, Microsoft, many ISPs, etc Time Warner connects with RETN (AS9002) Do they pay, or is this free? Same sharing of BGP announcements occurs here 36

The same thing is happening over in Eurasia Last AS of our path is Moscow State University (AS2848) MSU s gateway(s) to the Internet advertise a BGP prefix for 93.180.0.0/18 (along with 3 others that originate in this AS) That encompasses the destination IP of 93.180.0.18 37

Moscow State University connects to Runnet (AS3267) Runnet announces prefix 93.180.0.0/18 (along with 291 others reachable downstream, and 13 that originate in this AS) Runnet now knows how to reach IPs that belong to MSU Runnet obtains transit through RETN, so our link is complete! 38

The forwarding table! We keep forgetting to generate the forwarding table! Need more information BGP tells us links between autonomous systems Other protocols (RIP, OSPF) tell us paths within autonomous systems 39

AS A AS B AS C BGP BGP Interior Routing Protocol Interior Routing Protocol Interior Routing Protocol Stub AS Transit AS e.g. backbone service provider Stub AS 40

Let s say (hypothetically) that Time Warner runs RIP, a distance- vector protocol Does each router have a complete view of the network inside the AS? No What algorithm is used to develop routes? Bellman- Ford (using distance vectors) 41

Let s say (hypothetically) that Time Warner runs OSPF, a link- state protocol Does each router have a complete view of the network inside the AS? Yes What algorithm is used to develop routes? Dijkstra s 42

Each router inside the AS updates its own forwarding table to direct BGP prefixes to the appropriate gateway router to the next AS Rules might be very simple, i.e. just forward everything not destined to this AS to the same gateway router Or rules might be complicated End result is a forwarding table for the router Prefix (for LPM) Next- hop IP Exit port 43

44

45

What does this growth mean for routers on the BGP- speaking Internet? They need to grow too! (more memory, faster CPUs, etc ) 46

Does my computer speak BGP? No your ISP s external gateway router does Does my computer speak RIP or OSPF? No your ISP s internal routers do Does my computer speak ARP? Yes Does my computer speak IP? Yes Does my computer speak Ethernet? Yes 47

Successfully sent a single IP packet across the global Internet Now know all of the key protocols and standards necessary to accomplish that task Now can I waste time watching LOLcats? 48

Not quite. One IP packet by itself is not enough to transmit an entire image What else do we need? Method to link multiple IP packets together and deliver them to the correct process on the receiver Transport layer: UDP, TCP (TCP also provides reliability!) Applications need to be written to use this reliable network communication, and they need protocols of their own! Web = HTTP, Email = POP / IMAP / SMTP, 49