Portál AbcLinuxu, 4. května 2025 14:20
hostname 10.1.50.29
password ---
enable password ---
log file /var/log/ospfd.log
!
interface lo
ip ospf cost 1
!
!interface dummy0
! description dummy0
! ip ospf cost 10
!
interface eth2
description local
ip ospf cost 10
ip ospf priority 5
! ip ospf authentication message-digest
! ip ospf message-digest-key 1 md5 haleluja
!
!interface eth0
! description local
! ip ospf cost 1
! ip ospf priority 10
!
!
router ospf
ospf router-id 10.1.50.29
! redistribute kernel
! redistribute connected route-map just-10
redistribute connected
redistribute static
! default-information originate always
passive-interface eth0
passive-interface eth1
! passive-interface eth2
passive-interface tap0
! passive-interface lo
! network 185.167.208.0/24 area 0
! network 10.1.0.123/32 area 0
network 10.1.50.0/24 area 0
!
access-list net-10 permit 0.0.0.0/0
access-list term permit 127.0.0.1/32
access-list term deny any
!
route-map just-10 permit 10
match ip address net-10
!
line vty
!
Řešení dotazu:
ip route 0.0.0.0 0.0.0.0 eth2Vsechno pujde pres konkretni interface, routovani za tebe vyresi prvni router na ceste.
! redistribute connected
! redistribute static
ip ospf priority 0Setting the value to 0, makes the router ineligible to become Designated Router.
ip ospf cost 65535Set link cost for the specified interface. The cost value is set to router-LSA’s metric field and used for SPF calculation.
Interface Command: bandwidth 1Set bandwidth value of the interface in kilobits/sec. This is for calculating OSPF cost. This command does not affect the actual device configuration. tohle bude v konfiguraci procesu
no auto-cost reference-bandwidthThis sets the reference bandwidth for cost calculations, where this bandwidth is considered equivalent to an OSPF cost of 1, specified in Mbits/s. The default is 100Mbit/s (i.e. a link of bandwidth 100Mbit/s or higher will have a cost of 1. Cost of lower bandwidth links will be scaled with reference to this cost). This configuration setting MUST be consistent across all routers within the OSPF domain.
hostname vpn-10.1.50.29
password ---
enable password ---
log file /var/log/ospfd.log
!
interface eth2
description pater
ip ospf cost 65535
ip ospf priority 0
! ip ospf authentication message-digest
! ip ospf message-digest-key 1 md5 haleluja
!
router ospf
ospf router-id 10.1.50.29
! redistribute kernel
! redistribute connected route-map just-10
! redistribute connected
! redistribute static
! default-information originate always
passive-interface eth0
passive-interface eth1
! passive-interface eth2
passive-interface tap0
passive-interface lo
no auto-cost reference-bandwidth
! network 185.167.208.0/24 area 0
network 10.1.50.0/24 area 0
!
access-list net-10 permit 0.0.0.0/0
access-list term permit 127.0.0.1/32
access-list term deny any
!
route-map just-10 permit 10
match ip address net-10
!
line vty
!
Nevím kam zakomponovat toto:
Interface Command: bandwidth 1
Samozřejmě bez tohoto (předpokládám) problém zatím vyřešen není :( i nadále teče vše skrze tento stroj.
interface eth2
description pater
ip ospf cost 65535
ip ospf priority 0
--> bandwidth 1 <--
* Starting ospfd ...
*** Error reading config: There is no such command.
*** Error occured processing line 21, below:
bandwidth 1
Do not speak OSPF interface on the given interface, but do advertise the interface as a stub link in the router-LSA (Link State Advertisement) for this router. This allows one to advertise addresses on such connected interfaces without having to originate AS-External/Type-5 LSAs (which have global flooding scope) - as would occur if connected addresses were redistributed into OSPF (see Redistribute routes to OSPF). This is the only way to advertise non-OSPF links into stub areas.
area 0.0.0.0 filter-list prefix ignore_subnet in
ip prefix-list ignore_subnet seq 10 deny 192.168.0.0/16
ip prefix-list ignore_subnet seq 20 permit any
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.