Home  >  Article  >  Database  >  华为MA5200G配置实例

华为MA5200G配置实例

WBOY
WBOYOriginal
2016-06-07 15:03:481796browse

1.基础 配置 : sys /*进入系统视图*/ sysname xxx_xxx_5200G /*更改5200G的系统显示名称*/ super password level 3 cipher xxxxxx /*设置超级用户密码*/ user-interface vty 0 4 /*进入虚拟终端接口 配置 模式*/ auth aaa /*这里我使用 的是aaa的认证模式,

1.基础配置
sys 
/*进入系统视图*/
sysname xxx_xxx_5200G
/*更改5200G的系统显示名称*/
super password level 3 cipher xxxxxx
/*设置超级用户密码*/
user-interface vty 0 4
/*进入虚拟终端接口配置模式*/
auth aaa
/*这里我使用 的是aaa的认证模式,可选用none 也就是不认证,和passowrd 密码认证这三种,推荐选择aaa 和 password */
/*set auth pass cipher xxxxx 如果你选择的是password认证方式,则要设置一个密码*/
/*user privilege level 3  设置telnet登录级别为3级,*/ /*这两步只要选用password时需要使用*/
local-aaa-server
/*进行本地3a服务器视图*/
user maple password cipher xxxxxxx level 3
/*设置你的登录用户名和密码,并设置级别为3级,免得从普通视图进入系统视图时需要再输一次密码,但这样似乎不太安全,呵呵*/


2.PPPoEoVLAN的配置
配置流程如下:
配置虚模板接口--配置认证方案--配置计费方案--配置RADIUS--配置地址池--配置域--配置子接口并为子接口指定虚模板子接口绑定vlan--配置bas接口--配置上行接口和以太口--配置默认路由

#1.配置虚模板接口 
 interface virtual-template 1
  /*创建虚模板接口1*/
  /*虚模板接口1的默认验证方式为auto,包含pap和chap,所以无需额外配置验证方式*/
#2.配置认证方案
 aaa
 /*进入aaa视图*/
 authentication-scheme maple
 /*创建认证方案maple,@_@照抄要收费,发票可以多开@_@ */
 /*在华为5200G中,默认认证模式就是radius,所以无需额外配置认证模式;配置认证模式的命令是authen radius*/
#3.配置计费方案
 aaa
 /*进入AAA视图*/
 accounting-scheme maple
 /*创建计费方案为maple */
 /*在这里无需设置计费模式,默认就是radius;设置计费模式的命令是 accounting-mode radius */
#4.配置radius服务器
  radius-server group maple
  /*创建radius服务器组maple*/
  radius-server authentication 1.1.1.1 1812
  /*配置radius认证服务器的地址及端口号,记得把地址改一下,至于端口号,RFC推荐使用1812,我司radius服务器使用的端口号也是1812*/
   radius-server accounting 1.1.1.1 1813
  /*配置radius计费服务器的地址及端口号,地址不改者,出问题请拨999999999,呵呵*/
   radius-server type plus11
  /*配置radius服务器协议版本,比较新点的服务器potal型是使用plus11,后面是数字11,默认是使用标准的radius服务器*/
  radius-server shared-key maple
  /*配置radius服务器通信密钥,我这里写了maple,记得自己改!!!*/
#5.配置地址池
  ip pool maple local
  /*配置名为maple的本地地址池*/
  gateway 1.1.1.1 255.255.255.0
  /*配置地址池的网关,这里不要填错了。。。。。*/
  section 0 1.1.1.2 1.1.2.254
  /*配置地址段0的地址为1.1.1.2 -- 1.1.2.254
  dns-server 210.53.31.2
  /*配置DNS服务器地址*/
  dns-server 210.52.149.2 secondary
  /*配置从DNS服务器地址*/
#6.配置
  aaa
 /*进入AAA视图*/
  domain maple
 /*创建maple域*/
 authentication-scheme maple
 /*配置域的认证方案为maple,注意和上面配置的认证方案对应*/
 accounting-scheme maple
 /*配置域的计费方案为maple,注意和上面的计费方案对应*/
 radius-server group maple
 /*指定域的radius服务器为maple,注意和上面的服务器组对应*/
 ip-pool maple
 /*指定域的地址池为maple,注意和上面的地址池对应*/
#7.为子接口指定虚模板
 interface ethernet 1/0/2
 /*进入以太网接口视图*/
 un sh
 /*这个是默认配置,不过最好养成这种习惯,因为在有些设备上,默认接口是shutdown的*/
 int ethernet 1/0/2.1
 /*创建1/0/2.1子接口*/
 pppoe-server bind virtral-template 1
 /*绑定虚模板1*/
 user-vlan 101-111
 /*绑定vlan101到111*/
#8.配置BAS接口
 bas
 /*注意,这里是在子接口视图下输的bas命令,其实这第8步和第七步应该是不间断的*/
 access-type layer2-subscriber default-domain  authentication maple
 /*设置BAS接口下的用户为二层用户,默认认证域为maple*/
 /*默认情况下,bas接口下的用户使用的认证方法是pppoe ,所以这里不作额外配置*/

#9.配置上行接口和以太口
  interface GigabitEthernet2/0/0.1
  /*创建子接口,至于为什么,一下子说不清楚,华为至今也无法给出合理的解释,而今朝的解释是子接口下无配置封装类型*&&^^&%&%%^$#$%#%@##@!@@#^&^& */
  vlan-type dot1q vid 2
  /*在创建子接口号,可能出现的情况就是根本看不到vlan-type这条命令!!!,到时自己手动输入就行了,不会报错,过后用?号查看就可以看到这条命令,想想华为也够BT的,呵呵,这里的vlan id 是根据原ESR50配置修改的.*/
 mtu 1514
 /*因为我对端7750是配置的1514,所以这里也改了,以防MTU不匹配引起数据包丢失,还有就是在配置OSPF的时候,如果MTU不匹配,会出现停留在exchange状态的情况。这里根据需要自己改,配置成默认的1500似乎也没什么大的影响.*/
 ip address xxx.xxx.xxx.xxx 255.255.255.252
 /*地球人都知道的东西,用不着再解释了*/
 un sh
 /*启用接口*/
#9.1 配置以太口
interface Ethernet1/0/0.3
/*创建一个子接口*/
pppoe-server bind virtual-template  1
/*绑定到虚模板1*/
undo shutdown
/*启用接口,这是默认配置*/
user-vlan 300 310
/*关联vlan号*/                      
bas
/*配置成bas接口*/
 access-type layer2-subscriber  default-domain  authentication maple
/*配置接口下接入的用户类型为二层用户,并关联到maple域认证*/
#10.配置静态路由
 ip route-static 0.0.0.0 0.0.0.0 x.x.x.x
  /*配置到对端的默认路由*/

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn