Show Lecture.LAN as a slide show.
CT320 LAN
Introduction
- LAN = Local Area Network
- It just means a local network—doesn’t have to be connected to
any other networks.
- The term LAN is independent of the medium, or the technology used
to transmit data over the medium.
- An implicit assumption is that the number of computers on a LAN
is relatively small.
- LANs far predate the Internet.
Historic perspective
- For the moment, don’t think of a LAN as just being a way to get
to the Internet.
- Instead, think of a business office, back in the before times.
You might have:
- the engineer’s computer
- the boss’s computer
- the secretary’s computer
- a printer.
- You’d want them all connected together, on a LAN.
- You don’t really need to be connected anywhere else.
- To get something to another department, you carry or mail a floppy disk.
Types of LANs
The basic problem
- Here’s the basic problem: most LAN technologies use a medium that
is common to all computers in the LAN.
- They’re all listening to the same radio frequency,
sensing voltage on the same wire, etc.
- What if computer A and B both want to talk at the same time?
- They’ll both try to transmit radio waves at the same time,
or put voltage on the wire at the same time, and neither one wins.
Human Solutions
- We humans have the same problem. We all speak and listen on roughly
the same range of frequencies.
- If two nearby people try to talk at the same time, neither can be heard.
- How do we solve this …
- on a date?
- in a classroom?
- in a meeting?
- at a party?
Token Ring
┌───┐ ┌───┐
│ A │·····│ B │
└───┘ └───┘
: :
: :
┌───┐ ┌───┐
│ D │·····│ C │
└───┘ └───┘
- Token Ring is a LAN technique developed by IBM in 1984.
- Imagine computers connected in a ring, with data flowing clockwise.
- A can send data only to B.
- B can send data only to C.
- C can send data only to D.
- D can send data only to A.
Token Ring
┌───┐ ┌───┐
│ A │·····│ B │
└───┘ └───┘
: :
: :
┌───┐ ┌───┐
│ D │·····│ C │
└───┘ └───┘
- A small packet, or token, is constantly flying around the ring.
- It’s usually empty.
- When a given computer receives the token, it examines it.
- If it contains data for that computer, it consumes the data,
and sends an empty token to the next computer.
- If it doesn’t contain data for this computer (or is empty),
send it on to the next computer.
- If a computer wishes to send data to another computer:
- Wait until it sees an empty token.
- Fill the token with our data, along with a To: address.
- Send it to the next computer, which may or may not be the target.
Token Ring
- What are the advantages and disadvantages of Token Ring?
- Simplicity?
- Latency?
- Throughput?
- Robustness?
Ethernet
- Ethernet, on the other hand, has all computers on a single wire.
- We hope that they don’t all talk at once!
- If two computers try to talk at the same time (called a “collision”),
they detect it and back off for a random amount of time.
┌───┐ ┌───┐ ┌───┐ ┌───┐
│ A │ │ B │ │ C │ │ D │
└───┘ └───┘ └───┘ └───┘
: : : :
: : : :
·······························
Star Configuration
┌───┐ ┌───┐ ┌───┐
│ A │ │ B │ │ C │
└───┘ └───┘ └───┘
⠡ : ⠌
⠡ : ⠌
⠡ : ⠌
┌───┐ ┌────────┐ ┌───┐
│ H │···│ Switch │···│ D │
└───┘ └────────┘ └───┘
⠌ : ⠡
⠌ : ⠡
⠌ : ⠡
┌───┐ ┌───┐ ┌───┐
│ G │ │ F │ │ E │
└───┘ └───┘ └───┘
- With modern wired Ethernet, all computers are wired directly to a switch.
- It’s like many small Ethernets.
- The only possible collisions are if the computer and the switch
start to talk at the same time—much less likely.
- However, the switch could get overwhelmed.
- More expensive—you have to buy a switch.
Hub vs. Switch
- An Ethernet hub, also called a repeater,
simply connects everything to everything.
- That is, if A were sending data to B via a hub, C & D would also see the data.
- If A were sending to B at the same time that C were sending to D,
a collision would occur on a hub.
- An Ethernet switch, on the other hand, only sends data where it
needs to go.
┌───┐ ┌───┐ ┌───┐ ┌───┐
│ A │ │ B │ │ C │ │ D │
└───┘ └───┘ └───┘ └───┘
⠡ : : ⠌
⠡ : : ⠌
⠡ : : ⠌
┌───────────────────┐
│ Hub or switch │
└───────────────────┘
MAC addresses
- When using Ethernet, each device has a unique
48-bit MAC (Media Access Control) address
- 248 = ~281 trillion possible MAC addresses
- Really, they should only have to be unique on a given LAN,
but they’re now also used to identify computers for licensing.
- Official style: 00-00-5E-00-53-42
- Linux style: 00:00:5E:00:53:42
Ethernet Packet
Ethernet packet
Preamble | Dest. address | Source address | Length | Data | CRC |
8 bytes | 6 bytes | 6 bytes | 2 bytes | 64–1500 bytes | 4 bytes |
- Note the lack of IP addresses.
- What if you want to send more than 1500 bytes?