行走在技术的道路上,目标高,精,尖!

Goin's Blog


  • 首页

  • 分类

  • 我的简历

  • 归档

  • 标签

  • 站点地图

  • 公益404

华为常用命令

发表于 2018-09-06

######################################

常用命令

######################################
1U=44.5mm
核心:Core,汇聚:Dditribution,接入:Access
PVID=private vlan ID,华为的缺省vlan叫private vlan,cisco的缺省vlan叫native vlan
scheme/计划
alarm/警告
entries/进入
authentication/鉴定
authorization/授权
anti-attack/抗攻击的
URPF(Unicast Reverse Path Forward)/单播反向路径发送
abnormal/反常的,变态的
fragment/碎片
specify/vt.指定;详细说明
characteristics/n.特征
discard=drop/vt.vi.n.抛弃
combo/n.联合体,复用端口

======通用命令==========
交换机默认的 bootrom 密码
交换机系统启动bootrom时,在2秒内按下“CTRL+B”,此处需要输入密码才
能进入BOOTROM菜单。默认密码如下:

  1. S9300 V100R006及其之前的版本:9300
  2. S7700 V100R006及其之前的版本:huawei
  3. 盒式交换机V100R006(V100R006C03除外)及其之前的版本:huawei
  4. 全系列以太网交换机V200R001、V100R006C03版本:Admin@huawei.com

console口密码破解

阅读全文 »

S7703与cisco3560通过trunk模式的端口互连,链路无法起来

发表于 2018-08-24

根因:

由于思科设备在开启端口的trunk模式时会运行其私有协议DTP自动协商链路模式,导致S7703在与其对接时无法协商成功。
解决方案
当华为交换机需与思科交换机对接并需要将各自端口模式配置为trunk模式时,建议关闭两端端口自协商,且思科设备关闭DTP协商。配置命令如下:

华为设备:

interface GigabitEthernet x/x/x
undo negotiation auto
port link-type trunk
port trunk allow-pass vlan xx

思科设备:

interface GigabitEthernetx/x/x
switchport trunk encapsulation dot1q
switchport trunk allowed vlan xx
switchport mode trunk
switchport nonegotiate
speed nonegotiate

END

linux学习笔记

发表于 2017-12-27

fcitx 中文输入法

  • 通配符,代表一个或多个任意字符
    ? 通配符,仅表示一个任意字符
    ctrol+alt+t #命令行终端快捷方式
    Ctrl + Alt + F2 #X window切换到命令行模式

/boot
/bin 执行命令
/sbin 重要系统执行命令
/dev
/etc
/srv service
/var variable
/opt 第三方协力程式
/usr unix software resource
/tmp
/proc 内存中的数据

阅读全文 »

一个ping,traceroute检测shell脚本

发表于 2017-12-20

#this script is made for check one host,if it is unreachable,then output result of traceroute can refer to traceroute.txt file.
#want to check the result,please use "tail -n 100 traceroute.txt"
#version 2
#20170614
#!/bin/sh
while [ "1" = "1" ]
do 
ping -c 1 192.168.30.21 > /dev/null
a=$?
if [ $a -eq 1 ]
then 
    echo $a >> ping.txt
    b=$(awk 'END{print NR}' ping.txt)
    if [ $b -eq 5 ]
    then 
        date=` date +%Y%m%d-%k:%M:%S `
        echo "=======start=======" >> traceroute.txt
        echo $date >> traceroute.txt
        traceroute 8.8.8.8 >> traceroute.txt
        c=$(awk 'END{print NR}' traceroute.txt)
        if [ $c -gt 3000 ]
        then
            tail -n 300 > traceroute-temp.txt
            cat traceroute-temp.txt > traceroute.txt
            rm -rf traceroute-temp.txt
        fi
    fi
else
    cat /dev/null > ping.txt
fi
done

脚本说明:ping检测到ip192.168.30.21,连续不通5次就输出traceroute 8.8.8.8的结果到traceroute.txt

linux使用密钥对+短语认证

发表于 2017-12-10
  1. 即是密钥对登陆,故而首先要生成密钥对
    windows下用xshell,securecrt,生成密钥对
    密钥分两种:标准公钥和vandyke私钥格式;openssh密钥格式

linux安装phpstudy后phpmyadmin error

发表于 2017-09-20

问题描述:
linux安装phpstudy后,phpmyadmin打不开,报错
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

解决方法:
vi /phpstudy/server/php/etc/php.ini
定位如下行
session.save_path = “”
修改为
session.save_path = “/phpstudy/www/tmp”
如果行首有分号“;”要删除

然后重启phpstudy
phpstudy restart

华为初始化配置命令

发表于 2017-09-06

#########################

华为初始化配置命令

#########################

核心:Core,汇聚:Dditribution,接入:Access

=========通用配置命令===========
1,clea rconfiguration interface #清除接口配置
2,display logbuffer #显示系统日志信息
3,terminal monitor #启用终端显示信息,可查看最近端口的动态信息
4,undo terminal monitor #关闭终端信息显示
5,terminal logging #启用终端显示日志信息

========交换机配置命令==========
for H3C S3100-SI5100
1,

system-view #进入配置模式
[Quidway]sysname Distribution-3f-1 #配置名称为GR3f-CT-Core
Core/核心,Distribution/汇聚,Access/接入
2,配置管理vlan和IP
[Quidway]vlan 168
[Quidway-vlan2]quit
[Quidway]interface vlanif 168 #“168”为要配置ip的vlan ID
[Quidway-vlanif2]ip address 172.16.0.1 24

===============================================
关于aaa ssh登陆配置的关键
1>创建aaa用户
[Quidway-aaa]local-user grit password grit2015
2>给予aaa用户ssh telnet服务权限ssh telnet
[Quidway-aaa]local-user grit service-type ssh telnet
3>生成密钥对
[Quidway]rsa local-kup-pair create
4>ssh使能,ssh用户配置服务类型(指定grit为ssh认证用户)
[Quidway]stelnet server enable
[Quidway]ssh user grit service-type all
[Quidway]ssh user grit anthenticationt-type all
5>vty应用
[Quidway-ui-vty0-4]authentication-mode aaa
[Quidway-ui-vty0-4]protocol inbound all

–>->

3,在aaa添加用户
[Quidway]aaa
[Quidway-aaa]local-user grit password grit2015
[Quidway-aaa]local-user grit password cipher grit2015
[Quidway-aaa]local-user grit privilege level 3 #设置为配置级
[Quidway-aaa]local-user grit service-type telnet ssh #配置grit应用的服务

4,配置vty ssh登陆
1>
[quidway]aaa #创建AAA用户
[quidway-aaa]local-user grit password cipher grit2015
[quidway-aaa]local-user grit privilege level 3 #指定grit为管理级
[Quidway-aaa]local-user grit service-type telnet ssh #配置grit应用的服务
2>
[Quidway]rsa local-key-pair create #生成本地密钥对(主要用于ssh)
[quidway]stelnet server enable #ssh使能
[quidway]ssh user grit service-type stelnet
[quidway]ssh user grit authentication-type password #配置ssh用户认证和服务方式
3>vty接口配置
[quidway]user-interface vty 0 4 #进入vty
[quidway-ui-vty0-4]authentication-mode aaa

[quidway-ui-vty0-4]protocol inbound ssh

设置接口登陆密码,无需输入用户名
[Quidway-ut-vty0-4]authentication mode password #接口改为密码认证

[Quidway-ui-vty0-4]set authentication password chiper huawei123

4,配置console
[Quidway]user-interface console 0
[Quidway-console0]authentication-mode aaa #使用AAA鉴权
[Quidway-console0]authentication-mode password #单独配置一个console口密码
[Quidway-console0]set authentication pasword cipher grit2015

#配置console口登陆密码

5,端口批量处理/interface range fa 0/1 -10
[Quidway]port-group 1 #创建一个端口组
[Quidway-port-group-1]group-member Ethernet 0/0/1 to Ethernet 0/0/10
[Quidway-port-group-1]port link-type access
[Quidway-port-group-1]port default vlan 2 #将端口组加入vlan 2
或者
[QuidWay]port-group group-member Ethernet 0/0/1 to Ethernet 0/0/10
[QuidWay-port-group]port link-type access
[QuidWay-port-group]port default vlan 2

6,配置时间

clock datetime HH:MM:SS YYYY-MM-DD
7,清空端口配置,恢复默认
[Quidway-GigabitEthernet0/0/1]clear configuration this

*8,配置gvrp[透传学习到的vlan无法default到access口,初始不配置,没什么用]
[Quidway]gvrp #gvrp全局使能
[Quidway]port-group gvrp #建立gvrp端口组
[Quidway-port-group-gvrp]group-memeber GigabitEthernet 0/0/1 to
GigabitEthernet 0/0/2 #将端口添加进组
[Quidway-port-group-gvrp]port link-type trunk
[Quidway-port-group-gvrp]port trunk allow-pass vlan all #必须是vlan all
[Quidway-port-group-gvrp]gvrp #在端口上gvrp使能

=======路由器配置命令===========
AR
admin/admin
admin/Admin@123

windows虚拟wifi有关

发表于 2017-08-24

windows电脑虚拟wifi共享网络,无线网卡共享有线网卡网络,无线网卡共享无线网卡网络
首先,我们一般会
netsh wlan show drivers #检查下hosted network supported 是否是yes,如果是no,非win10的操作系统,则可以尝试下更新网卡驱动;如果是win10的系统,则用win10自带的Mobile hotspot去共享;如果是yes,则继续
netsh wlan set hostednetwork mode=allow ssid=wifi key=123456789
netsh wlan start hostednetwork
netsh wlan show hostednetwork

如果出现wifi自动关闭,或无连接终端,wifi自动关闭的情况
则可以在设备管理器里找出虚拟出的网卡,然后右键属性,电源管理,取消勾选“允许电脑关闭此设备已节能”

解决外接显示器桌面图标变乱

发表于 2017-08-21

故障表述:
笔记本在使用外接显示器时,导致系统桌面图标错乱,每次移动好之后又会变乱,不是桌面图标自动排列的问题。

故障原因:
两台显示器分辨率不一样

解决方法:
在桌面鼠标右键,单击display settings->display->Advanced display settings,把1,2显示器的Resolution选项里的分辩率选成一样。

私钥转换ppk

发表于 2017-08-02

背景知识
openSSL是密码学库,主要设计目的是加密网络数据流(应用层和传输层)。
OpenSSH是使用OpenSSL实现的Remote Shell

运维中常用的连接软件有:

1. xshell
2. securecrt
3. putty
4. winscp 图形化sftp

xshell推荐使用,因为既可以用rsa格式的私钥,也可以用PPK私钥


securecrt下的私钥转换成winscp下可用的ppk私钥的方法

方法一:直接用winscp指定securecrt的私钥,软件会自动识别并提示转换成ppk,按向导提示操作即可
方法二:用putty key generator将rsa私钥转换成ppk私钥
方法三:用高于6.5版本的securecrt 工具->转换私钥为openssh格式


securecrt
secure shell (ssh)
openssh des-ede3-cbc rsa private key
winscp
openssh rsa密钥 aes256-cbc putty private key ppk

openssh 密钥格式
putty private key密钥格式

openssl

12
Goin

Goin

Welcome to my technological blog!

13 日志
12 标签
© 2014 - 2018 Goin
由 Hexo 强力驱动
主题 - NexT.Muse
     | 本站总访问量
      您是第 个小伙伴