Mudanças entre as edições de "Redes de Computadores II (diário 2014-2)"
Linha 1 236: | Linha 1 236: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ===25/11: | + | ===25/11: projeto final=== |
− | + | O projeto final contempla todas as tecnologias e protocolos vistos na disciplina. | |
− | + | [[Imagem:red20142.svg|thumb|400px|Desenho da rede]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===28/11: MPLS=== | ===28/11: MPLS=== |
Edição das 07h14min de 28 de novembro de 2014
URL encurtada: https://bit.ly/red20142
Sobre a disciplina
Metodologia e Avaliação
Abordagem baseada em projetos cumulativos ao longo da disciplina, com avaliação prática em laboratório (defesa do cenário).
Composição do Conceito Final
- A = todos os conceitos A.
- B = no máximo um conceito C e nenhum D (incluindo recuperação e avaliação recuperada).
- C = no máximo um conceito D (exceto projeto final), e para cada D um A correspondente (incluindo recuperação e avaliação recuperada).
- D = demais casos.
Nota: os conceitos recuperados não são descartados para a composição do conceito final.
Conceitos
Aluno | Prova 1 |
Alfredo | D |
Anderson | B |
Carlos | B |
Giovanni | D |
Guilherme | C |
Nathan | D |
Renato | D |
Valmir | D |
Aulas
Plano de ensino
01/08: apresentação da disciplina
Apresentação da metodologia a ser usada na disciplina, bem como os 4 projetos que serão trabalhados ao longo do semestre.
Conceitos básicos
Leitura recomendada: capítulos 1, 2, 7 e 8 do livro base.[1]
05/08: revisão
- Arquitetura de redes de computadores.
08/08: revisão
- Netkit. Arquivo de exemplo utilizado em aula:
- Configurações globais
global[compact]=False
global[mem]=64
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
- Equipamentos
A[type]=generic
B[type]=generic
R[type]=router
- Enlaces e endereçamento IPv4
A[eth0]=AR:ip=10.0.0.2/30
R[eth0]=AR:ip=10.0.0.1/30
R[eth1]=BR:ip=172.16.0.1/30
B[eth0]=BR:ip=172.16.0.2/30
</syntaxhighlight>
12/08: conceitos básicos
- Transmissão orientada a bit e byte.
- Transmissão analógica e digital, código de linha.
- Topologias de redes físicas e lógicas.
- Comutação por circuitos, datagramas e circuitos virtuais.
- Multiplexação.
Projeto 1: Rede local em meio guiado
Leitura recomendada: capítulos 12, 13 e 15 livro base.
15/08: apresentação do projeto
A primeira rede:
- Configurações globais
global[compact]=False
global[mem]=64
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
- Equipamentos
roteador0[type]=router
switch0[type]=switch
servidor0[type]=generic
estacao0[type]=generic
estacao1[type]=generic
- Enlaces
roteador0[eth0]=enlace0
switch0[eth0]=enlace0
servidor0[eth0]=enlace1
switch0[eth1]=enlace1
estacao0[eth0]=enlace2
switch0[eth2]=enlace2
estacao1[eth0]=enlace3
switch0[eth3]=enlace3
</syntaxhighlight>
19/08: Ethernet e CSMA/CD
- Redes de múltiplo acesso
- IEEE 802.3 e Ethernet
- CSMA/CD
22/08: IEEE 802.1Q
- VLAN.
- Cenário com rede interna (etiqueta 100) e, agora, DMZ (etiqueta 200). No caso, somente o switch e o roteador precisam operar diretamente com IEEE 802.1q.
- Configurações globais
global[compact]=False
global[mem]=64
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
- Equipamentos
roteador0[type]=router
switch0[type]=switch
servidor0[type]=generic
estacao0[type]=generic
estacao1[type]=generic
dmz0[type]=generic
- Enlace e Rede (endereçamento)
roteador0[eth0]=enlace0:vlan_tagged=(100,ip=192.168.100.254/24),(200,ip=192.168.200.254/24)
switch0[eth0]=enlace0:vlan_tagged=100,200
servidor0[eth0]=enlace1:ip=192.168.100.1/24
switch0[eth1]=enlace1:vlan_untagged=100
estacao0[eth0]=enlace2:ip=192.168.100.100/24
switch0[eth2]=enlace2:vlan_untagged=100
estacao1[eth0]=enlace3:ip=192.168.100.101/24
switch0[eth3]=enlace3:vlan_untagged=100
dmz0[eth0]=enlace4:ip=192.168.200.1/24
switch0[eth4]=enlace4:vlan_untagged=200
- Rede (roteamento)
servidor0[default_gateway]=192.168.100.254
estacao0[default_gateway]=192.168.100.254
estacao1[default_gateway]=192.168.100.254
dmz0[default_gateway]=192.168.200.254</syntaxhighlight>
26/08: IEEE 802.1Q
- VLAN.
29/08: IEEE 802.1Q e IEEE 802.1P
- Priorização de pacotes em redes locais, IEEE 802.1P.
No nosso cenário, por exemplo, é possível modificar a prioridade a partir de um dispositivo que manipule os cabeçalhos IEEE 802.1Q e IEEE 802.1P, como roteador. A seguir, os quadros destinados (operação set_egress_map) para a VLAN 200 (interface eth0.200) terão sua prioridade original (0) modificada para máxima (7):
vconfig set_egress_map eth0.200 0 7
No caso do Netkit, esse comando pode ser aplicado no arquivo .startup das máquinas virtuais roteador0 e switch0.
02/09: IEEE 802.1D-2004
- STP.
05/09: IEEE 802.1D-2004
- Laboratório com STP:
- Configurações globais
global[compact]=False
global[mem]=64
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
- Equipamentos
roteador0[type]=router
switch0[type]=switch
switch0[stp]=on:bridge_priority=0
switch1[type]=switch
switch1[stp]=on:bridge_priority=4096
switch2[type]=switch
switch2[stp]=on:bridge_priority=8192
switch3[type]=switch
switch3[stp]=on:bridge_priority=16384
servidor0[type]=generic
estacao0[type]=generic
estacao1[type]=generic
- Enlaces
roteador0[eth0]=enlace0
switch0[eth0]=enlace0
servidor0[eth0]=enlace1
switch1[eth0]=enlace1
estacao0[eth0]=enlace2
switch2[eth0]=enlace2
estacao1[eth0]=enlace3
switch3[eth0]=enlace3
- Entre switches
switch0[eth1]=enlace4
switch1[eth1]=enlace4
switch0[eth2]=enlace5
switch2[eth2]=enlace5
switch0[eth3]=enlace6
switch3[eth2]=enlace6
switch1[eth2]=enlace7
switch2[eth1]=enlace7
switch2[eth3]=enlace8
switch3[eth1]=enlace8
</syntaxhighlight>
Monitoramento individual das interfaces:
for x in 0 1 2 3; do (tcpdump -ni eth${x} -w /hostlab/$(hostname)-eth${x}.pcap &); done
09/09: IEEE 802.1D, 802.1w e 802.1s
- IEEE 802.1D STP.
- IEEE 802.1w RSTP.
- IEEE 802.1s MSTP.
12/09: IEEE 802.3ad
- Agragação de enlace.
16/09: finalização do projeto
- lab.conf:
# Configurações globais
global[compact]=False
global[mem]=64
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
# Equipamentos
roteador0[type]=generic
switch0[type]=generic
# Enlaces
roteador0[eth0]=roteador0-switch0-enlace0
switch0[eth0]=roteador0-switch0-enlace0
roteador0[eth1]=roteador0-switch0-enlace1
switch0[eth1]=roteador0-switch0-enlace1
- /tmp/red20142/lab/roteador0.startup:
#!/bin/bash
/hostlab/roteador0-auto.sh
# LACP
modprobe bonding miimon=100 mode=4 lacp_rate=fast xmit_hash_policy=0
ifconfig bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
ip link set bond0 up
# STP
brctl addbr br0
brctl stp br0 on
brctl setbridgeprio br0 4096
brctl addif br0 bond0
ip link set br0 up
# VLAN
vconfig set_name_type VLAN_PLUS_VID_NO_PAD
vconfig add br0 100
vconfig add br0 200
ip link set vlan100 up
ip link set vlan200 up
# Rede
ip address add 192.168.100.1/24 dev vlan100
ip address add 192.168.200.1/24 dev vlan200
- /tmp/red20142/lab/switch0.startup:
#!/bin/bash
/hostlab/switch0-auto.sh
# LACP
modprobe bonding miimon=100 mode=4 lacp_rate=fast xmit_hash_policy=0
ifconfig bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
ip link set bond0 up
# STP
brctl addbr br0
brctl stp br0 on
brctl setbridgeprio br0 0
brctl addif br0 bond0
ip link set br0 up
# VLAN
vconfig set_name_type VLAN_PLUS_VID_NO_PAD
vconfig add br0 100
vconfig add br0 200
ip link set vlan100 up
ip link set vlan200 up
19/09: entrega do projeto
Defesa do primeiro projeto da disciplina.
Projeto 2: Rede local em meio não guiado
Leitura recomendada: livro sobre o padrão IEEE 802.11.[2]
23/09: IEEE 802.11
- Conceitos de IEEE 802.11.
26/09: IEEE 802.11
- Conceitos de IEEE 802.11.
30/09: IEEE 802.11 e modo ad-hoc
- Aula prática de configuração de rede em modo ad-hoc.
03/10: IEEE 802.11 e modo infraestrutura
- Aula prática de configuração de rede em modo infraestrutura. Um exemplo de configuração da aplicação hostapd:
- Interfaces
interface=wlan1
bridge=br0
driver=nl80211
- SSID
ssid=abc
ignore_broadcast_ssid=0
- Canais
channel=3
ieee80211n=0
</syntaxhighlight>
07/10: IEEE 802.11 e modo infraestrutura
10/10: IEEE 802.11 e mesh
- Rede mesh utilizando OLSR.
14/10: revisão para a prova
- lab.conf
- Configurações globais
global[compact]=False
global[mem]=32
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
- Equipamentos
roteador0[type]=generic
switch0[type]=generic
estacao1[type]=generic
estacao2[type]=generic
- Enlaces
roteador0[eth0]=r0s0
switch0[eth0]=r0s0
estacao1[eth0]=e1s0
switch0[eth1]=e1s0
estacao2[eth0]=e2s0
switch0[eth2]=e2s0
</syntaxhighlight>
- estacao1
# "Física"
ip link set eth0 up
#
# Enlace: agregação de enlace
#
# Enlace: VLAN
#
# Enlace: pontes
#
# Enlace: STP
#
# Rede: endereçamento IPv4
ip -4 address add 192.168.10.2/24 dev eth0
#
# Rede: roteamento IPv4
ip -4 route add 0.0.0.0/0 via 192.168.10.1
#
# Rede: endereçamento IPv6
ip -6 address add FC00:10::2/64 dev eth0
#
# Rede: roteamento IPv6
ip -6 route add ::/0 via FC00:10::1
- estacao2
# "Física"
ip link set eth0 up
#
# Enlace: agregação de enlace
#
# Enlace: VLAN
#
# Enlace: pontes
#
# Enlace: STP
#
# Rede: endereçamento IPv4
ip -4 address add 192.168.20.2/24 dev eth0
#
# Rede: roteamento IPv4
ip -4 route add 0.0.0.0/0 via 192.168.20.1
#
# Rede: endereçamento IPv6
ip -6 address add FC00:20::2/64 dev eth0
#
# Rede: roteamento IPv6
ip -6 route add ::/0 via FC00:20::1
- roteador
# "Física"
ip link set eth0 up
ip link set eth1 up
#
# Enlace: agregação de enlace
modprobe bonding mode=4 lacp_rate=1 xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
#
# Enlace: VLAN
ip link add link bond0 name bond0.10 type vlan id 10
ip link set bond0.10 up
ip link add link bond0 name bond0.20 type vlan id 20
ip link set bond0.20 up
#
# Enlace: pontes
#
# Enlace: STP
#
# Rede: endereçamento IPv4
ip -4 address add 192.168.10.1/24 dev bond0.10
ip -4 address add 192.168.20.1/24 dev bond0.20
#
# Rede: roteamento IPv4
sysctl -w net.ipv4.conf.all.forwarding=1
#
# Rede: endereçamento IPv6
ip -6 address add FC00:10::1/64 dev bond0.10
ip -6 address add FC00:20::1/64 dev bond0.20
#
# Rede: roteamento IPv6
sysctl -w net.ipv6.conf.all.forwarding=1
- switch
# "Física"
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
ip link set eth3 up
#
# Enlace: agregação de enlace
modprobe bonding mode=4 lacp_rate=1 xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
#
# Enlace: VLAN
ip link add link bond0 name bond0.10 type vlan id 10
ip link set bond0.10 up
ip link add link bond0 name bond0.20 type vlan id 20
ip link set bond0.20 up
#
# Enlace: pontes
brctl addbr br10
ip link set br10 up
btcrl addif br10 bond0.10
brctl addif br10 eth3
brctl addbr br20
ip link set br20 up
brctl addif br20 bond0.20
brctl addif br20 eth2
#
# Enlace: STP
#
# Rede: endereçamento IPv4
#
# Rede: roteamento IPv4
#
# Rede: endereçamento IPv6
#
# Rede: roteamento IPv6
17/10: revisão para a prova
Projeto 3: Redes de Circuitos Virtuais
- Frame Relay
- ATM, PPP, ADSL
- MPLS
31/10: WAN e modens digitais
LAN vs. WAN
04/11: PPP
O protocolo PPP:
- LCP
- PAP
- CHAP
- NCP
- IPCP
07/11: Enlaces LAN e WAN e roteamento dinâmico
Cenário de preparação para integração com MPLS.
Roteador inter-redes
Configuração do roteador que integrará as redes dos alunos, algo semelhante a um PTT:
- lab.conf:
- Configurações globais
global[compact]=False
global[mem]=32
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
- Equipamentos
roteador0[type]=router
- Enlace e rede
roteador0[eth0]=uplink:bridge=eth0
- Arquivos a preservar
roteador0[preserve]=/etc/quagga/daemons:/etc/quagga/ospfd.conf
</syntaxhighlight>
- /tmp/red20142/lab/roteador0.startup:
- !/bin/bash
/hostlab/roteador0-auto.sh
ip link set eth0 up
ip -4 address add 10.0.0.1/24 dev eth0
chmod 0644 /etc/quagga/ospfd.conf
</syntaxhighlight>
- /tmp/red20142/lab/roteador0/preserve/etc/quagga/daemons:
zebra=yes
ospfd=yes
</syntaxhighlight>
- /tmp/red20142/lab/roteador0/preserve/etc/quagga/ospfd.conf:
!
hostname roteador0
password ospf
!
interface eth0
!
router ospf
network 10.0.0.0/24 area 0
!
log stdout
!
</syntaxhighlight>
Redes por aluno
Nos arquivos a seguir, há duas variáveis em relação aos endereçamentos IPv4 e IPv6:
- X: equivalente ao último número encontrado na etiqueta do computador do Lab. de Redes I.
- Y: a regra de formação é a seguinte:
- 0: rede da operadora com MPLS. Máscaras de sub-rede /24 e /64.
- 1: enlace PPP entre roteadores de borda das redes do cliente e da operadora. Máscara de sub-rede /30 e /127.
- 2: rede DMZ do cliente. Máscara de sub-rede /24 e /64.
- 3: rede interna (LAN) do cliente. Máscara de sub-rede /24 e /64.
- lab.conf:
- Configurações globais
global[compact]=False
global[mem]=32
global[vm]=4
global[clean]=False
global[path]=/tmp/red20142/lab
- Equipamentos
r0rot0[type]=router
r1rot0[type]=router
r1rot1[type]=router
r0swi0[type]=generic
r0swi1[type]=generic
r0swi2[type]=generic
r0dmz0[type]=generic
r0srv0[type]=generic
r0est0[type]=generic
r0est1[type]=generic
- Enlace (e rede)
- r0rot0 - r1rot0
r0rot0[ppp0]=r0rot0r1rot0:ip=10.X.Y.2/30
r1rot0[ppp0]=r0rot0r1rot0:ip=10.X.Y.1/30
- r1rot0 - r1rot1
r1rot0[eth0]=r1rot0r1rot1
r1rot1[eth0]=r1rot0r1rot1
- r1rot1 - rede física
r1rot1[eth1]=uplink:bridge=eth0
- r0rot0 - r0swi0
r0rot0[eth0]=r0rot0r0swi0-0
r0swi0[eth0]=r0rot0r0swi0-0
r0rot0[eth1]=r0rot0r0swi0-1
r0swi0[eth1]=r0rot0r0swi0-1
- r0swi0 - r0swi1
r0swi0[eth2]=r0swi0r0swi1-0
r0swi1[eth0]=r0swi0r0swi1-0
r0swi0[eth3]=r0swi0r0swi1-1
r0swi1[eth1]=r0swi0r0swi1-1
- r0swi0 - r0swi2
r0swi0[eth4]=r0swi0r0swi2-0
r0swi2[eth0]=r0swi0r0swi2-0
r0swi0[eth5]=r0swi0r0swi2-1
r0swi2[eth1]=r0swi0r0swi2-1
- r0swi1 - r0swi2
r0swi1[eth2]=r0swi1r0swi2-0
r0swi2[eth2]=r0swi1r0swi2-0
r0swi1[eth3]=r0swi1r0swi2-1
r0swi2[eth3]=r0swi1r0swi2-1
- r0swi0 - r0dmz0
r0swi0[eth6]=r0swi0r0dmz0-0
r0dmz0[eth0]=r0swi0r0dmz0-0
r0swi0[eth7]=r0swi0r0dmz0-1
r0dmz0[eth1]=r0swi0r0dmz0-1
- r0swi1 - r0srv0
r0swi1[eth4]=r0swi1r0srv0-0
r0srv0[eth0]=r0swi1r0srv0-0
r0swi1[eth5]=r0swi1r0srv0-1
r0srv0[eth1]=r0swi1r0srv0-1
- r0swi2 - r0est0
r0swi2[eth4]=r0swi2r0est0
r0est0[eth0]=r0swi2r0est0
- r0swi2 - r0est1
r0swi2[eth5]=r0swi2r0est1
r0est1[eth0]=r0swi2r0est1
</syntaxhighlight>
- /tmp/red20142/lab/r0dmz0.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
ip link set eth1 up
- Agregação de enlace
modprobe bonding max_bonds=1 mode=4 lacp_rate=fast xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
- VLAN
vconfig set_name_type DEV_PLUS_VID_NO_PAD
vconfig add bond0 45
ip link set bond0.45 up
- Ponte
- STP
- Rede: endereçamento IPv4
ip -4 address add 10.X.Y.2/24 dev bond0.45
- Rede: roteamento IPv4
ip -4 route add 0.0.0.0/0 via 10.X.Y.1
- Rede: endereçamento IPv6
ip -6 address add 2804:1454:X:Y::2/64 dev bond0.45
- Rede: roteamento IPv6
ip -6 route add ::0/0 via 2804:1454:X:Y::1
</syntaxhighlight>
- /tmp/red20142/lab/r0est0.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
- Agregação de enlace
- VLAN
- Ponte
- STP
- Rede: endereçamento IPv4
ip -4 address add 10.X.Y.100/24 dev eth0
- Rede: roteamento IPv4
ip -4 route add 0.0.0.0/0 via 10.X.Y0.1
- Rede: endereçamento IPv6
ip -6 address add 2804:1454:X:Y::100/64 dev eth0
- Rede: roteamento IPv6
ip -6 route add ::0/0 via 2804:1454:X:Y::1
</syntaxhighlight>
- /tmp/red20142/lab/r0est1.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
- Agregação de enlace
- VLAN
- Ponte
- STP
- Rede: endereçamento IPv4
ip -4 address add 10.X.Y.101/24 dev eth0
- Rede: roteamento IPv4
ip -4 route add 0.0.0.0/0 via 10.X.Y.1
- Rede: endereçamento IPv6
ip -6 address add 2804:1454:X:Y::101/64 dev eth0
- Rede: roteamento IPv6
ip -6 route add ::0/0 via 2804:1454:X:Y::1
</syntaxhighlight>
- /tmp/red20142/lab/r0rot0.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
ip link set eth1 up
- Agregação de enlace
modprobe bonding max_bonds=1 mode=4 lacp_rate=fast xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
- VLAN
vconfig set_name_type DEV_PLUS_VID_NO_PAD
vconfig add bond0 30
ip link set bond0.30 up
vconfig add bond0 45
ip link set bond0.45 up
- Ponte
- STP
- Rede: endereçamento IPv4
ip -4 address add 10.X.Y.1/24 dev bond0.30
ip -4 address add 10.X.Y.1/24 dev bond0.45
- Rede: roteamento IPv4
sysctl -w net.ipv4.conf.all.forwarding=1
- Rede: endereçamento IPv6
ip -6 address add 2804:1454:X:Y::1/64 dev bond0.30
ip -6 address add 2804:1454:X:Y::1/64 dev bond0.45
- Rede: roteamento IPv6
sysctl -w net.ipv6.conf.all.forwarding=1
- Outros
chmod 0644 /etc/quagga/ospfd.conf
</syntaxhighlight>
- /tmp/red20142/lab/r0srv0.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
ip link set eth1 up
- Agregação de enlace
modprobe bonding max_bonds=1 mode=4 lacp_rate=fast xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
- VLAN
vconfig set_name_type DEV_PLUS_VID_NO_PAD
vconfig add bond0 30
ip link set bond0.30 up
- Ponte
- STP
- Rede: endereçamento IPv4
ip -4 address add 10.X.Y.2/24 dev bond0.30
- Rede: roteamento IPv4
ip -4 route add 0.0.0.0/0 via 10.X.Y.1
- Rede: endereçamento IPv6
ip -6 address add 2804:1454:X:Y::2/64 dev bond0.30
- Rede: roteamento IPv6
ip -6 route add ::0/0 via 2804:1454:X:Y::1
</syntaxhighlight>
- /tmp/red20142/lab/r0swi0.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
ip link set eth3 up
ip link set eth4 up
ip link set eth5 up
ip link set eth6 up
ip link set eth7 up
- Agregação de enlace
modprobe bonding max_bonds=4 mode=4 lacp_rate=fast xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
ip link set bond1 up
ifenslave bond1 eth2
ifenslave bond1 eth3
ip link set bond2 up
ifenslave bond2 eth4
ifenslave bond2 eth5
ip link set bond3 up
ifenslave bond3 eth6
ifenslave bond3 eth7
- VLAN
vconfig set_name_type DEV_PLUS_VID_NO_PAD
vconfig add bond0 30
ip link set bond0.30 up
vconfig add bond0 45
ip link set bond0.45 up
vconfig add bond1 30
ip link set bond1.30 up
vconfig add bond2 30
ip link set bond2.30 up
vconfig add bond3 45
ip link set bond3.45 up
- Ponte
brctl addbr br30
ip link set br30 up
brctl addif br30 bond0.30
brctl addif br30 bond1.30
brctl addif br30 bond2.30
brctl addbr br45
ip link set br45 up
brctl addif br45 bond0.45
brctl addif br45 bond3.45
- STP
brctl stp br30 on
brctl setbridgeprio br30 0
brctl stp br45 on
brctl setbridgeprio br45 0
- Rede: endereçamento IPv4
- Rede: roteamento IPv4
- Rede: endereçamento IPv6
- Rede: roteamento IPv6
</syntaxhighlight>
- /tmp/red20142/lab/r0swi1.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
ip link set eth3 up
ip link set eth4 up
ip link set eth5 up
- Agregação de enlace
modprobe bonding max_bonds=3 mode=4 lacp_rate=fast xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
ip link set bond1 up
ifenslave bond1 eth2
ifenslave bond1 eth3
ip link set bond2 up
ifenslave bond2 eth4
ifenslave bond2 eth5
- VLAN
vconfig set_name_type DEV_PLUS_VID_NO_PAD
vconfig add bond0 30
ip link set bond0.30 up
vconfig add bond1 30
ip link set bond1.30 up
vconfig add bond2 30
ip link set bond2.30 up
- Ponte
brctl addbr br30
ip link set br30 up
brctl addif br30 bond0.30
brctl addif br30 bond1.30
brctl addif br30 bond2.30
- STP
brctl stp br30 on
brctl setbridgeprio br30 4096
- Rede: endereçamento IPv4
- Rede: roteamento IPv4
- Rede: endereçamento IPv6
- Rede: roteamento IPv6
</syntaxhighlight>
- /tmp/red20142/lab/r0swi2.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
ip link set eth3 up
ip link set eth4 up
ip link set eth5 up
- Agregação de enlace
modprobe bonding max_bonds=2 mode=4 lacp_rate=fast xmit_hash_policy=0 miimon=100
ip link set bond0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
ip link set bond1 up
ifenslave bond1 eth2
ifenslave bond1 eth3
- VLAN
vconfig set_name_type DEV_PLUS_VID_NO_PAD
vconfig add bond0 30
ip link set bond0.30 up
vconfig add bond1 30
ip link set bond1.30 up
- Ponte
brctl addbr br30
ip link set br30 up
brctl addif br30 bond0.30
brctl addif br30 bond1.30
brctl addif br30 eth4
brctl addif br30 eth5
- STP
brctl stp br30 on
brctl setbridgeprio br30 8192
- Rede: endereçamento IPv4
- Rede: roteamento IPv4
- Rede: endereçamento IPv6
- Rede: roteamento IPv6
</syntaxhighlight>
- /tmp/red20142/lab/r1rot0.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
- Agregação de enlace
- VLAN
- Ponte
- STP
- Rede: endereçamento IPv4
ip -4 address add 10.X.Y.1/24 dev eth0
- Rede: roteamento IPv4
sysctl -w net.ipv4.conf.all.forwarding=1
- Rede: endereçamento IPv6
ip -6 address add 2804:1454:X:Y::1/64 dev eth0
- Rede: roteamento IPv6
sysctl -w net.ipv6.conf.all.forwarding=1
- Outros
chmod 0644 /etc/quagga/ospfd.conf
</syntaxhighlight>
- /tmp/red20142/lab/r1rot1.startup:
- !/bin/bash
- "Físico"
ip link set eth0 up
ip link set eth1 up
- Agregação de enlace
- VLAN
- Ponte
- STP
- Rede: endereçamento IPv4
ip -4 address add 10.X.Y.1/24 dev eth0
ip -4 address add 10.X.Y.1/24 dev eth1
- Rede: roteamento IPv4
sysctl -w net.ipv4.conf.all.forwarding=1
- Rede: endereçamento IPv6
ip -6 address add 2804:1454:X:Y::1/64 dev eth0
ip -6 address add 2804:1454:X:Y::1/64 dev eth1
- Rede: roteamento IPv6
sysctl -w net.ipv6.conf.all.forwarding=1
- Outros
chmod 0644 /etc/quagga/ospfd.conf
</syntaxhighlight>
- /tmp/red20142/lab/r0rot0/preserve/etc/quagga/daemons:
zebra=yes
ospfd=yes
</syntaxhighlight>
- /tmp/red20142/lab/r0rot0/preserve/etc/quagga/ospfd.conf:
!
hostname r0rot0
password ospf
!
interface ppp0
!
router ospf
! LAN
network 10.X.Y.0/24 area 0
! DMZ
network 10.X.Y.0/24 area 0
!
log stdout
!
</syntaxhighlight>
- /tmp/red20142/lab/r1rot0/preserve/etc/quagga/daemons:
zebra=yes
ospfd=yes
</syntaxhighlight>
- /tmp/red20142/lab/r1rot0/preserve/etc/quagga/ospfd.conf:
!
hostname r1rot0
password ospf
!
interface ppp0
!
interface eth0
!
router ospf
! PPP
network 10.X.Y.0/24 area 0
! MPLS
network 10.X.Y.0/24 area 0
!
log stdout
!
</syntaxhighlight>
- /tmp/red20142/lab/r1rot1/preserve/etc/quagga/daemons:
zebra=yes
ospfd=yes
</syntaxhighlight>
- /tmp/red20142/lab/r1rot1/preserve/etc/quagga/ospfd.conf:
!
hostname r1rot1
password ospf
!
interface eth0
!
interface eth1
!
router ospf
! MPLS
network 10.X.Y.0/24 area 0
! PTT
network 10.X.Y.0/24 area 0
!
log stdout
!
</syntaxhighlight>
11/11: MPLS
14/11: não houve aula
Não houve aula devido ao concurso público do IFSC.
18/11: não houve aula
Não houve aula devido ao concurso público do IFSC.
21/11: MPLS
Um exemplo de rede MPLS baseada em quadros:
- Configurações globais
global[compact]=False
global[mem]=32
global[vm]=6
global[clean]=True
global[path]=/tmp/lab
- Equipamentos
r0est0[type]=generic
r1est0[type]=generic
ler0[type]=mpls
ler1[type]=mpls
lsr0[type]=mpls
lsr1[type]=mpls
- Enlaces e rede
- Rede 0 (r0)
r0est0[eth0]=r0:ip=192.168.0.1/24
ler0[eth0]=r0:ip=192.168.0.254/24
r0est0[default_gateway]=192.168.0.254
- Rede 1 (r1)
r1est0[eth0]=r1:ip=192.168.1.1/24
ler1[eth0]=r1:ip=192.168.1.254/24
r1est0[default_gateway]=192.168.1.254
- MPLS 0 (mpls0)
ler0[eth1]=mpls0:ip=10.0.1.1/30
lsr0[eth0]=mpls0:ip=10.0.1.2/30
- MPLS 1 (mpls1)
lsr0[eth1]=mpls1:ip=10.0.0.2/30
ler1[eth1]=mpls1:ip=10.0.0.1/30
- MPLS 2 (mpls2)
ler1[eth2]=mpls2:ip=10.0.3.1/30
lsr1[eth0]=mpls2:ip=10.0.3.2/30
- MPLS 3 (mpls3)
lsr1[eth1]=mpls3:ip=10.0.2.2/30
ler0[eth2]=mpls3:ip=10.0.2.1/30
- MPLS
- FEC
ler0[fec]=192.168.1.0/24:nhlfe=1
ler1[fec]=192.168.0.0/24:nhlfe=1
- NHLFE (push)
ler0[nhlfe]=1:interface=eth1:label=1000:ip=10.0.1.2
lsr0[nhlfe]=1:interface=eth1:label=1001:ip=10.0.0.1
ler1[nhlfe]=1:interface=eth2:label=2000:ip=10.0.3.2
lsr1[nhlfe]=1:interface=eth1:label=2001:ip=10.0.2.1
- ILM (pop / swap)
ler0[ilm]=2001:labelspace=0
lsr0[ilm]=1000:labelspace=0:nhlfe=1
ler1[ilm]=1001:labelspace=0
lsr1[ilm]=2000:labelspace=0:nhlfe=1
- Labelspace
ler0[labelspace]=0:interfaces=eth1,eth2
lsr0[labelspace]=0:interfaces=eth0,eth1
ler1[labelspace]=0:interfaces=eth1,eth2
lsr1[labelspace]=0:interfaces=eth0,eth1
</syntaxhighlight>
25/11: projeto final
O projeto final contempla todas as tecnologias e protocolos vistos na disciplina.
28/11: MPLS
02/12: MPLS
05/12: MPLS
Recuperação
09/12
12/12
Referências