华为路由器配置入门二

华为路由器配置入门 二

思路:

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

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

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

4.交换机配置console口密码

5.配置4台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/0   进入接口G0/0/0

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

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 : 10 Routes : 10

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 GigabitEthernet0/0/1
192.168.1.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1


192.168.2.0/24 Direct 0 0 D 192.168.2.254 GigabitEthernet0/0/0
192.168.2.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
192.168.2.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
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>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fe48:641b
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.1.1
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.1.254
Physical address..................: 54-89-98-48-64-1B
DNS server........................:

PC>ping 192.168.2.1

Ping 192.168.2.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.1: bytes=32 seq=2 ttl=127 time=47 ms
From 192.168.2.1: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.2.1: bytes=32 seq=4 ttl=127 time=63 ms
From 192.168.2.1: bytes=32 seq=5 ttl=127 time=62 ms

--- 192.168.2.1 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/62/78 ms

 

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

导航