华为低端路由器配置脚本文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
根据本次工程特点:路由器本端由客户自己配置,我们只配通上行链路就可以了,如果这样文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
的话路由器只需以下三步简单配置就 OK 了:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、配置路由器上行接口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
3、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ping -c 1000 -s 5000 192.168.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
以下是华为 AR2811 路由器配置为例( 版本,版本不一样命令有些差别)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
首先用串口线通过 WIN XP 自带的超级终端或用第三方软件(如:SecureCRT)登录路由器文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
(波特率设置为:9600)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
刚登录上路由器只在第一层使能模式,显示为“<”文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
要配置地址需要进入端口模式:[Quidway]interface [端口类型] [端口号]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
要配置路由之类要进入配置模式,显示为“#”:>Quidway<system-view< p=""></system-view<>文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、配置路由器上行接口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Serial 0/0 //进入端口模式(2M 上行口,不同版本的 2M 口配置不一文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
样,详见后面说明)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]ip address 172.36.30 255.255.255.252 //配置上行接口 IP 地址,具体文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
地址要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]disp this //配置后可以用 disp thi 或 dis int serial 0/0 或 disp cu 命令文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]quit //退出接口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip route-static 0.0.0.0 0.0.0.0 172.36.29 // 配置默认路由,目的地址用文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
0.0.0.0 0.0.0.0 表示,网关要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
如果上层设备已配置好数据,可以在路由器上 ping 通网关地址了 ping 172.36.293、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
The configuration will be written to the device.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Are you sure?[Y/N] //选 Y 回车就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
以下为可选取配置,根据客户需要选配文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]sysname LHAR2811 //给路由器命名,如罗湖 AR2811文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]super password level 3 cipher sz //设置路由器二级登录 SUPER 密码,需要维文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
护管理人员给出,如 SUPER 密码设置为:sz,文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]local-user huawei //创建登录用户名/密码,如用户名为:huawei文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
password cipher huawei //设置登录密码为:huawei文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
service-type telnet level 0 //设置登录访问级别,0 级为最低,3 级为最高,一般文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
登录就给 0 或 1 级就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入本地以太网端口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
description to_LH //给端口添加描述文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 10.246.56.229 255.255.255.252 //配置 Ethernet0/0文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
如路由器接口下挂有交换机,而且交换机是要求配置 VLAN,则要进入该以太网的子接口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
下配置,如 Ethernet 0/,配置 VLAN 100文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet 0/文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/]vlan-type dot1q vid 100 //配置子接口 VLAN 100文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/]ip address 172.16. 255.255.255.0 //配置子接口 IP 地址,用于终文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
结 VLAN 100文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
以下是常见的 2M 接口配置,不同版本的路由器配置有些不一样,配置时只要跟传输端一文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
至就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface Serial0/0 //最简单一种,连时隙都不需要配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
description to_SZ //添加描述文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
clock DTECLK1 //端口默认时钟已是 DTECLK1文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
link-protocol ppp //端口默认协议已是 ppp文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 192.168.0.1 255.255.255.252 ////配置地址interface Serial1/0 //不分时隙的 2M 配置,需要配置端口为 unframed 模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
link-protocol ppp //端口默认协议已是 ppp文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
fe1 unframed //配置端口为 unframed 模式,即不分 2M 时隙文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
description to_HZNE08 //添加描述文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 172.32.16.1 255.255.255.252 //配置地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface Serial1/1 //分 2M 时隙配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
fe1 frame-format crc4 //配置 CRC4 模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
link-protocol ppp //配置链路协议文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
fe1 timeslot-list 1-31 //配置 2M 时隙文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
description to GouJi_DCN_HK1 //添加描述文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 132.127.148.113 255.255.255.252 //配置 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip route-static 0.0.0.0 0.0.0.0 10.246.56.5 preference 60 ////配置默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
user-interface vty 0 4 进入登录 VTY 模式,如果要远程管理一定要配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
authentication-mode scheme //配置登录认证为需要用户名和密码认证文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
删除配置命令:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
华为设备的删除命令为 undo 开头,如删除地址为:undo ip add,删除路由为:undo ip文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
route-static 0.0.0.0 0.0.0.0 10.246.56.5文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
删除子接口为:[Quidway]undo interface Ethernet 0/文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
常用查看命令:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
disp cu 查看所有配置数据文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
disp dev 查看硬件情况文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
disp int Ethernet 0/0 查看端口状态文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
disp thi 查看当前配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
disp ip route 查看 IP 路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
华为交换机配置要点文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、创建登录用户名和密码文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、创建 VLAN ID3、配置 IP 地址 (注意:一般交换机都是在 VLAN 下配置 IP 地址,路由器则是在端口下配文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
置 IP 地址)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
4、设置端口模式(trunk、access、hybrid)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
5、把 VLAN 把入具体端口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
6、配置缺省路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
刚登录上交换机只在第一层使能模式,显示为“<”文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
要配置地址需要进入 VLAN 模式:[Quidway]interface vlan [vlan 号]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
要配置交换机要进入配置模式,显示为“#”:>Quidway<system-view< p=""></system-view<>文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
local-user huawei //设置登录用户名文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
password cipher huawei //设置登录密码文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
service-type telnet //设置登录服务方式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
level 3 //设置访问级别文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
vlan 100 //创建 VLAN 100文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
vlan 401 ////创建 VLAN 401文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface Vlan-interface401 //进入 VLAN 401,用于配置 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 172.16.71.35 255.255.255.0 //配置 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface Ethernet1/0/0 //进入以太网端口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
port link-type access //设置该端口为 access 模式,用于接 PC 之类文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
port access vlan 100 //把端口加入到 VLAN 100 中文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface GigabitEthernet1/0/1 //进入以太网端口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
port link-type trunk //设置该端口为 trunk 模式,用于透传 VLAN,一般用于上行文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
口或级联端口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
undo port trunk permit vlan 1 //禁止 VLAN 1 通过该端口,为了防止环路产生,一般都文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
要禁止 VLAN 1 通过,因默认 VLAN 1 都是允许通过的文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
port trunk permit vlan 401 //设置允许通过的 VLAN文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
user-interface vty 0 4 //进入远程登录 VTY 模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
authentication-mode scheme //设置登录所采用的认证方式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip route-static 0.0.0.0 0.0.0.0 172.16.7 //配置缺省路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
save //保存配置以下是几种常见组图配置脚本文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
语音业务:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
一、路由器采用一个 2M 上行(也就是说移动提供一个 2M),路由器一个 FE 以太网端口连文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
接客户。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
配置如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、配置端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Serial 0/0 //进入端口模式(2M 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]fe1 timeslot-list 1-31 //配置 2M 时隙,一般端口默认是分时隙的,如果文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
端口已有该条命令就不用再配置了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]ip address 172.36.30 255.255.255.252 //配置上行接口 IP 地址,具体文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
地址要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]disp this //配置后可以用 disp thi 或 dis int serial 0/0 或 disp cu 命令文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]quit //退出接口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入以太网端口模式(该端口连接客户端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip address 10.246.56.229 255.255.255.252 //配置客户端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip route-static 0.0.0.0 0.0.0.0 172.36.29 // 配置默认路由,目的地址用文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
0.0.0.0 0.0.0.0 表示,网关要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
如果上层设备已配置好数据,可以在路由器上 ping 通网关地址了 ping 172.36.29文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
3、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Are you sure?[Y/N] //选 Y 回车就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
二、路由器采用 2 个 2M 捆绑上行(也就是说移动提供 2 个 2M),路由器一个 FE 以太网端文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
口连接客户。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
配置如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、配置 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Mp-group 1 //创建一个 2M 组 group 组 1,还有一种方法是文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
通过虚模板来创建 2M 组的,见后面部分文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 172.36.30 255.255.255.252 //配置上行接口 IP 地址,2M 捆绑地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
是在 group 里配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Serial 0/0 //进入端口模式(2M 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]fe1 timeslot-list 1-31 //配置 2M 时隙,一般端口默认是分时隙的,如果文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
端口已有该条命令就不用再配置了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]ppp mp Mp-group 1 //把该端口加入到 group 组 1文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]disp this //配置后可以用 disp thi 或 dis int serial 0/0 或 disp cu 命令文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]quit //退出接口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Serial 0/1 //进入端口模式(2M 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]fe1 timeslot-list 1-31 //配置 2M 时隙,一般端口默认是分时隙的,如果文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
端口已有该条命令就不用再配置了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]ppp mp Mp-group 1 //把该端口加入到 group 组 1,这样 2 个 2M 都加文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
进了 group 组 1 了,加起来就是 4M 带宽了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]disp this //配置后可以用 disp thi 或 dis int serial 0/1 或 disp cu 命令文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入以太网端口模式(该端口连接客户端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip address 10.246.56.229 255.255.255.252 //配置客户端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit2、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip route-static 0.0.0.0 0.0.0.0 172.36.29 // 配置默认路由,目的地址用文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
0.0.0.0 0.0.0.0 表示,网关要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
如果上层设备已配置好数据,可以在路由器上 ping 通网关地址了 ping 172.36.29文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
3、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
The configuration will be written to the device.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Are you sure?[Y/N] //选 Y 回车就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
*******文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
下面是通过虚模板 Virtual-Template 来创建 2M 组,和通过组来创建配置一样,只是把文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Mp-group 改成 Virtual-Template 就可以了,其他配置不变文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
//文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface Virtual-Template 1 //创建 2M 虚模板 1文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 172.36.30 255.255.255.252文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface Serial0/0文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
link-protocol ppp文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ppp mp Virtual-Template 1 //把端口加到虚模板 1 中文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
fe1 timeslot-list 1-31文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
interface Serial1/0文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
link-protocol ppp文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ppp mp Virtual-Template 1 //把端口加到虚模板 1 中文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
fe1 timeslot-list 1-31文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
//文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
*******文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
数据业务部分文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
一:假设路由器采用一个 FE 端口做上行口,另一个 FE 连接客户设备,客户申请一个公网文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
IP 地址,要求内部 PC 通过路由器实现 NAT 地址转换上网。 公 网 IP 为 : 64.1.2/30 , 网 关 为 : 64. ; 内 部 PC 所 在 的 网 段 为 :文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
,内部网关为:192.168.。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
配置如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、配置端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入端口模式(FE 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]ip address 64.1.2 255.255.255.252 //配置上行接口 IP 地址,具体文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
地址要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]disp this //配置后可以用 disp thi 或 dis int Ethernet 0/0 或 disp cu文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
命令查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]quit //退出接口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/1 //进入以太网端口模式(该端口连接客户端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip address 192.168. 255.255.255.0 //配置客户端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip route-static 0.0.0.0 0.0.0.0 64. //配置默认路由,目的地址用 0.0.0.0文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
0.0.0.0 表示,网关要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
如果上层设备已配置好数据,可以在路由器上 ping 通网关地址了 ping 64.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
3、NAT 地址转换配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] nat address-group 10 64.1.2 64.1.2 //配置公网地址池文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] acl number 2000 //配置 ACL 访问列表,也就是允许那些地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
可以转换出去文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
rule 0 permit source 192.168.1.0 0.0.0.255 //配置私网地址段,注意是反掩码文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入上行口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
nat outbound 2000 address-group 10 //配置私网地址段与公网地址相关联文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
4、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
The configuration will be written to the device.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Are you sure?[Y/N] //选 Y 回车就可以了二:假设路由器采用一个 FE 端口做上行口,另一个 FE 连接客户设备,客户申请二个公网文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
IP 地址,一个公网 IP 用于内部 WWW 服务器,一个用于内部 PC 上网。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
要求在公网可以访问到公司 WWW 服务器和内部 PC 通过路由器实现 NAT 地址转换上文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
网。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
公 网 IP 为 : 64.1.2-3/29 , 网 关 为 : 64. ; 内 部 PC 所 在 的 网 段 为 :文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
,WWW 内部服务器地址为:192.168.00,内部网关为:192.168.。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
配置如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、配置端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入端口模式(FE 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]ip address 64.1.2 255.255.255.248 //配置上行接口 IP 地址,具体文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
地址要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]disp this //配置后可以用 disp thi 或 dis int Ethernet 0/0 或 disp cu文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
命令查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]quit //退出接口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/1 //进入以太网端口模式(该端口连接客户端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip address 192.168. 255.255.255.0 //配置客户端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip route-static 0.0.0.0 0.0.0.0 64. //配置默认路由,目的地址用 0.0.0.0文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
0.0.0.0 表示,网关要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
如果上层设备已配置好数据,可以在路由器上 ping 通网关地址了 ping 64.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
3、NAT 地址转换配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] nat address-group 10 64.1.2 64.1.3 //配置公网地址池,公网地址池要把内文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
部服务器所对应的公网 IP 也包括在内文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] acl number 2000 //配置 ACL 访问列表,也就是允许那些地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
可以转换出去rule 0 permit source 192.168.1.0 0.0.0.255 //配置私网地址段,注意是反掩码文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入上行口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
nat outbound 2000 address-group 10 //配置私网地址段与公网地址相关联文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
nat server protocol tcp global inside 192.168.00 www //配置公司文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
WWW 服务器与公网地址 关联文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
4、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
The configuration will be written to the device.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Are you sure?[Y/N] //选 Y 回车就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
三:假设路由器采用一个 FE 端口做上行口,另一个 FE 连接客户设备,客户申请一个公网文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
IP 地址,要求内部 PC 通过 DCHP 自动获得 IP 地址上网。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
公网 IP 为:64.1.2/30 ,网关为:64.;内部 PC 所在的网段为:。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
配置如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、配置端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入端口模式(FE 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]ip address 64.1.2 255.255.255.252 //配置上行接口 IP 地址,具体文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
地址要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]disp this //配置后可以用 disp thi 或 dis int Ethernet 0/0 或 disp cu文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
命令查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Ethernet0/0]quit //退出接口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/1 //进入以太网端口模式(该端口连接客户端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip address 192.168. 255.255.255.0 //配置客户端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip route-static 0.0.0.0 0.0.0.0 64. //配置默认路由,目的地址用 0.0.0.0文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
0.0.0.0 表示,网关要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit 如果上层设备已配置好数据,可以在路由器上 ping 通网关地址了 ping 64.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
3、NAT 地址转换配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] nat address-group 10 64.1.2 64.1.2 //配置公网地址池文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] acl number 2000 //配置 ACL 访问列表,也就是允许那些地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
可以转换出去文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
rule 0 permit source 192.168.1.0 0.0.0.255 //配置私网地址段,注意是反掩码文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/0 //进入上行口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
nat outbound 2000 address-group 10 //配置私网地址段与公网地址相关联文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
4、配置 DHCP文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] dhcp server ip-pool 1 //配置 DHCP 自动分配地址池文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
network 192.168.1.0 mask 255.255.255.0 //配置自动分配的地址范围文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
gateway-list 192.168. //配置 192.168. 为网关地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
dns-list 2136.192.6 2139.163.6 //配置 DNS 地址,一般配置 2 个,以文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
防一个出现故障另一个可以备用文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]dhcp select global interface Ethernet 0/0 //配置需要运行 DHCP 自动分配 IP 在端文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
口,一般是连接客户的端口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]dhcp server forbidden-ip 192.168. //配置网关地址不参与地址分配文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
5、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
The configuration will be written to the device.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Are you sure?[Y/N] //选 Y 回车就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
******************文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
移动 DNS 地址为:2136.192.6 2139.163.6文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
电信 DNS 地址为:202.96.128.86 202.96.134.133文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
******************四:假设路由器采用 2 个 2M 捆绑做上行口,一个 FE 连接客户设备,客户申请一个公网 IP文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
地址,要求内部 PC 通过路由器实现 NAT 地址转换上网。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
公 网 IP 为 : 64.1.2/30 , 网 关 为 : 64. ; 内 部 PC 所 在 的 网 段 为 :文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
,内部网关为:192.168.。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
配置如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
1、创建 2M 组用来配置 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Mp-group 1 //创建一个 2M 组 group 组 1,还有一种方法是文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
通过虚模板来创建 2M 组的,见后面部分文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
ip address 64.1.2 255.255.255.252 //配置上行接口 IP 地址,2M 捆绑地址是文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
在 group 里配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
2、把端口加入到 2M 组中文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Serial 0/0 //进入端口模式(2M 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]fe1 timeslot-list 1-31 //配置 2M 时隙,一般端口默认是分时隙的,如果文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
端口已有该条命令就不用再配置了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]ppp mp Mp-group 1 //把该端口加入到 group 组 1文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]disp this //配置后可以用 disp thi 或 dis int serial 0/0 或 disp cu 命令文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/0]quit //退出接口模式文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Serial 0/1 //进入端口模式(2M 上行口,连接移动端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]fe1 timeslot-list 1-31 //配置 2M 时隙,一般端口默认是分时隙的,如果文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
端口已有该条命令就不用再配置了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]ppp mp Mp-group 1 //把该端口加入到 group 组 1,这样 2 个 2M 都加文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
进了 group 组 1 了,加起来就是 4M 带宽了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]disp this //配置后可以用 disp thi 或 dis int serial 0/1 或 disp cu 命令文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
查看配置是否成功文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway-Serial0/1]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Ethernet0/1 //进入以太网端口模式(该端口连接客户端)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip address 192.168. 255.255.255.0 //配置客户端口 IP 地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit3、配置路由器默认路由文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]ip route-static 0.0.0.0 0.0.0.0 64. //配置默认路由,目的地址用 0.0.0.0文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
0.0.0.0 表示,网关要看工单文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]quit文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
如果上层设备已配置好数据,可以在路由器上 ping 通网关地址了 ping 64.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
4、NAT 地址转换配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] nat address-group 10 64.1.2 64.1.2 //配置公网地址池文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway] acl number 2000 //配置 ACL 访问列表,也就是允许那些地址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
可以转换出去文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
rule 0 permit source 192.168.1.0 0.0.0.255 //配置私网地址段,注意是反掩码文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
[Quidway]interface Mp-group 1 //进入 2M 组 1,注意 2M 捆绑 NAT 相联是在文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
组下面,不是在端口下文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
nat outbound 2000 address-group 10 //配置私网地址段与公网地址相关联文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
5、保存配置文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
>Quidway文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
The configuration will be written to the device.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html
Are you sure?[Y/N] //选 Y 回车就可以了文章源自菜鸟学院-https://www.cainiaoxueyuan.com/wangluo/17124.html