zoukankan      html  css  js  c++  java
  • HCNA配置接口IP地址

    1、拓扑图

    2、R1配置

    The device is running!
    
    <Huawei>sys    
    <Huawei>system-view 
    Enter system view, return user view with Ctrl+Z.
    [Huawei]sysn    
    [Huawei]sysname r1
    [r1]int    
    [r1]interface ?
      Bridge-if         Bridge-if interface
      Dialer            Dialer interface
      Eth-Trunk         Ethernet-Trunk interface
      GigabitEthernet   GigabitEthernet interface
      Ima-group         ATM-IMA interface
      LoopBack          LoopBack interface
      MFR               MFR interface
      Mp-group          Mp-group interface
      NULL              NULL interface
      Tunnel            Tunnel interface
      Virtual-Ethernet  Virtual-Ethernet interface
      Virtual-Template  Virtual-Template interface
      Vlanif            Vlan interface
      Wlan-Ess          Wlan-Ess interface
    [r1]dis int    
    [r1]dis interface 
    GigabitEthernet0/0/0 current state : UP
    Line protocol current state : DOWN
    Description:HUAWEI, AR Series, GigabitEthernet0/0/0 Interface
    Route Port,The Maximum Transmit Unit is 1500
    Internet protocol processing : disabled
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc3e-555d
    Last physical up time   : 2017-12-07 21:23:07 UTC-08:00
    Last physical down time : 2017-12-07 21:22:55 UTC-08:00
    Current system time: 2017-12-07 21:26:36-08:00
    Port Mode: COMMON COPPER
    Speed : 1000,  Loopback: NONE
    Duplex: FULL,  Negotiation: ENABLE
    Mdi   : AUTO
    Last 300 seconds input rate 0 bits/sec, 0 packets/sec
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
    Input peak rate 0 bits/sec,Record time: -
    Output peak rate 0 bits/sec,Record time: -
    
    Input:  0 packets, 0 bytes
      Unicast:                  0,  Multicast:                   0
      Broadcast:                0,  Jumbo:                       0
      Discard:                  0,  Total Error:                 0
    
      CRC:                      0,  Giants:                      0
    
    [r1]int    
    [r1]interface g    
    [r1]interface GigabitEthernet 0    
    [r1]interface GigabitEthernet 0/0/0
    [r1-GigabitEthernet0/0/0]ip add    
    [r1-GigabitEthernet0/0/0]ip address 12.1.1.1 255.255.255.0
    [r1-GigabitEthernet0/0/0]
    Dec  7 2017 21:27:20-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
    on the interface GigabitEthernet0/0/0 has entered the UP state. 
    [r1-GigabitEthernet0/0/0]q
    [r1]dis ip int br
    *down: administratively down
    ^down: standby
    (l): loopback
    (s): spoofing
    The number of interface that is UP in Physical is 2
    The number of interface that is DOWN in Physical is 2
    The number of interface that is UP in Protocol is 2
    The number of interface that is DOWN in Protocol is 2
    
    Interface                         IP Address/Mask      Physical   Protocol  
    GigabitEthernet0/0/0              12.1.1.1/24          up         up        
    GigabitEthernet0/0/1              unassigned           down       down      
    GigabitEthernet0/0/2              unassigned           down       down      
    NULL0                             unassigned           up         up(s)     
    [r1]

     3、R2配置

     Configuration console exit, please press any key to log on
    
    <Huawei>sys    
    <Huawei>system-view 
    Enter system view, return user view with Ctrl+Z.
    [Huawei]sysn    
    [Huawei]sysname R2
    [R2]int g    
    [R2]int GigabitEthernet 0/0/0
    [R2-GigabitEthernet0/0/0]ip add 12.1.1.2  24
    Error: The address already exists.
    [R2-GigabitEthernet0/0/0]ip add 12.1.1.3 24
    [R2-GigabitEthernet0/0/0]q
    [R2]dis ip int    
    [R2]dis ip interface br    
    [R2]dis ip interface brief 
    *down: administratively down
    ^down: standby
    (l): loopback
    (s): spoofing
    The number of interface that is UP in Physical is 2
    The number of interface that is DOWN in Physical is 2
    The number of interface that is UP in Protocol is 2
    The number of interface that is DOWN in Protocol is 2
    
    Interface                         IP Address/Mask      Physical   Protocol  
    GigabitEthernet0/0/0              12.1.1.3/24          up         up        
    GigabitEthernet0/0/1              unassigned           down       down      
    GigabitEthernet0/0/2              unassigned           down       down      
    NULL0                             unassigned           up         up(s)     
    [R2]

     4、测试

     Configuration console time out, please press any key to log on
    
    <r1>ping  12.1.1.2
      PING 12.1.1.2: 56  data bytes, press CTRL_C to break
        Request time out
        Request time out
        Request time out
    
      --- 12.1.1.2 ping statistics ---
        3 packet(s) transmitted
        0 packet(s) received
        100.00% packet loss
    
    <r1>
    <r1>ping 12.1.1.3
      PING 12.1.1.3: 56  data bytes, press CTRL_C to break
        Reply from 12.1.1.3: bytes=56 Sequence=1 ttl=255 time=160 ms
        Reply from 12.1.1.3: bytes=56 Sequence=2 ttl=255 time=20 ms
        Reply from 12.1.1.3: bytes=56 Sequence=3 ttl=255 time=20 ms
        Reply from 12.1.1.3: bytes=56 Sequence=4 ttl=255 time=20 ms
        Reply from 12.1.1.3: bytes=56 Sequence=5 ttl=255 time=20 ms
    
      --- 12.1.1.3 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 20/48/160 ms
    
    <r1>ping 12.1.1.3 ?
      ip-forwarding  Specify the request packet forward by IP
      <cr>           Please press ENTER to execute command 
    <r1>ping 12.1.1.3 
      PING 12.1.1.3: 56  data bytes, press CTRL_C to break
        Reply from 12.1.1.3: bytes=56 Sequence=1 ttl=255 time=30 ms
        Reply from 12.1.1.3: bytes=56 Sequence=2 ttl=255 time=30 ms
        Reply from 12.1.1.3: bytes=56 Sequence=3 ttl=255 time=20 ms
        Reply from 12.1.1.3: bytes=56 Sequence=4 ttl=255 time=20 ms
        Reply from 12.1.1.3: bytes=56 Sequence=5 ttl=255 time=30 ms
    
      --- 12.1.1.3 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 20/26/30 ms
    
    <r1>
    [R2]ping  12.1.1.1
      PING 12.1.1.1: 56  data bytes, press CTRL_C to break
        Reply from 12.1.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
        Reply from 12.1.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
        Reply from 12.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
        Reply from 12.1.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
        Reply from 12.1.1.1: bytes=56 Sequence=5 ttl=255 time=20 ms
    
      --- 12.1.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 20/24/30 ms
  • 相关阅读:
    理解Golang包导入
    go语言执行windows下命令行的方法
    Go中使用动态库C/C++库
    MongoDB · 引擎特性 · MongoDB索引原理
    Linux中more和less命令用法
    修改Linux文件句柄限制
    MongoDB自动删除过期数据--TTL索引
    mongodb可以通过profile来监控数据 (mongodb性能优化)
    MongoDB学习笔记(索引)
    查看nginx cache命中率
  • 原文地址:https://www.cnblogs.com/me80/p/8001198.html
Copyright © 2011-2022 走看看