Computer Networks 0000

Download Report

Transcript Computer Networks 0000

Computer Networks
0100-Ethernet
Gergely Windisch
[email protected]
Channel allocation problem
• Point to point communication is easy
– direct link between the communicating parties
– anyone can talk whenever they wish
• Broadcast communication
– Not so easy – too many people might want to talk – who
can?
– if two messages overlap, both are destroyed
• How do we allocate the channel to each user?
– Static channel allocation - dedicated frequency for each
user – good for a small number of users who transmit a
large amount – like radio stations
• not so good for large number of users with burst traffic
– Dynamic channel allocation
• channel is allocated to whoever wants to use it
–
–
–
–
better for large number of users, but some problems may arise
single channel
collision is bad (but observable)
carrier sense – no carrier sense
» whether the sender can listen in on the channel first
• ALOHA
– 18%
• Slottet ALOHA
– 35%
• Carrier Sense Multiple Access Protocol
– goood
– instead of just sending data whenever the urge drives us,
let us listen first and if there is silence, then talk
Carrier Sense Multiple Access Protocol
• Listen first, talk later – but how?
– if two computers want to send when a third is talking –
they will collide
– better: wait a random amount of time before sending
• Carrier Sense Multiple Access / Collision Detection
– like above, but look out for collision and stop sending as
soon as it is noted – the message is runined anyway, why
waste bandwidth
• Basis of the classic Ethernet
History of ethernet
• Invented 40 years ago at Xerox
Ethernet topology
• Used to be a but
• Star nowdays
Transport medium
• Anything goes
CSMA/CD protocol
• Collisions should be avoided at all cost
Ethernet implementation
• Thick ethernet
– 500 m
– 100 hosts
• Thin ethernet
– 100 m
– 30 hosts
• UTP (switched ethernet)
Ethernet frames
• Bits are transferred, but the bits need some
organization
Errors
• Error detection vs. error correction
– error detection can detect errors and the offending message is
retransmitted
– error correction is better as faulty messages can be corrected, but
at what price?
• Error detection is used on reliable connections, error
correction is used on unreliable connections
– on unreilable channels even the retransmitted messages will be
corrupt – no use having them retransmitted
• Error correction codes
– hamming code
– reed solomon code
• Error detection codes
– parity (normal and interleaved)
– checksum
– cyclic redundancy check (polinomial code)
Devices in an etherenet network
• hub
– first there was the hub
• bridge
– bridge connects two networks
• switch
– switch is like a bridge, but with more legs
– (they are essentially the same)
*: Source: http://fun-loops.com/
Interesting questions concerning switches
• What do we want from bridges/switches?
– Let them be plug and play
– They should send the data only to the appropriate port
– When multiple switches are connected they should not
form loops as loops are normally fun*, but not in this
case
• When do we want them?
– Now
• How do we do it?
– Backward learning
– Spanning tree protocol
• spanning tree is a type of graph without a cycle
Switch backward learning
• Hash table stores computers and ports
• At first there are no entries in the hash table
– messages destined at a host not in the hash table will be
sent to all ports
– whenever a computer sends a message the source port
is extracted and stored
• Hash table entries are timestamped at each use, old
entries are removed to keep the system dynamic
and up-to-date
• Switching can be done as soon as the destination
address is available – good thing it is the first one to
arrive then
– wormhole switching
Switch backward learning
• Protocol processing in the bridge
Spanning tree protocol
• Redundant magic
• Imagine two networks – each have their own
switches, and the switches are connected to form
an UBER LAN. What happens if a hamster chews the
cable between the two?
– disaster
Spanning tree protocol
• Redundant magic
• Imagine two networks – each have their own
switches, and the switches are connected to form
an UBER LAN. What happens if a hamster chews the
cable between the two?
– disaster
• Let’s connect the switches by multiple cables!
– now we would need multiple hamsters, but as there is
just one hamster to do the chewing, we are fine
Spanning tree protocol
• Redundant magic
• Imagine two networks – each have their own
switches, and the switches are connected to form
an UBER LAN. What happens if a hamster chews the
cable between the two?
– disaster
• Let’s connect the switches by multiple cables!
– now we would need multiple hamsters, but as there is
just one hamster to do the chewing, we are fine
• Or are we?
– What happens if the machines start communicating?
Spanning tree protocol
Spanning tree protocol
• How to build spanning tree
– Periodically send out messages to all ports, and analyze
messages coming from othter routers
– Select a root bridge (based on the MAC – smallert MAC
ID will be the root)
– Find out the shortest paths to the root
– Turn off all other links
Spanning tree protocol
Layers and devices
• Repeaters and hubs
do not care about
frames, they only
care about voltages
• Standard allows 4
repeaters to extend
cable length to 2.5
km
– enhance the signal
• Hubs don’t enhance
signal
• Devices extend the
collision domain –
CSMA/CD
Layers and devices
• Switches isolate
networks and hosts
– no collision domains,
no CSMA/CD
• Originally bridges
were created to
connect different
technologies (eg.
Ethernet and token
ring)
– not used for that any
more, but to connect
similar LANs
Layers and devices
• Routers strip the
frame and look at
the payload, extract
IP addresses and do
their magic to
forward packages.
– We’ll look behind
the curtains later
this semester
• hopefully
Layers and devices
• High level stuff, will
not even touch with
a stick
– Application gateway
is an email-sms
gateway for example
Ethernet speeds
• Original Ethernet – 802.3
– 10Mbps
– Like heaven when first introduced, but even heaven gets
boring in a few short years
• Fast Ethernet – 1995 (IEEE committee – 802.3u)
– 100Mbps
– compatible to the original in every aspect
• Gigabit Ethernet – 1999 – 802.3ab
– 1000Mbps
– compatible to the original in every aspect
• 10 Gigabit Ethernet, 40 Gigabit, 100 Gigabit
– not so compatible anymore (hubs are not allowed)
VLAN
• VLANs are good
– Topology and LAN membership can be independent of
geographical location
• Definition
• Traffic filtering
• Access control
VLAN
VLAN ID
• The ethernet frame had to be modified – frames
must be identified as part of a VLAN – but how?
– vlan id
Wireless lan
•
•
•
•
Ethernet 802.11
Wireless network topologies
Network security
WPA/WPA2