您的位置:首页 > 其它

交换、路由与防火墙手记(3)

2015-09-06 18:27 344 查看
交接机的名称、时钟以及IP地址配置
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.

[Huawei]sysname myhaspl
[Huawei]quit

<myhaspl>clock timezone BJ add 08:00
<myhaspl>clock datetime 15:34:00 2015-09-06
<myhaspl>sy
<myhaspl>system-view 
Enter system view, return user view with Ctrl+Z.



清空当前配置,重新进行配置
[myhaspl]return
<myhaspl>reset saved-conf
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:y
Warning: Now clearing the configuration in the device.
Sep  7 2015 09:35:35-08:00 myhaspl %%01CFM/4/RST_CFG(l)[61]:The user chose Y when
 deciding whether to reset the saved configuration.
Info: Succeeded in clearing the configuration in the device.
<myhaspl>reboot
Info: The system is now comparing the configuration, please wait.
Warning: All the configuration will be saved to the configuration file for the ne
xt startup:, Continue?[Y/N]:n
Info: If want to reboot with saving diagnostic information, input 'N' and then ex
ecute 'reboot save diagnostic-information'.
System will reboot! Continue?[Y/N]:y
Sep  7 2015 09:35:50-08:00 myhaspl %%01CMD/4/REBOOT(l)[62]:The user chose Y when 
deciding whether to reboot the system. (Task=co0, Ip=**, User=**)

交接机通常拥有一个默认的vlan 1,所有端口都在该vlan上。
<myhaspl>disp vlan 1
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
#: ProtocolTransparent-vlan;    *: Management-vlan;
--------------------------------------------------------------------------------

VID  Type    Ports                
--------------------------------------------------------------------------------
1    common  UT:GE0/0/1(U)      GE0/0/3(U)      GE0/0/4(U)      GE0/0/5(D)      
                GE0/0/6(D)      GE0/0/7(D)      GE0/0/8(D)      GE0/0/9(D)      
                GE0/0/10(D)     GE0/0/11(D)     GE0/0/12(D)     GE0/0/13(D)     
                GE0/0/14(D)     GE0/0/15(D)     GE0/0/16(D)     GE0/0/17(D)     
                GE0/0/18(D)     GE0/0/19(D)     GE0/0/20(D)     GE0/0/21(D)     
                GE0/0/22(D)     GE0/0/23(D)     GE0/0/24(D)                     

VID  Status  Property      MAC-LRN Statistics Description      
--------------------------------------------------------------------------------
1    enable  default       enable  disable    VLAN 0001                         
<myhaspl>

本博客所有内容是原创,如果转载请注明来源

http://blog.csdn.net/myhaspl/

配置交接机IP
[myhaspl]vlan 20
[myhaspl-vlan20]interface vlan 20
[myhaspl-Vlanif20]ip address 192.168.10.254 255.255.255.0
[myhaspl-Vlanif20]quit
[myhaspl]interface GigabitEthernet 0/0/2

[myhaspl-GigabitEthernet0/0/2]port link-type access

[myhaspl]vlan 20
[myhaspl-vlan20]port GigabitEthernet 0/0/2

查看当前用户界面信息
<myhaspl>disp user-interface 
  Idx  Type     Tx/Rx      Modem Privi ActualPrivi Auth  Int     
+ 0    CON 0    9600       -     3     3           N     -       
  34   VTY 0               -     0     -           P     -       
  35   VTY 1               -     0     -           P     -       
  36   VTY 2               -     0     -           P     -       
  37   VTY 3               -     0     -           P     -       
  38   VTY 4               -     0     -           P     -       
  67   LTT 0    9600       -     0     -           N     -       
  68   LTT 1    9600       -     0     -           N     -       
  69   LTT 2    9600       -     0     -           N     -       
  70   LTT 3    9600       -     0     -           N     -       
  71   LTT 4    9600       -     0     -           N     -       
  72   LTT 5    9600       -     0     -           N     -       
  73   LTT 6    9600       -     0     -           N     -       
  74   LTT 7    9600       -     0     -           N     -       
  75   LTT 8    9600       -     0     -           N     -       
  76   LTT 9    9600       -     0     -           N     -       
  77   LTT 10   9600       -     0     -           N     -       
  78   LTT 11   9600       -     0     -           N     -       
  79   LTT 12   9600       -     0     -           N     -       
  80   LTT 13   9600       -     0     -           N     -       
  81   LTT 14   9600       -     0     -           N     -       
  82   LTT 15   9600       -     0     -           N     -       
  83   LTT 16   9600       -     0     -           N     -    

              

UI(s) not in async mode -or- with no hardware support: 
1-32  
  +    : Current UI is active.
  F    : Current UI is active and work in async mode.
  Idx  : Absolute index of UIs.
  Type : Type and relative index of UIs.
  Privi: The privilege of UIs.
  ActualPrivi: The actual privilege of user-interface.
  Auth : The authentication mode of UIs.
      A: Authenticate use AAA.
      N: Current UI need not authentication.
      P: Authenticate use current UI's password.
  Int  : The physical location of UIs.

下面中的auth为用户界面的验证方式

A: Authenticate use AAA. 表示用户名和密码同时输入进行验证

P: Authenticate use current UI's password.表示只需要输入密码

N: Current UI need not authentication. 表示无需输入用户名和密码

本博客所有内容是原创,如果转载请注明来源

http://blog.csdn.net/myhaspl/

配置用户最大的vty界面数量及vty界面[myhaspl]user-interface maximum-vty 10
[myhaspl]user-interface vty 0 5
[myhaspl-ui-vty0-5]
[myhaspl-ui-vty0-5]user privilege level 2

[myhaspl-ui-vty0-5]authentication-mode aaa
[myhaspl-ui-vty0-5]quit
[myhaspl]aaa
[myhaspl-aaa]local-usermyhaspl password cipher myhaspl.com
Info: Add a newuser.
[myhaspl-aaa]local-user myhaspl service-type telnet
[myhaspl-aaa]return
<myhaspl>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: