Mudanças entre as edições de "Configurando IPv6"
(7 revisões intermediárias por 2 usuários não estão sendo mostradas) | |||
Linha 2: | Linha 2: | ||
==Cisco ASA 5510== | ==Cisco ASA 5510== | ||
A nova rede está temporariamente na interface <tt>Ethernet0/2</tt>: | A nova rede está temporariamente na interface <tt>Ethernet0/2</tt>: | ||
− | + | ! | |
− | ! | + | interface Ethernet0/2 |
− | interface Ethernet0/2 | + | description ipv4+ipv6 |
− | + | security-level 0 | |
− | + | nameif ipv4+ipv6 | |
− | + | security-level 0 | |
− | + | ip address 200.237.201.158 255.255.255.252 | |
− | + | ipv6 address 2801:80:a81:1:2113::2/126 | |
− | + | ipv6 enable | |
− | + | ipv6 nd suppress-ra | |
− | + | no shutdown | |
− | + | exit | |
− | + | ! | |
− | ! | + | ipv6 route ipv4+ipv6 ::/0 2801:80:a81:1:2113::1 |
− | ipv6 route ipv4+ipv6 ::/0 2801:80:a81:1:2113::1 | + | ! |
− | ! | + | |
− | |||
=Swiches L3= | =Swiches L3= | ||
Linha 39: | Linha 38: | ||
<code> | <code> | ||
interface vlan 1 | interface vlan 1 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:1::/64 eui-64 | ipv6 address 2804:1454:1004:1::/64 eui-64 | ||
+ | interface vlan 20 | ||
+ | ipv6 enable | ||
+ | ipv6 address 2804:1454:1004:20::/64 eui-64 | ||
interface vlan 102 | interface vlan 102 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:102::/64 eui-64 | ipv6 address 2804:1454:1004:102::/64 eui-64 | ||
interface vlan 109 | interface vlan 109 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:109::/64 eui-64 | ipv6 address 2804:1454:1004:109::/64 eui-64 | ||
interface vlan 110 | interface vlan 110 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:110::/64 eui-64 | ipv6 address 2804:1454:1004:110::/64 eui-64 | ||
interface vlan 600 | interface vlan 600 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:600::/64 eui-64 | ipv6 address 2804:1454:1004:600::/64 eui-64 | ||
interface vlan 900 | interface vlan 900 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:900::/64 eui-64 | ipv6 address 2804:1454:1004:900::/64 eui-64 | ||
interface vlan 120 | interface vlan 120 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:120::/64 eui-64 | ipv6 address 2804:1454:1004:120::/64 eui-64 | ||
interface vlan 129 | interface vlan 129 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:129::/64 eui-64 | ipv6 address 2804:1454:1004:129::/64 eui-64 | ||
interface vlan 301 | interface vlan 301 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:301::/64 eui-64 | ipv6 address 2804:1454:1004:301::/64 eui-64 | ||
interface vlan 302 | interface vlan 302 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:302::/64 eui-64 | ipv6 address 2804:1454:1004:302::/64 eui-64 | ||
interface vlan 303 | interface vlan 303 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:303::/64 eui-64 | ipv6 address 2804:1454:1004:303::/64 eui-64 | ||
interface vlan 304 | interface vlan 304 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:304::/64 eui-64 | ipv6 address 2804:1454:1004:304::/64 eui-64 | ||
interface vlan 305 | interface vlan 305 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:305::/64 eui-64 | ipv6 address 2804:1454:1004:305::/64 eui-64 | ||
interface vlan 306 | interface vlan 306 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:306::/64 eui-64 | ipv6 address 2804:1454:1004:306::/64 eui-64 | ||
interface vlan 307 | interface vlan 307 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:307::/64 eui-64 | ipv6 address 2804:1454:1004:307::/64 eui-64 | ||
interface vlan 308 | interface vlan 308 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:308::/64 eui-64 | ipv6 address 2804:1454:1004:308::/64 eui-64 | ||
interface vlan 309 | interface vlan 309 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:309::/64 eui-64 | ipv6 address 2804:1454:1004:309::/64 eui-64 | ||
interface vlan 310 | interface vlan 310 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:310::/64 eui-64 | ipv6 address 2804:1454:1004:310::/64 eui-64 | ||
interface vlan 311 | interface vlan 311 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:311::/64 eui-64 | ipv6 address 2804:1454:1004:311::/64 eui-64 | ||
interface vlan 312 | interface vlan 312 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:312::/64 eui-64 | ipv6 address 2804:1454:1004:312::/64 eui-64 | ||
interface vlan 313 | interface vlan 313 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:313::/64 eui-64 | ipv6 address 2804:1454:1004:313::/64 eui-64 | ||
interface vlan 314 | interface vlan 314 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:314::/64 eui-64 | ipv6 address 2804:1454:1004:314::/64 eui-64 | ||
interface vlan 315 | interface vlan 315 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:315::/64 eui-64 | ipv6 address 2804:1454:1004:315::/64 eui-64 | ||
interface vlan 316 | interface vlan 316 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:316::/64 eui-64 | ipv6 address 2804:1454:1004:316::/64 eui-64 | ||
interface vlan 318 | interface vlan 318 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:318::/64 eui-64 | ipv6 address 2804:1454:1004:318::/64 eui-64 | ||
interface vlan 199 | interface vlan 199 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:199::/64 eui-64 | ipv6 address 2804:1454:1004:199::/64 eui-64 | ||
interface vlan 200 | interface vlan 200 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:200::/64 eui-64 | ipv6 address 2804:1454:1004:200::/64 eui-64 | ||
interface vlan 520 | interface vlan 520 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:520::/64 eui-64 | ipv6 address 2804:1454:1004:520::/64 eui-64 | ||
interface vlan 530 | interface vlan 530 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:530::/64 eui-64 | ipv6 address 2804:1454:1004:530::/64 eui-64 | ||
interface vlan 540 | interface vlan 540 | ||
+ | ipv6 enable | ||
ipv6 address 2804:1454:1004:540::/64 eui-64 | ipv6 address 2804:1454:1004:540::/64 eui-64 | ||
interface vlan 255 | interface vlan 255 | ||
− | ipv6 | + | no ipv6 enable |
− | </ | + | </code> |
{{collapse bottom}} | {{collapse bottom}} | ||
=Servidores= | =Servidores= | ||
− | Após ativar o roteamento IPv6 e configurar as respectivas faixas tem que configurar todos os servidores que possuem IP estático<ref>[https://www.debian.org/doc/manuals/debian-handbook/sect.ipv6.en.html The Debian Administrator's Handbook, capítulo 10.5 IPv6]</ref>, abaixo um exemplo de configuração do arquivo '''/etc/networks''' para a vlan fictícia '''ABCD''' | + | Após ativar o roteamento IPv6 e configurar as respectivas faixas tem que configurar todos os servidores que possuem IP estático<ref>[https://www.debian.org/doc/manuals/debian-handbook/sect.ipv6.en.html The Debian Administrator's Handbook, capítulo 10.5: IPv6]</ref>, abaixo um exemplo de configuração do arquivo '''/etc/networks''' para a vlan fictícia '''ABCD''' |
− | + | # No final de /etc/network/interfaces | |
− | # No final de /etc/network/interfaces | + | iface eth0 inet6 static |
− | iface eth0 inet6 static | + | # IPv6 estático |
− | + | autoconf 0 | |
− | + | address 2804:1454:1004:ABCD::{ip} | |
− | + | netmask 64 | |
− | + | # Roteador autoconfigurado | |
− | + | accept_ra 1 | |
− | |||
− | |||
==Servidores sem IPv6== | ==Servidores sem IPv6== | ||
Linha 124: | Linha 154: | ||
Execute o seguinte comando para reiniciar o serviço: | Execute o seguinte comando para reiniciar o serviço: | ||
− | + | sysctl --system | |
ou | ou | ||
− | + | sysctl -p | |
Agora é hora de forçar um ip (se o ip for fixo), com o comando: | Agora é hora de forçar um ip (se o ip for fixo), com o comando: | ||
ip a a 2804:1454:1004:"vlanX"::{ip}/64 dev eth0 | ip a a 2804:1454:1004:"vlanX"::{ip}/64 dev eth0 | ||
+ | ==Configuração DNS== | ||
+ | No arquivo de configuração do DNS (no nosso caso '''/etc/bind/zones/externa/db.sj.ifsc.edu.br-A''' adicionamos a primeira linha no exemplo abaixo: | ||
+ | dns.sj.ifsc.edu.br. IN AAAA 2804:1454:1004:100::65 | ||
+ | dns.sj.ifsc.edu.br. IN A 200.135.37.65 | ||
+ | O IPv6 está primeiro para forçar os serviços a utilizarem primeiro o IPv6. Para cada IPv4 deve-se ter também um IPv6. | ||
<references/> | <references/> |
Edição atual tal como às 10h42min de 25 de junho de 2021
Roteadores
Cisco ASA 5510
A nova rede está temporariamente na interface Ethernet0/2:
! interface Ethernet0/2 description ipv4+ipv6 security-level 0 nameif ipv4+ipv6 security-level 0 ip address 200.237.201.158 255.255.255.252 ipv6 address 2801:80:a81:1:2113::2/126 ipv6 enable ipv6 nd suppress-ra no shutdown exit ! ipv6 route ipv4+ipv6 ::/0 2801:80:a81:1:2113::1 !
Swiches L3
Cisco Catalyst 3560
Ativando IPv6[1]: por padrão o Switch 3560 não fica ativo o IPv6, para ativá-lo execute o seguinte comando:
sdm prefer dual-ipv4-and-ipv6 default
Após esse comando o switch deve ser reiniciado:
reload
Ativando o IP para as VLANs
Após a ativação do comando ipv6 no switch tem que se ativar o roteamento para o IPv6
ipv6 unicast-routing
Agora é hora de configurar a faixa de IP para cada uma das Vlan's
interface vlan x ipv6 address 2804:1454:1004:"vlanX"::/64 eui-64
O comando que foi executado no switch do IFSC são José está disponível abaixo.
Comandos |
---|
|
Servidores
Após ativar o roteamento IPv6 e configurar as respectivas faixas tem que configurar todos os servidores que possuem IP estático[2], abaixo um exemplo de configuração do arquivo /etc/networks para a vlan fictícia ABCD
# No final de /etc/network/interfaces iface eth0 inet6 static # IPv6 estático autoconf 0 address 2804:1454:1004:ABCD::{ip} netmask 64 # Roteador autoconfigurado accept_ra 1
Servidores sem IPv6
Alguns servidores não estão com suporte ao IPv6 liberado. Para liberar, edite o arquivo /etc/sysctl.conf e adicione/modifique as seguintes linhas no final do arquivo:
net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0 net.ipv6.conf.eth0.disable_ipv6 = 0
Execute o seguinte comando para reiniciar o serviço:
sysctl --system
ou
sysctl -p
Agora é hora de forçar um ip (se o ip for fixo), com o comando:
ip a a 2804:1454:1004:"vlanX"::{ip}/64 dev eth0
Configuração DNS
No arquivo de configuração do DNS (no nosso caso /etc/bind/zones/externa/db.sj.ifsc.edu.br-A adicionamos a primeira linha no exemplo abaixo:
dns.sj.ifsc.edu.br. IN AAAA 2804:1454:1004:100::65 dns.sj.ifsc.edu.br. IN A 200.135.37.65
O IPv6 está primeiro para forçar os serviços a utilizarem primeiro o IPv6. Para cada IPv4 deve-se ter também um IPv6.