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. [Groovy]static typing

    一般想到Groovy是JVM上的动态语言,都不知道它还有Static Typeing的功能 import groovy.transform.TypeChecked void someMethod() ...

  2. P3225 [HNOI2012]矿场搭建

    传送门 对于一个点双联通分量,如果它连接了两个或更多割点 那么不论哪个点GG都有至少一条路通到其他的点双联通分量,所以我们不用考虑 如果它只连接一个割点,如果这个割点GG,那整个块也一起GG,所以要再 ...

  3. POJ 3686 *最小费用流-转化成普通指派问题)

    题意] 有N个订单和M个机器,给出第i个订单在第j个机器完成的时间Mij,每台机器同一时刻只能处理一个订单,机器必须完整地完成一个订单后才能接着完成下一个订单.问N个订单完成时间的平均值最少为多少. ...

  4. 华东交通大学2015年ACM“双基”程序设计竞赛1003

    Problem C Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Other) Total Sub ...

  5. js删除数组中的 "NaN"

    [注意] js中的NaN不和任何值相等,包括自身 所以可以使用 x!=x 来判断x是否是NaN,当且仅当x为NaN时,表达式的结果为true NaN != NaN ; //true 可以依此删除数组中 ...

  6. Rabbitmq相关学习网址

    1.安装文档: http://www.cnblogs.com/shuzhenyu/p/9823324.html 2.RabbitMq的整理 exchange.route.queue关系 https:/ ...

  7. sqlserver 事务日志

    预写式日志(Write-Ahead Logging (WAL)) --在数据写入到数据库之前,先写入到日志. 1.”Begin Tran”记录  -> 缓冲区 2. 日志             ...

  8. 更新jdk

    1.从官网下载jdk-8u191-linux-x64.tar.gz,然后放在ubuntu里的Downloads文件夹里.然后解压到/usr/lib/jvm文件夹中. sudo tar -zxvf Do ...

  9. tcp的半连接与完全连接队列(三)源码分析

    TCP 协议中的 SYN queue 和 accept queue 处理 若要理解本文意图说明的问题,可能需要以下知识背景: listen 系统调用的 backlog 参数含义,以及与 net.cor ...

  10. Neutron命令测试1

    Refer: http://wenku.baidu.com/link?url=DtrbhO0A393hg8kOWKX0XYuZtSC8Iu0occn8NF1pYcUwNzlaSq5qXCQoNEBDM ...