I already had an OSPFv2 for IPv4 lab on my blog. However, I missed capturing a pcap file in order to publish it. So, here it is. Feel free to have a look at another small lab with three Cisco routers and OSPFv2. Just another pcapng file to practise some protocol and Wireshark skills.
This is an overview of the complete lab. OSPFv2 is in the middle between R4/R5 and R1:
Some notes regarding it:
- R4 and R5 are uplinks to the Internet, redistributing their default route.
- Behind R1 there are some more networks coming in via EIGRP, which are redistributed as well.
- A summary address at R1 is used just for test purposes. It shows up in the routing table as an “is a summary” route with an exit interface of Null0.
- All three routers are using authentication via MD5. (Note that the keys are only “type 7 encrypted” which can be reverted using online password crackers.)
- All routers running IOS version 15.1(4)M12a. R4 and R5 are Cisco 2851 routers, while R1 is a 2811.
Here is the pcapng file (zipped). I used my ProfiShark 1G for capturing it in front of R1, interface fa0/0. Have a look, for example, on packet number 9, LS Update, which shows some LSAs of type 5 “AS-External-LSA” advertising the default route among others. Note that OSPF is no TCP/UDP protocol but an own IP protocol with number 89, refer to the IANA Protocol Numbers.
And here are the used OSPF configuration commands for those three routers:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
! ########## R4 ########## ! interface GigabitEthernet0/1 description Downlink zu S1 Port 1 ip address 192.168.121.4 255.255.255.0 ip ospf authentication message-digest ip ospf message-digest-key 1 md5 7 062C0029421F5A5556435F5859 ! router ospf 4 router-id 192.168.255.14 passive-interface default no passive-interface GigabitEthernet0/1 network 192.168.120.0 0.0.0.255 area 0.0.0.0 network 192.168.121.0 0.0.0.255 area 0.0.0.0 default-information originate ! ! ! ! ########## R5 ########## ! interface GigabitEthernet0/1 description Downlink zu S1 Port 2 ip address 192.168.121.5 255.255.255.0 ip ospf authentication message-digest ip ospf message-digest-key 1 md5 7 062C0029421F5A5556435F5859 ! router ospf 4 router-id 192.168.255.15 passive-interface default no passive-interface GigabitEthernet0/1 network 192.168.120.0 0.0.0.255 area 0.0.0.0 network 192.168.121.0 0.0.0.255 area 0.0.0.0 default-information originate ! ! ! ! ########## R1 ########## ! interface FastEthernet0/0 description Uplink zu S1 Port 24 ip address 192.168.121.42 255.255.255.0 ip ospf authentication message-digest ip ospf message-digest-key 1 md5 7 1123160D19435840577E66777D ! router ospf 4 router-id 192.168.255.11 summary-address 192.168.255.12 255.255.255.254 redistribute eigrp 4711 subnets passive-interface default no passive-interface FastEthernet0/0 network 192.168.121.0 0.0.0.255 area 0.0.0.0 network 192.168.122.0 0.0.0.3 area 0.0.0.0 network 192.168.255.11 0.0.0.0 area 0.0.0.0 ! |
As well as some (many) show commands from R1:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
R1#show ip route Codes: L - local, 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, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is 192.168.121.5 to network 0.0.0.0 O*E2 0.0.0.0/0 [110/1] via 192.168.121.5, 4d11h, FastEthernet0/0 [110/1] via 192.168.121.4, 4d07h, FastEthernet0/0 O 192.168.120.0/24 [110/13] via 192.168.121.5, 4d11h, FastEthernet0/0 [110/13] via 192.168.121.4, 4d07h, FastEthernet0/0 192.168.121.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.121.0/24 is directly connected, FastEthernet0/0 L 192.168.121.42/32 is directly connected, FastEthernet0/0 192.168.122.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.122.0/30 is directly connected, Serial0/0/0 L 192.168.122.1/32 is directly connected, Serial0/0/0 D 192.168.124.0/24 [90/837120] via 192.168.122.2, 4d11h, Serial0/0/0 D 192.168.127.0/24 [90/834560] via 192.168.122.2, 2w0d, Serial0/0/0 D 192.168.128.0/23 [90/837120] via 192.168.122.2, 4d07h, Serial0/0/0 192.168.255.0/24 is variably subnetted, 4 subnets, 2 masks C 192.168.255.11/32 is directly connected, Loopback0 O 192.168.255.12/31 is a summary, 4d04h, Null0 D 192.168.255.12/32 [90/960000] via 192.168.122.2, 2w0d, Serial0/0/0 D 192.168.255.13/32 [90/962560] via 192.168.122.2, 4d11h, Serial0/0/0 R1# R1# R1#show ip ospf Routing Process "ospf 4" with ID 192.168.255.11 Start time: 06:27:18.308, Time elapsed: 4w5d Supports only single TOS(TOS0) routes Supports opaque LSA Supports Link-local Signaling (LLS) Supports area transit capability Supports NSSA (compatible with RFC 1587) Event-log enabled, Maximum number of events: 1000, Mode: cyclic It is an autonomous system boundary router Redistributing External Routes from, eigrp, includes subnets in redistribution Router is not originating router-LSAs with maximum metric Initial SPF schedule delay 5000 msecs Minimum hold time between two consecutive SPFs 10000 msecs Maximum wait time between two consecutive SPFs 10000 msecs Incremental-SPF disabled Minimum LSA interval 5 secs Minimum LSA arrival 1000 msecs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Number of external LSA 6. Checksum Sum 0x045D3A Number of opaque AS LSA 0. Checksum Sum 0x000000 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Number of areas transit capable is 0 External flood list length 0 IETF NSF helper support enabled Cisco NSF helper support enabled Reference bandwidth unit is 100 mbps Area BACKBONE(0.0.0.0) Number of interfaces in this area is 3 (1 loopback) Area has no authentication SPF algorithm last executed 4d07h ago SPF algorithm executed 16 times Area ranges are Number of LSA 4. Checksum Sum 0x025E75 Number of opaque link LSA 0. Checksum Sum 0x000000 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 R1# R1# R1#show ip ospf database OSPF Router with ID (192.168.255.11) (Process ID 4) Router Link States (Area 0.0.0.0) Link ID ADV Router Age Seq# Checksum Link count 192.168.255.11 192.168.255.11 1128 0x8000026F 0x00C391 3 192.168.255.14 192.168.255.14 267 0x80000275 0x00E425 2 192.168.255.15 192.168.255.15 201 0x80000270 0x000804 2 Net Link States (Area 0.0.0.0) Link ID ADV Router Age Seq# Checksum 192.168.121.5 192.168.255.15 1488 0x8000026F 0x0001FF Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 192.168.255.14 518 0x8000026B 0x003695 4 0.0.0.0 192.168.255.15 201 0x8000026B 0x00309A 4 192.168.124.0 192.168.255.11 1128 0x800000C1 0x000D78 0 192.168.127.0 192.168.255.11 623 0x8000025D 0x00AE36 0 192.168.128.0 192.168.255.11 1645 0x800000C1 0x00DBA6 0 192.168.255.12 192.168.255.11 1645 0x8000025E 0x00A8AF 0 R1# R1# R1#show ip ospf rib OSPF Router with ID (192.168.255.11) (Process ID 4) Base Topology (MTID 0) OSPF local RIB Codes: * - Best, > - Installed in global RIB *> 192.168.120.0/24, Intra, cost 13, area 0.0.0.0 via 192.168.121.4, FastEthernet0/0 via 192.168.121.5, FastEthernet0/0 * 192.168.121.0/24, Intra, cost 12, area 0.0.0.0, Connected via 192.168.121.42, FastEthernet0/0 * 192.168.122.0/30, Intra, cost 12, area 0.0.0.0, Connected via 192.168.122.1, Serial0/0/0 * 192.168.255.11/32, Intra, cost 1, area 0.0.0.0, Connected via 192.168.255.11, Loopback0 *> 192.168.255.12/31, Intra, cost 20 via Null0 *> 0.0.0.0/0, Ext2, cost 1, tag 4 via 192.168.121.4, FastEthernet0/0 via 192.168.121.5, FastEthernet0/0 R1# R1# R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.255.14 1 FULL/DROTHER 00:00:32 192.168.121.4 FastEthernet0/0 192.168.255.15 1 FULL/DR 00:00:37 192.168.121.5 FastEthernet0/0 R1# R1# R1#show ip ospf neighbor detail Neighbor 192.168.255.14, interface address 192.168.121.4 In the area 0.0.0.0 via interface FastEthernet0/0 Neighbor priority is 1, State is FULL, 6 state changes DR is 192.168.121.5 BDR is 192.168.121.42 Options is 0x12 in Hello (E-bit, L-bit) Options is 0x52 in DBD (E-bit, L-bit, O-bit) LLS Options is 0x1 (LR) Dead timer due in 00:00:32 Neighbor is up for 4d07h Index 2/2, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec Neighbor 192.168.255.15, interface address 192.168.121.5 In the area 0.0.0.0 via interface FastEthernet0/0 Neighbor priority is 1, State is FULL, 6 state changes DR is 192.168.121.5 BDR is 192.168.121.42 Options is 0x12 in Hello (E-bit, L-bit) Options is 0x52 in DBD (E-bit, L-bit, O-bit) LLS Options is 0x1 (LR) Dead timer due in 00:00:33 Neighbor is up for 4d11h Index 1/1, retransmission queue length 0, number of retransmission 0 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 0, maximum is 0 Last retransmission scan time is 0 msec, maximum is 0 msec R1# R1# R1#show ip protocols *** IP Routing is NSF aware *** Routing Protocol is "ospf 4" Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Router ID 192.168.255.11 It is an autonomous system boundary router Redistributing External Routes from, eigrp, includes subnets in redistribution Number of areas in this router is 1. 1 normal 0 stub 0 nssa Address Summarization: Maximum path: 4 Routing for Networks: 192.168.121.0 0.0.0.255 area 0.0.0.0 192.168.122.0 0.0.0.3 area 0.0.0.0 192.168.255.11 0.0.0.0 area 0.0.0.0 Passive Interface(s): FastEthernet0/1 Serial0/0/0 Serial0/0/1 Loopback0 VoIP-Null0 Routing Information Sources: Gateway Distance Last Update 192.168.120.24 110 2w4d 192.168.120.25 110 2w4d 192.168.255.15 110 4d11h 192.168.255.14 110 4d07h 192.168.255.11 254 4d04h Distance: (default is 110) R1# R1# R1#show ip ospf interface fa0/0 FastEthernet0/0 is up, line protocol is up Internet Address 192.168.121.42/24, Area 0.0.0.0, Attached via Network Statement Process ID 4, Router ID 192.168.255.11, Network Type BROADCAST, Cost: 12 Topology-MTID Cost Disabled Shutdown Topology Name 0 12 no no Base Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 192.168.255.15, Interface address 192.168.121.5 Backup Designated router (ID) 192.168.255.11, Interface address 192.168.121.42 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:08 Supports Link-local Signaling (LLS) Cisco NSF helper support enabled IETF NSF helper support enabled Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length is 0, maximum is 5 Last flood scan time is 0 msec, maximum is 4 msec Neighbor Count is 2, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.255.14 Adjacent with neighbor 192.168.255.15 (Designated Router) Suppress hello for 0 neighbor(s) Message digest authentication enabled Youngest key id is 1 R1# |
That’s it. Cheers.
Featured image “Rec” by Jean-Maki Simon is licensed under CC BY-ND 2.0.