顯示具有 hp 標籤的文章。 顯示所有文章
顯示具有 hp 標籤的文章。 顯示所有文章

2013年11月27日 星期三

LACP - Extreme Summit X430 and HP Procuve 2610


實體環境設定

Extreme X430 的 Port 22,24 要連到 HP 2610 的 Port 5,6



Extreme:

#enable sharing 24 grouping 22, 24 algorithm address-based L2 lacp


HP:
#configure terminal
#trunk 5-6 trk1 lacp
#vlan XXX
#untag trk1


設定完成後

Extreme:

#show lacp

LACP Up                             : Yes
LACP Enabled                        : Yes
System MAC                          : 00:04:96:xx:xx:xx
LACP PDUs dropped on non-LACP ports : 1500

Lag        Actor    Actor   Partner            Partner  Partner  Agg   
           Sys-Pri  Key     MAC                Sys-Pri  Key      Count 
--------------------------------------------------------------------------------
24             0    0x0400  00:1f:28:xx:xx:xx  60032    0x0035   2
================================================================================

# show sharing
Load Sharing Monitor
Config    Current    Agg       Ld Share    Ld Share  Agg   Link    Link Up
Master    Master     Control   Algorithm   Group     Mbr   State   Transitions
==============================================================================
    24     22        LACP      L2          22         Y      A       23
                               L2          24         Y      A       20
==============================================================================
Link State: A-Active, D-Disabled, R-Ready, NP-Port not present, L-Loopback
Load Sharing Algorithm: (L2) Layer 2 address based, (L3) Layer 3 address based
                        (L3_L4) Layer 3 address and Layer 4 port based
Number of load sharing trunks: 1


HP:

# show lacp

                           LACP

   PORT   LACP      TRUNK     PORT      LACP      LACP
   NUMB   ENABLED   GROUP     STATUS    PARTNER   STATUS
   ----   -------   -------   -------   -------   -------
   5      Active    Trk1      Up        Yes       Success
   6      Active    Trk1      Up        Yes       Success

#show trunks

 Load Balancing

  Port | Name                             Type      | Group Type 
  ---- + -------------------------------- --------- + ----- -----
  5    | 4F6(409)                         10/100TX  | Trk1  LACP 
  6    | 4F5(403)                         10/100TX  | Trk1  LACP




# show vlans ports trk1

 Status and Counters - VLAN Information - for ports Trk1

  VLAN ID Name                 | Status     Voice Jumbo
  ------- -------------------- + ---------- ----- -----

  XXX    V_XXX                | Port-based No    No  

2013年3月5日 星期二

使用 Expect 備份網路設備設定檔 for HP


支援 HP ProCurve Switch 2610系列、2510系列

#!/usr/bin/expect -f

if { $argc != 4 } {
        send_user "usage: hp.exp device_ip username password server_ip \n"
        exit
}

set timeout 1
set TERM ANSI
set date [exec date +%Y%m%d]

set DEVICE [lindex $argv 0]
set USERNAME [lindex $argv 1]
set PASSWD [lindex $argv 2]
set SERVER [lindex $argv 3]


spawn telnet
expect "telnet> "
send "open $DEVICE\r"
sleep 1
expect continue { send "\r" ; exp_continue }
sleep 1
expect "Username:"
send "$USERNAME\r"
sleep 1
expect "Password:"
send "$PASSWD\r"



sleep 1
send "\r\r"
expect "#"
send "copy running-config tftp $SERVER $DEVICE-$date\r"
sleep 1
expect "#"
send "exit\r"
sleep 1
expect ">"
send "exit\r"
sleep 1
expect "Do you want to log out"
send "y\r"
interact