Tuesday, October 21, 2008

BGP Lab


Hi all,
I started studying for CCIP certification, 642-661 BGP will be the next goal, so yesterday I created a lab for "Configure basic BGP" practice:





Finally a protocol that is supported by all mylab equipment! ;-)
Here some configuration principles that I used:
-used Loopbacks for iBGP neighbors and a IGP protocol with redistribution of connected interfaces and passive interface as default
-for the different Bgp AS I used private addressing (RFC1918 ;-) with several overlapping networks, because IGP routes aren't propagated between ASs.

-The AS64512 called "The Internet" is the main injection point, here i used random prefixes, initially I injected about 20000 prefixes copyed from a real route server, but my old 3550 had troubles save with a so big configuration, nvram doesn't have enough space ;-(

Now the lab is ready for Transit/non-Transit configuration, prefix lists, aggregation and so on... I will try each feature and post a small portion of configuration using this topology.

Some tasks to solve for this lab:

1) Configure CustomerA (AS65400) to use the link CON15 <-> CON4 only as backup for both directions (in/out) using weight and AS Prepend

Here a CON15 configuration part:
CON15# sh run | beg router bgp
router bgp 65400
no synchronization
bgp log-neighbor-changes
neighbor 10.0.3.1 remote-as 65002
neighbor 10.0.3.1 description CON3 (AS65002)
neighbor 10.0.3.1 update-source FastEthernet0/1
neighbor 10.0.3.1 route-map BACKUP-LINK-in in !-- for inbound routes, I will set weight = 1000, so this neighbor will be preferred for outbound traffic
neighbor 10.0.3.5 remote-as 65002
neighbor 10.0.3.5 description CON4 (AS65002)
neighbor 10.0.3.5 update-source FastEthernet0/0.3
neighbor 10.0.3.5 route-map BACKUP-LINK-out out !-- for outbound routes, I will set as-path with 65400 3 prepends, so the provider will use the main link for incoming traffic
neighbor 172.31.0.16 remote-as 65400
neighbor 172.31.0.16 description CON16
neighbor 172.31.0.16 update-source Loopback8
no auto-summary
!
route-map BACKUP-LINK-in permit 100
set weight 1000
!
route-map BACKUP-LINK-out permit 100
set as-path prepend 65400 65400 65400

The result, after a clear ip bgp for both neighbors is:

CON4#sh ip bgp
BGP table version is 66, local router ID is 192.168.0.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
* 16.17.19.0/24 10.0.3.6 0 65400 65400 65400 65400 i
*>i 10.0.3.2 0 100 0 65400 i
* 130.25.16.0/20 10.0.3.6 0 65400 65400 65400 65400 i
*>i 10.0.3.2 0 100 0 65400 i

and:
CON15# sh ip bgp
BGP table version is 97, local router ID is 10.0.4.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
* 16.17.18.0/24 10.0.3.5 0 65002 65300 i
*> 10.0.3.1 1000 65002 65300 i
*>i16.17.19.0/24 172.31.0.16 0 100 0 i
* 130.20.0.0 10.0.3.5 0 65002 65200 64512 i
*> 10.0.3.1 1000 65002 65200 64512 i
r>i130.25.16.0/20 172.31.0.16 0 100 0 i
* 130.25.32.0/20 10.0.3.5 0 65002 65300 i
*> 10.0.3.1 1000 65002 65300 i
* 140.24.0.0/13 10.0.3.5 0 65002 65200 64512 i
*> 10.0.3.1 1000 65002 65200 64512 i
* 140.30.0.0 10.0.3.5 0 0 65002 i
*> 10.0.3.1 0 1000 65002 i
* 150.15.5.0/24 10.0.3.5 0 65002 65200 64512 i
*> 10.0.3.1 1000 65002 65200 64512 i
*> 150.15.10.0/24 10.0.3.5 0 65002 ?
*> 150.15.15.0/24 10.0.3.5 0 65002 ?
CON15#
Ok, now AS 65400 and AS 65002 will use CON15-CON3 link as preferred path.


2) Configure CON3 and CON4 to accept updates only for the customer's assigned prefixes (to avoid customer's mistakes) using prefix-lists

On both CON3 and CON4 I configured two prefix lists and applyed to the Customers neighbor in inbound direction as follows:
CON3#sh run | beg router bgp
router bgp 65002
no synchronization
bgp log-neighbor-changes
aggregate-address 140.30.0.0 255.255.0.0 summary-only
neighbor 10.0.3.2 remote-as 65400
neighbor 10.0.3.2 description CON15 CustA
neighbor 10.0.3.2 update-source Vlan2
neighbor 10.0.3.2 prefix-list CustA in
neighbor 10.0.4.2 remote-as 65300
neighbor 10.0.4.2 description CON6 CustB
neighbor 10.0.4.2 update-source Vlan4
neighbor 10.0.4.2 prefix-list CustB in
neighbor 172.18.0.2 remote-as 65002
neighbor 172.18.0.2 update-source Loopback1
neighbor 172.18.0.3 remote-as 65002
neighbor 172.18.0.3 update-source Loopback1
no auto-summary
!
ip prefix-list CustA seq 100 permit 130.25.16.0/20
ip prefix-list CustA seq 200 permit 16.17.19.0/24
!
ip prefix-list CustB seq 100 permit 130.25.32.0/20
ip prefix-list CustB seq 200 permit 16.17.18.0/24


3) Configure CustomerB (AS65300) as NON-Transit using as-path filter lists

To accomplish this task I simply used a single as-path filter list, on CON6 I applyed that using route-maps, con CON10 using filter-list directly on neighbor

CON6#sh run | beg router bgp
router bgp 65300
no synchronization
bgp log-neighbor-changes
neighbor 10.0.4.1 remote-as 65002
neighbor 10.0.4.1 description CON3 (AS65002)
neighbor 10.0.4.1 update-source FastEthernet0/0
neighbor 10.0.4.1 route-map ALLOW-LOCALLY-ORIGINATED_ONLY out
neighbor 10.0.4.5 remote-as 65002
neighbor 10.0.4.5 description CON4 (AS65002)
neighbor 10.0.4.5 update-source FastEthernet0/1
neighbor 10.0.4.5 route-map ALLOW-LOCALLY-ORIGINATED_ONLY out
neighbor 10.25.5.9 remote-as 65300
neighbor 10.25.5.9 description Neighbor CON9
neighbor 10.25.5.9 update-source Loopback5
neighbor 10.25.5.10 remote-as 65300
neighbor 10.25.5.10 description Neighbor CON10
neighbor 10.25.5.10 update-source Loopback5
neighbor 172.17.5.17 remote-as 65100
neighbor 172.17.5.17 description SP2 CON13
neighbor 172.17.5.17 route-map ALLOW-LOCALLY-ORIGINATED_ONLY out
no auto-summary
!
ip as-path access-list 1 permit ^$
!
route-map ALLOW-LOCALLY-ORIGINATED_ONLY permit 10
match as-path 1

and on CON10:

CON10#sh run | beg router bgp
router bgp 65300
no synchronization
bgp log-neighbor-changes
neighbor 10.25.5.6 remote-as 65300
neighbor 10.25.5.6 description Neighbor CON6
neighbor 10.25.5.6 update-source Loopback5
neighbor 10.25.5.9 remote-as 65300
neighbor 10.25.5.9 description Neighbor CON9
neighbor 10.25.5.9 update-source Loopback5
neighbor 192.168.23.1 remote-as 65200
neighbor 192.168.23.1 description Neighbor with SP1
neighbor 192.168.23.1 filter-list 1 out
no auto-summary
!
ip as-path access-list 1 permit ^$


4) Configure CustomerB (AS65300) to use CON6 <-> CON13 link as preferred path for both directions using MED and local preference.

here MED is insufficent, because MED attribute isn't propagated always, but only within the first AS... if i set MED on CON6 for outbound prefixes to CON13, only AS 65100 will receive MED. When the same prefixes are received to AS65002, through CON8, MED value is removed.
So I must use something like this:

CON6#sh run | beg router bgp
router bgp 65300
no synchronization
bgp log-neighbor-changes
neighbor 10.0.4.1 remote-as 65002
neighbor 10.0.4.1 description CON3 (AS65002)
neighbor 10.0.4.1 update-source FastEthernet0/0
neighbor 10.0.4.1 route-map ALLOW-LOCALLY-ORIGINATED+MED+PREPEND out
neighbor 10.0.4.5 remote-as 65002
neighbor 10.0.4.5 description CON4 (AS65002)
neighbor 10.0.4.5 update-source FastEthernet0/1
neighbor 10.0.4.5 route-map ALLOW-LOCALLY-ORIGINATED+MED+PREPEND out
neighbor 10.25.5.9 remote-as 65300
neighbor 10.25.5.9 description Neighbor CON9
neighbor 10.25.5.9 update-source Loopback5
neighbor 10.25.5.10 remote-as 65300
neighbor 10.25.5.10 description Neighbor CON10
neighbor 10.25.5.10 update-source Loopback5
neighbor 172.17.5.17 remote-as 65100
neighbor 172.17.5.17 description SP2 CON13
neighbor 172.17.5.17 route-map Local-Pref-1000 in
neighbor 172.17.5.17 route-map ALLOW-LOCALLY-ORIGINATED_ONLY out
no auto-summary
!
ip as-path access-list 1 permit ^$
!
route-map ALLOW-LOCALLY-ORIGINATED+MED+PREPEND permit 100
match as-path 1
set metric 100
set as-path prepend 65300 65300
!
route-map ALLOW-LOCALLY-ORIGINATED_ONLY permit 10
match as-path 1
!
route-map Local-Pref-1000 permit 100
set local-preference 1000
(Similar config for CON10)
With this configuration i set MED and AS Path-prepend for the backup links (Biggest MED = worst path) and i allowed only locally generated prefixes as specified in task 3.
This means that MED is right for tell to neighbors what is your preferred link, but it works well only if your neighbors are in the same AS.


Thursday, October 16, 2008

Wism mobility configuration

Today we have experienced some Wireless Lan Controller issues: we have a Wism module with 2 controllers and an external web authentication page.
Well several users today had troubles with web auth, after entering the correct password, they aren't redirected to their requested page, but always return to web auth page, without error messages.

So I tryed with my own pc and see that our Wism "A" wasn't working properly.

Under "Management" - "logs" we see a lot of messages like this:
Oct 16 10:30:28.991 iapp_socket_task.c:580 IAPP-3-MSGTAG015: iappSocketTask: iappRecvPkt returned error
Oct 16 10:30:17.563 pem_api.c:5669 PEM-1-MSGTAG051: Unable to allow user [username was here] into the system - perhaps the useris already logged onto the system?
Well, i look the "monitor" page of Wism A:
System Name WiSM-WLC-A
Up Time 371 days, 21 hours, 58 minutes
Internal Temperature +36 C
Lol! 371 days it's enough... time to reboot it ;-) (old style! )
(note the +36°C internal temp... new cooling system for network and datacenter room pls!)

So i made a configuration backup and proceed to reboot the controller.

I noted that:
-all Access Points with secondary controller setting have registered correctly to the other WLC (our Wism B) in a minute
-the Access Points that haven't a secondary controller configured have to "wait" for Wism A
-when all controllers are up, the APs still registered on Wism B, so i note that our installation man (not me ;-)) haven't configured correctly both controllers for mobility.



Above we can see the Wism A, just rebooted with few APs registered



And Wism B well loaded ;-)

I read the Document ID: 69639 "WLAN Controller Failover for Lightweight Access Points Configuration Example Downloads" to control configuration of Mobility features...

...and see that in our Wism there is a mobility group configured, but during the installation no one has configured the members of mobility group, so each controller see itself only as mobility group member...

After proper configuration, with "AP Fallback" option enabled, the APs doesn't move from one controller to another until a wism falls, or manually reset APs.
It's a good idea read this document's note about primary, secondary and tertiary Ap controllers:
Note: Define only system names under the primary, secondary, and tertiary controller name fields. Do not enter the IP address or the MAC address of the controller in these fields.
We have IP address configured, and registration after an AP reset takes about 30-45 sec... I tryed with the controller name... and it takes 10-15 sec!

Well, this means that someone have to read this document too:
Document ID: 82463 Wireless LAN Controller (WLC) Configuration Best Practices

Thursday, October 2, 2008

MPLS VPN Lab

After a little break, used to complete my last CCNP exam, I'm back with another lab...
Now playing on MPLS VPN!

First, read Reggie Nolasco's document "Understanding How Routes are propagated in an MPLS VPN"

Then I made a sample topology like this:




here we have a service provider (SP) with 3 points of presence (CON6, CON7, CON8) and two different customers.

Service Provider:
-runs OSPF and MBGP AS 65535
-uses VpnV4 to connect customers

Customer1:

-uses EIGRP AS 12

Customer2:
-uses OSPF Area0

Obviously customers have overlapping RFC1918 networks...


Here are my configurations for SP:
CON6[+/-]


!
hostname CON6
!
ip cef
!
ip vrf CUSTOMER1
rd 120:12
route-target export 12:120
route-target import 12:120
!
ip vrf CUSTOMER2
rd 500:20
route-target export 20:500
route-target import 20:500
!
interface Loopback0
description iBGP Peering interface internal to SP domain
ip address 192.168.0.6 255.255.255.255
!
interface FastEthernet0/0
description Link to SP-CON7
ip address 172.17.0.2 255.255.255.252
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 TEST-SP
ip ospf network point-to-point
ip ospf hello-interval 3
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
description Link to CUSTOMER1 (CON14)
ip vrf forwarding CUSTOMER1
ip address 172.31.0.9 255.255.255.252
duplex auto
speed auto
!
!
interface FastEthernet0/0/0
!
interface FastEthernet0/0/1
!
interface FastEthernet0/0/2
description Link to CUSTOMER2 (CON13) - VLAN5
switchport access vlan 5
!
interface FastEthernet0/0/3
!
interface Vlan1
no ip address
!
interface Vlan5
description Link to CUSTOMER2 vlan5 - fa 0/0/2
ip vrf forwarding CUSTOMER2
ip address 172.31.0.13 255.255.255.252
!
router eigrp 120
auto-summary
!
address-family ipv4 vrf CUSTOMER1
redistribute bgp 65535 metric 10000 100 255 1 1500
network 172.31.0.0
no auto-summary
autonomous-system 12
exit-address-family
!
router ospf 2 vrf CUSTOMER2
log-adjacency-changes
redistribute bgp 65535 subnets
network 172.31.0.13 0.0.0.0 area 0
!
router ospf 1
router-id 192.168.0.6
log-adjacency-changes
area 0 authentication message-digest
network 172.17.0.2 0.0.0.0 area 0
network 192.168.0.6 0.0.0.0 area 0
!
router bgp 65535
no synchronization
bgp log-neighbor-changes
neighbor 192.168.0.7 remote-as 65535
neighbor 192.168.0.7 update-source Loopback0
neighbor 192.168.0.8 remote-as 65535
neighbor 192.168.0.8 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 192.168.0.7 activate
neighbor 192.168.0.7 send-community both
neighbor 192.168.0.8 activate
neighbor 192.168.0.8 send-community both
exit-address-family
!
address-family ipv4 vrf CUSTOMER2
redistribute ospf 2 vrf CUSTOMER2
no synchronization
exit-address-family
!
address-family ipv4 vrf CUSTOMER1
redistribute eigrp 12
no synchronization
exit-address-family
!
mpls ldp router-id Loopback0 force
!



CON7[+/-]


!
hostname CON7
!
ip cef
!
ip vrf CUSTOMER1
rd 120:12
route-target export 12:120
route-target import 12:120
!
interface Loopback0
description iBGP Peering interface internal to SP domain
ip address 192.168.0.7 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex full
speed 100
!
interface FastEthernet0/1
ip address 172.17.0.1 255.255.255.252
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 TEST-SP
ip ospf network point-to-point
ip ospf hello-interval 3
duplex full
speed 100
mpls ip
!
interface Serial0/0/0
no ip address
no fair-queue
!
interface Serial0/0/1
no ip address
clock rate 2000000
!
interface Serial0/1/0
no ip address
fair-queue
!
interface Serial0/1/1
no ip address
!
interface Serial0/2/0
ip address 172.17.0.5 255.255.255.252
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 TEST-SP
ip ospf hello-interval 3
mpls ip
!
interface Serial0/2/1
ip vrf forwarding CUSTOMER1
ip address 172.31.0.1 255.255.255.252
!
interface Serial0/3/0
no ip address
fair-queue
!
interface Serial0/3/1
no ip address
!
router eigrp 120
auto-summary
!
address-family ipv4 vrf CUSTOMER1
redistribute bgp 65535 metric 10000 100 255 1 1500
network 172.31.0.0
no auto-summary
autonomous-system 12
exit-address-family
!
router ospf 1
router-id 192.168.0.7
log-adjacency-changes
area 0 authentication message-digest
passive-interface default
no passive-interface FastEthernet0/1
no passive-interface Serial0/2/0
network 172.17.0.1 0.0.0.0 area 0
network 172.17.0.5 0.0.0.0 area 0
network 192.168.0.7 0.0.0.0 area 0
!
router bgp 65535
no synchronization
bgp log-neighbor-changes
neighbor 192.168.0.6 remote-as 65535
neighbor 192.168.0.6 update-source Loopback0
neighbor 192.168.0.8 remote-as 65535
neighbor 192.168.0.8 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 192.168.0.6 activate
neighbor 192.168.0.6 send-community both
neighbor 192.168.0.8 activate
neighbor 192.168.0.8 send-community both
exit-address-family
!
address-family ipv4 vrf CUSTOMER1
redistribute eigrp 12
no synchronization
exit-address-family
!
mpls ldp router-id Loopback0 force
!




CON8[+/-]


!
hostname CON8
!
ip cef
!
ip vrf CUSTOMER1
rd 120:12
route-target export 12:120
route-target import 12:120
!
ip vrf CUSTOMER2
rd 500:20
route-target export 20:500
route-target import 20:500
!
interface Loopback0
description iBGP Peering interface internal to SP domain
ip address 192.168.0.8 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding CUSTOMER1
ip address 172.31.0.17 255.255.255.252
duplex full
speed 100
!
interface FastEthernet0/1
ip vrf forwarding CUSTOMER2
ip address 172.31.0.5 255.255.255.252
duplex auto
speed auto
!
interface Serial0/0/0
ip address 172.17.0.6 255.255.255.252
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 TEST-SP
ip ospf hello-interval 3
mpls ip
no fair-queue
clock rate 2000000
!
router eigrp 120
auto-summary
!
address-family ipv4 vrf CUSTOMER1
redistribute bgp 65535 metric 10000 100 255 1 1500
network 172.31.0.0
no auto-summary
autonomous-system 12
exit-address-family
!
router ospf 2 vrf CUSTOMER2
log-adjacency-changes
redistribute bgp 65535 subnets
network 172.31.0.5 0.0.0.0 area 0
!
router ospf 1
router-id 192.168.0.8
log-adjacency-changes
area 0 authentication message-digest
passive-interface default
no passive-interface Serial0/0/0
network 172.17.0.6 0.0.0.0 area 0
network 192.168.0.8 0.0.0.0 area 0
!
router bgp 65535
no synchronization
bgp log-neighbor-changes
neighbor 192.168.0.6 remote-as 65535
neighbor 192.168.0.6 update-source Loopback0
neighbor 192.168.0.7 remote-as 65535
neighbor 192.168.0.7 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 192.168.0.6 activate
neighbor 192.168.0.6 send-community both
neighbor 192.168.0.7 activate
neighbor 192.168.0.7 send-community both
exit-address-family
!
address-family ipv4 vrf CUSTOMER2
redistribute ospf 2 vrf CUSTOMER2
no synchronization
exit-address-family
!
address-family ipv4 vrf CUSTOMER1
redistribute eigrp 12
no synchronization
exit-address-family
!
mpls ldp router-id Loopback0 force
!



Customers configuration are really simple, they didn't have a special configuration but something like this:
-for Customer 1 (eigrp 12)

router eigrp 12
network 172.31.0.0
network 192.168.2.0
no auto-summary
-for Customer 2 (ospf area 0)
router ospf 1
log-adjacency-changes
network 172.31.0.14 0.0.0.0 area 0
network 192.168.2.1 0.0.0.0 area 0

note that on SP CON6 we see the following routing protocols:
CON6#sh ip protocols
Routing Protocol is "eigrp 120"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 120
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: internal 90 external 170

Routing Protocol is "bgp 65535"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
192.168.0.7
192.168.0.8
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
Distance: external 20 internal 200 local 200

Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.0.6
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.17.0.2 0.0.0.0 area 0
192.168.0.6 0.0.0.0 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
192.168.0.8 110 01:14:20
192.168.0.7 110 01:14:20
Distance: (default is 110)

CON6#

Ospf process 2 is applied to vrf CUSTOMER2, so is not visible here... but we can see with:
CON6#sh ip protocols vrf CUSTOMER2
Routing Protocol is "bgp 65535"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Redistributing: ospf 2
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
192.168.0.8 200 01:15:52
Distance: external 20 internal 200 local 200

Routing Protocol is "ospf 2"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 172.31.0.13
It is an area border and autonomous system boundary router
Redistributing External Routes from,
bgp 65535, includes subnets in redistribution
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
172.31.0.13 0.0.0.0 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
13.13.13.13 110 01:15:47
Distance: (default is 110)

CON6#

From customer2 perspective, the MP-BGP learned routes are viewed as inter-area "O IA", despite all Customer2 networks are declared in area0:


CON10#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

172.31.0.0/30 is subnetted, 2 subnets
C 172.31.0.4 is directly connected, FastEthernet0/0
O IA 172.31.0.12 [110/2] via 172.31.0.5, 01:17:08, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback1
192.168.2.0/32 is subnetted, 1 subnets
O IA 192.168.2.1 [110/3] via 172.31.0.5, 01:16:51, FastEthernet0/0
CON10#
CON10#sh ip ospf data
CON10#sh ip ospf database

OSPF Router with ID (10.10.10.10) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
10.10.10.10 10.10.10.10 662 0x80000004 0x00C2FD 2
172.31.0.5 172.31.0.5 745 0x80000005 0x006286 1

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
172.31.0.5 172.31.0.5 745 0x80000003 0x00CDD2

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
172.31.0.12 172.31.0.5 745 0x80000003 0x001AF9
192.168.2.1 172.31.0.5 745 0x80000003 0x001764
CON10#