Mudanças entre as edições de "Telecom20162 pji3 configuracoes"
Linha 1: | Linha 1: | ||
+ | Link curto: http://bit.ly/2cMDeey | ||
+ | |||
+ | |||
+ | |||
Operadora | Operadora | ||
Linha 4: | Linha 8: | ||
/etc/network/interfaces | /etc/network/interfaces | ||
− | # interfaces(5) file used by ifup(8) and ifdown(8) | + | <code># interfaces(5) file used by ifup(8) and ifdown(8) |
auto lo | auto lo | ||
iface lo inet loopback | iface lo inet loopback | ||
Linha 50: | Linha 54: | ||
address 192.168.40.10 | address 192.168.40.10 | ||
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
+ | </syntaxhighlight | ||
############ Arquivo script de inicialização | ############ Arquivo script de inicialização |
Edição das 19h27min de 15 de setembro de 2016
Link curto: http://bit.ly/2cMDeey
Operadora
- Arquivo de configuração das interfaces de redes
/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
- Onboard interface
auto eth0
iface eth0 inet manual
bond-master bond0
bond-use-carrier 1
- Offboard interface
auto eth1
iface eth1 inet manual
bond-master bond0
bond-use-carrier 1
- Bonding
auto bond0
iface bond0 inet manual
bond-slaves none
bond-lacp-rate fast
bond-mode 802.3ad
bond-xmit_hash_policy layer2+3
bond-miimon 100
auto bond0.10
iface bond0.10 inet static
address 192.168.10.10
netmask 255.255.255.0
auto bond0.20
iface bond0.20 inet static
address 192.168.20.10
netmask 255.255.255.0
auto bond0.30
iface bond0.30 inet static
address 200.135.37.125
netmask 255.255.255.192
gateway 200.135.37.126
dns-nameservers 8.8.8.8 8.8.4.4
auto bond0.40
iface bond0.40 inet static
address 192.168.40.10
netmask 255.255.255.0
</syntaxhighlight
- Arquivo script de inicialização
/etc/rc.local
- !/bin/sh -e
- rc.local
- This script is executed at the end of each multiuser runlevel.
- Make sure that the script will "exit 0" on success or any other
- value on error.
- In order to enable or disable this script just change the execution
- bits.
- By default this script does nothing.
killall pppoe-server # Mata qualquer processo pppoe rodando
pppoe-server -C pji -L 10.0.0.1 -p /etc/ppp/faixa-ip -I bond0.40 # Cria um novo processo pppoe
sysctl -w net.ipv4.conf.all.forwarding=1 # Habilita o roteamento no servidor
iptables -t nat -A POSTROUTING -o bond0.30 -j MASQUERADE # Configura o NAT
exit 0