Networking Flashcards
Ethernet LAN Cable
- Local Area Network
- wire is about as thick as a drinking straw
- often yellow or blue
- one house or one floor of a building
- 100 meters max
Sending One Packet Process
- the natural unit of transmission within networking
- 1 packet = 1500 bytes
- Say we have a packet of 1500 bytes of information we want to send. Each byte is 8 bits, so that’s 12000 bits to send, where each bit is a 0 or 1
- The sending computer could read through the 12000 bits in order, and for each 1 bit, put 3 volts between the wires, and for each 0 bit, put 0 volts between the wires
- The receiving computer can follow along, noting the 3v/0v pattern on the wires over time and so receive the 12000 bits
Packet Errors - Checksum Re-send
- the receiver of the packet can detect if some of the bits in the packet got corrupted in transmission
- go through all the bytes, and add them all up
- the checksum is the last 2 digits of the sum of all the bytes; send that checksum as an extra byte along with the rest of the packet data
- the receiver can do the same computation – adding up all the bytes – to check that they get the same checksum
Ethernet on Multiple Computers
- only one computer should transmit at a time
- to send data, the sender divides their message into small “packets” of, say, around 1500 bytes
- every packet begins with the address of the recipient
- each computers on the LAN has a unique address called the MAC address (Media Access Control)
- there is one wire, and all the computers are connected to it – they share the wire – this is what makes it “broadband” as they all share the one medium
- all computers listen to the wire all the time, picking up packets addressed to them and ignoring packets not for them
- Wi-Fi is similar and the “air” is the shared medium
Ethernet Collision
- sometimes two senders send at the same time, and so their packets “collide” on the wire and get garbled
- the network hardware can usually detect this “collision” and so know to stop transmitting, as those sends are ruined
- the senders follow a “wait/re-transmit” protocol to re-send packets – wait a random amount of time – one of Metcalfe’s breakthrough ideas – and then try again when the wire is quiet
Ethernet Design Advantages
- Shared – there’s just the one wire and everybody uses it (cheap)
Incredibly successful design strategy – getting great performance out of minimal hardware
- Distributed and Collaborative – no central control, depends on each computer following the collaborative protocol in good faith
- Insecure – not to hard to listen and pick up packets not intended for you (shared)
- Performance degrades but does not break as more computers use the shared medium
Suppose a computer wants to send a packet on ethernet, as shown in lecture. The computer first waits for what?
Waits for the ethernet wire to be quiet
Suppose we are using the same checksum scheme as in lecture: add up all the bytes, and take just the last two digits of the sum. What is the checksum of the following bytes: 101, 202, 103, 100, 210, 120?
36
What is the purpose of a packet checksum?
allow the recipient to detect if bytes received were corrupted in transit