INTRODUÇÃO ÀS REDES DE
COMPUTADORES
CAMADA DE REDE
Teresa Vazão
INTRODUÇÃO
•
1973 – David Bobs and Robert Metcalfe
•
Inventores da Ethernet, na Xerox Palo Alto Research
•
Lançada em 22 de Maio de 2013
SUMARIO
•
Camada de ligação lógica
– Funções
– Características
– Mecanismo de acesso ao meio
– Rede Ethernet
CAMADA DE LIGAÇÃO LÓGICA
Ligação lógica
•
Mecanismos de acesso ao meio
CAMADA DE LIGAÇÃO LÓGICA
Ligação lógica
•
Função
•
CaracterísYcas
•
Mecanismos de acesso ao meio
•
Rede Ethernet
CAMADA DE LIGAÇÃO LÓGICA – acesso ao meio
O problema do acesso múlCplo
•
Meio parYlhado:
–
Dois ou mais uYlizadores podem transmiYr em simultâneo
•
Protocolos de acesso ao meio:
–
Coordenar o acesso ao meio parYlhado entre dois ou mais
uYlizadores, de forma eficiente e justa
CAMADA DE LIGAÇÃO LÓGICA – acesso ao meio
Protocolo de acesso ao meio -‐ Aloha
to B
host A
link
collision collisionhost B
host C
to A time time time time packet arrival to C to A success packet arrival packet arrival to BCAMADA DE LIGAÇÃO LÓGICA – acesso ao meio
Protocolo -‐ Aloha
•
Colisões
–
Quando existe mais do que
um nó a transmiYr dados no
mesmo instante de tempo
–
Destroem todos os dados
envolvidos na colisão
1 0 0 0 1 1 0 0 0 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 t t t
Packet sent from A to B
Packet sent from C to A
“Packet” on the shared link (received by A, B and C)
CAMADA DE LIGAÇÃO LÓGICA – acesso ao meio
Protocolo – Aloha – recuperação de colisões
•
AlternaYvas
Host A Host B Host C Data ACK Host A Host B Host C Data DataCAMADA DE LIGAÇÃO LÓGICA – acesso ao meio
Protocolo – Aloha – recuperação de colisões
•
Retransmissão após tempo fixo
•
Mau método!
host A
link
collision collisionretransmission after fixed delay
host B
host C
time time time time arrival of new packet collisionCAMADA DE LIGAÇÃO LÓGICA – acesso ao meio
Protocolo – Aloha – recuperação de colisões
•
Atraso de retransmissão com valor inicial aleatório
–
Random backoff
•
Bom método!
host A
link
collision collision success success successretransmission after random delay
host B
host C
time time time time arrival of new packetCAMADA DE LIGAÇÃO LÓGICA
Ligação lógica
•
Função
•
CaracterísYcas
•
Mecanismos de acesso ao meio
•
Redes Ethernet e Wifi
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Ethernet – expansão com HUBs
Hub regenerates signals, does not process frames –
physical layer device
Hub twisted-‐ pair cable PC PC PC PC PC PC PC PC Server Hub Hub Hub Hub
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Ethernet – expansão com Cabo Coaxial
PC Server terminator coaxial cable segment Repeater Repeater Router Printer Access point
Repeater regenerates signals, does not process frames –
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 1
Switch/Bridge twisted-‐ pair cable Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 2 i2 3 i1 4 i4 5 i4 6 i4 1 i2 2 i2 3 i2 4 i1 5 i1 6 i1 1 i4 2 i4 3 i4 4 i3 5 i2 6 i1 data 5 routing tableCAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 2
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 routing table data 5 1CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 3
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 routing table data 5 1 da ta 5 1 data 51 data 5 1CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 4
Bridge 2 learns address of host 1 and floods packet
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 routing table 1 i2 data 1 5 data 5 1
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 5
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 routing table 1 i2 1 i4 data 5 1 data 5 1 data 5 1 data 51CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 6
Host 5 sends packet to host 1
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 routing table 1 i2 1 i4 data 51
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 7
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 routing table 1 i2 1 i4 5 i2 data 51 data 5 1CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 8
Bridge 2 learns address of host 5 and forwards packet (towards host 1)
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 routing table 1 i2 5 i1 1 i4 5 i2 data 5 1 data 5 1
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: comutação 9
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 5 i4 routing table 1 i2 5 i1 1 i4 5 i2 data 5 1 data 5 1CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: mobilidade
Switch/Bridge twisted-‐ pair cable 4 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 2 i2 3 i1 4 i4 5 i4 6 i4 1 i2 2 i2 3 i2 4 i1 5 i1 6 i1 1 i4 2 i4 3 i4 4 i3 5 i2 6 i1 data 5 routing table 5 i5CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: domínio de colisão
Hub twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge i1 i2 1 i2 2 i2 3 i2 4 i1 5 i1 6 i1 routing table Hub Collision domain
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: ciclos fechados e encaminhamento
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge data 5 routing table
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: ciclos fechados e spanning tree protocol
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 2 i2 3 i1 4 i5 5 i5 6 i5 1 i2 2 i2 3 i2 4 i1 5 i1 6 i1 1 i4 2 i4 3 i4 4 i3 5 i2 6 i1 data 5 routing table i5 i5
CAMADA DE LIGAÇÃO LÓGICA – interligação de LANs
Switches/Bridges: ciclos fechados e spanning tree protocol
Switch/Bridge twisted-‐ pair cable 4 5 6 1 2 3 Switch/Bridge i1 i2 i4 i3 i1 i2 i3 i4 i1 i2 1 i3 2 i2 3 i1 4 i4 5 i4 6 i4 1 i5 2 i5 3 i5 4 i3 5 i2 6 i1 data 5 routing table i5 i5