IP地址配置

1.实验目的

掌握接口IPv4地址的配置方法。

2.实验拓扑

IP地址配置的实验拓扑如下图所示。

3.实验步骤

(1)R1的配置,命令如下:

<Huawei>system-view      //进入系统视图
[Huawei]undo info-center enable    //关闭路由器输出信息
[Huawei]sysname R1   //修改设备名为R1
[R1]interface g0/0/0     //进入接口g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.12.1 24      //配置IP地址和子网掩码
[R1-GigabitEthernet0/0/0]undo shutdown     //打开接口
[R1-GigabitEthernet0/0/0]quit     //退出

(2)查看R1接口的IP地址,命令如下:

[R1]display ip interface brief   //查看接口的IP简要信息
*down: administratively down  //"*"表示该接口被管理员手动关闭,如在接口执行命令shutdown
!down: FIB overload down   
^down: standby  //该符号表示该接口是备份接口
(l): loopback  //表示环回
(s): spoofing  //表示欺骗
(d): Dampening Suppressed
The number of interface that is UP in Physical is 2  //表示物理状态UP的接口数量为2
The number of interface that is DOWN in Physical is 9  //表示物理状态DOWN的接口数量为9
The number of interface that is UP in Protocol is 2  //表示协议状态UP的接口数量为2
The number of interface that is DOWN in Protocol is 9  //表示协议状态DOWN的接口数量为9

Interface                         IP Address/Mask      Physical   Protocol  
Ethernet0/0/0                     unassigned           down       down      
Ethernet0/0/1                     unassigned           down       down      
GigabitEthernet0/0/0              192.168.12.1/24      up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
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  

(3)R2的配置,命令如下:

<Huawei>system-view  //进入系统视图
[Huawei]undo info-center enable  //关闭路由器输出信息
[Huawei]sysname R2  //修改设备名为R2
[R2]interface g0/0/1  //进入接口g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.12.2 24  //配置IP地址和子网掩码
[R2-GigabitEthernet0/0/1]undo shutdown  //打开接口
[R2-GigabitEthernet0/0/1]quit  //退出

4.实验调试

R1访问R2,使用ping命令进行调试,命令如下:

<R1>ping 192.168.12.2  //使用ping命令测试192.168.12.2的连通性
  PING 192.168.12.2: 56  data bytes, press CTRL_C to break  //使用CTRL_C终止测试
    Reply from 192.168.12.2: bytes=56 Sequence=1 ttl=255 time=50 ms
    Reply from 192.168.12.2: bytes=56 Sequence=2 ttl=255 time=60 ms
    Reply from 192.168.12.2: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 192.168.12.2: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 192.168.12.2: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 192.168.12.2 ping statistics ---
    5 packet(s) transmitted  //发送了5个包
    5 packet(s) received  //接收了5个包
    0.00% packet loss  //丢包率为0
    round-trip min/avg/max = 30/40/60 ms  //来回旅程延迟分别为最小30ms、最大60ms、平均40ms

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值