NAME

Net::Telnet::Huawei

SYNOPSIS

        use Net::Telnet::Huawei;
        my $net_dev=Net::Telnet::Huawei->new;
        my ($host, $user, $password, $super_password) = ('192.168.1.1', 'admin', 'password', 'super password');

        $net_dev->login($host, $user, $password, $super_password);

        # or ssh login
        # $net_dev->login($host, $user, $password, $super_password, 1);

        my @lines = $net_dev->exec_cmd('display version');
        print join("\n", @lines), "\n";

DESCRIPTION

  利用TELNET协议访问华为系列网络设备。

Subs

debug

Enable/Disable debug mode if passing an argument. Return debug mode if no argument.

new

Constructor.

wait_prompt

Wait until prompt is found.

can

Check if a device command exists.

enter_super

Enter privilege view.

set_vty_no_pause

Setting no page pause

set_vty_pause
 Setting page pause
prompt_str

Return prompt status

get_sysname

Return device host name.

login
        $obj->login($host, $username, $password, $ssh )

$ssh: 1 using ssh 0 use telnet

Login to device.

logout

$obj->logout

Logout from device.

get_device_type

Get device type

get_config_filename

Get configuration filename.

backup_config

backup config file to a ftp server.

get_version

Get software version string.

exec_cmd

Execute command and get output.

enter_system

Enter system mode.

quit_system

Quit system mode.

save configration file
get_arp

Get arp list.

get_maclist

Get mac list.

get_config

Get configration file.

set_sysname

Set the name of the device.