2024年8月28日 15:26:47
This commit is contained in:
parent
e9c4baa590
commit
8bea0a7484
109
B. 第二阶段/拓扑练习/0828_BFD和静态路由.md
Normal file
109
B. 第二阶段/拓扑练习/0828_BFD和静态路由.md
Normal file
@ -0,0 +1,109 @@
|
||||
# BFD和静态路由
|
||||
|
||||
![image-20240828140643096](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240828140643096.png)
|
||||
|
||||
### 一、配IP
|
||||
|
||||
- **AR1**
|
||||
|
||||
```
|
||||
[AR1]int g0/0/2
|
||||
[AR1-GigabitEthernet0/0/2]ip add 192.168.1.254 24
|
||||
[AR1-GigabitEthernet0/0/2]int g0/0/0
|
||||
[AR1-GigabitEthernet0/0/0]ip add 192.168.12.1 24
|
||||
[AR1-GigabitEthernet0/0/0]int g0/0/1
|
||||
[AR1-GigabitEthernet0/0/1]ip add 192.168.13.1 24
|
||||
[AR1-GigabitEthernet0/0/1]quit
|
||||
[AR1]ip route-static 192.168.2.0 24 192.168.12.2
|
||||
[AR1]ip route-static 192.168.2.0 24 192.168.13.2 preference 100
|
||||
```
|
||||
|
||||
- **AR2**
|
||||
|
||||
```
|
||||
[AR2]int g0/0/0
|
||||
[AR2-GigabitEthernet0/0/0]ip add 192.168.12.2 24
|
||||
[AR2-GigabitEthernet0/0/0]int g0/0/1
|
||||
[AR2-GigabitEthernet0/0/1]ip add 192.168.24.2 24
|
||||
[AR2-GigabitEthernet0/0/1]quit
|
||||
[AR2]ip route-static 192.168.1.0 24 192.168.12.1
|
||||
[AR2]ip route-static 192.168.2.0 24 192.168.24.4
|
||||
```
|
||||
|
||||
- **AR3**
|
||||
|
||||
```
|
||||
[AR3]int g0/0/0
|
||||
[AR3-GigabitEthernet0/0/0]ip add 192.168.13.3 24
|
||||
[AR3-GigabitEthernet0/0/0]int g0/0/1
|
||||
[AR3-GigabitEthernet0/0/1]ip add 192.168.34.3 24
|
||||
[AR3-GigabitEthernet0/0/1]quit
|
||||
[AR3]ip route-static 192.168.1.0 24 192.168.13.1
|
||||
[AR3]ip route-static 192.168.2.0 24 192.168.34.4
|
||||
```
|
||||
|
||||
- **AR4**
|
||||
|
||||
```
|
||||
[AR4]int g0/0/0
|
||||
[AR4-GigabitEthernet0/0/0]ip add 192.168.24.4 24
|
||||
[AR4-GigabitEthernet0/0/0]int g0/0/1
|
||||
[AR4-GigabitEthernet0/0/1]ip add 192.168.34.4 24
|
||||
[AR4-GigabitEthernet0/0/1]int g0/0/2
|
||||
[AR4-GigabitEthernet0/0/2]ip add 192.168.2.254 24
|
||||
[AR4-GigabitEthernet0/0/2]quit
|
||||
[AR4]ip route-static 192.168.1.0 24 192.168.24.2
|
||||
[AR4]ip route-static 192.168.1.0 24 192.168.34.3 preference 100
|
||||
```
|
||||
|
||||
### 二、BFD
|
||||
|
||||
- **AR1**
|
||||
|
||||
```
|
||||
[AR1]ip route-static 192.168.24.0 24 192.168.12.2
|
||||
[AR1]ip route-static 192.168.34.0 24 192.168.13.3
|
||||
[AR1]bfd
|
||||
[AR1-bfd]quit
|
||||
[AR1]bfd ntd2407 bind peer-ip 192.168.24.4
|
||||
[AR1-bfd-session-ntd2407]discriminator local 1
|
||||
[AR1-bfd-session-ntd2407]discriminator remote 4
|
||||
[AR1-bfd-session-ntd2407]min-tx-interval 10
|
||||
[AR1-bfd-session-ntd2407]min-rx-interval 10
|
||||
[AR1-bfd-session-ntd2407]commit
|
||||
```
|
||||
|
||||
- *注解:*
|
||||
1. `[AR1]bfd`:进入BFD配置模式
|
||||
2. `[AR1-bfd]quit`:退出BFD配置模式
|
||||
3. `[AR1]bfd ntd2407 bind peer-ip 192.168.24.4`:创建一个名为`ntd2407`的BFD会话,并将其绑定到对端IP地址`192.168.24.4`
|
||||
4. `[AR1-bfd-session-ntd2407]discriminator local 1`:为本地设备设置BFD会话的鉴别器值为`1`
|
||||
5. `[AR1-bfd-session-ntd2407]discriminator remote 4`:设置对端设备BFD会话的鉴别器值为`4`
|
||||
6. `[AR1-bfd-session-ntd2407]min-tx-interval 10`:设置BFD会话的最小发送间隔为`10`毫秒
|
||||
7. `[AR1-bfd-session-ntd2407]min-rx-interval 10`:设置BFD会话的最小接收间隔为`10`毫秒
|
||||
8. `[AR1-bfd-session-ntd2407]commit`:提交BFD会话的配置,使其生效
|
||||
|
||||
- **AR4**
|
||||
|
||||
```
|
||||
[AR4]ip route-static 192.168.12.0 24 192.168.24.2
|
||||
[AR4]ip route-static 192.168.13.0 24 192.168.34.3
|
||||
[AR4]bfd
|
||||
[AR4-bfd]quit
|
||||
[AR4]bfd ntd2407 bind peer-ip 192.168.12.1
|
||||
[AR4-bfd-session-ntd2407]discriminator local 4
|
||||
[AR4-bfd-session-ntd2407]discriminator remote 1
|
||||
[AR4-bfd-session-ntd2407]min-tx-interval 10
|
||||
[AR4-bfd-session-ntd2407]min-rx-interval 10
|
||||
[AR4-bfd-session-ntd2407]commit
|
||||
```
|
||||
|
||||
- *注解:*
|
||||
1. `[AR1]bfd`:进入BFD配置模式
|
||||
2. `[AR1-bfd]quit`:退出BFD配置模式
|
||||
3. `[AR1]bfd ntd2407 bind peer-ip 192.168.12.1`:创建一个名为`ntd2407`的BFD会话,并将其绑定到对端IP地址`192.168.12.1`
|
||||
4. `[AR1-bfd-session-ntd2407]discriminator local 4`:为本地设备设置BFD会话的鉴别器值为`4`
|
||||
5. `[AR1-bfd-session-ntd2407]discriminator remote 1`:设置对端设备BFD会话的鉴别器值为`1`
|
||||
6. `[AR1-bfd-session-ntd2407]min-tx-interval 10`:设置BFD会话的最小发送间隔为`10`毫秒
|
||||
7. `[AR1-bfd-session-ntd2407]min-rx-interval 10`:设置BFD会话的最小接收间隔为`10`毫秒
|
||||
8. `[AR1-bfd-session-ntd2407]commit`:提交BFD会话的配置,使其生效
|
Loading…
Reference in New Issue
Block a user