OSPF - BGP labo

Hi,

I’m working on OSPF and BGP.

As below schema :

image

PC1 can ping all routers. My goal was make a redudancy WAN with Vy4 - Vy3 - Vy2

On Vy2 route table i get a static route (default route) with Vy1 :

vyos@vyos:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,

  • selected route, * - FIB route, q - queued route, r - rejected route
    S>* 0.0.0.0/0 [1/0] via 88.88.88.3, eth3, 00:11:09
    O 0.0.0.0/0 [110/50] via 77.77.77.1, eth0, 00:13:40
    O>* 10.0.0.0/24 [110/21] via 77.77.77.1, eth0, 00:08:48
    S 10.2.2.2/32 [1/0] unreachable (blackhole), 00:36:48
    C>* 10.2.2.2/32 is directly connected, lo, 00:37:04
    C>* 11.0.0.0/31 is directly connected, vti10, 00:36:37
    C>* 66.66.66.0/24 is directly connected, eth2, 00:36:55
    O 77.77.77.0/24 [110/1] is directly connected, eth0, 00:36:38
    C>* 77.77.77.0/24 is directly connected, eth0, 00:36:57
    C>* 88.88.88.0/24 is directly connected, eth3, 00:11:09
    B>* 99.99.99.0/24 [20/2] via 66.66.66.4, eth2, 00:36:41

When i cut Link between Vy2 -> Vy3, trafic is not routed on Network 66.66.66.0/24

image

PC1 Ping command :

image

Config Vy-1 :

set interfaces ethernet eth0 address β€˜10.0.0.1/24’
set interfaces ethernet eth0 hw-id β€˜0c:1c:0a:ac:ce:00’
set interfaces ethernet eth1 hw-id β€˜0c:1c:0a:ac:ce:01’
set interfaces ethernet eth2 hw-id β€˜0c:1c:0a:ac:ce:02’
set interfaces ethernet eth3 address β€˜77.77.77.1/24’
set interfaces ethernet eth3 hw-id β€˜0c:1c:0a:ac:ce:03’
set interfaces loopback lo address β€˜10.1.1.1/32’
set policy route-map CONNECT rule 11 action β€˜permit’
set policy route-map CONNECT rule 11 match interface β€˜eth0’
set protocols ospf area 777 network β€˜77.77.77.0/24’
set protocols ospf default-information originate always
set protocols ospf default-information originate metric β€˜50’
set protocols ospf default-information originate metric-type β€˜2’
set protocols ospf log-adjacency-changes
set protocols ospf parameters abr-type β€˜cisco’
set protocols ospf parameters router-id β€˜77.77.77.1’
set protocols ospf redistribute connected metric-type β€˜2’
set protocols ospf redistribute connected route-map β€˜CONNECT’
set protocols static route 10.1.1.1/32 blackhole
set service dhcp-server shared-network-name LAN authoritative
set service dhcp-server shared-network-name LAN subnet 10.0.0.0/24 default-router β€˜10.0.0.1’
0.0.0.1’
set service dhcp-server shared-network-name LAN subnet 10.0.0.0/24 lease β€˜86400’
set service dhcp-server shared-network-name LAN subnet 10.0.0.0/24 range 0 start β€˜10.0.0.10’
set service dhcp-server shared-network-name LAN subnet 10.0.0.0/24 range 0 stop β€˜10.0.0.20’
set system config-management commit-revisions β€˜100’
set system console device ttyS0 speed β€˜115200’
set system host-name β€˜vyos’
set system login banner pre-login β€˜vr-VY-1’
set system login user vyos authentication encrypted-password β€˜$6$17Sn.oD0SFDBvne$ZZgaV/UfSwvkKxVZeCf21MJ06vxPOVvLwC.84ISBn.cArBHw0aXJBGT9l.2yYZMFaYiRsOoAnUnNebhxV1B6a.’
set system login user vyos authentication plaintext-password β€˜β€™
set system ntp server 0.pool.ntp.org
set system ntp server 1.pool.ntp.org
set system ntp server 2.pool.ntp.org
set system syslog global facility all level β€˜info’
set system syslog global facility protocols level β€˜debug’

Confg Vy-2 :

set interfaces ethernet eth0 address β€˜77.77.77.2/24’
set interfaces ethernet eth0 hw-id β€˜0c:1c:0a:b4:4a:00’
set interfaces ethernet eth1 hw-id β€˜0c:1c:0a:b4:4a:01’
set interfaces ethernet eth2 address β€˜66.66.66.2/24’
set interfaces ethernet eth2 hw-id β€˜0c:1c:0a:b4:4a:02’
set interfaces ethernet eth3 address β€˜88.88.88.2/24’
set interfaces ethernet eth3 hw-id β€˜0c:1c:0a:b4:4a:03’
set interfaces loopback lo address β€˜10.2.2.2/32’
set interfaces vti vti10 address β€˜11.0.0.1/31’
set policy prefix-list AS65534-IN rule 10 action β€˜permit’
set policy prefix-list AS65534-IN rule 10 prefix β€˜99.99.99.0/24’
set policy prefix-list AS65534-IN rule 11 action β€˜permit’
set policy prefix-list AS65534-IN rule 11 prefix β€˜88.88.88.0/24’
set policy prefix-list AS65534-IN rule 12 action β€˜permit’
set policy prefix-list AS65534-IN rule 12 prefix β€˜10.0.0.0/24’
set policy prefix-list AS65534-IN rule 13 action β€˜permit’
set policy prefix-list AS65534-IN rule 13 prefix β€˜77.77.77.0/24’
set policy prefix-list AS65534-IN rule 14 action β€˜permit’
set policy prefix-list AS65534-IN rule 14 prefix β€˜66.66.66.0/24’
set policy prefix-list AS65534-OUT rule 10 action β€˜permit’
set policy prefix-list AS65534-OUT rule 10 prefix β€˜99.99.99.0/24’
set policy prefix-list AS65534-OUT rule 11 action β€˜permit’
set policy prefix-list AS65534-OUT rule 11 prefix β€˜88.88.88.0/24’
set policy prefix-list AS65534-OUT rule 12 action β€˜permit’
set policy prefix-list AS65534-OUT rule 12 prefix β€˜10.0.0.0/24’
set policy prefix-list AS65534-OUT rule 13 action β€˜permit’
set policy prefix-list AS65534-OUT rule 13 prefix β€˜77.77.77.0/24’
set policy prefix-list AS65534-OUT rule 14 action β€˜permit’
set policy prefix-list AS65534-OUT rule 14 prefix β€˜66.66.66.0/24’
set policy route-map AS65534-IN rule 10 action β€˜permit’
set policy route-map AS65534-IN rule 10 match ip address prefix-list β€˜AS65534-IN’
set policy route-map AS65534-OUT rule 10 action β€˜permit’
set policy route-map AS65534-OUT rule 10 match ip address prefix-list β€˜AS65534-OUT’
set policy route-map CONNECT rule 11 action β€˜permit’
set policy route-map CONNECT rule 11 match interface β€˜eth0’
set protocols bgp 65534 address-family ipv4-unicast network 10.2.2.2/32
set protocols bgp 65534 address-family ipv4-unicast redistribute connected metric β€˜2’
set protocols bgp 65534 address-family ipv4-unicast redistribute ospf metric β€˜2’
set protocols bgp 65534 neighbor 66.66.66.4 address-family ipv4-unicast route-map export β€˜AS65534-OUT’
set protocols bgp 65534 neighbor 66.66.66.4 address-family ipv4-unicast route-map import β€˜AS65534-IN’
set protocols bgp 65534 neighbor 66.66.66.4 ebgp-multihop β€˜2’
set protocols bgp 65534 neighbor 66.66.66.4 remote-as β€˜65566’
set protocols bgp 65534 neighbor 66.66.66.4 update-source β€˜66.66.66.2’
set protocols bgp 65534 neighbor 88.88.88.3 address-family ipv4-unicast route-map export β€˜AS65534-OUT’
set protocols bgp 65534 neighbor 88.88.88.3 address-family ipv4-unicast route-map import β€˜AS65534-IN’
set protocols bgp 65534 neighbor 88.88.88.3 ebgp-multihop β€˜2’
set protocols bgp 65534 neighbor 88.88.88.3 remote-as β€˜65535’
set protocols bgp 65534 neighbor 88.88.88.3 update-source β€˜88.88.88.2’
set protocols bgp 65534 parameters router-id β€˜10.2.2.2’
set protocols ospf area 777 network β€˜77.77.77.0/24’
set protocols ospf default-information originate always
set protocols ospf default-information originate metric β€˜50’
set protocols ospf default-information originate metric-type β€˜2’
set protocols ospf log-adjacency-changes
set protocols ospf parameters abr-type β€˜cisco’
set protocols ospf parameters router-id β€˜77.77.77.2’
set protocols ospf redistribute bgp metric-type β€˜2’
set protocols ospf redistribute bgp route-map β€˜AS65534-IN’
set protocols ospf redistribute connected metric-type β€˜2’
set protocols ospf redistribute connected route-map β€˜CONNECT’
set protocols static route 0.0.0.0/0 next-hop 88.88.88.3
set protocols static route 10.2.2.2/32 blackhole

Hi,

it looks like you have a issue with your default routes? TTL expired means you have routing loop
You originate it on both VyOS

set protocols ospf default-information originate always
set protocols ospf default-information originate metric β€˜50’
set protocols ospf default-information originate metric-type β€˜2’

Whats the content the routing Table of Vy2 when you block the 88.88.88.0/24 link

1 Like

Hi Rob,

I found my issue problem come from VY-3 i added prefix list to send route. Now all is redundant ! i wil make a update to explain you with screenshot !

New Config Vy -3

set policy prefix-list AS65535-IN rule 16 action β€˜permit’
set policy prefix-list AS65535-IN rule 16 ge β€˜8’
set policy prefix-list AS65535-IN rule 16 prefix β€˜100.0.0.0/0’

AND OUT SAME

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.