祖瑞科技 全国计算机 网络IT运维社区!

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 4679|回复: 0

HCNA-2 熟悉相关常用的IP命令

[复制链接]

199

主题

212

帖子

1200

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1200
发表于 2021-2-4 17:34:52 | 显示全部楼层 |阅读模式
HCNA-2 熟悉相关常用的IP命令

1、配置时钟
<Huawei>clocktimezone BJ add 8:00:00  //配置时区
<Huawei>clockdatetime 17:16 2020-04-13  //配置日期时间
<Huawei>displayclock  //查看时钟
2020-04-1317:16:13
Monday
Time Zone(BJ): UTC+08:00

2、配置路由接口IP地址
<Huawei>system-view  //系统视图
[Huawei]sysnameRouter1  //配置设备名称
[Router1]interfaceGigabitEthernet 0/0/0  //GE 0/0/0 接口视图
[Router1-GigabitEthernet0/0/0]ipaddress 10.1.1.1 24  //配置GE 0/0/0接口IP 掩码
[Router1-GigabitEthernet0/0/0]quit  //退出
[Router1]interfaceGigabitEthernet 0/0/1  
[Router1-GigabitEthernet0/0/1]ipaddress 10.1.2.1 24  
[Router1-GigabitEthernet0/0/1]quit  
[Router1]displayip interface brief  //显示IP接口简介
*down:administratively down
^down:standby
(l):loopback
(s):spoofing
The numberof interface that is UP in Physical is 3
The numberof interface that is DOWN in Physical is 1
The numberof interface that is UP in Protocol is 3
The numberof interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical  Protocol  
GigabitEthernet0/0/0              10.1.1.1/24          up         up        
GigabitEthernet0/0/1              10.1.2.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down     
NULL0                             unassigned           up         up(s)   

3、查看路由配置信息
[Router1]displayip routing-table   //查看IP路由表
RouteFlags: R - relay, D - download to fib
------------------------------------------------------------------------------
RoutingTables: Public
         Destinations : 10       Routes : 10      
Destination/Mask    Proto  Pre  Cost      Flags NextHop         Interface
       10.1.1.0/24  Direct 0    0           D  10.1.1.1        GigabitEthernet
0/0/0
       10.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet
0/0/0
     10.1.1.255/32  Direct 0    0           D  127.0.0.1       GigabitEthernet
0/0/0
       10.1.2.0/24  Direct 0    0           D  10.1.2.1        GigabitEthernet
0/0/1
       10.1.2.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet
0/0/1
     10.1.2.255/32  Direct 0    0           D  127.0.0.1       GigabitEthernet
0/0/1
      127.0.0.0/8   Direct 0    0           D  127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct 0    0           D  127.0.0.1       InLoopBack0
127.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0
255.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0

注释:
Route Flags:路由标记  R=迭代路由  D=该路由下发到FIB表
RoutingTables: Public:表示此路由是全局路由表
Destinations:表示目的网络/主机的总数
Routes : 表示路由的总数
Destination/Mask:表示目的网络/主机的地址和掩码长度
Proto:表示接收此路由协议
Direct:表示直连路由
Pre:表示此路由优先级
Cost:表示此路由的路由开销值
NextHop:表示此路由的下一跳地址
Interface:表示此路由下一跳的出接口

4、保存配置
[Router1]return  //返回用户视图
<Router1>save  //保存配置
  The current configuration will be written tothe device.
  Are you sure to continue? (y/n)[n]:y  //确认继续
  It will take several minutes to saveconfiguration file, please wait.........
  Configuration file had been savedsuccessfully
  Note: The configuration file will take effectafter being activated

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
祖瑞(上海)网络科技有限公司
我们在全国范围提供企业IT运维、网络工程、弱电安装、监控安防、计算机产品收售、办公设备耗材等服务!
期待与您的合作!
邮箱:sanne@zurkj.com
电话:021-51850021 18918292296
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

公司网站

QQ|Archiver|手机版|小黑屋|祖瑞科技 全国计算机 网络IT运维社区! ( 沪ICP备16021636号-2 )

GMT+8, 2024-5-2 20:54 , Processed in 0.068177 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表