【上设备配置】U全量基础设备配置解释
这是一台华环/华为风格承载设备的基础开局配置主要完成了设备命名、管理登录、环回地址、日志、SNMP、MPLS、BFD、PW伪线、AAA认证、告警上送等功能。下面按模块解释。一、系统基础配置进入系统视图system-view进入全局配置模式。设置设备名sysname SX-XZ-KLX-XZSKLXYJCFDHHH20RN-161-U-1.MCN.H20RN-161设置主机名便于网管识别。二、本地用户配置创建管理用户local-user ***** class manage password simple ***** service-typesshtelnet authorization-attribute user-role network-admin quit作用创建本地管理账号登录方式SSHTelnet权限network-admin即最高管理权限三、Loopback接口配置Loopback31interface LoopBack31ipaddress1.14.186.68255.255.255.255 quit作用给设备配置稳定的逻辑地址用于MPLS LSR-IDBFD网管识别路由器标识四、日志服务器配置info-center loghostsourceLoopBack1023 info-center loghost vpn-instance __mgnt_vpn__4.12.1.35作用设备日志发送到日志服务器服务器地址4.12.1.35通过管理VPN__mgnt_vpn__日志源地址LoopBack1023五、SNMP网管配置snmp-agent snmp-agent communityreadsimple ***** snmp-agent sys-info version all snmp-agenttrapenablesnmp-agenttrapsourceLoopBack1023snmp-agent target-hosttrapaddress udp-domain4.12.1.34 vpn-instance __mgnt_vpn__ params securityname ***** v2c作用开启SNMP用于网管监控设备。配置只读团体字communityread支持版本version all支持SNMPv1SNMPv2cSNMPv3Trap告警设备故障主动上报到4.12.1.34六、SSH配置sshserverenable开启SSH远程登录。七、MPLS配置设置LSR IDmpls lsr-id1.14.186.68MPLS路由器ID。通常使用Loopback地址。MPLS标签配置mpls label advertise non-null发送真实标签不使用implicit-null。开启LDPmpls ldp non-stop-routing quit作用开启LDP协议标签自动分发NSF不中断转发八、物理接口配置主接口interface GigabitEthernet1/0/4 port link-mode route description... quit作用把端口改为三层接口。子接口interface GigabitEthernet1/0/4.31 description... mtu9000ipaddress1.15.53.105255.255.255.252 mplsenablequit作用VLAN子接口.31表示VLAN 31Jumbo帧mtu9000IP地址1.15.53.105/30对端1.15.53.106开启MPLS在该链路上传MPLS报文。九、静态路由iproute-static3.13.76.139255.255.255.2551.15.53.106到目标3.13.76.139下一跳1.15.53.106十、静态LSP入方向static-lsp ingress in100to18 destination3.13.76.139255.255.255.255 nexthop1.15.53.106 out-label18作用发往3.13.76.139时压入标签18出方向static-lsp egress out18to100 in-label100收到标签100时弹出。十一、BFD配置bfd template1bfd min-transmit-interval10bfd min-receive-interval10bfd detect-multiplier3undo bfd ip-router-alert作用快速链路检测。参数发送间隔10ms接收间隔10ms检测倍数3故障检测时间10×330ms十二、L2VPN / PW配置l2vpnenable开启二层VPN。PW模板Ethernet PWpw-class template-ethernetVLAN PWpw-class template-vlan主要功能control-wordenablevccv bfd template1含义开启控制字开启伪线BFD检测快速感知PW故障十三、MPLS BFDmpls bfdenable开启MPLS层BFD。用于LSP检测PW检测快速倒换十四、AAA认证TACACShwtacacs scheme hwtac配置AAA服务器。认证服务器4.53.255.714.53.255.72作用登录认证权限授权集中账号管理十五、登录域配置domain default_admin authentication login hwtacacs-scheme hwtaclocalauthorization login hwtacacs-scheme hwtaclocalaccounting login none含义优先TACACS认证本地认证备份十六、VTY远程登录line vty063authentication-mode scheme user-role network-operator idle-timeout150quit支持64个远程会话空闲15分钟断开十七、Console口line console0authentication-mode password user-role network-adminsetauthentication password simple Huahuan_123 quit串口登录密码。十八、断电告警dying-gasphost4.12.1.34 vpn-instance __mgnt_vpn__ snmp-trap version v2c securityname *****作用设备断电前立即发送SNMP Trap。通知网管设备掉电十九、保存配置save force强制保存当前配置。二十、整体作用总结这套配置实现管理面SSH登录TACACS认证SNMP监控Syslog日志掉电告警业务面MPLS静态LSPL2VPNPW伪线保护面BFD快速检测PW故障检测MPLS故障检测