华为路由器配置入门一

华为路由器配置入门一

思路:

1.用ENSP搭建这样一个结构

2.由2台PC,1台交换机,1台路由器构建

3.配置路由器:改路由器名字,配置console控制口密码,配置接口地址;

4.交换机配置console口密码

5.配置2台PC的IP地址

 

结构图:

 

一、配置路由器:(作为网关使用)

1.配置console口登录密码:

system-view 由用户模式进入系统模式

user-interface console 0  进入console口0

set authentication password cipher abc123  配置console口登录密码

 

2.配置接口IP地址

system-view  由用户模式进入系统模式

interface GigabitEthernet 0/0/1   进入接口G0/0/1

ip address 192.168.1.254 255.255.255.0 配置接口接口IP地址

display ip routing-table  查询路由表

Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7

Destination/Mask Proto Pre Cost Flags NextHop Interface

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
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.254 GigabitEthernet 0/0/1
192.168.1.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

 

二、交换机配置

system-view 由用户模式进入系统模式

user-interface console 0  进入console口0

authentication-mode password  进入密码认证模式 (这点与路由器有点不同)

set authentication password cipher abc123  配置console口登录密码

 

三、PC电脑配置

 

 

 

测试结果成功(网关和另一台电脑都成功)

PC>ping 192.168.1.254

Ping 192.168.1.254: 32 data bytes, Press Ctrl_C to break
From 192.168.1.254: bytes=32 seq=1 ttl=255 time=31 ms
From 192.168.1.254: bytes=32 seq=2 ttl=255 time=32 ms
From 192.168.1.254: bytes=32 seq=3 ttl=255 time=31 ms
From 192.168.1.254: bytes=32 seq=4 ttl=255 time=31 ms
From 192.168.1.254: bytes=32 seq=5 ttl=255 time=47 ms

--- 192.168.1.254 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/34/47 ms

posted on 2022-05-03 21:08  人生不开窍  阅读(1565)  评论(0编辑  收藏  举报

导航