Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Lecture Topics: 11/27 Networks Layered Model Ethernet IP."— 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 Protocol Stack These layers comprise the protocol stack
Each layer of the stack adds extra info to the packet Application layer Application Data IP Header TCP Header Ethernet Header Checksum Ethernet Frame IP Datagram TCP Segment Transport layer Network layer Data link layer

6 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 Destination Address Source Address Type 4 bytes CRC Ethernet Header IP Header Application Data TCP 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 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 A B C

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

10 Collision Detection Nodes detect if there are multiple senders A B C
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 B and C detect that there was a collision

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 Multiple Collisions B and C detect a collision and jam Ethernet
B and C wait a random amount of time Random[0,WaitTime] A B C B and C happen to collide again A B C B and C double the amount of time to wait Random[0,2*WaitTime] A B C A B C B happens to send first A B C C waits for B to finish and then sends A B C

13 Minimum Packet Size Sender cannot sense a collision if packets are too small A B A and B send small packets at the same time A and B stop sending before detecting a collision A B The packets are corrupted, but neither sender knows A B Min packet must be twice the max propagation delay A B A B 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 Other goals:
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 Telephone 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 Routers send packet to next closest point
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 ) the rest of the address designates the machine on the network (e.g ) 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 == , 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)


Download ppt "Lecture Topics: 11/27 Networks Layered Model Ethernet IP."

Similar presentations


Ads by Google