1 / 24

Lecture Topics: 11/27

Lecture Topics: 11/27. Networks Layered Model Ethernet IP. What is a network?. A network allows computers to communicate There are lots of different views of a network System Area Network (computers in the same room) Local Area Network (computers in the same building)

calais
Download Presentation

Lecture Topics: 11/27

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture Topics: 11/27 • Networks • Layered Model • Ethernet • IP

  2. What is a network? • A network allows computers to communicate • There are lots of different views of a network • System Area Network (computers in the same room) • Local Area Network (computers in the same building) • Wide Area Network (computers on the same planet) • All basically the same idea: one computer sends another computer a message

  3. What is a protocol? • A protocol is a common standard that determines how two machines communicate • Many different types of protocols • low level (transfer bits between two connected machines, e.g. Ethernet) • middle level (transfer bits between two unconnected machines, e.g. IP) • high level (do something useful, e.g. HTTP get a web page)

  4. OSI Layered Network Model • Layering of protocols is good • enforces modularity (easier to make changes) • layers don’t need to know details of higher or lower layers • Physical layer • getting raw bits from one node to another • coaxial, fiber optics, wireless • Data link layer • groups bits together to transmit between nodes on a network • Ethernet, PPP, SLIP • Network layer • transmits packets between networks (IP) • Transport layer • sequencing and acknowledgment of received data (UPD,TCP) • Application layer • telnet, Internet Explorer

  5. Application Data TCP Header Application Data IP Header TCP Header Application Data TCP Segment IP Header TCP Header Application Data IP Datagram Ethernet Header Ethernet Checksum Ethernet Frame Protocol Stack • These layers comprise the protocol stack • Each layer of the stack adds extra info to the packet Application layer Transport layer Network layer Data link layer

  6. IP Header TCP Header Application Data Destination Address Source Address Type Ethernet Packets • Ethernet header includes • the network address of the source and destination • hardwired and globally unique • the type of the packet (e.g. IP or ARP) • Ethernet checksum used to detect errors • is a hash of the entire packet • when a packet is received the hash is checked with the CRC 6 bytes 4 bytes CRC Ethernet Header Ethernet Checksum Ethernet Frame

  7. Ethernet • Protocol defining how to send packets within a LAN (local area network) • Developed at Xerox PARC in early ’70s • Packet based, distributed administration • A broken node does not affect the network • CSMA/CD (Carrier Sense, Multiple Access, Collision Detection) • Basic idea: • Wait for line to become quiet • While transmitting, check if someone else was transmitting • If someone else was transmitting, stop and wait before retransmitting

  8. A B C Multiple Access • All nodes are connected to the same shared wire • All nodes receive all packets • A destination address distinguishes • addresses are 48 bits and are globally unique • Example: If A sends a packet, it is received by both B and C

  9. A B C A B C A B C Carrier Sense • Nodes can sense when the wire is being used • A node waits to send if someone else is sending B wants to send, but can’t b/c A is sending A finishes sending B can send after A is finished • What’s the problem?

  10. B and C want to send, but can’t b/c A is sending A finishes sending B and C both send at the same time A B C A B C A B C B and C detect that there was a collision A B C Collision Detection • Nodes detect if there are multiple senders

  11. After Collision Detection B and C jam the Ethernet to make sure all nodes see the collision A B C B and C wait a random amount of time before sending again A B C C happens to wait less time and sends first A B C B waits for C to finish and then sends A B C

  12. A A B B C C A A A B B B C C C A B C A B C Multiple Collisions B and C detect a collision and jam Ethernet B and C wait a random amount of time Random[0,WaitTime] B and C happen to collide again B and C double the amount of time to wait Random[0,2*WaitTime] B happens to send first C waits for B to finish and then sends

  13. A B A B A B A A B B Minimum Packet Size • Sender cannot sense a collision if packets are too small A and B send small packets at the same time A and B stop sending before detecting a collision The packets are corrupted, but neither sender knows • Min packet must be twice the max propagation delay A can send for one propagation delay without B sensing it A must send for another propagation delay before sensing that B caused a collision

  14. Determining Minimum Size • The minimum packet size depends on • length of the Ethernet (1 km) • speed of the signal (km/sec) • bits sent per second (Mbits/sec) • For 10Mbit Ethernet, the minimum packet size is 64 bytes

  15. Maximum Packet Size • Ethernet uses a maximum packet size of 1500 • only for fairness, so nodes don’t have to wait indefinitely to send a packet

  16. Ethernet Evaluation • Ethernet had many key ideas that have spread to other layers of the protocol • decentralized control • exponential backoff • best effort—no guarantees that a packet would be delivered • There are other data link protocols, why did Ethernet win? • biggest competitor was token rings, • allowed bandwidth to be shared fairly • one machine’s failure caused the entire network to fail

  17. Internet History • Goal: effective use of existing networks • minimal support from underlying networks • packet switching • routers connecting networks • Other goals: • survive hardware failure • support multiple types of apps • run on wide variety of networks • distributed management of resources • cost-effective • low cost host attachment • Internet hugely successful because of it can run on anything

  18. Survivability • Internet approach • Cheap, failable components • Stateless routers + self-healing • Keep routing simple (non-adaptive) • End to end recovery • Telephone approach • Ultra reliable switches • Self-healing

  19. IP • Ethernet allows packets to be sent between nodes on the same network • Internet Protocol (IP) allows packets to be sent between nodes on different networks • Key idea: some machines (i.e. routers) are on multiple networks • Ethernet is still used to send packets between routers

  20. IP Routers Routers send packet to next closest point H R H R H H R R R R R H R H: Hosts R: Routers H

  21. IP Addresses • IP addresses are 4 bytes (e.g. 128.95.8.137) • part of the address designates the network (e.g. 128.95) • the rest of the address designates the machine on the network (e.g. 8.137) • A router sends the packet to the correct network, and the network sends the packet to the correct node • this greatly reduces the information a router must store

  22. How do routers know where to send packets? • Forwarding tables at each router • Network == 128.95, then send to router X • Original Internet: manual update • Now: automatic update based on “cost” • exchange tables with neighbors • use neighbor with smallest hop count • what if node says zero cost to everywhere?

  23. Setting up Routing Tables • Graph theory to compute “shortest path” • routers = nodes • links = edges • delay, hops = cost • Need dynamic computation to adapt to changes in topology • if a router goes down, might need to find another path

  24. IP Routing Protocols • There are two basic kinds of routing protocols • Distance Vector • exchange routing tables with neighbors • no one knows complete topology • now used between admin domains (i.e. AT&T and MCI • Link state • tell everyone who your neighbors are • everyone computes shortest path • now used within admin domains (within AT&T)

More Related