I want to do such setup, I have made this network, (see the attachment),
I want to do BGP and OSPF together,
I want to do balanceing and failover with having BGP and OSPF options on
I use RB 133 and RB 150 for this stage, but if everything goes well, I am planing to enlarge my network.
When the Router 2 goes down the network's topology changes, BGP changes the routes.
but i want to use OSPF for changing routes using the cost parameter, sometimes it does not.
Every time my default route goes from Router 1 to Router 2 and then it goes to Router 5
If I set th cost the for LIne from Router 1 to Router 2 it does not change anything in my routes
Here my all setup
Router 1
Code: Select all
/ ip address
add address=192.168.12.1/24 network=192.168.12.0 broadcast=192.168.12.255 interface="ether1 1-2" comment="To 2-rd Router" disabled=no
add address=192.168.14.1/24 network=192.168.14.0 broadcast=192.168.14.255 interface="ether3 1-4" comment="To 4-rd Router" disabled=no
add address=10.0.246.12/24 network=10.0.246.0 broadcast=10.0.246.255 interface="ether2 net" comment="" disabled=no
/ routing bgp instance
set default name="default" as=200 router-id=0.0.0.0 redistribute-connected=yes redistribute-static=yes redistribute-rip=no redistribute-ospf=no \
redistribute-other-bgp=no out-filter="" client-to-client-reflection=yes ignore-as-path-len=no comment="" disabled=no
/ routing bgp peer
add name="peer1" instance=default remote-address=192.168.12.2 remote-as=202 tcp-md5-key="" nexthop-choice=default multihop=no route-reflect=no hold-time=10s \
ttl=1 in-filter="" out-filter="" comment="" disabled=no
add name="peer2" instance=default remote-address=192.168.14.4 remote-as=204 tcp-md5-key="" nexthop-choice=default multihop=no route-reflect=no hold-time=10s \
ttl=1 in-filter="" out-filter="" comment="" disabled=no
/ routing ospf
set router-id=0.0.0.0 distribute-default=always-as-type-2 redistribute-connected=as-type-2 redistribute-static=no redistribute-rip=no \
redistribute-bgp=as-type-1 metric-default=1 metric-connected=1 metric-static=20 metric-rip=20 metric-bgp=20
/ routing ospf area
set backbone area-id=0.0.0.0 type=default translator-role=translate-candidate authentication=none disabled=no
add name="local-246" area-id=0.0.0.246 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-12" area-id=0.0.0.12 type=default translator-role=translate-never authentication=none default-cost=25 disabled=no
add name="local-14" area-id=0.0.0.14 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-52" area-id=0.0.0.52 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-23" area-id=0.0.0.23 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-35" area-id=0.0.0.35 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-34" area-id=0.0.0.34 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-54" area-id=0.0.0.54 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
/ routing ospf network
add network=10.0.246.0/24 area=backbone disabled=no
add network=192.168.12.0/24 area=local-12 disabled=no
add network=192.168.14.0/24 area=local-14 disabled=no
add network=192.168.52.0/24 area=local-52 disabled=no
add network=192.168.23.0/24 area=local-23 disabled=no
add network=192.168.35.0/24 area=local-35 disabled=no
add network=192.168.34.0/24 area=local-34 disabled=no
add network=192.168.54.0/24 area=local-54 disabled=no
Code: Select all
/ ip address
add address=192.168.52.2/24 network=192.168.52.0 broadcast=192.168.52.255 interface="ether2 2-5" comment="To 5-rd Router" disabled=no
add address=192.168.23.2/24 network=192.168.23.0 broadcast=192.168.23.255 interface="ether1 2-3" comment="To 3-rd Router" disabled=no
add address=192.168.12.2/24 network=192.168.12.0 broadcast=192.168.12.255 interface="ether3 2-1" comment="" disabled=no
/ routing bgp instance
set default name="default" as=202 router-id=0.0.0.0 redistribute-connected=yes redistribute-static=yes redistribute-rip=no redistribute-ospf=no \
redistribute-other-bgp=no out-filter="" client-to-client-reflection=yes ignore-as-path-len=no comment="" disabled=no
/ routing bgp peer
add name="peer1" instance=default remote-address=192.168.12.1 remote-as=200 tcp-md5-key="" nexthop-choice=default multihop=no route-reflect=no hold-time=10s \
ttl=1 in-filter="" out-filter="" comment="" disabled=no
add name="peer2" instance=default remote-address=192.168.52.5 remote-as=205 tcp-md5-key="" nexthop-choice=default multihop=no route-reflect=no hold-time=10s \
ttl=1 in-filter="" out-filter="" comment="" disabled=no
add name="peer3" instance=default remote-address=192.168.23.3 remote-as=203 tcp-md5-key="" nexthop-choice=default multihop=no route-reflect=no hold-time=10s \
ttl=1 in-filter="" out-filter="" comment="" disabled=no
/ routing ospf
set router-id=0.0.0.0 distribute-default=always-as-type-2 redistribute-connected=as-type-2 redistribute-static=no redistribute-rip=no \
redistribute-bgp=as-type-1 metric-default=1 metric-connected=1 metric-static=20 metric-rip=20 metric-bgp=20
/ routing ospf area
set backbone area-id=0.0.0.0 type=default translator-role=translate-candidate authentication=none disabled=no
add name="local-246" area-id=0.0.0.246 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-12" area-id=0.0.0.12 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-14" area-id=0.0.0.14 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-52" area-id=0.0.0.52 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-23" area-id=0.0.0.23 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-35" area-id=0.0.0.35 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-34" area-id=0.0.0.34 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
add name="local-54" area-id=0.0.0.54 type=default translator-role=translate-never authentication=none default-cost=1 disabled=no
/ routing ospf network
add network=10.0.246.0/24 area=local-246 disabled=no
add network=192.168.12.0/24 area=local-12 disabled=no
add network=192.168.14.0/24 area=local-14 disabled=no
add network=192.168.52.0/24 area=local-52 disabled=no
add network=192.168.23.0/24 area=local-23 disabled=no
add network=192.168.35.0/24 area=local-35 disabled=no
add network=192.168.34.0/24 area=local-34 disabled=no
add network=192.168.54.0/24 area=local-54 disabled=no
Thanks
with Regards Karapet Aznavuryan
Here my tracert result to my main router
Tracing route to 192.168.254.254 over a maximum of 30 hops
1 1 ms <1 ms <1 ms 10.0.246.12 Router 1
2 2 ms 1 ms 1 ms 192.168.12.2 Router 2
3 2 ms 1 ms 1 ms 192.168.52.5 Router 5
4 2 ms 1 ms 1 ms 192.168.254.254 Router Main
Trace complete.