Mudanças entre as edições de "Gerência de Rede (diário 2015-1)"
(→19/02) |
(→19/02) |
||
Linha 21: | Linha 21: | ||
==19/02== | ==19/02== | ||
− | + | Revisão: IPv4. | |
+ | * Cenário com [[Netkit]]: | ||
<code> | <code> | ||
# Global | # Global | ||
Linha 77: | Linha 78: | ||
e3[eth0]=e3-s1 | e3[eth0]=e3-s1 | ||
s1[eth0]=e3-s1 | s1[eth0]=e3-s1 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo e0.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/e0-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.2/29 dev eth0 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.1 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo e1.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/e1-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.3/29 dev eth0 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.1 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo e2.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/e2-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.10/29 dev eth0 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.9 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo e3.startup | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/e3-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.11/29 dev eth0 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.9 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo r0.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/r0-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | ip link set eth1 up | ||
+ | ip link set eth2 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.1/29 dev eth0 | ||
+ | ip -4 addr add 192.168.0.17/30 dev eth1 | ||
+ | ip -4 addr add 192.168.0.25/30 dev eth2 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.18 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo r1.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/r1-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | ip link set eth1 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.18/30 dev eth0 | ||
+ | ip -4 addr add 192.168.0.21/30 dev eth1 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.22 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo r2.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/r2-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | ip link set eth1 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.26/30 dev eth0 | ||
+ | ip -4 addr add 192.168.0.29/30 dev eth1 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.25 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo r3.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/r3-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | ip link set eth1 up | ||
+ | ip link set eth2 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | ip -4 addr add 192.168.0.9/29 dev eth0 | ||
+ | ip -4 addr add 192.168.0.30/30 dev eth1 | ||
+ | ip -4 addr add 192.168.0.22/30 dev eth2 | ||
+ | |||
+ | # Rede: roteamento | ||
+ | ip -4 route add 0.0.0.0/0 via 192.168.0.29 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo s0.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/s0-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | ip link set eth1 up | ||
+ | ip link set eth2 up | ||
+ | |||
+ | # Enlace: ponte | ||
+ | brctl addbr br0 | ||
+ | brctl addif br0 eth0 | ||
+ | brctl addif br0 eth1 | ||
+ | brctl addif br0 eth2 | ||
+ | ip link set br0 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | |||
+ | # Rede: roteamento | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Arquivo s1.startup: | ||
+ | <code> | ||
+ | #!/bin/bash | ||
+ | |||
+ | /hostlab/s1-auto.sh | ||
+ | |||
+ | # Enlace | ||
+ | ip link set eth0 up | ||
+ | ip link set eth1 up | ||
+ | ip link set eth2 up | ||
+ | |||
+ | # Enlace: ponte | ||
+ | brctl addbr br0 | ||
+ | brctl addif br0 eth0 | ||
+ | brctl addif br0 eth1 | ||
+ | brctl addif br0 eth2 | ||
+ | ip link set br0 up | ||
+ | |||
+ | # Rede: endereçamento | ||
+ | |||
+ | # Rede: roteamento | ||
</syntaxhighlight> | </syntaxhighlight> |
Edição das 09h07min de 19 de fevereiro de 2015
Sobre a disciplina
Avaliação
Serão realizadas 4 avaliações ao longo do semestre. De caráter prático, contemplarão todo o conteúdo da disciplina ministrado até o momento.
Composição do conceito final
O conceito final será assim composto:
- A: todas as avaliações com conceito A.
- B: no máximo um C, e para cada C um A correspondente.
- C: no máximo um D, e para cada D um A correspondente.
- D: demais casos.
Observação: a composição do conceito final inclui os conceitos de todas as avaliações e recuperações.
Aulas
05/02
- Apresentação da disciplina e discussão do plano de ensino.
- Revisão: sistemas operacionais baseados no UNIX e comandos básicos de rede.
12/02
- Revisão: sistemas operacionais baseados no UNIX.
19/02
Revisão: IPv4.
- Cenário com Netkit:
- Global
global[compact]=False
global[mem]=32
global[vm]=4
global[clean]=False
global[path]=/tmp/ger20706/lab
- Equipamentos
e0[type]=generic
e1[type]=generic
e2[type]=generic
e3[type]=generic
s0[type]=generic
s1[type]=generic
r0[type]=generic
r1[type]=generic
r2[type]=generic
r3[type]=generic
- Enlaces
e0[eth0]=e0-s0
s0[eth0]=e0-s0
e1[eth0]=e1-s0
s0[eth1]=e1-s0
r0[eth0]=r0-s0
s0[eth2]=r0-s0
r0[eth1]=r0-r1
r1[eth0]=r0-r1
r0[eth2]=r0-r2
r2[eth0]=r0-r2
r1[eth1]=r1-r3
r3[eth2]=r1-r3
r2[eth1]=r2-r3
r3[eth1]=r2-r3
r3[eth0]=r3-s1
s1[eth2]=r3-s1
e2[eth0]=e2-s1
s1[eth1]=e2-s1
e3[eth0]=e3-s1
s1[eth0]=e3-s1
</syntaxhighlight>
- Arquivo e0.startup:
- !/bin/bash
/hostlab/e0-auto.sh
- Enlace
ip link set eth0 up
- Rede: endereçamento
ip -4 addr add 192.168.0.2/29 dev eth0
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.1
</syntaxhighlight>
- Arquivo e1.startup:
- !/bin/bash
/hostlab/e1-auto.sh
- Enlace
ip link set eth0 up
- Rede: endereçamento
ip -4 addr add 192.168.0.3/29 dev eth0
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.1
</syntaxhighlight>
- Arquivo e2.startup:
- !/bin/bash
/hostlab/e2-auto.sh
- Enlace
ip link set eth0 up
- Rede: endereçamento
ip -4 addr add 192.168.0.10/29 dev eth0
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.9
</syntaxhighlight>
- Arquivo e3.startup
- !/bin/bash
/hostlab/e3-auto.sh
- Enlace
ip link set eth0 up
- Rede: endereçamento
ip -4 addr add 192.168.0.11/29 dev eth0
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.9
</syntaxhighlight>
- Arquivo r0.startup:
- !/bin/bash
/hostlab/r0-auto.sh
- Enlace
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
- Rede: endereçamento
ip -4 addr add 192.168.0.1/29 dev eth0
ip -4 addr add 192.168.0.17/30 dev eth1
ip -4 addr add 192.168.0.25/30 dev eth2
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.18
</syntaxhighlight>
- Arquivo r1.startup:
- !/bin/bash
/hostlab/r1-auto.sh
- Enlace
ip link set eth0 up
ip link set eth1 up
- Rede: endereçamento
ip -4 addr add 192.168.0.18/30 dev eth0
ip -4 addr add 192.168.0.21/30 dev eth1
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.22
</syntaxhighlight>
- Arquivo r2.startup:
- !/bin/bash
/hostlab/r2-auto.sh
- Enlace
ip link set eth0 up
ip link set eth1 up
- Rede: endereçamento
ip -4 addr add 192.168.0.26/30 dev eth0
ip -4 addr add 192.168.0.29/30 dev eth1
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.25
</syntaxhighlight>
- Arquivo r3.startup:
- !/bin/bash
/hostlab/r3-auto.sh
- Enlace
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
- Rede: endereçamento
ip -4 addr add 192.168.0.9/29 dev eth0
ip -4 addr add 192.168.0.30/30 dev eth1
ip -4 addr add 192.168.0.22/30 dev eth2
- Rede: roteamento
ip -4 route add 0.0.0.0/0 via 192.168.0.29
</syntaxhighlight>
- Arquivo s0.startup:
- !/bin/bash
/hostlab/s0-auto.sh
- Enlace
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
- Enlace: ponte
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
brctl addif br0 eth2
ip link set br0 up
- Rede: endereçamento
- Rede: roteamento
</syntaxhighlight>
- Arquivo s1.startup:
- !/bin/bash
/hostlab/s1-auto.sh
- Enlace
ip link set eth0 up
ip link set eth1 up
ip link set eth2 up
- Enlace: ponte
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
brctl addif br0 eth2
ip link set br0 up
- Rede: endereçamento
- Rede: roteamento
</syntaxhighlight>