IRF em Switches HP 5500 (JG543A) utilizando módulo traseiro

Dica enviada pelo Samuel Alencar de Fortaleza/CE, sobre a configuração de um IRF em Switches HP 5500 (JG543A) utilizando o módulo traseiro com interfaces CX4 (JD360B).

Ele foi bastante gentil em compartilhar com o Blog o script final da configuração. Aproveitem!

CONFIGURAÇÃO DO SWICTH A

PASSO 0

<HP> reset saved-configuration
<HP> reboot
! reinicie o switch e não salve a configuração.


PASSO 3

[HP] irf member 1 priority 32
[HP] int tengigabitethernet 1/1/1
[HP –Ten-GigabitEthernet1/1/1] shutdown

[HP] irf-port 1/1
[HP – irf-port] port group interface tem 1/1/1
[HP] int TenGigabitEthernet 1/1/1
[HP –Ten-GigabitEthernet1/1/1] undo shutdown
[HP] irf-port-configuration active
[HP] save

CONFIGURAÇÃO DO SWICTH B

PASSO 1

! Desconecte os cabos do IRF
<HP> reset saved-configuration
<HP> reboot
! reinicie o switch e não salve a configuração.

PASSO 2

[HP] irf member  1 renumber 2
[HP] quit
<HP> reboot


PASSO 4

[HP] irf member 2 priority 31
[HP] int tengigabitethernet 2/2/2
[HP –Ten-GigabitEthernet2/2/2] shutdown

[HP] irf-port 2/2
[HP – irf-port] port group interface tem 2/2/2
[HP] int TenGigabitEthernet 2/2/2
[HP –Ten-GigabitEthernet2/2/2] undo shutdown
[HP –Ten-GigabitEthernet2/2/2] quit
[HP] irf-port-configuration active
[HP] save
! Reconecte os cabos e se o switch não reiniciar automaticamente, digite
! o comando 'irf-port-configuration active'.


[HP]quit
<HP>reboot

Comandos secretos para os Switches HP 1950

Galera, segue abaixo a dica para liberar a configuração de algumas funcionalidades via CLI para os Switches HP 1950.

O comando “xtd-cli-mode” no modo user-view libera a configuração “avançada” do Switch via CLI.

Após digitar o comando aparecerá a imagem de warning abaixo. A senha é: foes-bent-pile-atom-ship

<HPE>xtd-cli-mode
All commands can be displayed and executed in extended CLI mode. Switch to extended CLI mode? [Y/N]:Y
Password:
Warning: Extended CLI mode is intended for developers to test the system. Before using commands in extended CLI mode, contact the Technical Support and make sure you know the potential impact on the device and the network.

Após isso os comandos abaixo serão liberados:

<HPE>?
User view commands:
  archive             Archive configuration
  backup              Backup the startup configuration file to a TFTP server
  boot-loader         Software image file management
  bootrom             Update/read/backup/restore bootrom
  cd                  Change current directory
  cfd                 Connectivity Fault Detection (CFD) module
  clock               Specify the system clock
  copy                Copy a file
  debugging           Enable system debugging functions
  delete              Delete a file
  diagnostic-logfile  Diagnostic log file configuration
  dir                 Display files and directories on the storage media
  display             Display current system information
  exception           Exception information configuration
  fdisk               Partition a storage médium
  fixdisk             Check and repair a storage médium
  format              Format a storage médium
  free                Release a connection
  ftp                 Open an FTP connection
  gunzip              Decompress file
  gzip                Compress file
  install             Perform package management operation
  lock                Lock the current line
  logfile             Log file configuration
  md5sum              Compute the hash digest of a file using the MD5 algorithm
  mkdir               Create a new directory
  monitor             System monitor
  more                Display the contents of a file
  move                Move a file
  oam                 OAM module
  ping                Ping function
  process             Process management
  pwd                 Display current working directory
  python              Source using python script
  quit                Exit from current command view
  reboot              Reboot operation
  rename              Rename a file or directory
  reset               Reset operation
  restore             Restore next startup-configuration file from TFTP server
  rmdir               Remove an existing directory
  save                Save current configuration
  scheduler           Scheduler configuration
  scp                 Establish an SCP connection
  screen-length       Multiple-screen output function
  security-logfile    Security log file configuration
  send                Send information to other lines
  sftp                Establish an SFTP connection
  sha256sum           Compute the hash digest of a file using the SHA256
                      algorithm
  ssh2                Establish a secure shell client connection
  startup             Specify system startup parameters
  super               Switch to a user role
  system-view         Enter the System View
  tar                 Archive management
  tclquit             Exit from TCL shell
  tclsh               Enter the TCL shell
  telnet              Establish a telnet connection
  terminal            Set the terminal line characteristics
  tftp                Open a TFTP connection
  tracert             Tracert function
  undelete            Recover a deleted file
  undo                Cancel current setting
  web                 Web configuration
  xml                 Enter XML view
  xtd-cli-mode        Switch to extended CLI mode to display and execute all commands (special authorization required)

Até logo!

Referência:
https://jailsonnascimento.wordpress.com/2017/04/26/habilitando-todos-os-comando-no-switch-hp-1950/

Vídeo: Comware – Configurando IRF

O empilhamento de switches, também conhecido como stacking permite configurar diversos switches como se fossem um único switch lógico, simplificando drasticamente a administração da sua rede e aumentando significativamente a disponibilidade e o desempenho.

Neste vídeo completo, você aprenderá a configurar o IRF (Intelligent Routing and Forwarding) em switches 3Com, H3C e HP baseados no Comware:

  • Introdução ao empilhamento de switches: Descubra os principais benefícios dessa tecnologia e como ela pode otimizar sua rede.
  • Funcionamento do IRF: Compreenda os conceitos básicos do IRF e como ele transforma switches físicos em um único switch lógico.
  • Configuração passo a passo: Siga as instruções detalhadas para configurar o IRF em seus switches 3Com ou HP com Comware.
  • Gerenciamento simplificado: Aprenda a gerenciar o switch empilhado como um único dispositivo, reduzindo o tempo e o esforço necessários para a administração da rede.
  • Maior disponibilidade: Elimine pontos únicos de falha e garanta a alta disponibilidade da sua rede, mesmo em caso de falha de um switch individual.
  • Melhor desempenho: Distribua o tráfego de forma inteligente entre os switches empilhados, otimizando o desempenho geral da rede.

Comware 7: Autenticação com FreeRADIUS

A autenticação em Switches e Roteadores para fins de administração dos dispositivos pode ser efetuada com uma base de usuários configurados localmente ou em uma base de usuários remota que pode utilizar servidores RADIUS ou TACACS.

No exemplo abaixo montamos um ‘How to’ com o auxílio do Derlei Dias, utilizando o FreeRADIUS no Slackware para autenticação em um roteador HP VSR1000 que possui como base o Comware 7.

Instalando Freeradius no Slackware

1 – Baixe os pacotes do slackbuilds.org e instale normalmente;

2 – Após instalação vá na pasta /etc/raddb/certs e execute o bootstrap;

3 – Usando de forma simples sem base de dados, abra o arquivo /etc/raddb/users;

4 – Adicione na primeira linha: student1   Cleartext-Password := “labhp”
! Usaremos como exemplo o usuário ‘student1’ com a senha ‘labhp’

5 – Depois use o comando a seguir para testar: radtest student1 labhp localhost 0 testing123
! O ‘testing123’ servirá como chave para autenticação entre o Switch/Roteador e o Radius

6 – A resposta deverá ser essa, se a autenticação ocorrer com sucesso:

Sending Access-Request of id 118 to 127.0.0.1 port 1812
User-Name = "student1"
User-Password = "labhp"
NAS-IP-Address = 10.12.0.102
NAS-Port = 0
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=118, length=20

7 – Lembre-se que ao inserir usuários no arquivo você deverá reiniciar o RADIUS.

8 – Editar o arquivo clients.conf e permitir a rede que fará acesso ao servidor.

10 – Alguns dispositivos requerem uma configuração especial no clients.conf e no users:

Configuração no RADIUS para Switches/Roteadores HP baseados no Comware7

Arquivo Clients.conf

client ip_do_device/máscara {
        secret          = testing123
}

ou

client vr1000 {
       ipaddr = ip_do_roteador
       secret          = testing123
}

Arquivo users

nome_usuario    Cleartext-Password := "senha"
                Service-Type = NAS-Prompt-User,
                Cisco-AVPair = "shell:roles=\"network-admin\"",

nome_usuario    Cleartext-Password := "senha"
                Service-Type = NAS-Prompt-User,
                Cisco-AVPair = "shell:roles=\"network-operator\""

Após ocorrer a autenticação do usuário com sucesso, o servidor RADIUS irá retornar uma das CiscoAVPairs para a autorização da ‘role’ que o usuário deve obter quando autentica no dispositivo. Você pode usar o network-admin, ou o network-operator, ou alguma role criada para RBAC.

Configurando o Comware7

#
interface GigabitEthernet1/0
 ip address 10.12.0.102 255.255.255.0
#
radius scheme rad
 primary authentication 10.12.0.100 key cipher $c$3$5mQHlUeQbVhRKAq3QxxN0NiB0Sc8jbyZFKyc3F0=
 primary accounting 10.12.0.100 key cipher $c$3$Q12zYBjRIkRGeQQL6gYm4wofbMfjDl/Cqalc17M=
 accounting-on enable
 user-name-format without-domain
! É possível enviar o usuário com ou sem o formato @dominio 
nas-ip 10.12.0.102
#
domain bbb
 authentication login radius-scheme rad
 authorization login radius-scheme rad
 accounting login radius-scheme rad
#
 domain default enable bbb
#
user-vty 0 63
authentication-mode scheme

Referências e observações

Após quebrar bastante a cabeça com diversos parâmetros e alguns dias de teste, usamos o documento http://h30499.www3.hp.com/hpeb/attachments/hpeb/switching-a-series-forum/5993/1/Freeradius%20AAA%20Comware%207.pdf como referência que cita a conexão do simulador HCL com FreeRADIUS no Ubuntu.

Treinamento Comware – Aula 7 – AAA, RADIUS, TACACS+

Aula 7 do Treinamento Comware para Switches HP. ​O acrônimo AAA é uma referência aos protocolos relacionados com os procedimentos de autenticação, autorização e contabilidade. Vários métodos, tecnologias e protocolos podem ser usados ​​para implementar o controle de identidade e acesso, fornecendo informações sobre a validade das credenciais, direitos de acesso e auditoria. Como continuidade demonstramos a configuração do RADIUS e TACACS+ para gerenciamento dos Switches e Roteadores.

Treinamento Comware – Aula 6 – Empilhamento com IRF (Stacking)

Aula 6 do Treinamento Comware para Switches HP. Nesse vídeo demonstramos o funcionamento do empilhamento ou stacking com IRF. A funcionalidade é utilizada para configuração de diversos switches em um único switch lógico. Todos os equipamentos serão visualizados como uma única “caixa”, aumentando a disponibilidade da rede.

Dicionário de Comandos BGP: Comware vs Cisco

Pessoal, segue abaixo a lista de alguns comandos para BGP quando há a necessidade de traduzir de Cisco IOS para HP Comware.

Comware                                                      Cisco IOS
------------                                                 --------------
bgp xxxxx                                                   router bgp xxxxx
router-id x.x.x.x                                           bgp router-id x.x.x.x 
preference 200 200 200 (valor recomendado, não é default)   distance 20 200 200 (default)
undo synchronization                                        no synchronization (not default)
v5: recomendado (não é default)
v7: default
undo summary automatic (default)                            no auto-summary (not default)
log-peer-change                                             bgp log-neighbor-changes
graceful-restart                                            bgp graceful-restart
bgp graceful-restart restart-time 120 (default)             bgp graceful-restart stalepath-time 360 (default)
balance n (default=1)                                       maximum-path (dependente do contexto, default=1)
v5: global BGP config
v7: in ipv4 address family
maximum-path n (n=numero de rotas paralelas)                 maximum-path ibgp m 
ebgp-interface-sensitive (default)                           bgp fast-external-fallover (default)
network x.x.x.x y.y.y.y                                      network x.x.x.x mask y.y.y.y
aggregate x.x.x.x y.y.y.y                                    aggregate-addresss x.x.x.x y.y.y.y
aggregate x.x.x.x y.y.y.y detail-suppressed                  aggregate-addresss x.x.x.x y.y.y.y summary-only
import-route static [route-policy name]                      redistribute static [route-map name]
import-route direct [route-policy name]                      redistribute connected [route-map name]
import-route ospf process_id [route-policy name]             redistribute ospf process_id [route-map name]
default-information originate                                 
reflector cluster-id x.x.x.x                                 bgp cluster-id x.x.x.x
dampening                                                    bgp dampening
peer x.x.x.x as-number AS-number                             neighbor x.x.x.x remote-as AS-number
peer x.x.x.x description blabla                              neighbor x.x.x.x description blabla
peer x.x.x.x connect-interface LoopBack0                     neighbor x.x.x.x update-source Loopback0
peer x.x.x.x next-hop-local                                  neighbor x.x.x.x next-hop-self
peer x.x.x.x advertise-community                             neighbor x.x.x.x send-community
peer x.x.x.x password simple|cipher string                   neighbor x.x.x.x password 7 string
(default)                                                    neighbor x.x.x.x version 4 (no negotiation)
peer x.x.x.x ebgp-max-hop                                    neighbor x.x.x.x ebgp-multihop hop_count
peer x.x.x.x preferred-value default_prefval                 neighbor x.x.x.x weight default_weight
peer x.x.x.x default-route-advertise route-policy name       neighbor x.x.x.x default-originate route-map name
peer x.x.x.x timer keepalive keepalive hold holdtime         neighbor x.x.x.x timers keepalive holdtime minholdtime
peer x.x.x.x route-policy name import | export               neighbor x.x.x.x route-map name in | out
peer x.x.x.x public-as-only                                  neighbor x.x.x.x remove-private-as
peer x.x.x.x fake-as AS-number                               neighbor x.x.x.x local-as no-prepend AS-number replace-as
peer x.x.x.x substitute-as                                  
peer x.x.x.x allow-as-loop AS_occurances                     neighbor x.x.x.x allowas-in AS_occurances  
peer x.x.x.x route-limit prefix_number % reconnect restart_interval 
                                              neighbor x.x.x.x maximum-prefix prefix_number % restart restart_interval
peer x.x.x.x reflect-client                                  neighbor x.x.x.x route-reflector-client
peer x.x.x.x ignore                                          neighbor x.x.x.x shutdown
group group_name internal | external                         neighbor group_name peer-group
peer x.x.x.x group group_name                                neighbor x.x.x.x peer-group group_name

compare-different-as-med                                     bgp always-compare-med
bestroute compare-med                                        bgp deterministic-med
bestroute as-path-neglect                                    bgp bestpath as-path ignore

undo default ipv4-unicast                                    no bgp default ipv4-unicast
(Default)                                                    bgp suppress-inactive
peer x.x.x.x capability-advertise orf ip-prefix both         neighbor x.x.x.x capability orf prefix-list both
peer x.x.x.x capability-advertise route-refresh (default)    neighbor x.x.x.x soft-reconfiguration inbound
peer x.x.x.x bfd                                             neighbor x.x.x.x fall-over bfd
peer x.x.x.x route-update-interval timer                     neighbor x.x.x.x advertisement-interval seconds
(iBGP default=5s, eBGP default=30s)                          iBGP default=0s, eBGP (na VRF) default=0s, eBGP default=0s)
peer x.x.x.x next-hop-local                                  neighbor x.x.x.x next-hop-self
peer x.x.x.x capability-advertise orf ip-prefix both         neighbor x.x.x.x capability orf prefix-list both
Deve ser usado no vpnv4 address-family.                      Deve ser usado no vpnv4 address-family.
peer x.x.x.x advertise-ext-community                         neighbor x.x.x.x send-community extended | both
undo peer x.x.x.x enable                                     no neighbor x.x.x.x activate

Verificando a troca de prefixos												
display bgp routing-table peer x.x.x.x received-routes      show ip bgp neighbors x.x.x.x received-routes
display bgp routing-table peer x.x.x.x advertised-routes    show ip bgp neighbors x.x.x.x advertised-routes

MPBGP
display bgp vpnv4 vpn-instance vpn-instance-name routing-table peer x.x.x.x received-routes
show ip bgp vpnv4 vrf vrf-instance-name neighbors x.x.x.x received-routes
display bgp vpnv4 all routing-table peer x.x.x.x received-routes
v5
show ip bgp vpnv4 all neighbors x.x.x.x received-routes

display bgp vpnv4 vpn-instance vpn-instance-name routing-table peer x.x.x.x advertised-routes
show ip bgp neighbors x.x.x.x advertised-routes
display bgp vpnv4 all routing-table peer x.x.x.x advertised-routes
show ip bgp

Comware – T38 – Fax over IP (FoIP) em Roteadores HP MSR

O Fax (abreviação de fac-símile) é a transmissão telefônica de material impresso digitalizado (texto e imagens), normalmente para um número de telefone conectado a uma impressora ou outro dispositivo de saída.

O protocolo T.38 permite transmitir mensagens de fax através de uma rede IP em tempo real (na velocidade da transmissão). Os aparelhos de FAX não necessariamente precisam obter informações sobre a rede e podem continuar a enviar as suas mensanges no padrão T.30.

O padrão T.38 Fax Relay foi concebido em 1998 como uma maneira de permitir que a mensagem via fax a seja transportadas através de redes IP entre terminais de fax existentes no padrão do Grupo 3.

Existem outros protocolos de envio de FAX sobre IP mas o padrão do ITU é o T.38.

Como T.38 Fax Relay funciona?

Os dados modulados pelo fax analógico são digitalizados pelo DSP (Digital Signal Processor) no gateway e as informações são geradas em binário.

A informações em binário são encapsuladas no pacote T.38 e então transportada pela rede IP.

O DSP no gateway de destino extrai a informação transportada pelo pacote T.38 e modula dentro do sinal de fax analógico tradicional.

Configuração

No exemplo abaixo utilizaremos o mesmo exemplo do Configuration Guide do MSR 3012 para Voz, utilizando SIP entre duas localidades.

<RouterA> system-view
[RouterA] voice-setup
[RouterA-voice] dial-program
[RouterA-voice-dial] entity 2000 voip
[RouterA-voice-dial-entity2000] match-template 2000
[RouterA-voice-dial-entity2000] address sip ip 10.2.2.2
[RouterA-voice-dial-entity2000] fax protocol standard-t38 ls-redundancy 4
[RouterA-voice-dial-entity2000] quit
[RouterA-voice-dial] entity 1000 pots
[RouterA-voice-dial-entity1000] match-template 1000
[RouterA-voice-dial-entity1000] line 2/1/1
[RouterA-voice-dial-entity1000] fax protocol standard-t38 ls-redundancy 4
####
<RouterB> system-view
[RouterB] voice-setup
[RouterB-voice] dial-program
[RouterB-voice-dial] entity 1000 voip
[RouterB-voice-dial-entity1000] match-template 1000
[RouterB-voice-dial-entity1000] address sip ip 10.1.1.1
[RouterB-voice-dial-entity1000] fax protocol standard-t38 ls-redundancy 4
[RouterB-voice-dial-entity1000] quit
[RouterB-voice-dial] entity 2000 pots
[RouterB-voice-dial-entity2000] match-template 2000
[RouterB-voice-dial-entity2000] line 2/1/1
[RouterB-voice-dial-entity2000] fax protocol standard-t38 ls-redundancy 4

Para visualizar as estatísticas utilize os comandos:

display voice fax statistics
reset voice fax statistics

Até logo

Referências

HPE FlexNetwork MSR Router Series – Voice – Configuration Guide Document version: 6PW104-20151118

https://en.wikipedia.org/wiki/T.38