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// current state : UP
Line protocol current state : DOWN
Description:HUAWEI, AR Series, GigabitEthernet0// Interface
Route Port,The Maximum Transmit Unit is
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc3e-555d
Last physical up time : -- :: UTC-:
Last physical down time : -- :: UTC-:
Current system time: -- ::-:
Port Mode: COMMON COPPER
Speed : , Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Mdi : AUTO
Last seconds input rate bits/sec, packets/sec
Last seconds output rate bits/sec, packets/sec
Input peak rate bits/sec,Record time: -
Output peak rate bits/sec,Record time: - Input: packets, bytes
Unicast: , Multicast:
Broadcast: , Jumbo:
Discard: , Total Error: CRC: , Giants: [r1]int
[r1]interface g
[r1]interface GigabitEthernet
[r1]interface GigabitEthernet //
[r1-GigabitEthernet0//]ip add
[r1-GigabitEthernet0//]ip address 12.1.1.1 255.255.255.0
[r1-GigabitEthernet0//]
Dec ::-: r1 %%01IFNET//LINK_STATE(l)[]:The line protocol IP
on the interface GigabitEthernet0// has entered the UP state.
[r1-GigabitEthernet0//]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
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// 12.1.1.1/ up up
GigabitEthernet0// unassigned down down
GigabitEthernet0// 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 //
[R2-GigabitEthernet0//]ip add 12.1.1.2
Error: The address already exists.
[R2-GigabitEthernet0//]ip add 12.1.1.3
[R2-GigabitEthernet0//]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
The number of interface that is DOWN in Physical is
The number of interface that is UP in Protocol is
The number of interface that is DOWN in Protocol is Interface IP Address/Mask Physical Protocol
GigabitEthernet0// 12.1.1.3/ up up
GigabitEthernet0// unassigned down down
GigabitEthernet0// 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: data bytes, press CTRL_C to break
Request time out
Request time out
Request time out --- 12.1.1.2 ping statistics ---
packet(s) transmitted
packet(s) received
100.00% packet loss <r1>
<r1>ping 12.1.1.3
PING 12.1.1.3: data bytes, press CTRL_C to break
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms --- 12.1.1.3 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // 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: data bytes, press CTRL_C to break
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.3: bytes= Sequence= ttl= time= ms --- 12.1.1.3 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // ms <r1>
[R2]ping  12.1.1.1
PING 12.1.1.1: data bytes, press CTRL_C to break
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms
Reply from 12.1.1.1: bytes= Sequence= ttl= time= ms --- 12.1.1.1 ping statistics ---
packet(s) transmitted
packet(s) received
0.00% packet loss
round-trip min/avg/max = // ms

HCNA配置接口IP地址的更多相关文章

  1. linux配置网卡IP地址命令详细介绍及一些常用网络配置命令

    linux配置网卡IP地址命令详细介绍及一些常用网络配置命令2010-- 个评论 收藏 我要投稿 Linux命令行下配置IP地址不像图形界面下那么方 便,完全需要我们手动配置,下面就给大家介绍几种配置 ...

  2. VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装

    VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装在阿里云开源镜像地址下载镜像Index of /centos/7.2.1511/isos/x86_64/http://mirro ...

  3. 如何为CentOS 7配置静态IP地址

    问题:在CentOS 7上,我想要将我其中一个网络接口从DHCP改为静态IP地址配置,如何才能永久为CentOS或RHEL 7上的网络接口分配静态IP地址? 如果你想要为CentOS 7中的某个网络接 ...

  4. VMware虚拟CentOS 6.5在NAT模式下配置静态IP地址及Xshell远程控制配置

    VMware虚拟CentOS 6.5在NAT模式下配置静态IP地址及Xshell远程控制配置 标签: LinuxXshellCentOS 2016-10-15 04:58 127人阅读 评论(0) 收 ...

  5. 为CentOS 7配置静态IP地址及遇到的问题解决策略

    为CentOS 7配置静态IP地址及遇到的问题解决策略 1. 为CentOS 7配置静态IP地址的两种方法 (原文地址:http://www.linuxidc.com/Linux/2014-10/10 ...

  6. 如何在Ubuntu Server 18.04 LTS中配置静态IP地址

    安装Ubuntu Server 18.04后需要分配一个的静态IP地址.先前的LTS版本Ubuntu 16.04使用/etc/network/interfaces文件配置静态IP地址,但是Ubuntu ...

  7. CentOS 7配置静态IP地址的两种方法 来自:互联网

    CentOS 7配置静态IP地址的两种方法 来自:互联网 时间:2021-01-12 阅读:4 如果你想要为CentOS 7中的某个网络接口设置静态IP地址,有几种不同的方法,这取决于你是否想要使用网 ...

  8. Ubuntu 为网卡配置静态IP地址

    为网卡配置静态IP地址编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primar ...

  9. Ubuntu12.04配置静态ip地址

    Ubuntu12.04配置静态ip地址 $sudo gedit /etc/network/interfaces 原有内容只有如下两行: auto lo iface lo inet loopback 向 ...

随机推荐

  1. python 元组拾遗

    python 元组拾遗 python 语法糖 def printall(*args):  return args  一个以 * 开头的参数将参数聚集为一个元组. printall函数可以接收任意个数的 ...

  2. 26-----BBS论坛

    BBS论坛(二十六) 26.发布帖子前台代码逻辑完成 (1)front/hooks.py from .views import bp from flask import session,g from ...

  3. Javascript各种事件汇总

    https://www.cnblogs.com/diligenceday/p/4190173.html#undefined https://www.cnblogs.com/starof/p/40663 ...

  4. angularjs的ng-repeat回调

    首先html代码是这样的: <label>Name des Leiters:</label><select name="leaderID" id=&q ...

  5. ES6数组新增方法总结

    关于数组中forEach() .map().filter().reduce().some().every()的总结 let arr = [1, 2, 3, 4, 5] // forEach遍历数组 a ...

  6. SourceInsight,Understand,SecureCRT设置

    SourceInsight 设置字体 Option/Document  Option/Screen  Fonts   Understand https://scitools.com/download/ ...

  7. GBDT,FM,FFM推导

    GBDT推导: https://xgboost.readthedocs.io/en/latest/tutorials/model.html FM,FFM推导: https://tech.meituan ...

  8. #include <bits/stdc++.h>头文件

    这实际上就是一个头文件的集合,可以看看他的定义. #ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cct ...

  9. CI模板中php脚本的使用

    今天偶然发现,在CI的模板中能够直接使用CI自带的函数,并且可以直接调用controller里面的属性.案例: 控制器: public function test(){ $this->a = ' ...

  10. telnet不能用,提示:-bash: telnet: command not found

    1.[root@localhost ~]# telnet  bash: telnet: command not found 2. 查询了是否安装Telnet包,结果如下: [root@localhos ...