Mudanças entre as edições de "Telecom20162 pji3 configuracoes"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
Linha 82: Linha 82:
  
  
#############
+
> VLANS no Switch da Operadora
 +
 
 +
<code>
 +
Switch2#show vlan                                                                 
 +
 
 +
VLAN Name                            Status    Ports
 +
---- -------------------------------- --------- -------------------------------
 +
1    default                          active    Gi1/0/25, Gi1/0/26, Gi1/0/27
 +
                                                Gi1/0/28
 +
10  VLAN0010                        active    Gi1/0/3, Gi1/0/4, Gi1/0/5
 +
                                                Gi1/0/6, Gi1/0/7, Gi1/0/8
 +
                                                Gi1/0/9, Gi1/0/10, Gi1/0/11
 +
                                                Gi1/0/12
 +
20  VLAN0020                        active    Gi1/0/13, Gi1/0/14, Gi1/0/15
 +
                                                Gi1/0/16, Gi1/0/17, Gi1/0/18
 +
                                                Gi1/0/19, Gi1/0/20, Gi1/0/21
 +
                                                Gi1/0/22
 +
30  VLAN0030                        active    Gi1/0/2
 +
40  VLAN0040                        active    Gi1/0/1
 +
</syntaxhighlight>
 +
 
 +
> Interface PO 1 do Switch da Operadora
 +
 
 +
<code>
 +
Switch2#show running-config interface port-channel 1
 +
Building configuration...
 +
 
 +
Current configuration : 97 bytes
 +
!
 +
interface Port-channel1
 +
switchport trunk allowed vlan 10,20,30,40
 +
switchport mode trunk
 +
end
 +
 
 +
</syntaxhighlight>
 +
 
 +
 
 +
> Resumo das interfaces do Switch da Operadora
 +
 
 +
<code>
 +
Switch2#show running-config interface gigabitEthernet 1/0/1
 +
Building configuration...
 +
 
 +
Current configuration : 89 bytes
 +
!
 +
interface GigabitEthernet1/0/1
 +
switchport access vlan 40
 +
switchport mode access
 +
end
 +
 
 +
Switch2#show running-config interface gigabitEthernet 1/0/2
 +
Building configuration...
 +
 
 +
Current configuration : 89 bytes
 +
!
 +
interface GigabitEthernet1/0/2
 +
switchport access vlan 30
 +
switchport mode access
 +
end
 +
 
 +
Switch2#show running-config interface gigabitEthernet 1/0/23
 +
Building configuration...
 +
 
 +
Current configuration : 134 bytes
 +
!
 +
interface GigabitEthernet1/0/23
 +
switchport trunk allowed vlan 10,20,30,40
 +
switchport mode trunk
 +
channel-group 1 mode active
 +
end
 +
 
 +
Switch2#show running-config interface gigabitEthernet 1/0/24
 +
Building configuration...
 +
 
 +
Current configuration : 134 bytes
 +
!
 +
interface GigabitEthernet1/0/24
 +
switchport trunk allowed vlan 10,20,30,40
 +
switchport mode trunk
 +
channel-group 1 mode active
 +
end
 +
</syntaxhighlight>

Edição das 19h35min 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

  1. Onboard interface

auto eth0 iface eth0 inet manual

   bond-master bond0
   bond-use-carrier 1
  1. Offboard interface

auto eth1 iface eth1 inet manual

   bond-master bond0
   bond-use-carrier 1
  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

  1. !/bin/sh -e
  2. rc.local
  3. This script is executed at the end of each multiuser runlevel.
  4. Make sure that the script will "exit 0" on success or any other
  5. value on error.
  6. In order to enable or disable this script just change the execution
  7. bits.
  8. 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 </syntaxhighlight>


> VLANS no Switch da Operadora

Switch2#show vlan

VLAN Name Status Ports


-------------------------------- --------- -------------------------------

1 default active Gi1/0/25, Gi1/0/26, Gi1/0/27

                                               Gi1/0/28

10 VLAN0010 active Gi1/0/3, Gi1/0/4, Gi1/0/5

                                               Gi1/0/6, Gi1/0/7, Gi1/0/8
                                               Gi1/0/9, Gi1/0/10, Gi1/0/11
                                               Gi1/0/12

20 VLAN0020 active Gi1/0/13, Gi1/0/14, Gi1/0/15

                                               Gi1/0/16, Gi1/0/17, Gi1/0/18
                                               Gi1/0/19, Gi1/0/20, Gi1/0/21
                                               Gi1/0/22

30 VLAN0030 active Gi1/0/2 40 VLAN0040 active Gi1/0/1 </syntaxhighlight>

> Interface PO 1 do Switch da Operadora

Switch2#show running-config interface port-channel 1 Building configuration...

Current configuration : 97 bytes ! interface Port-channel1

switchport trunk allowed vlan 10,20,30,40
switchport mode trunk

end

</syntaxhighlight>


> Resumo das interfaces do Switch da Operadora

Switch2#show running-config interface gigabitEthernet 1/0/1 Building configuration...

Current configuration : 89 bytes ! interface GigabitEthernet1/0/1

switchport access vlan 40
switchport mode access

end

Switch2#show running-config interface gigabitEthernet 1/0/2 Building configuration...

Current configuration : 89 bytes ! interface GigabitEthernet1/0/2

switchport access vlan 30
switchport mode access

end

Switch2#show running-config interface gigabitEthernet 1/0/23 Building configuration...

Current configuration : 134 bytes ! interface GigabitEthernet1/0/23

switchport trunk allowed vlan 10,20,30,40
switchport mode trunk
channel-group 1 mode active

end

Switch2#show running-config interface gigabitEthernet 1/0/24 Building configuration...

Current configuration : 134 bytes ! interface GigabitEthernet1/0/24

switchport trunk allowed vlan 10,20,30,40
switchport mode trunk
channel-group 1 mode active

end </syntaxhighlight>