配置文件为一文本文件,其格式如下:
如下为一Quidway(R) R2501路由器的配置文件:
!
loghost 129.9.191.240
firewall enable
snmp-server contact Mr.Wang-Tel:3306
snmp-server traps enable
snmp-server host 129.102.149.23
snmp-server location telephone-closet,3rd-flood
host liuzhenhua 129.102.157.55
host server 129.102.157.55
!
interface Ethernet0
ip address 129.102.100.141 255.255.0.0
!
interface Serial0
baudrate 9600
encapsulation ppp
ppp chap host quidway
ppp pap sent-username quidway password quidway
!
interface Serial1
encapsulation ppp
ppp chap host quidway
ppp pap sent-username quidway password quidway
!
interface Serial2
flowcontrol normal
encapsulation ppp
ppp chap host quidway
ppp pap sent-username quidway password quidway
!
end
2. 加载配置文件
配置文件可以按照规定格式脱机编辑,然后用download config命令加载到路由器,该命令只能在终端仿真程序中执行,如果在Telnet中执行,则提示如下信息:
Download can only be executed by the serial terminal client.
表3-1 加载配置文件
| 操作 | 命令 |
| 加载配置文件 | download config |
在终端仿真程序中执行步骤如下:
第一步:用户确认。
Do you want really download the config.ini?(Y/N)y
第二步:设置二进制传输协议为Xmodem/CRC。
Change Protocol to Xmodem,then Send the Selected File...