目录
OSPF区域配置
SW7为例宣告直连网段
SW7:ip routing
int lo0 ip add 1.1.1.1 32
int g0/1 ip add 192.168.1.254 24
2-3口一致
route ospf 1
net 192.168.1.0 0.0.0.255 area 0
......
net 1.1.1.1 0.0.0.0 area 0
net 110.1.1.0 0.0.0.255 area 0
虚链路配置
R4:
route ospf 1
area 1 vietual-link 2.2.2.2
R2:
route ospf 1
area 1 vietual-link 5.5.5.5
RIP协议配置
R5为例,宣告网络
route rip
version 2
no auto-summary
net 12.0.0.0
路由重分布
位于ABR-R5上
重分布OSPF
route rip
redistribute ospf 1
重分布RIP
route ospf 1
redistribute rip subnets
策略路由
使192.168.1.0/24、192.168.3.0/24网段通行上路由,2通行下
R2:
匹配规则
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 permit 192.168.3.0 0.0.0.255
access-list 2 permit 192.168.1.0 0.0.0.255
创建route-map
route-map PBR permit 10
match ip address 1
set ip next-hop 10.1.12.2(下一跳地址)
route-map PBR permit 20
match ip address 2
set ip next-hop 10.1.13.2
int g0/0(应用到端口)
ip policy route-map PBR