|
OSPF AND RIP 的路由双向再分配配置
说明:
cisco-labA->juniper-lab1->juniper-lab2->juniper-lab3
|----------------RIP------------------||---------OSPF----------|
在juniper-lab2上进行RIP和OSPF的双向路由分配,然后在cisco-labA,juniper-lab3上检查路由表,看RIP和OSPF的路由注入情况;做双向再分配的时候有时需要做路由过滤,用于防止环路的出现.不知道说得对不对,如果有错误请各位大吓指正,谢谢!!!!
cisco-labA#sh run
Building configuration...
Current configuration : 1214 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cisco-labA
!
logging queue-limit 100
enable password cisco
!
memory-size iomem 10
ip subnet-zero
!
!
!
ip audit notify log
ip audit po max-events 100
!
!
!
!
!
!
!
!
!
!
!
!
no voice hpi capture buffer
no voice hpi capture destination
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Loopback0
ip address 10.10.10.1 255.255.255.0
!
interface Loopback1
ip address 18.100.100.1 255.255.255.0
!
interface Ethernet0/0
ip address 172.16.1.2 255.255.255.0
half-duplex
!
interface Serial0/0
no ip address
shutdown
no fair-queue
!
interface Serial0/1
no ip address
shutdown
!
interface Serial1/0
no ip address
shutdown
!
interface Serial1/1
no ip address
shutdown
!
interface Serial1/2
no ip address
shutdown
!
interface Serial1/3
no ip address
shutdown
!
router rip
version 2
network 10.0.0.0
network 18.0.0.0
network 172.16.0.0
!
ip http server
no ip http secure-server
ip classless
cat@juniper-lab1> show configuration
system {
host-name juniper-lab1;
login {
user cat {
uid 2001;
class superuser;
authentication {
encrypted-password "$1$Ip7dKTyk$h2ETNt/ZknC4/VlwaJU201"; # SECRET-DATA
}
}
}
services {
ftp;
telnet;
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 192.168.1.1/24;
}
}
}
fxp1 {
unit 0 {
family inet {
address 172.16.1.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 1.1.1.1/32;
}
}
}
}
protocols {
rip {
send broadcast;
receive both;
group rip {
export ripsend;
neighbor fxp0.0;
neighbor fxp1.0;
neighbor lo0.0;
}
}
}
policy-options {
policy-statement ripsend {
from protocol [ direct rip ];
then accept;
}
}
cat@juniper-lab2> show configuration
version 5.2R2.3;
system {
host-name juniper-lab2;
login {
user cat {
uid 2000;
class superuser;
authentication {
encrypted-password "$1$D3ARALrC$PMJSqBeXXPD2p2AfWrUC11"; # SECRET-DATA
}
}
}
services {
ftp;
telnet;
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 192.168.1.2/24;
}
}
}
fxp1 {
unit 0 {
family inet {
address 175.18.1.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 4.4.4.4/32;
}
}
}
}
protocols {
ospf {
export rip-2-ospf;
area 0.0.0.0 {
interface fxp1.0;
interface lo0.0;
}
}
rip {
send broadcast;
receive both;
group rip {
export [ ripsend ospf-2-rip ];
neighbor fxp0.0;
neighbor lo0.0;
}
}
}
policy-options {
policy-statement ripsend {
from protocol direct;
then accept;
}
policy-statement rip-2-ospf {
term 1 {
from protocol rip;
}
then {
metric 15;
accept;
}
}
policy-statement ospf-2-rip {
from protocol ospf;
then {
metric 10;
accept;
}
}
}
cat@juniper-lab3> show configuration
version 5.6R1.3;
system {
host-name juniper-lab3;
login {
user cat {
uid 2000;
class superuser;
authentication {
encrypted-password "$1$cSYhFq2I$oKA.luXE4A5ctl4ZsRAeW1"; # SECRET-DATA
}
}
}
services {
ftp;
telnet;
}
}
interfaces {
fxp0 {
unit 0 {
family inet {
address 175.18.1.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 44.44.44.44/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface fxp0.0;
interface lo0.0;
}
}
}
cisco-labA#show ip route rip
1.0.0.0/32 is subnetted, 1 subnets
R 1.1.1.1 [120/1] via 172.16.1.1, 00:00:24, Ethernet0/0
4.0.0.0/32 is subnetted, 1 subnets
R 4.4.4.4 [120/2] via 172.16.1.1, 00:00:24, Ethernet0/0
175.18.0.0/24 is subnetted, 1 subnets
R 175.18.1.0 [120/2] via 172.16.1.1, 00:00:24, Ethernet0/0
R 192.168.1.0/24 [120/1] via 172.16.1.1, 00:00:24, Ethernet0/0
44.0.0.0/32 is subnetted, 1 subnets
R 44.44.44.44 [120/11] via 172.16.1.1, 00:00:24, Ethernet0/0
cat@juniper-lab3> show ospf route
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface addr/label
4.4.4.4 Intra AS BR IP 1 fxp0.0 175.18.1.1
1.1.1.1/32 Ext2 Network IP 15 fxp0.0 175.18.1.1
4.4.4.4/32 Intra Network IP 1 fxp0.0 175.18.1.1
10.0.0.0/8 Ext2 Network IP 15 fxp0.0 175.18.1.1
18.0.0.0/8 Ext2 Network IP 15 fxp0.0 175.18.1.1
44.44.44.44/32 Intra Network IP 0 lo0.0
172.16.1.0/24 Ext2 Network IP 15 fxp0.0 175.18.1.1
175.18.1.0/24 Intra Network IP 1 fxp0.0
192.168.1.0/24 Ext2 Network IP 15 fxp0.0 175.18.1.1
cat@juniper-lab3> ping 10.10.10.1
PING 10.10.10.1 (10.10.10.1): 56 data bytes
64 bytes from 10.10.10.1: icmp_seq=0 ttl=253 time=1.863 ms
64 bytes from 10.10.10.1: icmp_seq=1 ttl=253 time=1.615 ms
64 bytes from 10.10.10.1: icmp_seq=2 ttl=253 time=1.654 ms
64 bytes from 10.10.10.1: icmp_seq=3 ttl=253 time=1.637 ms
64 bytes from 10.10.10.1: icmp_seq=4 ttl=253 time=1.614 ms
64 bytes from 10.10.10.1: icmp_seq=5 ttl=253 time=1.673 ms
64 bytes from 10.10.10.1: icmp_seq=6 ttl=253 time=1.678 ms
64 bytes from 10.10.10.1: icmp_seq=7 ttl=253 time=1.821 ms
64 bytes from 10.10.10.1: icmp_seq=8 ttl=253 time=1.618 ms
64 bytes from 10.10.10.1: icmp_seq=9 ttl=253 time=1.620 ms
64 bytes from 10.10.10.1: icmp_seq=10 ttl=253 time=1.652 ms
64 bytes from 10.10.10.1: icmp_seq=11 ttl=253 time=1.607 ms
^C
--- 10.10.10.1 ping statistics ---
12 packets transmitted, 12 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.607/1.671/1.863/0.080 ms
|
该贴已经同步到 COCO999的微博 |
|