LAN Topology, Ethernet
- LAN Topology:
- Aloha
- Ethernet
- Wireless LANs
- ATM
- Ethernet
- Ethernet Wiring
- Ethernet Encoding
- Ethernet Frames
- Hardware Addressing
- Ethernet Interface Hardware
- Frame Types
Local Area Networks
- point-to-point links to completely connect n computers need
n-1 interfaces on each computer, for a total cost of O(n2)
- instead, we can connect each computer to 1 shared network
for a total cost of O(n)
- such a network is especially useful when the cost of the
cabling is small compared to the cost of the interfaces: in Local
Area Networks (LANs)
- these networks use TDM over a shared medium
LAN Topologies
- Star Topology: each computer attaches to a central point, which
redistributes the data (e.g. Ethernet with hubs/switches)
- Ring Topology: each computer attaches to the next, and the last
one back to the first. Each interface must forward and/or keep messages
(e.g. FDDI)
- Bus Topology: each computer is directly connected to a physically
shared medium (e.g. older Ethernet, Aloha)
- in practice, most installations tend to be star topology, leading
back to a wiring closet
- star topology tends to be more robust, leading to easier fault
isolation
Aloha
- wireless star topology
- frequency f1 carries data from end systems to hub, f2 carries
data from hub back to end systems
- original Aloha (1960s) used military radios, all traffic received
by hub was rebroadcast to all the end systems
- the only problem is if two end systems transmit at the same time --
a collision which keeps the hub from hearing either packet
- a 1-bit overlap is sufficient to corrupt an entire packet
Aloha Collisions
- if the hub rebroadcasts each packet, each sender can listen for
its transmission and retransmit if the packet is missing or wrong
- the maximum theoretical traffic that can be sent is about 18%
of the channel capacity (assuming equal-sized packets): sending more
means more collisions and less useful traffic
- slotted Aloha constrains sender to start sending at the
beginning of a slot, reducing overlap and allowing up to about 30%
of the bandwidth to be used
- Aloha is used for communication from earth stations to satellites:
the satellite can be the hub, or the satellite can relay traffic back
to an earth station which is the hub
Ethernet Shared Medium
- Ethernet is similar to Aloha, except it uses a wire as its shared medium
- on a short enough wire, senders can sense others' transmission and wait:
Carrier Sense Multiple Access, CSMA
- if two senders are waiting for a frame to complete, the might start
sending almost simultaneously, so we can still have collisions
- on ethernet, if we have a collision we wait a random time then
try again
- every successive time we collide, we double the range of our
random waiting time: exponential backoff
- after 16 collisions, we give up
Ethernet Collision Detection
- on a radio, we cannot listen and transmit at the same time
- on a wire, we can!
- if the data I am sending is being received incorrectly by my
own receiver, there must be a collision
- if so, I jam the wire (put an illegal electrical pattern on it)
to make sure everyone detects the collision -- this is CSMA/CD
- CD requires a small enough "diameter" that everyone sees
the same collisions
- Ethernet will start rejecting bursty packets at around 50% average load
Modern Ethernet
- point-to-point links from end systems to hubs (or switches)
- a hub is the only place where collisions and medium sharing
take place
- hubs can be connected to other hubs, up to about 2 (diameter)
-- more than 2, and collision detection becomes unreliable
- switches work like hubs, but optimize by only sending
on the wire connecting to the destination
- speeds of 10Mb/s, 100Mb/s, 1Gb/s, and soon 10Gb/s
- different media for the point-to-point links: copper (CAT-5), fiber
Wireless LANs
- station A and station C might both be in range of station B,
but not in range of each other
- A sends a short Request To Send packet (RTS), including the length
S of the packet it really wants to send
- B sends a short Clear To Send (CTS) packet, also including the same
length S
- if A gets the CTS back, then anyone within range of either A or B
knows to keep quiet for S bit times
- this is Carrier Sense Multiple Access with Collision Avoidance,
CSMA/CA
ATM Topology
- Asynchronous Transfer Mode,
based on ideas from telephony: connections, point-to-point links
- central ATM switch accepts data from each end system, forwards
it to the correct end-system (non-broadcast)
- one fiber for each connection in each direction
- star topology for end systems
- ATM switches can be interconnected arbitrarily, will forward
data from one to another to the final destination
Ethernet Wire Types
- Thickwire (10Base5) -- coaxial cable is the shared medium, connected to
transceivers (using vampire taps), connected to Network Interface Cards
- Thinwire (10Base2) -- coaxial cable is the shared medium, plugged into
BNC connectors connected to Network Interface Cards
- CAT-5 (10BaseT) -- twisted pair connects Network Interface Card
to hubs, which are the actual shared medium.
Ethernet Encoding
- 10Mb/s Ethernet is encoded using Manchester Encoding
- "1" bit is encoded by a rising edge:
- if the voltage was low, in the middle of the bit period,
raise the voltage
- if the voltage was high, lower the voltage at the beginning
of the bit period, then raise it in the middle of the bit period.
"0" bit is encoded by a falling edge
- there is at least one transition per bit, allowing the receiver
to keep its clock synchronized
- 1010101010... (64 bits) bit pattern is sent before every frame: preamble,
has a transition in the middle of each bit slot
Ethernet Frames
- preamble allows receiver clocks to synchronize
- destination comes first: very little buffering/intelligence needed
to discard a frame that is not for me
- source address is generally ignored
- ethertype identifies next higher protocol
- minimum data length is required to insure that everyone sees the
same collisions
Ethernet Addresses
- each ethernet address is 6 bytes long
- each ethernet NIC (Network Interface Card) carries a unique
ethernet address in hardware
- blocks of 224 ethernet addresses are sold to companies
for 4-digit (dollar) figures.
- it is up to the company to assign the low-order 24 bits as
they please
- because each address is globally unique, computers plugged into
the same network are guaranteed to have distinct addresses
Broadcast and Multicast
- each NIC generally looks at the first 6 bytes of the header to
determine whether to read or ignore the rest of the packet
- NICs are also configured to accept the
address ff:ff:ff:ff:ff:ff -- the broadcast address
- many NICs can also be configured to recognize other (arbitrary)
addresses -- this allows for multicasting, sending data to a
restricted set of hosts without bothering the others
- many NICs can also be configured into promiscuous mode,
where they forward all packets to the host
Network Analyzers, tcpdump
- analyzers can make visible (blinking lights :-) or report
any number of events or statistics:
- collisions
- frames per second
- average frame size
- network utilization
- broadcast frames
- analyzers can also be full computers running software to classify
each packet
- tcpdump on Unix will print all the headers of all received
packets
- most LANs are not very secure!
Network Interface Cards
- a Network Interface Card (NIC) connects the computer (CPU and memory)
to the network
- a NIC has an analog side which connects to the LAN and a digital side
connected to the computer
- a NIC will:
- recognize frames
- check the destination address
- if the frame is for us, store it in memory (DMA) and interrupt
the computer
- also check the CRC
- DMA outgoing frames, insert CRC after sending
Ethernet Type, LLC/SNAP
- ethertype is 0x0800 for IP packets, 0x0806 for ARP packets
- if ethertype is 1500 or less, it encodes the frame length, and
other protocols (LLC/Logical Link Control) must be used to determine
next higher layer
- LLC starts with bytes AA, AA, 03
- followed by 3 bytes of organizational unique ID identifying the issuer
of the type field -- all zeros for Ethernet types
- followed by the type field itself