使用 Ansible 管理 Cisco IOS 设备
1. 配置 OSPF
在使用 Ansible 配置 Cisco IOS 设备的 OSPF 时,我们需要完成以下操作:
- 准备工作 :确保所有接口已配置正确的 IP 地址。
- 操作步骤 :
1. 更新 group_vars/core.yml 文件,定义核心交换机和广域网路由器之间的 L3 链路:
core_l3_links:
core01:
- name: Ethernet1/0
description: wan01_Gi2
ipv4: 10.3.1.0/30
ospf: yes
ospf_metric: 100
peer: wan01
core02:
- name: Ethernet1/0
description: wan02_Gi2
ipv4: 10.3.1.4/30
ospf: yes
ospf_metric: 200
peer: wan02
2. 更新 `pb_build_network.yml` 剧本,设置 OSPF:
- name: "PLAY 2: Configure Core Switches"
hosts: core
tags: l3_cor
超级会员免费看
订阅专栏 解锁全文
1097

被折叠的 条评论
为什么被折叠?



