ensp 动态路由 3 个路由器和 4 台 pc 配置命令图
时间: 2024-03-09 11:46:21 浏览: 97
以下是 3 台路由器和 4 台 PC 的动态路由配置命令图:
```
+----------+ +----------+
| R1 | | R2 |
| | | |
| e0/0/0 +----------------+ e0/0/0 |
| | | |
| 10.0.0.1/24 | | 10.0.0.2/24 |
+----+-----+ +-----+----+
| |
| |
+----+-----+ +-----+----+
| | | |
| R3 | | PC4 |
| | | |
| e0/0/0 +----------------+ |
| | | |
| 10.0.0.3/24 | | 10.0.0.4/24 |
+----------+ +----------+
```
配置命令如下:
```
// R1 配置
sys
ospf 1 router-id 1.1.1.1
area 0
network 10.0.0.0 0.0.0.255
interface Ethernet0/0/0
ip address 10.0.0.1 24
ospf network point-to-point
// R2 配置
sys
ospf 1 router-id 2.2.2.2
area 0
network 10.0.0.0 0.0.0.255
interface Ethernet0/0/0
ip address 10.0.0.2 24
ospf network point-to-point
// R3 配置
sys
ospf 1 router-id 3.3.3.3
area 0
network 10.0.0.0 0.0.0.255
interface Ethernet0/0/0
ip address 10.0.0.3 24
ospf network point-to-point
// PC4 配置
ip address 10.0.0.4 24
gateway 10.0.0.3
// 配置静态路由
// PC1 到 PC4 的静态路由
ip route-static 10.0.0.4 255.255.255.255 10.0.0.3
// R1 到 PC4 的静态路由
ip route-static 10.0.0.4 255.255.255.255 10.0.0.2
// R2 到 PC4 的静态路由
ip route-static 10.0.0.4 255.255.255.255 10.0.0.3
```
阅读全文