本页内容
代理配置文件(设备)
控制器部分
[controller] # <metadb> provides directory service for AOS. It must be configured properly # for a device to connect to AOS controller. metadb = tbt://aos-server:29731 # Use <web> to specify AOS web server IP address or name. This is used by # device to make REST API calls to AOS controller. It is assumed that AOS web # server is running on the same host as metadb if this option is not specified web = # <interface> is used to specify the management interface.This is currently # being used only on server devices and the AOS agent on the server device will # not come up unless this is specified. interface =
metadb
代理服务器发现是一种客户端-服务器模型。Apstra 设备代理通过 metadb
连接直接注册到 Apstra 服务器。Apstra 服务器可从静态 IP 或 DNS 中发现。
动态 DNS - 默认情况下,Apstra 设备代理会依靠 dhcp 提供的 DNS 解析和主机名解析来指向 DNS 条目 aos 服务器。在 Apstra 服务器上,如果 metadb 连接条目指向某个 DNS 条目,则 Apstra 代理也必须能够解析该 DNS 条目。必须配置 DNS,以便os 服务器解析为 Apstra 服务器本身的接口,因此代理配置了 metadb = tbt://aos-server:29731
静态 DNS - 我们可以将静态 DNS 入口直接指向 aos 服务器的 IP。添加静态 DNS 条目,或使用设备上的 DNS 名称服务器配置。
Arista 和 Cisco 静态主机名
localhost(config)#ip host aos-server 192.168.25.250
从 Apstra 服务器获取 IP
admin@aos-server:~# ip addr show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:8a:39:05 brd ff:ff:ff:ff:ff:ff inet 192.168.59.250/24 brd 192.168.59.255 scope global eth0 inet6 fe80::a00:27ff:fe8a:3905/64 scope link valid_lft forever preferred_lft forever
然后,将配置代理。metadb = tbt://aos-server:29731
Web
在未来的版本中,Apstra REST API 将能够独立于 Apstra 服务器本身运行。此功能仅适用于 Apstra 内部使用。
接口
设备代理源接口仅适用于 Linux 服务器(Ubuntu、CentOS)。此源 IP 是设备代理在使用 Apstra 注册时使用的服务器接口。例如,在服务器上,要将设备代理绑定到 eth1 而不是默认 eth0,请指定 interface = eth1
。
服务部分
[service] # AOS device agent by default starts in "telemetry-only" mode.Set following # variable to 1 if you want AOS agent to manage the configuration of your # device. enable_configuration_service = 0 # When managing device configuration AOS agent will restore backup config if it # fails to connect to AOS controller in <backup_config_restoration_timeout>, # specified as <hh:mm:ss>. Set it to 00:00:00 to disable backup restoration backup_config_restoration_timeout = 00:00:00
服务部分管理与呈现和遥测服务配置相关的特定代理配置。
enable_configuration_service
此字段指定设备代理的操作模式:仅遥测或完全控制。
enable_configuration_service = 0
要仅推送遥测(警报),请保留默认值 0
。除非网络管理员指定配置文件,否则配置文件不会修改。
enable_configuration_service = 1
将此字段设置为 1
允许 Apstra 完全管理设备代理配置,包括推送发现和基于意图的完整配置。
backup_config_restoration_timeout
配置未 存储在 设备上。这会阻止设备启动并立即参与可能尚未正确配置的交换矩阵。Apstra 设备代理在发现阶段结束后配置。
backup_restoration_timeout = 00:00:00
如果 Apstra 设备代理无法与 Apstra 服务器联系,则这种禁用状态(默认)会阻止 Apstra 设备代理替换正在运行的配置。之前的任何配置状态都无法还原。
backup_restoration_timeout = 00:15:00
除默认值 00:00:00
外,任何值都允许 Apstra 代理在指定的时间段后启动并替换之前已知的状态(此示例为 15 分钟)运行的配置。具体来说,配置还原期到期后,来自的文件 /.aos/rendered/
将还原到系统。
Logrotate 部分
[logrotate] # AOS has builtin log rotate functionality. You can disable it by setting # <enable_log_rotate> to 0 if you want to use linux logrotate utility to manage # your log files. AOS agent reopens log file on SIGHUP enable_log_rotate = 1 # Log file will be rotated when its size exceeds <max_file_size> max_file_size = 1M # The most recent <max_kept_backups> rotated log files will be saved. Older # ones will be removed. Specify 0 to not save rotated log files, i.e. the log # file will be removed as soon as its size exceeds limit. max_kept_backups = 5 # Interval, specified as <hh:mm:ss>, at which log files are checked for # rotation. check_interval = 1:00:00
Apstra 将一系列文件记录到 /var/log/aos
该文件夹。Apstra 实施自己的日志轮换方法以防止 /var/log/aos
填满。您可以启用 (2) 或禁用 (1) 日志轮换。当每个单独的日志文件接近适当的最大大小时,都会进行轮换。默认情况下,日志轮换每小时进行一次。
设备信息部分
[device_info] # <model> is used to specify the device's hardware model to be reported to AOS # device manager. This is only used by servers, so can be ignored for non- # server devices such as switches. By default a server reports "Generic Model" # which matches a particular HCL entry's selector::model value in AOS. Specify # another model for the server to be classified as a different HCL entry. model = Generic Model
模型
设备信息部分用于在服务器注册到 Apstra 时修改服务器的默认设备型号。例如, Server 2x10G
将服务器更改为双连接的 L3 服务器。所有有效的选项 model
包括:
- 通用模型
- 服务器 2x10G
- 服务器 1x25G
- 服务器 1x40G
- 服务器 4x10G
设备配置文件部分
# <device_profile_id> is used to specify the device profile to be associated to # the device. Selector in the specified device profile should match the # reported device facts. device_profile_id = [credential] username = admin