Download week8-1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

IEEE 1394 wikipedia , lookup

Network tap wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Industry Standard Architecture wikipedia , lookup

Computer network wikipedia , lookup

AppleTalk wikipedia , lookup

Net bias wikipedia , lookup

Distributed firewall wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Airborne Networking wikipedia , lookup

TCP congestion control wikipedia , lookup

Low Pin Count wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

MIL-STD-1553 wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

CAN bus wikipedia , lookup

Bus (computing) wikipedia , lookup

I²C wikipedia , lookup

VMEbus wikipedia , lookup

Serial digital interface wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

IEEE 1355 wikipedia , lookup

RapidIO wikipedia , lookup

Packet switching wikipedia , lookup

Deep packet inspection wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Transcript
Local Area Networks:
Topologies
Packet Identification & MAC Addresses
• Each packet specifies an intended recipient with an
identifier.
– Demultiplexing uses the identifier known as an address.
• IEEE (Institute for Electrical and Electronic Engineers)
allocates a unique address for each piece of network
interface hardware, i.e., a network interface card (NIC)
• Media Access Control (MAC) address
– A device may have multiple MAC addresses depending on how
many network interface cards it has.
2
48 bits in hexadecimal number
3
MAC Addresses
• Composition
– Vendor ID + NIC ID
• VV:VV:VV:NN:NN:NN
– IEEE assigns a vendor ID
• Organizationally Unique ID (OUI)
• http://standards.ieee.org/regauth/oui/oui.txt
– The vendor assigns a unique NIC value to each device
4
Exercise: Find MAC address of your
computer
1. Start Command Prompt (Start Runcmd) and
type ipconfig /all
2. Do a google search to find the vendor name of
the NIC of your computer
Compose a Packet: Step 1
• A packet consists of two conceptual parts:
– Header that contains metadata, such as an address
– Payload that contains the data being sent
header
payload
54:DD:91 E8:25:32
11:CA:3B 46:C2:8F
I like you
6 bytes
6 bytes
dest. address source address
46-1500 bytes
6
Compose a Packet: Step 2
• Framing: using extra bits to delineate the start and end of
a frame
– SOH: Start of Header (ASCII code: 0000001)
– EOT: End of Transmission (ASCII code: 0000100)
– To enable computer to distinguish two packets, the SOH and
EOT must be unique and different from the payload.
• Frame: Layer-2 packet
SOH header
payload
EOT
1 byte
1 byte
7
Compose a Packet: Step 3
• Add error checking code
– Ethernet use Cyclic Redundancy Check (CRC), a form
of channel coding for high-speed data network
SOH header
payload
modulation
EOT
CRC
Cable
More on CRC: Chapter 8.13 – 8.14
How to Transmit a Packet?
• Depends on the network type and topology
• Three main categories of packet switching network:
9
LAN Example
LAN Topologies
• Each LAN is classified into a category according to its
topology or general shape
11
Star Topology in Detail
P-B
NIC-B
NIC-2
P-A
NIC-A
NIC-1
P-S
NIC-4
NIC-D
P-D
NIC-3
NIC-C
P-C
Star Topology in Detail
Steps for P-A to send “I like you” to P-C:
1. P-A will compose the packet
C A
I like you
2. P-A forwards the packet to NIC-A
3. NIC-A calculates the CRC, adds SOH, EOT
SOH C A
I like you
EOT
CRC
4. NIC-A modulates the packet  send out
5. After a while, NIC-1 will receive the m-carrier
6. NIC-1 demodulates the m-carrier and put the packet into a queue
7. P-S checks this packet and find destination is “C”
8. NIC-3 modulates the packet  send out
9. After a while, NIC-C will receive the m-carrier
10. NIC-C demodulates the packet and put it into its cache
11. NIC-C does two checkings; If failed, the packet will be discarded
a) Length checking: the payload should be between 46 and 1500 bytes
b) CRC checking
12. If the packet passes all checkings, NIC-C will strip off SOH, EOT, CRC, and
forward “|C|A|I like you|” to P-C
Bus Topology
• Bus topology usually consists of a single cable to which
computers are attached.
• The ends of a bus network must be terminated.
– Preventing electrical signals from reflecting back along the
bus.
P-B
P-D
NIC-B
NIC-D
NIC-A
NIC-C
P-A
P-C
14
Bus Topology in Detail
Steps for P-A to send “I like you” to P-C:
1. P-A will compose the packet
C A
I like you
2. P-A forwards the packet to NIC-A
3. NIC-A calculates the CRC, adds SOH, EOT
SOH C A
4.
5.
6.
7.
8.
9.
I like you
EOT
CRC
NIC-A modulates the packet  send out
After a while, NIC-C will receive the m-carrier
NIC-C demodulates the packet and put it into its cache
NIC-C does address checking; if the packet is not for P-C, discard it
NIC-C does length and CRC checkings; If failed, the packet will be discarded
If the packet passes all checkings, NIC-C will strip off SOH, EOT, CRC, and
send “|C|A|I like you|” to P-C
Bus Topology
• When there is a signal on the bus, everybody can
sense it.
• What if multiple computers are sending packets
simultaneously?
• Collisions may happen!
Bus Topology: The Collision Problem
• Basic solution: CSMA (Carrier Sense Multiple Access)
1.
2.
Before any packet is sent out, the sender will first senses its
connecting point to see if the bus is idle.
If nothing is sensed, it will send out a packet, otherwise it
will wait until nothing is sensed.
• Q1: Do you believe that CSMA can avoid all collisions?
Bus Topology: The Collision Problem
• Advanced solution: CSMA/CD (CD = Collisions
Detection)
1.
2.
During the whole transmission period of any packet (after it
is send out) the sender keeps on sensing the bus.
If any other m-carrier is sensed, stop transmitting instantly;
wait for a random amount of time; then retransmit
• Q2: If collision occurs, who will detect the collision?
Bus Topology: The Collision Problem
• Advanced solution: CSMA/CD (CD = Collisions
Detection)
1.
2.
During the whole transmission period of any packet (after it
is send out) the sender keeps on sensing the bus.
If any other m-carrier is sensed, stop transmitting instantly;
wait for a random amount of time; then retransmit
• Q3: Why do we wait a random amount of time?
Bus Topology: The Collision Problem
• Advanced solution: CSMA/CD (CD = Collisions
Detection)
1.
2.
During the whole transmission period of any packet (after it
is send out) the sender keeps on sensing the bus.
If any other m-carrier is sensed, stop transmitting instantly;
wait for a random amount of time; then retransmit
• Q4: When a NIC senses a collided m-carrier, will the
NIC card demodulate it?
Bus Topology: The Collision Problem
• Advanced solution: CSMA/CD (CD = Collisions
Detection)
1.
2.
During the whole transmission period of any packet (after it
is send out) the sender keeps on sensing the bus.
If any other m-carrier is sensed, stop transmitting instantly;
wait for a random amount of time; then retransmit
• Q5: When a NIC senses a collided m-carrier, will the
NIC forward the packet to the computer?
Why Different Topologies?
• Ring:
– Easy for computers to coordinate access and to
detect whether the network is operating
correctly
– An entire ring network is disabled if one of the
cables is cut
• Star:
– Protecting the network from damage to a single
cable
– No collisions at all
– Requiring more wires
• Bus:
– Fewer wires
– A network is disabled if someone accidentally
cuts the main cable
– Difficult to add new devices if no tap exists.
22