Closed pautiina closed 5 years ago
Can I ask... Why the redistribution? As a rule of thumb I suggest to avoid redistribution and static routes as much possible. You can add a network statement for each segment (interfaces & static routes) that your device have presence like you did with the 10.10.10.33.
Unfortunately, this was built long before me and the network topology does not allow me to configure the OSPF network without a long shutdown. On a server that accepts the default route (192.168.1.1) and does have only vlan780 on it, the OSPF is disabled, and in version > 5.0, I can only statically add a route to all servers. In this case, all servers have vlan780 and vlan781, and all servers have the option passive-interface vlan780
@pautiina This is my understanding about this issue.
Running OSPF * Running OSPF ***** (Not running OSPF)
RS3<------10.10.10.33/27------->RS1<---Static route----192.168.1.8/27 ------>(192.168.1.1) RS2 |<-----------------------Static route---------------------------------------------------------->|
1st behavior :In version 3.0 & 4.0 all ospf neighbor’s installs static the route like this 0.0.0.0/0 192.168.1.1
2nd behavior : In version >5.0 all ospf neighbor’s eg RS3 installs static the route like this 0.0.0.0/0 10.10.10.33
If my understanding as above is correct, the 2nd behavior should be the correct behavior as IGP routes should point to the immediate reachable next hop and it should not point to node beyond the next hop as its next hop.
If my understadning is not the same as yours. Please share the exact issue that is being observing at your end, including configuration and show output on RS3
you do not understand me. all neighbors are in two peer-to-peer networks, only ospf is running on one of them. and up to version 5 and higher the static route pointed to the neighbor from the second peer-to-peer network. everyone sees each other's arps. if in the second network was launched OSPF, then it was also IGP neighbor.
RS1:
!
ip route 0.0.0.0/0 192.168.1.1
!
interface vlan780
ip address 192.168.1.8/27
!
interface vlan781
ip address 10.10.10.33/27
!
router ospf
ospf router-id 10.10.10.33
redistribute kernel
redistribute connected
redistribute static
redistribute bgp
passive-interface vlan780
network 10.10.10.33/27 area 0.0.0.0
default-information originate always
!
RS2:
!
interface vlan780
ip address 192.168.1.9/27
!
interface vlan781
ip address 10.10.10.34/27
!
router ospf
ospf router-id 10.10.10.34
redistribute connected
passive-interface vlan780
network 10.10.10.32/27 area 0.0.0.0
!
RS3:
!
interface vlan780
ip address 192.168.1.10/27
!
interface vlan781
ip address 10.10.10.35/27
!
router ospf
ospf router-id 10.10.10.35
redistribute connected
passive-interface vlan780
network 10.10.10.32/27 area 0.0.0.0
!
FRR 3 and 4
RS2# show ip route 0.0.0.0
Routing entry for 0.0.0.0/0
Known via "OSPF", distance 20, metric 0, best
Last update 01:00:37 ago
* 192.168.1.1, via vlan780
RS2#
FRR 5.0 release and 5.1-dev
RS2# show ip route 0.0.0.0
Routing entry for 0.0.0.0/0
Known via "OSPF", distance 20, metric 0, best
Last update 01:00:27 ago
* 10.10.10.33, via vlan781
RS2#
@pautiina As per the configuration you had given, this is how the network should look like.
____________(10.10.10.0/27) VLAN781 ______________
| .33 |.34 .35| <- n/w is running OSPF
[ RS1] * [RS2] * [RS3]
|.8 |.9 .10| <- n/w is NOT running OSPF
____________(192.168.1.0/27) VLAN780 _____________
|
| .1
RS1 is configured with a static route for 192.168.1.1. I had configured my FRR routers (running master code) in the similar fashion.
dev# sh ip route 0.0.0.0 Routing entry for 0.0.0.0/0 Known via "static", distance 1, metric 0 Last update 00:16:34 ago 192.168.1.1, via ens192
RS2’s routing table would show n/w 192.168.1.1 reachable via .33 i.e via RS1, as we have decided to advertise this via OSPF dev# sh 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, > - selected route, - FIB route O> 0.0.0.0/0 [110/1] via 10.10.10.33, ens224, 20:52:19 O 10.10.10.32/27 [110/10] is directly connected, ens224, 21:13:13 C> 10.10.10.32/27 is directly connected, ens224, 21:23:27 O 10.112.158.0/23 [110/20] via 10.10.10.33, ens224, 21:13:12 via 10.10.10.34, ens224, 21:13:12 C> 10.112.158.0/23 is directly connected, ens160, 21:23:27 O 192.168.1.0/27 [110/20] via 10.10.10.33, ens224, 21:13:12 via 10.10.10.34, ens224, 21:13:12 C>* 192.168.1.0/27 is directly connected, ens192, 21:23:27 dev# sh ip ro 0.0.0.0 Routing entry for 0.0.0.0/0 Known via "ospf", distance 110, metric 1 Last update 20:56:13 ago 10.10.10.33, via ens224
RS3’s routing table too, would show n/w 192.168.1.1 reachable via .33 i.e via RS1, as we have decided to advertise this via OSPF dev# sh ip ro 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, > - selected route, - FIB route O> 0.0.0.0/0 [110/1] via 10.10.10.33, ens224, 00:13:17 O 10.10.10.32/27 [110/10] is directly connected, ens224, 00:13:18 C> 10.10.10.32/27 is directly connected, ens224, 00:23:32 O 10.112.158.0/23 [110/20] via 10.10.10.33, ens224, 00:13:17 via 10.10.10.34, ens224, 00:13:17 C> 10.112.158.0/23 is directly connected, ens160, 00:23:32 O 192.168.1.0/27 [110/20] via 10.10.10.33, ens224, 00:13:17 via 10.10.10.34, ens224, 00:13:17 C>* 192.168.1.0/27 is directly connected, ens192, 00:23:32 dev# sh ip ro 0.0.0.0 Routing entry for 0.0.0.0/0 Known via "ospf", distance 110, metric 1 Last update 00:13:55 ago 10.10.10.33, via ens224 This behaviour is correct, the reason I had mentioned above. “IGP routes should point to the immediate reachable next hop and it should not point to node beyond the next hop as its next hop.” The behaviour you had seen on FRR version 3 and 4, was not correct. Probably this issue got fixed with some other bug, which we can find out by code diff b/w these 5 &4 version.
@bisdhdh You correctly described the topology of my network, but there is a conflict with another static route:
!
ip route 4.4.4.0/24 192.168.1.1
!
interface vlan780
ip address 192.168.1.8/27
!
interface vlan781
ip address 10.10.10.33/27
!
router ospf
ospf router-id 10.10.10.33
redistribute kernel
redistribute connected
redistribute static
redistribute bgp
passive-interface vlan780
network 10.10.10.33/27 area 0.0.0.0
default-information originate always
!
and show ip route on other RS:
RS3# show ip route 4.4.4.0/24
Routing entry for 4.4.4.0/24
Known via "ospf", distance 110, metric 20, best
Last update 00:00:33 ago
* 192.168.1.1, via vlan780
RS3#
It turns out that when you specify a static route other than the default route on all versions of the FRR, the route is set correctly, provided that there is a available next hop.
I believe that there is a mistake.
@pautiina
It looks like you had change the "default static route" configured on RS1 to only "static route". I had verified the same configuration below but i didn’t see any change in the behaviour from the previous one. I am running latest master FRR code.
RS1 >
Current configuration: ! frr version 5.1-dev-MyOwnFRRVersion frr defaults traditional hostname dev log syslog informational service integrated-vtysh-config username cumulus nopassword ! ip route 4.4.4.0/24 192.168.1.1 ! router ospf ospf router-id 10.10.10.33 redistribute kernel redistribute connected redistribute static redistribute bgp passive-interface vlan780 network 10.10.10.32/27 area 0.0.0.0 default-information originate ! line vty ! end dev(config-router)#
RS2>
Current configuration: ! frr version 5.1-dev-MyOwnFRRVersion frr defaults traditional hostname dev log syslog informational service integrated-vtysh-config username cumulus nopassword ! router ospf ospf router-id 10.10.10.34 redistribute connected passive-interface vlan780 network 10.10.10.32/27 area 0.0.0.0 ! line vty ! end
dev(config-router)# do show ip route 4.4.4.4 Routing entry for 4.4.4.0/24 Known via "ospf", distance 110, metric 20, best Last update 01:47:13 ago
dev(config-router)#
Can we discuss this issue at slack, in order to resolve this faster ? You can ping me at slack @Biswajt Sadhu / sadhub
It's strange. Now I rechecked and the route began pointing to the next hop correctly. Try changing the configuration to the next, it is closer to my real:
SERVER_WITHOUT_OSPF:
!
interface vlan780
ip address 192.168.1.1/27
!
SERVER_WITHOUT_OSPF# show version
FRRouting 5.0.1 (SERVER_WITHOUT_OSPF).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
'--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--sysconfdir=/usr/local/etc/frr' '--localstatedir=/var/run/frr' '--disable-nhrpd' '--disable-pimd' '--enable-fpm' '--disable-ldpd' '--enable-multipath=64' '--without-libpam' '--disable-rpki' '--disable-shell-access' '--disable-snmp' '--disable-tcmalloc' '--disable-tcp-zebra' '--enable-vtysh' '--prefix=/usr/local' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd11.1' 'build_alias=amd64-portbld-freebsd11.1' 'PKG_CONFIG=pkgconf' 'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -pipe -fstack-protector' 'LDFLAGS= -L/usr/local/lib -L/usr/local/lib -fstack-protector' 'LIBS=' 'CPPFLAGS=-I/usr/local/include -I/usr/local/include' 'CPP=cpp'
SERVER_WITHOUT_OSPF#
SERVER_WITHOUT_OSPF# show interface vlan780
Interface vlan780 is up, line protocol detection is disabled
Link ups: 1 last: 2018/07/18 00:39:39.36
Link downs: 0 last: (never)
PTM status: disabled
vrf: Default-IP-Routing-Table
index 6 metric 1 mtu 1500 speed 10000
flags: <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
Type: Unknown
HWaddr: 00:1b:21:60:ff:c9
inet 192.168.1.1/27 broadcast 192.168.1.31
Interface Type Other
input packets 1259570921503, bytes 716399274847541, dropped 0, multicast packets 6126386
input errors 0
output packets 2046151088044, bytes 2182180738634227, multicast packets 18877779
output errors 1219263
collisions 0
SERVER_WITHOUT_OSPF#
SERVER_WITHOUT_OSPF# show interface vlan781
% Can't find interface vlan781
SERVER_WITHOUT_OSPF#
RS1:
!
interface vlan780
ip address 192.168.1.8/27
!
!
interface vlan781
ip address 192.168.1.33/27
!
router ospf
ospf router-id 192.168.1.33
redistribute kernel
redistribute connected
redistribute static
redistribute bgp
passive-interface vlan780
network 192.168.1.0/24 area 0.0.0.0
default-information originate always
!
RS1# show version
FRRouting 5.1-dev (RS1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
'--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--sysconfdir=/usr/local/etc/frr' '--localstatedir=/var/run/frr' '--disable-nhrpd' '--disable-pimd' '--enable-fpm' '--disable-ldpd' '--without-libpam' '--disable-rpki' '--disable-shell-access' '--disable-snmp' '--disable-doc' '--disable-tcmalloc' '--disable-tcp-zebra' '--enable-vtysh' '--prefix=/usr/local' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' 'PKG_CONFIG=pkgconf' 'CC=cc' 'LDFLAGS= -L/usr/local/lib -L/usr/local/lib -fstack-protector' 'LIBS=' 'CPPFLAGS=-I/usr/local/include -I/usr/local/include'
RS1#
RS1# show interface vlan780
Interface vlan780 is up, line protocol detection is disabled
Link ups: 1 last: 2018/07/18 11:23:38.86
Link downs: 0 last: (never)
PTM status: disabled
vrf: Default-IP-Routing-Table
Description: -=NAS-WORLD=-
index 10 metric 1 mtu 1500 speed 10000
flags: <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
Type: Unknown
HWaddr: e4:11:5b:9b:72:b4
inet 192.168.1.8/27 broadcast 192.168.1.31
Interface Type Other
input packets 112977369, bytes 23197014486, dropped 0, multicast packets 15282673
input errors 0
output packets 919763991, bytes 569524042304, multicast packets 1230666
output errors 0
collisions 0
RS1# show interface vlan781
Interface vlan781 is up, line protocol detection is disabled
Link ups: 1 last: 2018/07/18 11:23:38.86
Link downs: 0 last: (never)
PTM status: disabled
vrf: Default-IP-Routing-Table
Description: -=NAS-IX=-
index 11 metric 1 mtu 1500 speed 10000
flags: <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
Type: Unknown
HWaddr: e4:11:5b:9b:72:b4
inet 192.168.1.33/27 broadcast 192.168.1.63
Interface Type Other
input packets 743592807956, bytes 444553913161223, dropped 0, multicast packets 286344767
input errors 0
output packets 1012442635703, bytes 1175322227187508, multicast packets 54455896
output errors 0
collisions 0
RS1#
RS2:
!
interface vlan780
ip address 192.168.1.20/27
!
!
interface vlan781
ip address 192.168.1.50/27
!
router ospf
ospf router-id 192.168.1.119
redistribute kernel
redistribute connected
redistribute static
redistribute bgp
passive-interface vlan780
network 192.168.1.0/24 area 0.0.0.0
default-information originate always
!
RS2# show version
FRRouting 5.1-dev (RS2).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
'--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--sysconfdir=/usr/local/etc/frr' '--localstatedir=/var/run/frr' '--disable-nhrpd' '--disable-pimd' '--enable-fpm' '--disable-ldpd' '--without-libpam' '--disable-rpki' '--disable-shell-access' '--disable-snmp' '--disable-doc' '--disable-tcmalloc' '--disable-tcp-zebra' '--enable-vtysh' '--prefix=/usr/local' '--mandir=/usr/local/man' '--disable-silent-rules' '--infodir=/usr/local/info/' 'PKG_CONFIG=pkgconf' 'CC=cc' 'LDFLAGS= -L/usr/local/lib -L/usr/local/lib -fstack-protector' 'LIBS=' 'CPPFLAGS=-I/usr/local/include -I/usr/local/include'
RS2#
RS2# show interface vlan780
Interface vlan780 is up, line protocol detection is disabled
Link ups: 1 last: 2018/07/18 11:19:44.33
Link downs: 0 last: (never)
PTM status: disabled
vrf: Default-IP-Routing-Table
index 35 metric 1 mtu 1500 speed 10000
flags: <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
Type: Unknown
HWaddr: 00:25:90:09:1b:58
inet 192.168.1.20/27 broadcast 192.168.1.31
Interface Type Other
input packets 2138344545, bytes 1416756589702, dropped 0, multicast packets 3562838
input errors 0
output packets 2268269667, bytes 2829561812865, multicast packets 96446
output errors 0
collisions 0
RS2# show interface vlan781
Interface vlan781 is up, line protocol detection is disabled
Link ups: 1 last: 2018/07/18 11:19:44.33
Link downs: 0 last: (never)
PTM status: disabled
vrf: Default-IP-Routing-Table
index 36 metric 1 mtu 1500 speed 10000
flags: <UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
Type: Unknown
HWaddr: 00:25:90:09:1b:58
inet 192.168.1.50/27 broadcast 192.168.1.63
Interface Type Other
input packets 9440604497, bytes 13395439732956, dropped 0, multicast packets 53559121
input errors 0
output packets 6048174868, bytes 2523742338126, multicast packets 5874373
output errors 0
collisions 0
RS2#
RS2# show ip route 0.0.0.0
Routing entry for 0.0.0.0/0
Known via "ospf", distance 110, metric 1
Last update 01w2d13h ago
192.168.1.1, via vlan780
Routing entry for 0.0.0.0/0
Known via "static", distance 1, metric 0, best
Last update 04w0d00h ago
* 192.168.1.1, via vlan780
RS2#
RS2# show ip ospf route
============ OSPF network routing table ============
N 192.168.1.0/27 [10] area: 0.0.0.0
directly attached to vlan780
N 192.168.1.32/27 [10] area: 0.0.0.0
directly attached to vlan781
N 192.168.1.64/28 [20] area: 0.0.0.0
via192.168.1.33, vlan781
N 192.168.1.80/28 [20] area: 0.0.0.0
via192.168.1.41, vlan781
N 192.168.1.100/30 [20] area: 0.0.0.0
via192.168.1.33, vlan781
N 192.168.1.104/30 [20] area: 0.0.0.0
via192.168.1.41, vlan781
N 192.168.1.108/32 [20] area: 0.0.0.0
via192.168.1.57, vlan781
N 192.168.1.109/32 [20] area: 0.0.0.0
via192.168.1.57, vlan781
N 192.168.1.110/32 [20] area: 0.0.0.0
via192.168.1.60, vlan781
N 192.168.1.111/32 [20] area: 0.0.0.0
via192.168.1.60, vlan781
N 192.168.1.112/32 [20] area: 0.0.0.0
via192.168.1.60, vlan781
N 192.168.1.113/32 [10] area: 0.0.0.0
via192.168.1.54, vlan781
N 192.168.1.116/32 [10] area: 0.0.0.0
via192.168.1.44, vlan781
N 192.168.1.119/32 [0] area: 0.0.0.0
directly attached to lo0
N 192.168.1.120/32 [10] area: 0.0.0.0
via192.168.1.51, vlan781
N 192.168.1.121/32 [20] area: 0.0.0.0
via192.168.1.48, vlan781
N 192.168.1.122/32 [10] area: 0.0.0.0
via192.168.1.44, vlan781
N 192.168.1.123/32 [10] area: 0.0.0.0
via192.168.1.47, vlan781
N 192.168.1.124/32 [10] area: 0.0.0.0
via192.168.1.44, vlan781
N 192.168.1.125/32 [20] area: 0.0.0.0
via192.168.1.43, vlan781
N 192.168.1.126/32 [10] area: 0.0.0.0
via192.168.1.40, vlan781
N 192.168.1.128/25 [20] area: 0.0.0.0
via192.168.1.49, vlan781
============ OSPF router routing table =============
R 192.168.1.33 [10] area: 0.0.0.0, ASBR
via192.168.1.33, vlan781
R 192.168.1.34 [10] area: 0.0.0.0, ASBR
via192.168.1.34, vlan781
R 192.168.1.36 [10] area: 0.0.0.0, ASBR
via192.168.1.36, vlan781
R 192.168.1.37 [10] area: 0.0.0.0, ASBR
via192.168.1.37, vlan781
R 192.168.1.41 [10] area: 0.0.0.0, ASBR
via192.168.1.41, vlan781
R 192.168.1.43 [10] area: 0.0.0.0, ASBR
via192.168.1.43, vlan781
R 192.168.1.45 [10] area: 0.0.0.0, ASBR
via192.168.1.45, vlan781
R 192.168.1.49 [10] area: 0.0.0.0, ASBR
via192.168.1.49, vlan781
R 192.168.1.52 [10] area: 0.0.0.0, ASBR
via192.168.1.52, vlan781
R 192.168.1.54 [10] area: 0.0.0.0, ASBR
via192.168.1.54, vlan781
R 192.168.1.57 [10] area: 0.0.0.0, ASBR
via192.168.1.57, vlan781
R 192.168.1.59 [10] area: 0.0.0.0, ASBR
via192.168.1.59, vlan781
R 192.168.1.60 [10] area: 0.0.0.0, ASBR
via192.168.1.60, vlan781
R 192.168.1.120 [10] area: 0.0.0.0, ASBR
via192.168.1.51, vlan781
R 192.168.1.121 [10] area: 0.0.0.0, ASBR
via192.168.1.48, vlan781
R 192.168.1.123 [10] area: 0.0.0.0, ASBR
via192.168.1.47, vlan781
R 192.168.1.126 [10] area: 0.0.0.0, ASBR
via192.168.1.40, vlan781
============ OSPF external routing table ===========
N E2 0.0.0.0/0 [10/1] tag: 0
via192.168.1.1, vlan780
via192.168.1.1, vlan780
RS2# show ip ospf database
OSPF Router with ID (192.168.1.119)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
192.168.1.33 192.168.1.33 515 0x80001bf3 0xa74f 4
192.168.1.34 192.168.1.34 54 0x8000331b 0x36f8 2
192.168.1.36 192.168.1.36 390 0x800032ae 0x2670 2
192.168.1.37 192.168.1.37 455 0x800031c1 0x0d74 2
192.168.1.41 192.168.1.41 182 0x80001ebf 0x9566 4
192.168.1.43 192.168.1.43 1743 0x8000131e 0xd9e5 3
192.168.1.45 192.168.1.45 1502 0x80000030 0x1418 2
192.168.1.46 192.168.1.46 1359 0x8000160a 0x6ad0 2
192.168.1.49 192.168.1.49 294 0x80012a60 0xdcf2 3
192.168.1.52 192.168.1.52 1423 0x80003a1e 0xcf1f 2
192.168.1.54 192.168.1.54 656 0x80000578 0x6f66 7
192.168.1.57 192.168.1.57 365 0x800021bd 0xe5b1 4
192.168.1.59 192.168.1.59 1308 0x80006ab3 0x5ab9 2
192.168.1.60 192.168.1.60 1394 0x80007fa3 0x03de 5
192.168.1.119 192.168.1.119 907 0x800008ac 0x3379 3
192.168.1.120 192.168.1.120 763 0x80001128 0xaac4 3
192.168.1.121 192.168.1.121 1076 0x80001524 0x79a0 3
192.168.1.123 192.168.1.123 1798 0x80001056 0x3db4 3
192.168.1.124 192.168.1.124 705 0x8000074f 0xb38d 5
192.168.1.126 192.168.1.126 23 0x80004e05 0x08fa 3
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
192.168.1.41 192.168.1.41 363 0x800005e5 0xf1e1
AS External Link States
Link ID ADV Router Age Seq# CkSum Route
0.0.0.0 192.168.1.33 425 0x800005ba 0xee4e E2 0.0.0.0/0 [0x0]
0.0.0.0 192.168.1.54 1710 0x80000504 0xdd01 E2 0.0.0.0/0 [0x0]
RS2#
With other static route it's also work normally.
For lack of a better action, closing this.
Hello. I have some configurtion on RS 1:
All OSPF servers add a route on the table 0.0.0.0/0 10.10.10.33 but on version 3.0 and version 4.0 a route is added 0.0.0.0/0 192.168.1.1 and it suited me perfectly.
That is, now the router establishes itself as the default gateway, although at the same time it has a static route, which instructs it to set the default route to the next router, on which the OSPF is not running. I observe the same behavior at the [OSPF6]. I try it's config on FRR 5 and FRR5-1dev. I have a question: is it a change in logic or is it an error?