OSPF dont import routes from LSAdb

1 Игорь iggorok at yandex.ua
Sat Sep 28 10:53:09 CEST 2013


Hi everyone. I have a problem with OSPF. 

In my topology Core router (Area0) connected to 2 routers (Area1), which intrconnected with their own link. Core redistributes 0/0 and things works normal. Core router ID is 10.0.0.0, R1 - 10.0.1.1, R2 - 10.0.1.2.

But, when I drop one of links between Core router and Area1 router, I expect that 0/0 route pass through second Area 1 router and all reveal on first, on wich i drop link to core.

In LSA DB I see LSA Type 5, wich generates from core router:
bird> show ospf lsadb
Global

 Type   LS ID           Router           Age  Sequence  Checksum
 0005  0.0.0.0         10.0.0.0          616  80000002    72f0

Area 0.0.0.0

 Type   LS ID           Router           Age  Sequence  Checksum
 0001  10.0.1.2        10.0.1.2            0  80000002    594e
 0003  10.16.0.0       10.0.1.2           29  80000001    e258

Area 0.0.0.1

 Type   LS ID           Router           Age  Sequence  Checksum
 0003  10.0.0.0        10.0.1.1          943  80000001    6d75
 0004  10.0.0.0        10.0.1.1          943  80000001    5f82
 0001  10.0.1.1        10.0.1.1           23  8000000a    2103
 0003  10.0.1.1        10.0.1.1          962  80000001    6cd8
 0003  10.2.1.3        10.0.1.1          962  80000001    1ac5
 0002  10.31.12.1      10.0.1.1           23  80000001    847a
 0002  10.31.21.1      10.0.1.1           23  80000001    21d4
 0001  10.0.1.2        10.0.1.2           13  80000009    3be5
 0003  10.0.1.2        10.0.1.2           29  80000001    5ce6
 0003  10.2.1.4        10.0.1.2           29  80000001    0ad3


But in master table I have no this route:
bird> show route 
10.0.1.2/32        dev lo [C1 11:46] * I (150/0) [10.0.1.2]
10.2.1.4/30        dev bond0.4002 [C1 11:46] * I (150/100) [10.0.1.2]
10.31.21.0/24      dev bond0.4021 [C1 11:47] * I (150/10) [10.0.1.1]
10.31.12.0/24      dev bond0.4012 [C1 11:47] * I (150/10) [10.0.1.1]
 
(bond0.4012 and bond0.4021 - links which interconnect R1 and R2, bond0.4002 - link to Core, which disabled there)


Config of R1 and R2 is same (exept Router ID):
# Configure logging
#log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
log stderr all;
log "/var/log/bird.log" { info,remote,warning,error,auth,fatal,bug};
#log "/var/log/debug_bird.log" all;

filter OSPF_in {
	if ( net=0.0.0.0/0 || net ~ 10.0.0.0/8 ) then
		accept;
	else
		reject;
};

filter OSPF_out {
	if (net ~ 10.16.0.0/12 ) then
		accept;
	else
		reject;
};


# This pseudo-protocol performs synchronization between BIRD's routing
# tables and the kernel. If your kernel supports multiple routing tables
# (as Linux 2.2.x does), you can run multiple instances of the kernel
# protocol and synchronize different kernel tables with different BIRD tables.
protocol kernel {
#	learn;			# Learn all alien routes from the kernel
	debug {states,routes,filters,interfaces};
	persist;		# Don't remove routes on bird shutdown
	scan time 20;		# Scan kernel routing table every 20 seconds
	import all;		# Default is import all
	export all;		# Default is export none
#	kernel table 5;		# Kernel table to synchronize with (default: main)
}

# This pseudo-protocol watches all interface up/down events.
protocol device {
	scan time 10;		# Scan interfaces every 10 seconds
}
		

protocol ospf C1{
#	rfc1583compat yes;
	router id 10.0.1.2;
	ecmp;
	import keep filtered yes;
#	import filter OSPF_in;
	import all;
#	export filter OSPF_out;
#	export none;
#	debug {states,routes,filters,interfaces};
	debug all;
	area 0{
		stub no;
		interface "bond0.4002"{
                        type bcast;
                        cost 100;
                        hello 1;
                        dead count 3;
                        retransmit 6;
                        transmit delay 5;
                        wait 30;
                        authentication cryptographic;
                        password "xxx";
                };
		interface 10.0.1.2/32 {
			stub 1;
		};



	};
	area 1{
		stub no;
		interface "bond0.4012", "bond0.4021" {
			rx buffer large;
			type bcast;
			cost 10;
			hello 1;
			dead count 3;
			retransmit 6;
			transmit delay 5;
			wait 30;
			authentication cryptographic;
			password "aaa";

		};

		interface 10.16.0.0/12 {
			stub 1;
                        cost 10;
                };

	};		

}


Config of Core router:

# Configure logging
#log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
#log stderr all;
#log "tmp" all;

filter OSPF_in {
	if (net ~ 10.0.0.0/8 ) then
		accept;
	else
		reject;

};

# Redistribute 0/0 only from BRAS!!!

filter OSPF_redistribute {
	if ( net = 0.0.0.0/0) then 
		{
		#ospf_metric1=200;
		ospf_metric2=100;
		accept;
		}
	else
		reject;
};


# This pseudo-protocol performs synchronization between BIRD's routing
# tables and the kernel. If your kernel supports multiple routing tables
# (as Linux 2.2.x does), you can run multiple instances of the kernel
# protocol and synchronize different kernel tables with different BIRD tables.
protocol kernel {
	learn;			# Learn all alien routes from the kernel
	persist;		# Don't remove routes on bird shutdown
	scan time 10;		# Scan kernel routing table every 20 seconds
	import all;		# Default is import all
	export all;		# Default is export none
#	kernel table 5;		# Kernel table to synchronize with (default: main)
}

# This pseudo-protocol watches all interface up/down events.
protocol device {
	scan time 10;		# Scan interfaces every 10 seconds
}

# Static routes (again, there can be multiple instances, so that you
# can disable/enable various groups of static routes on the fly).
protocol static {
#	disabled;		# Disable by default
	route 123.123.123.0/24 via "eth0";
}


protocol ospf CORE{
	tick 2;
	ecmp;
#	rfc1583compat yes;
	router id 10.0.0.0;
	import filter OSPF_in;
	export filter OSPF_redistribute;
#	export none;
	area 0 {
		stub no;
		interface "eth0.4001", "eth0.4002" {
#			"To corp1";
			hello 1;
			retransmit 6;
			cost 10;
			transmit delay 5;
			dead count 3;
			wait 50;
			type broadcast;
			authentication cryptographic;
			password "corp1_pass";
		};

		interface "lo" {
			stub yes;
		};

	};

}
	



More information about the Bird-users mailing list