Академический Документы
Профессиональный Документы
Культура Документы
Router R1 is Area Border Router. We will make summarization here. First of all let's configure basic parametrs on our routers. R0 without external routes summarization /ip address add address=192.168.88.2/25 broadcast=192.168.88.127 comment="" disabled=no \ interface=ether1 network=192.168.88.0 add address=192.168.88.129/25 broadcast=192.168.88.255 comment="" disabled=no \ interface=ether2 network=192.168.88.128 add address=192.168.85.1/24 broadcast=192.168.85.255 comment="" disabled=no \ interface=loopback0 network=192.168.85.0
OSPF/Summarization and redistribution complex example This blackhole route will emulate remote network 192.168.84.0/24, which is reachable via static route: /ip route add disabled=no distance=1 dst-address=192.168.84.0/24 type=blackhole Here we will start OSPF process on router R0 and change default parameters to enable redistribution of connected and static routes. Also we will add 192.168.88.0/24 network to OSPF routing process:
/routing ospf area set backbone area-id=0.0.0.0 authentication=none disabled=no name=backbone \ type=default /routing ospf set distribute-default=never metric-bgp=20 metric-connected=20 \ metric-default=1 metric-rip=20 metric-static=20 mpls-te-area=unspecified \ mpls-te-router-id=unspecified redistribute-bgp=no redistribute-connected=\ as-type-1 redistribute-rip=no redistribute-static=as-type-1 router-id=0.0.0.0 /routing ospf network add area=backbone disabled=no network=192.168.88.0/24
R1 without inter-area summarization /ip address add address=192.168.88.3/25 broadcast=192.168.88.127 comment="" disabled=no \ interface=ether1 network=192.168.88.0 add address=192.168.89.66/26 broadcast=192.168.89.127 comment="" disabled=no \ interface=ether2 network=192.168.89.64 In the same way we will start OSPF process on router R1 as on R0. Similarly, we will add 192.168.89.64/26 and 192.168.88.0/25 networks to OSPF routing process: /routing ospf area set backbone area-id=0.0.0.0 authentication=none disabled=no name=backbone \ type=default add area-id=0.0.0.1 authentication=none default-cost=1 disabled=no \ inject-summary-lsa=no name=area1 type=default /routing ospf set distribute-default=never metric-bgp=20 metric-connected=20 \ metric-default=1 metric-rip=20 metric-static=20 mpls-te-area=unspecified \ mpls-te-router-id=unspecified redistribute-bgp=no redistribute-connected=\
OSPF/Summarization and redistribution complex example no redistribute-rip=no redistribute-static=no router-id=0.0.0.0 /routing ospf network add area=area1 disabled=no network=192.168.89.64/26 add area=backbone disabled=no network=192.168.88.0/25 Lets's look at R1 routing table:
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit # 0 ADo 1 ADo 2 ADC 3 ADo 4 ADC DST-ADDRESS 192.168.84.0/24 192.168.85.0/24 192.168.88.0/25 192.168.88.128/25 192.168.89.64/26 192.168.89.66 192.168.88.3 reachable 192.168.88.2 PREF-SRC GATEWAY-STATE GATEWAY reachable reachable 192.168.88.2 192.168.88.2 DISTANCE INTERFACE 110 110 0 110 0 ether1 ether1 ether1 ether1 ether2
R2 configuration R2 configuration is very simple even if you don't know the syntax of Cisco IOS configuration: interface Ethernet0/0 ip address 192.168.89.65 255.255.255.192 ! interface Ethernet0/1 ip address 192.168.89.1 255.255.255.192 ! router ospf 1 network 192.168.89.64 0.0.0.63 area 1 ! 0.0.0.63 is wildcard mask for network mask 255.255.255.192. Corresponding RouterOS configuration should look like this: /routing ospf network add area=area1 disabled=no network=192.168.89.64/26 Lets's look at R2 routing table (output omitted): Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 ia - IS-IS inter area, * - candidate default, U - per-user static route ... 192.168.89.0/26 is subnetted, 2 subnets C 192.168.89.0 is directly connected, Ethernet0/1 C 192.168.89.64 is directly connected, Ethernet0/0 192.168.88.0/25 is subnetted, 2 subnets O IA 192.168.88.0 [110/20] via 192.168.89.66, 00:10:10, Ethernet0/0 O IA 192.168.88.128 [110/30] via 192.168.89.66, 00:10:14, Ethernet0/0 O E1 192.168.85.0/24 [110/40] via 192.168.89.66, 00:09:28, Ethernet0/0
OSPF/Summarization and redistribution complex example O E1 192.168.84.0/24 [110/40] via 192.168.89.66, 00:09:57, Ethernet0/0
0 A SB 192.168.84.0/23 1 A SB 192.168.84.0/24 2 ADC 3 ADC 4 ADC 5 ADo 192.168.85.0/24 192.168.88.0/25 192.168.88.128/25 192.168.89.0/24
Notice that route number 0 was added. R1 R1 is Area Border Router. Here we can make inter-area summarization. Inter-area summarization was made with help of area ranges. Networks 192.168.88.0/25 and 192.168.88.128/25 are combined in 192.168.88.0/24. Network 192.168.89.64/26 is summarized in 192.168.89.0/24 (f.e. for future use): /routing ospf area range add advertise=yes area=backbone cost=default disabled=no range=192.168.88.0/24 add advertise=yes area=area1 cost=default disabled=no range=192.168.89.0/24 Let's look at the routing table after aggregation and summarization:
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit # 0 ADo 1 ADC 2 ADo DST-ADDRESS 192.168.84.0/23 192.168.88.0/25 192.168.88.128/25 192.168.88.3 reachable 192.168.88.2 PREF-SRC GATEWAY-STATE GATEWAY reachable 192.168.88.2 DISTANCE INTERFACE 110 0 110 ether1 ether1 ether1
Notice that route number 3 for 192.168.89.0/24 is presented as unreachable. This route is created automatically by routing process because it can't announce network until it have not any route to it (this is similarly to cisco ios behavior which creats automatic route to Null0 interface for such purpose). R2 New routing table on router R2 will look as follows: 192.168.89.0/26 is subnetted, 2 subnets C 192.168.89.0 is directly connected, Ethernet0/1 C 192.168.89.64 is directly connected, Ethernet0/0 O IA 192.168.88.0/24 [110/30] via 192.168.89.66, 00:00:02, Ethernet0/0 O E1 192.168.84.0/23 [110/40] via 192.168.89.66, 00:00:02, Ethernet0/0