Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPS110: Networks Landon Cox March 25, 2009. Network hardware reality  Lots of different network interface cards (NICs)  3Com/Intel, Ethernet/802.11x.

Similar presentations


Presentation on theme: "CPS110: Networks Landon Cox March 25, 2009. Network hardware reality  Lots of different network interface cards (NICs)  3Com/Intel, Ethernet/802.11x."— Presentation transcript:

1 CPS110: Networks Landon Cox March 25, 2009

2 Network hardware reality  Lots of different network interface cards (NICs)  3Com/Intel, Ethernet/802.11x  Each NIC has a fixed hardware address  MAC address: 01:10:C6:CE:8E:42  Send packet to LAN by specifying MAC address  Max packet size is 1500 bytes  Packets can be reordered, corrupted, dropped  Anyone can sniff packets from the network

3 Virtual/physical interfaces Hardware OS Applications

4 Distributed computing  Try to make multiple computers look like one  We won’t really cover  Take CPS 214  Distributed shared memory  Distributed file systems  Parallelizing compilers  Process migration

5 Protocol layers NFS (files) NFS (files) HTTP (web) HTTP (web) SMTP (email) SMTP (email) SSH (login) SSH (login) RPC TCP UDP IP Ethernet ATM PPP Applications Abstraction Hardware

6 OSI model  Open Systems Interconnections Applications Layer 7 Presentation Layer 6 Session Layer 5 Transport Layer 4 Network Layer 3 DataLink Layer 2 Physical Layer 1 Applications Presentation Session Transport Network DataLink Physical

7 Network layers (the stack)  Build higher-level services on simpler ones  IP over Ethernet  TCP over IP  HTTP over TCP  Why build in layers?  Could have 0 layers (build directly on top of HW)  What would happen?  Have to build from scratch each time HW changes  E.g. one firefox for wired NIC, one for wireless NIC

8 Network layers (the stack)  Build higher-level services on simpler ones  IP over Ethernet  TCP over IP  HTTP over TCP  Why build in layers?  Could have 1 layer (OS provides single layer)  What would happen?  Better to let applications choose functionality they need  Unneeded features usually cost something (performance)  E.g. would you ever not need reliable communication?

9 Virtual/physical interfaces Hardware OS Applications

10 Routing  HW lets us send to neighbor on same LAN  Single-hop route  Want to send to computer on another LAN  Multi-hop route  IP (Internet Protocol) handles this

11 Local-area network  Typically, switched Ethernet  Messages delivered using  Ethernet MAC address  E.g. 00:0D:56:1E:AD:BB  Unique to physical card (like a serial number)  Switch knows all connected computers’ MAC addresses Ethernet switch

12 Routing  Can’t put all computers on one switch!  Think of the wiring logistics  Want to connect two LANs together  Use a machine that straddles two networks  Called a router or gateway or bridge  LANs and routers form the Internet

13 Internet graph A A C C B B D D E E F F G G Each letter is a router, possibly with a LAN connected to it.

14 Internet graph Each node is an Autonomous System (AS). Can think of as an ISP.

15 Internet graph A A C C B B D D E E F F G G How does D know how to get to router G? Should it send messages to E, C, or F?

16 Internet routing is imprecise  Internet has no centralized state  Makes it (supposedly) more fault-tolerant  Routing is hard when a network is  Large (a lot to track)  Dynamic (connections change quickly)  Incentives to lie (make money by accepting traffic)  The Internet exhibits all three  Basic idea  Routers propagate info about the graph to each other  BGP (Border Gateway Protocol)

17 Traceroute example  www.kernel.org  Unix traceroute utility

18 Virtual/physical interfaces Hardware OS Applications

19 Naming other computers  Low-level interface  Provide the destination MAC address  00:13:20:2E:1B:ED  Middle-level interface  Provide the destination IP address  152.3.140.183  High-level interface  Provide the destination hostname  crocus.cs.duke.edu

20 Translating hostname to IP addr  Hostname  IP address  Performed by Domain Name Service (DNS)  Used to be a central server  /etc/hosts at SRI  What’s wrong with this approach?  Doesn’t scale to the global Internet

21 DNS  Centralized naming doesn’t scale  Server has to learn about all changes  Server has to answer all lookups  Instead, split up data  Use a hierarchical database  Hierarchy allows local management of changes  Hierarchy spreads lookup work across many computers

22 Example: www.cs.duke.edu  nslookup in interactive mode

23 Translating IP to MAC addrs  IP address  MAC address  Performed by ARP protocol  Only done after you get to the right LAN  How does a router know the MAC address of 152.3.140.183?  ARP (Address Resolution Protocol)  If it doesn’t know the mapping, broadcast through switch  “Whoever has this IP address, please tell me your MAC address”  Cache the mapping  “/sbin/arp”  Why is broadcasting over a LAN ok?  Number of computers connected to a switch is relatively small

24 Virtual/physical interfaces Hardware OS Applications

25 Message sizes  Hardware interface  Max Ethernet message size is 1500 bytes  Application interface  IP maximum packet size is 64 kbytes  What if the route narrows?  Start at Ethernet max of 1500 bytes  Could traverse ATM w/ max of 53 bytes

26 Message sizes  IP layer fragments larger MTU to smaller MTU Computer 1Computer 2Router IP Ethernet IP Ethernet ATM IP ATM

27 Virtual/physical interfaces Hardware OS Applications

28 Processes vs machines  IP is machine-to-machine  E.g. crocus.cs.duke.edu  www.kernel.org  Process abstraction  Each app thinks it has its own machine  Give each process multiple virtual NICs

29 Processes vs machines  Hardware interface  One network endpoint per machine  Application interface  Multiple network endpoints per machine  Sockets  Software endpoints for communication  Like virtual network cards

30 Sockets  Another example of virtualized hardware  Thread  virtual processor  Address space  virtual memory  Endpoint/socket  virtual NIC  NIC and socket both have unique identifiers  NIC: MAC address  Socket: ‹hostname, port number›  bind () assigns a port number to a host’s socket

31 Sockets  OS allows apps to program sockets  E.g. BSD sockets  WinSock has pretty much same interface  Processes name each other via sockets  Each message includes a destination ‹host, port›  Tells routers which computer gets message  Tells dst computer which process gets message

32 Sockets  OS can multiplex multiple connections over one NIC  Kinds of sockets: UDP (datagrams), TCP (ordered, reliable)

33 Course administration  Project 2 due on Friday  Two groups are done  Many more are very close  Normal office hours Thursday and Friday  Use Friday discussion section to answer P2 questions  Any questions?


Download ppt "CPS110: Networks Landon Cox March 25, 2009. Network hardware reality  Lots of different network interface cards (NICs)  3Com/Intel, Ethernet/802.11x."

Similar presentations


Ads by Google