conf ter
int lo 0
ip add 192.168.10.1255.255.255.0
no shu
int f0/0
ip add 192.168.20.1255.255.255.0
no shu
R1:
conf ter
intf0/0
ipadd 192.168.20.2 255.255.255.0
no shu
intf0/1
ipadd 192.168.30.1 255.255.255.0
no shu
R2:
conf ter
intf0/1
ipadd 192.168.30.2 255.255.255.0
no shu
intf0/0
ipadd 192.168.40.1 255.255.255.0
no shu
R3:
conf ter
intf0/0
ipadd 192.168.40.2 255.255.255.0
no shu
intf0/1
ipadd 192.168.50.1 255.255.255.0
no shu
R4:
conf ter
int lo 0
ipadd 192.168.60.1 255.255.255.0
no shu
intf0/1
ipadd 192.168.50.2 255.255.255.0
no shu
2)分别打开ospf和rip协议,并进行宣告
R0:
ro os 1
net 192.168.10.00.0.0.255 area 0
net 192.168.20.00.0.0.255 area 0
R1:
ro os 1
net 192.168.20.00.0.0.255 area 0
ex
ro rip
ver 2
no au
net 192.168.30.0
R2:
ro rip
ver 2
no au
net 192.168.30.0
net192.168.40.0
R3:
roos 2
net192.168.50.0 0.0.0.255 area 1
ex
ro rip
ver 2
no au
net192.168.40.0
R4:
roos 2
net192.168.50.0 0.0.0.255 area 1
net192.168.60.0 0.0.0.255 area 1
3)在交界区分别进行不同协议之间的相互学习
R1:
ro rip
redistribute os 1metric 11
ro os 1
redistribute ripsubnets
R3:
ro rip
redistributeos 2 metric 12
roos 2
redistribute ripsubnets
4)测试