交换机和路由器的基础配置

一、交换机基本配置.

1、language-mode Chinese //切换语言模式为中文

<Huawei>language-mode Chinese Change language mode, confirm? [Y/N] y 备注:更改语言模式,确认吗?Y确认 提示:改变语言模式成功。 <Huawei>language-mode English //切换语言模式为英文

2、undo terminal monitor //取消终端提示

<SW2>undo terminal monitor      //取消终端提示  terminal 终止
 Info: Current terminal monitor is off.  
 提醒:当前终端提示已经关闭 

 <SW2>terminal monitor     //开启终端提示 
 Info: Current terminal monitor is on.
 提示:当前终端提示已经开启 

 <SW2>u t m    //取消终端提示简写 
Info: Current terminal monitor is off.

3、设置交换机闲置会话时间

user-interface console 0 //进终端进行配置

[SW1]user-interface   console 0   //进终端进行配置

[SW1-ui-console0]idle-timeout 1   //设置闲置会话时间为1分钟

4、恢复出厂设置

<SW1> reset saved-configuration    //恢复出厂设置
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]: y     //是否要恢复出厂设置
..........
Info: Succeeded in clearing the configuration in the device.
<SW1> reboot                //重启终端
Warning: All the configuration will be saved to the configuration file for the n
ext startup:, Continue?[Y/N]: n       //提示是否保存当前配置,选择是Y/否N
...........
System will reboot! Continue?[Y/N]: y    //提示设备是否要重启,选择是Y/否N

 5、辟邪剑谱 

<Huawei> u t m 关闭日志提示

<Huawei> dis ver 显示版本
<Huawei> dis cu 查看当前配置信息
<Huawei> sy 进入系统视图
[Huawei] sy S1 更改设备名为S1
[S1] int g0/0/1 进入接口
[S1-GigabitEthernet0/0/1] sh 禁用接口
[S1-GigabitEthernet0/0/1] undo sh 启用接口
 Ctrl+z 返回用户视图
[S1] user-in co 0 进入console口
[S1-ui-console0] auth p 启用密码认证
[S1-ui-console0] set a p c 123设 置密码
[S1-ui-console0] ret 返回到用户视图
<S1> sa 保存
<S1> quit  
Please Press ENTER.
Login authentication
Password:输入 123 
[S1] user-in co 0 进入console口
[S1-ui-console0] i 1440 设置超时时间24小时
<S1> res sa 
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:y确认恢复

<S1> reboot  
ext startup:, Continue?[Y/N]:n不保存
System will reboot! Continue?[Y/N]:y重启

二、远程控制交换机

配置思路:

1、给设备配置IP地址

SW1:(以上图标注为准)
[Huawei]interface Vlanif 1    //进入虚接口Vlanif1
[Huawei-Vlanif1]ip address 192.168.10.100 24    //配置IP地址
PC:(以上图标注为准,也是一台交换机)
[Huawei]interface Vlanif 1    //进入虚接口Vlanif1
[Huawei-Vlanif1]ip address 192.168.10.200 24    //配置IP地址

**<SW1>display interface Vlanif 1  //查询IP地址信息**

2、测试两台设备的网络连通性

SW1:
<Huawei>ping 192.168.10.200
PC:(以上图标注为准,也是一台交换机)
<Huawei>ping 192.168.10.100

3、实施远程

SW1:
[SW1]user-interface  vty  0 4     //进入远程配置视图,允许5个会话远程访问
[SW1-ui-vty0-4]authentication-mode password  //启用密码认证模式
[SW1-ui-vty0-4]set authentication password cipher 123456  //设置密文密码为123456
[SW1-ui-vty0-4]user privilege level 3  //设置权限级别,默认为权限0参观级,3为管理级

PC:(以上图标注为准,也是一台交换机)
<huawei> telnet  192.168.10.100
Password:
实现远程控制

注:telnet 远程管理协议,端口号 23

三、路由器的相关知识

1) 路由:数据从一个网络到另外一个网络之间转发数据包的过程称为路由

2) 路由器:连接不同网络,实现不同网段之间的通信

3)路由表:路由器选择数据的传输路径的依据

4) 路由器的工作原理

路由器接收数据包

检查数据包中的目标IP

在路由表中查找与目标IP相匹配的路由条目

路由表中找到与目标IP相匹配的路由条目后,按照此条目所指的方向将数据转发出去

四、路由器的基本配置

配置思路:

1、给PC1、PC2配置IP地址、子网掩码、网关地址

2、给路由器接口配置IP地址

配置PC1设备的网关地址:
[Huawei]interface GigabitEthernet 0/0/0      //进入接口视图
[Huawei-GigabitEthernet0/0/0]ip address 192.168.10.254 24  //配置接口IP地址
配置PC2设备的网关地址:
[Huawei]interface GigabitEthernet 0/0/1     //进入接口视图
[Huawei-GigabitEthernet0/0/1]ip address 192.168.20.254 24  //配置接口IP地址

确认IP地址是否配置成功
[Huawei-GigabitEthernet0/0/0]display  this
[Huawei-GigabitEthernet0/0/1]display  this
<Huawei>display ip interface brief//查看接口IP地址简短信息

3、验证结果:测试PC1和PC2的网络连通性

在PC1上进行操作:ping  192.168.20.1
在PC2上进行操作:ping  192.168.10.1

查看路由表

根据以上的拓扑图,可以查看路由器的路由表

<Huawei>display ip routing-table

  • 7
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

nuc_ddddsj

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值