华为eNSP配置静态IP实验

拓扑图如下:

(1)R1的配置

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
Oct 22 2019 17:37:56-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 1, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
Oct 22 2019 17:38:21-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]
Oct 22 2019 17:38:26-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 2, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 13.0.0.1 24
Oct 22 2019 17:38:48-08:00 R1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R1-GigabitEthernet0/0/1]
Oct 22 2019 17:38:56-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 3, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R1-GigabitEthernet0/0/1]int loo 0
Oct 22 2019 17:39:06-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 4, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R1-LoopBack0]ip add 1.1.1.1 32
[R1-LoopBack0]q
Oct 22 2019 17:39:26-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R1]dis ip int b
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 8

Interface                         IP Address/Mask      Physical   Protocol
Ethernet0/0/0                     unassigned           down       down
Ethernet0/0/1                     unassigned           down       down
GigabitEthernet0/0/0              12.0.0.1/24          up         up
GigabitEthernet0/0/1              13.0.0.1/24          up         up
GigabitEthernet0/0/2              unassigned           down       down
GigabitEthernet0/0/3              unassigned           down       down
LoopBack0                         1.1.1.1/32           up         up(s)
NULL0                             unassigned           up         up(s)
Serial0/0/0                       unassigned           down       down
Serial0/0/1                       unassigned           down       down
Serial0/0/2                       unassigned           down       down
Serial0/0/3                       unassigned           down       down
[R1] User interface con0 is availabl
[R1]ip route-static 3.3.3.3 32 13.0.0.3
[R1]ip route-static 3.3.3.3 32 12.0.0.2
[R1]ip route-static 2.2.2.2 32 13.0.0.3
[R1]ip route-static 2.2.2.2 32 12.0.0.2
[R1]ip route-static 23.0.0.0 24 13.0.0.3
[R1]ip route-static 23.0.0.0 24 12.0.0.2
[R1]
Oct 22 2019 18:32:59-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 11, the c
hange loop count is 0, and the maximum number of records is 4095.
[R1] User interface con0 is available
[R1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 10       Routes : 13       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.1/32  Direct  0    0           D   127.0.0.1       LoopBack0
        2.2.2.2/32  Static  60   0          RD   13.0.0.3        GigabitEthernet
0/0/1
                    Static  60   0          RD   12.0.0.2        GigabitEthernet
0/0/0
        3.3.3.3/32  Static  60   0          RD   13.0.0.3        GigabitEthernet
0/0/1
                    Static  60   0          RD   12.0.0.2        GigabitEthernet
0/0/0
       12.0.0.0/24  Direct  0    0           D   12.0.0.1        GigabitEthernet
0/0/0
       12.0.0.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
       13.0.0.0/24  Direct  0    0           D   13.0.0.1        GigabitEthernet
0/0/1
       13.0.0.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
       23.0.0.0/24  Static  60   0          RD   13.0.0.3        GigabitEthernet
0/0/1
                    Static  60   0          RD   12.0.0.2        GigabitEthernet
0/0/0
      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

[R1]

(2)R2的配置

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname R2
[R2]
[R2]int g
Oct 22 2019 17:39:56-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 1, the ch
ange loop count is 0, and the maximum number of records is
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[R2-GigabitEthernet0/0/0]
Oct 22 2019 17:40:32-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]
Oct 22 2019 17:40:36-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 2, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R2-GigabitEthernet0/0/0]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 23.0.0.2 24
[R2-GigabitEthernet0/0/2]
Oct 22 2019 17:40:54-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[R2-GigabitEthernet0/0/2]u
Oct 22 2019 17:40:56-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 3, the ch
ange loop count is 0, and the maximum number of records is 4095.n sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R2-GigabitEthernet0/0/2]
[R2-GigabitEthernet0/0/2]int loo 0
[R2-LoopBack0]ip
Oct 22 2019 17:41:06-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 4, the ch
ange loop count is 0, and the maximum number of records is 4095.
                 ^
Error:Incomplete command found at ‘^‘ position.
[R2-LoopBack0]ip add 2.2.2.2 32
[R2-LoopBack0]q
[R2]dis ip int b
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 8

Interface                         IP Address/Mask      Physical   Protocol
Ethernet0/0/0                     unassigned           down       down
Ethernet0/0/1                     unassigned           down       down
GigabitEthernet0/0/0              12.0.0.2/24          up         up
GigabitEthernet0/0/1              unassigned           down       down
GigabitEthernet0/0/2              23.0.0.2/24          up         up
GigabitEthernet0/0/3              unassigned           down       down
LoopBack0                         2.2.2.2/32           up         up(s)
NULL0                             unassigned           up         up(s)
Serial0/0/0                       unassigned           down       down
Serial0/0/1                       unassigned           down       down
Serial0/0/2                       unassigned           down       down
Serial0/0/3                       unassigned           down       down
[R2]
Oct 22 2019 17:41:26-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 5, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R2]
[R2]ip route-static 1.1.1.1 32 12.0.0.1
[R2]ip route-static 1.1.1.1 32 23.0.0.3
[R2]ip route-static 3.3.3.3 32 12.0.0.1
[R2]ip route-static 3.3.3.3 32 23.0.0.3
[R2]ip route-static 13.0.0.0 24 23.0.0.3
[R2]ip route-static 13.0.0.0 24 12.0.0.1
[R2]
Oct 22 2019 18:33:18-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 11, the c
hange loop count is 0, and the maximum number of records is 4095.
[R2]
[R2] User interface con0 is available
[R2]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 10       Routes : 13       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.1/32  Static  60   0          RD   12.0.0.1        GigabitEthernet
0/0/0
                    Static  60   0          RD   23.0.0.3        GigabitEthernet
0/0/2
        2.2.2.2/32  Direct  0    0           D   127.0.0.1       LoopBack0
        3.3.3.3/32  Static  60   0          RD   12.0.0.1        GigabitEthernet
0/0/0
                    Static  60   0          RD   23.0.0.3        GigabitEthernet
0/0/2
       12.0.0.0/24  Direct  0    0           D   12.0.0.2        GigabitEthernet
0/0/0
       12.0.0.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
       13.0.0.0/24  Static  60   0          RD   23.0.0.3        GigabitEthernet
0/0/2
                    Static  60   0          RD   12.0.0.1        GigabitEthernet
0/0/0
       23.0.0.0/24  Direct  0    0           D   23.0.0.2        GigabitEthernet
0/0/2
       23.0.0.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
      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

[R2]

(3)R3的配置

<R3>sys
Enter system view, return user view with Ctrl+Z.
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 13.0.0.3 24
[R3-GigabitEthernet0/0/1]
Oct 22 2019 18:31:33-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R3-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R3-GigabitEthernet0/0/1]
[R3-GigabitEthernet0/0/1]
Oct 22 2019 18:31:39-08:00 R3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 2, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add 23.0.0.3 24
[R3-GigabitEthernet0/0/2]
Oct 22 2019 18:31:55-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
Oct 22 2019 18:31:59-08:00 R3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 3, the ch
ange loop count is 0, and the maximum number of records is 4095.
[R3-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R3-GigabitEthernet0/0/2]
[R3-GigabitEthernet0/0/2]
[R3-GigabitEthernet0/0/2]q
[R3]dis ip int b
*down: administratively down
!down: FIB overload down
^down: standby
(l): loopback
(s): spoofing
(d): Dampening Suppressed
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 8
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 8

Interface                         IP Address/Mask      Physical   Protocol
Ethernet0/0/0                     unassigned           down       down
Ethernet0/0/1                     unassigned           down       down
GigabitEthernet0/0/0              unassigned           down       down
GigabitEthernet0/0/1              13.0.0.3/24          up         up
GigabitEthernet0/0/2              23.0.0.3/24          up         up
GigabitEthernet0/0/3              unassigned           down       down
NULL0                             unassigned           up         up(s)
Serial0/0/0                       unassigned           down       down
Serial0/0/1                       unassigned           down       down
Serial0/0/2                       unassigned           down       down
Serial0/0/3                       unassigned           down       down
[R3]
[R3]ip route-static 1.1.1.1 32 13.0.0.1
[R3]ip route-static 1.1.1.1 32 23.0.0.2
[R3]ip route-static 2.2.2.2 32 13.0.0.1
[R3]ip route-static 2.2.2.2 32 23.0.0.2
[R3]ip route-static 12.0.0.0 24 23.0.0.2
[R3]ip route-static 12.0.0.0 24 13.0.0.1
[R3]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 9        Routes : 12       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.1/32  Static  60   0          RD   13.0.0.1        GigabitEthernet
0/0/1
                    Static  60   0          RD   23.0.0.2        GigabitEthernet
0/0/2
        2.2.2.2/32  Static  60   0          RD   13.0.0.1        GigabitEthernet
0/0/1
                    Static  60   0          RD   23.0.0.2        GigabitEthernet
0/0/2
       12.0.0.0/24  Static  60   0          RD   23.0.0.2        GigabitEthernet
0/0/2
                    Static  60   0          RD   13.0.0.1        GigabitEthernet
0/0/1
       13.0.0.0/24  Direct  0    0           D   13.0.0.3        GigabitEthernet
0/0/1
       13.0.0.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
       23.0.0.0/24  Direct  0    0           D   23.0.0.3        GigabitEthernet
0/0/2
       23.0.0.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
      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

[R3]

原文地址:https://blog.51cto.com/14449541/2444573

时间: 2024-11-06 03:33:04

华为eNSP配置静态IP实验的相关文章

虚拟机(VMWare)NAT 模式,配置静态IP上网的问题

问题描述: 感觉问题解决了回过头来想就很简单,但是没解决就怎么也找不到问题,知识储备捉襟见肘.针对这个问题我好长时间才弄好,各种找资料,也证明本人筛选有用博客的能力比较低,先让我哭会去…… 在虚拟的实验,特别是分布式集群环境中,我们需要配置静态IP地址,我们又想上网,往往我们是二者不可兼得,但是这个很明显有解决的办法,但是我们就是找不到,下面我从网上找的博客设置成功,特别感谢! 设置 1.windows.首先看一下,windows下有没有多出个VMware1(hostonly使用).VMware

vm安装centos7 Minimal 配置静态ip添加dns: 解决连不上网

去centos官网下载需要的镜像:https://www.centos.org/ 安装完成后,在centos7中,ifconfig命令已经不存在了,查看ip的命令 # ip addr 发现ens***(也可能不是ens开头)下面的地址一堆字符,并不是ip.开始修改为静态ip并配置dns. 这里vm采用nat网络,关闭虚拟机,使用nat网络.配置开始ip地址和结束ip地址 然后开始配置网关,记住这个网关,一会配置静态ip的时候会用. 重新打开虚拟机. vi /etc/sysconfig/netwo

Ubuntu 配置静态ip的方法

1. 配置静态ip地址 $sudo vi /etc/network/interfaces 原有内容只有如下两行: auto lo iface lo inet loopback 向末尾追加以下内容: auto eth0 iface eth0 inet static address 192.168.0.33 gateway 192.168.0.1 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 然后保存退出: 2.

如何配置静态IP

之前写过如何配置动态IP,相对于配置静态ip,其相对简单一些,但是毕竟是动态,虚拟机每次重启,ip地址就会出现变化,这对后期做集群架构来说是非常麻烦的.那么接下来就告诉大家如何来配置静态ip. 在这里我就不配图了,我会尽量描述的详细一点. 首先:vi /etc/sysconfig/network-scripts/ifcfg-eth0(进入后  i编辑文件  按Esc 再按:  输入wq  退出) 将文件中的ONBOOT=yes,改为ONBOOT=no   表示开机自启动, 如果在此文件中看到UU

CentOS 6.5 配置静态IP

如何在CentOS 6.5中配置静态IP sudo vi /etc/sysconfig/network-scripts/ifcfg-em1 文件内容如下: DEVICE=em1 #指出设备名称 BOOTPROTO=static #启动类型 dhcp|static BROADCAST=192.168.1.255 #广播地址 HWADDR=00:06:5B:FE:DF:7C #硬件Mac地址 ONBOOT=yes #是否开机启动 TYPE=Ethernet #网络类型 IPADDR=192.168.

Ubuntu配置静态IP

Ubuntu配置静态IP 静态IP配置 Ubuntu 的网络配置信息放在 /etc/network/interfaces 中,如果配置动态获取ip,则在上述文件中加入以下内容:使用如下命令打开网络配置信息文件: sudo gedit /etc/network/interfaces 编辑文件(注意检察你的getway是否正确.): auto eth0iface eth0 inet staticaddress 192.168.8.119netmask 255.255.255.0gateway 192

CentOS 7运维管理笔记(11)----解决配置静态IP还是会出现动态IP地址的问题

网上搜集CentOS7 配置静态IP的方法,基本上都是说在 /etc/sysconfig/network-scripts/ifcfg-eth0文件中做如下配置 TYPE=Ethernet HWADDR=00:xx:xx:xx:xx:xx #only : none , bootp , or dhcp BOOTPROTO= none DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no #禁用IPV6 IPV6INIT=no IP

CentOS虚拟机NAT模式下配置静态IP教程

本教程是以32位的CentOS6.5为例,CentOS的网卡是NAT模式 1.打开VMware虚拟机,编辑--->虚拟网络编辑器进行设置NAT网卡 将DHCP服务勾选上,可点击NAT设置查看网关 这里可不做修改,记下网关IP(或者稍后在CentOS中查看也行),保持默认即可 2.进入CentOS虚拟机中,运行dhclient命令来自动获取IP 3.执行ifconfig命令,查看获取的IP 4.配置相关文件 输入命令:vi /etc/sysconfig/network-scripts/ifcfg-

ubuntu无线上网静态ip配置以及配置静态IP 之后无法正常上网的解决方案

一. 配置无线网络的静态IP 编辑/etc/network/interfaces文件如下: auto lo wlan0 iface lo inet loopback iface wlan0 inet static address 192.168.1.120 #(根据具体情况填写) netmask 255.255.255.0 #(根据具体情况填写) gateway 192.168.1.1 #(根据具体情况填写) dns-nameservers 8.8.8.8 8.8.4.4 #(根据具体情况填写)