现在我们完成了总部和分部二层网络的业务分流
二、单区域OSPF的配置:
SW1:
router ospf 1
router-id 172.16.0.1
passive-interface default //工程化配置,不需要的接口要配置成被动接口
no passive-interface vlan 901
no passive-interface f1/1
network 172.16.0.1 0.0.0.0 area 0
network 172.16.1.0 0.0.0.3 area 0
network 172.16.1.8 0.0.0.3 area 0
network 172.16.20.0 0.0.0.255 area 0
network 172.16.21.0 0.0.0.255 area 0
int vlan 901
ip ospf network point-to-point //配置成点对点
int f1/1
ip ospf network point-to-point //配置成点对点
SW2:
router ospf 1
router-id 172.16.0.2
passive-interface default //工程化配置,不需要的接口要配置成被动接口
no passive-interface vlan 901
no passive-interface f1/1
network 172.16.0.2 0.0.0.0 area 0
network 172.16.1.4 0.0.0.3 area 0
network 172.16.1.8 0.0.0.3 area 0
network 172.16.20.0 0.0.0.255 area 0
network 172.16.21.0 0.0.0.255 area 0
int vlan 901
ip ospf network point-to-point //配置成点对点
int f1/1
ip ospf network point-to-point //配置成点对点
RT5:
router ospf 1
router-id 172.16.0.5
passive-interface default
no passive-interface f2/0
no passive-interface f1/0
no passive-interface s0/0
network 172.16.0.5 0.0.0.0 area 0
network 172.16.1.0 0.0.0.3 area 0
network 172.16.1.12 0.0.0.3 area 0
network 172.16.33.0 0.0.0.3 area 0
int f1/0
ip ospf network point-to-point //配置成点对点
int f2/0
ip ospf network point-to-point //配置成点对点
RT6:
router ospf 1
router-id 172.16.0.6
passive-interface default
no passive-interface f2/0
no passive-interface f1/0
no passive-interface s0/0
network 172.16.0.6 0.0.0.0 area 0
network 172.16.1.4 0.0.0.3 area 0
network 172.16.1.12 0.0.0.3 area 0
network 172.16.33.4 0.0.0.3 area 0
int f1/0
ip ospf network point-to-point //配置成点对点
int f2/0
ip ospf network point-to-point //配置成点对点
RT7:
router ospf 1
router-id 172.16.32.1
passive-interface default
no passive-interface s0/0
no passive-interface f1/0
network 172.16.32.1 0.0.0.0 area 0
network 172.16.33.0 0.0.0.3 area 0
network 172.16.33.12 0.0.0.3 area 0
network 172.16.35.0 0.0.0.255 area 0
network 172.16.36.0 0.0.0.255 area 0
network 172.16.37.0 0.0.0.255 area 0
int f1/0
ip ospf network point-to-point //配置成点对点
RT8:
router ospf 1
router-id 172.16.32.2
passive-interface default
no passive-interface s0/0
no passive-interface f1/0
network 172.16.32.2 0.0.0.0 area 0
network 172.16.33.4 0.0.0.3 area 0
network 172.16.33.12 0.0.0.3 area 0
network 172.16.35.0 0.0.0.255 area 0
network 172.16.36.0 0.0.0.255 area 0
network 172.16.37.0 0.0.0.255 area 0
int f1/0
ip ospf network point-to-point //配置成点对点
三、单区域OSPF业务分流策略部署:
RT7:
int f2/0.36
ip ospf cost 1000
int f2/0.37
ip ospf cost 2000
int f2/0
ip ospf cost 1000
RT8:
int f2/0.36
ip ospf cost 2000
int f2/0.37
ip ospf cost 1000
int f2/0
ip ospf cost 2000
SW1:
int vlan 20
ip ospf cost 1000
int vlan 21
ip ospf cost 2000
int vlan 22
ip ospf cost 1000
int vlan 23
ip ospf cost 2000
int vlan 300
ip ospf cost 1000
SW2:
int vlan 20
ip ospf cost 2000
int vlan 21
ip ospf cost 1000
int vlan 22
ip ospf cost 2000
int vlan 23
ip ospf cost 1000
int vlan 300
ip ospf cost 2000
调整平面间的流量:
SW、SW2:
int vlan 901
ip ospf cost 100
RT5、RT6:
int f1/0
ip ospf cost 101
RT7、RT8:
现在测试一下:
总部生产访问办公生产:VPC3-SW3-SW1-RT5-RT7-SW9-VPC5
总部生产访问分部办公:VPC3-SW3-SW1-SW2-RT6-RT8-SW10