Back to blog

Build Series  ·  Cisco IOS-XE  ·  Real-World Network  ·  November 2026

Build: The
Ferry Port Network

A regional ferry port on Crete's north coast: an administration building, a passenger terminal, a cargo shed with customs, a control tower running the harbour's radar, and a fuel yard by the gate. Five buildings along a kilometre of quay, where an excavator or a crane can cut a fibre on any working day. We connect them with a routed ring running authenticated OSPF, give the port two ways to the internet that fail over by themselves, and fence the security systems off, in 11 tested steps.

Build Series Cisco IOS-XE OSPF BFD Stub Area ZBF Starlink ISPS · NIS2

OSPF AREA 0 AREA 20 · stub 10.255.1.0/31 · cost 10 10.255.1.2/31 · cost 10 .4/31 10.255.1.6/31 · cost 10 diagonal .8/31 BFD 3 × 100 ms on every ring link V112 V103 V106 V108 Te1/1/4 ⇄ Gi0/0/1 Te1/1/4 ⇄ Gi0/0/1 fibre · 0/0 E1 metric 10 0/0 E1 metric 100 Gi1/0/1 · 1G LX Internet Starlink tower roof · bypass EDGE1 C8200 · fibre /29 EDGE2 C8200 · Starlink CORE-ADMIN 10.255.0.1 · bldg 10 CORE-TOWER 10.255.0.4 · bldg 40 CORE-CARGO 10.255.0.3 · ABR CORE-TERM 10.255.0.2 · bldg 20 YARD IE-3400 Data room DHCP·NTP·logs·NVR Ticket desks gates · V103 Customs V106 VTS radar · AIS · V108 PLCs · V109 Passenger Wi-Fiown ISP · own routernot on the ring FULL NETWORK all 11 steps built Drag the slider to build the network step by step. Devices with a config are clickable.

Full network · all steps built

Select a device to see its configuration

highlighted = lines added in the selected step · earlier steps shown plain · later steps hidden

Download the full config: MikroTik .rsc · Cisco IOS .txt — illustrative, review before use

This is part 13 of the Build series, and the first one where dynamic routing is the point of the design. Every earlier build had one core and one way to each building. A port has five buildings strung along the waterfront, ducts that get dug up, and systems such as the harbour radar that can't wait for someone to re-patch a cable.

OSPF is the tool that turns "there is another fibre" into "traffic is already using it". The rest of the post is about making that safe: who is allowed to speak OSPF, how quickly it reacts, how to keep a small outdoor cabinet out of the backbone's business, and how to work on the network while ships are boarding.

Prerequisites

01

The Brief

A fictional but typical regional port: two ferry lines, ro-ro freight, about 600,000 passengers a year, almost all of them between May and October.

The port authority runs five sites on one property. The administration building holds the offices, the data room and the fibre ISP. The passenger terminal has the ticket desks and the boarding gates. The cargo shed houses customs and the freight office. The control tower at the root of the breakwater runs the vessel traffic service (VTS): radar, AIS and recorded VHF. The fuel and cargo gate yard behind the cargo shed has the gate cameras, the barrier and the fuel dispensers. All of them have CCTV and card-access doors, required by the port facility security plan under the ISPS Code.

RequirementWhere it comes from, and what it forces
R1 Survive a cut ductWorks on the quay are constant. Losing any one fibre must not stop any building, and traffic must move in under a second, before the ticketing app or a camera stream notices.
R2 Two ways outTicketing and email must keep working when the fibre ISP fails. A Starlink dish on the tower is the backup, and the switch-over is automatic in both directions.
R3 Security systems fenced offISPS Code and NIS2: CCTV, access control, VTS and the fuel PLCs are reachable only from their own servers, and have no internet path.
R4 The tower stands aloneThe VTS keeps working with every fibre to the tower cut. Nothing it needs during a watch may depend on another building.
R5 No one joins the routingContractors, ship crews and technicians plug into whatever port is nearest. A device on a user port must not be able to influence routing.
R6 A small yard, a small footprintThe yard cabinet holds an industrial switch. It should not have to carry or process the port's full routing table.
R7 Work during the seasonFibre splicing, upgrades and reboots happen while ferries are boarding. Maintenance must move traffic away first, not cause the outage.
R8 EvidenceNIS2 incident reporting within 24 hours: routing changes, config changes and security events logged centrally with synchronised time.
R9 Passengers stay outsideThousands of passenger phones a day never touch the authority's network.

02

Four Design Decisions

All four come from the same fact: the port is long and thin, and things along it get broken.

1 · Every building routes for itself

One Catalyst 9300 per building is the default gateway for that building's VLANs, and the links between buildings are routed /31s. No VLAN crosses the quay, so there is no spanning tree to wait for and no broadcast domain that spans five buildings. It is also what makes R4 true: the tower's VLANs are routed inside the tower.

2 · A ring with a diagonal, in two ducts

The four cores form a ring: two sides in the quay duct, two in the access-road duct, plus a diagonal from administration to cargo. Any single fibre can fail with every building still connected, and the diagonal gives the busiest pair (data room and cargo) a direct path. OSPF with BFD finds the new path in under a second.

3 · One backbone area, one stub

Four cores and two edges are far too few to need multiple backbone areas: area 0 covers them all, and every router sees the same topology. The yard gets area 20, totally stubby, because it is a single outdoor cabinet that only needs a default route. That decision is about the IE-3400's workload and blast radius, not about scale.

4 · Defaults that follow health, not configuration

Neither edge injects a default unconditionally. Each one originates it only while its own uplink passes a probe, with a lower metric for fibre than for Starlink. Failover and recovery need no human and no script: OSPF already knows which exit works.

03

The Address & VLAN Plan

Each building gets a /20; inside it, VLAN 1xx is always the .xx subnet. Infrastructure lives in 10.255.0.0/16.

Block · VLANWhat lives there
10.<b>.0.0/20One per building: ADMIN 10.10, TERM 10.20, CARGO 10.30, TOWER 10.40, YARD 10.50.
101 STAFF · .1.0/24Office PCs and laptops in every building. DHCP from the data room via the core.
102 VOICE · .2.0/24IP phones, all buildings. SIP trunk to the provider through NAT.
103 TICKETING · 10.20.3.0/24Ticket desks and boarding-gate readers in the terminal. Reach the booking platform over HTTPS.
104 CCTV · .4.0/24Cameras in every building and the yard's gate cameras. NVR in the data room (10.10.12.30).
105 ACCESS-CTRL · .5.0/24Door and gate controllers. Access-control server 10.10.12.40.
106 CUSTOMS · 10.30.6.0/24Customs office PCs in the cargo shed (their own systems arrive on their own circuit).
108 VTS · 10.40.8.0/24Radar processors, AIS receivers, VHF recorders and operator consoles in the tower.
109 FUEL-OT · 10.50.9.0/24Fuel dispenser PLCs in the yard. Polled by the fuel-management server 10.10.12.50.
112 SERVERS · 10.10.12.0/24Data room: DHCP/DNS .10, NTP .5, syslog/SNMP .20, NVR .30, access control .40, fuel management .50.
115 MGMT · .15.0/24Switch and AP management in every building.
10.255.0.0/24Loopbacks: cores .1–.4, EDGE1 .11, EDGE2 .12, YARD .21.
10.255.1.0/24Point-to-point /31s: ring .0–.9, EDGE1 .10/.11, EDGE2 .12/.13, yard .14/.15.
HARBOUR BASIN breakwater ADMINISTRATIONbldg 10 · data roomEDGE1 · fibre ISP PASSENGER TERMINALbldg 20 · tickets · gatespassenger Wi-Fi: own ISP CARGO SHEDbldg 30 · customsABR to the yard TOWERbldg 40 · VTSEDGE2 · Starlink FUEL & GATE YARDbldg 50 · outdoor cabinetarea 20 ring duct B · port access road diagonal · ADMIN ⇄ CARGO ring duct A · along the quay Two ducts on different routes: a crane or an excavator can cut one side of the ring, never both.

04

The Policy Matrix

Rows start, columns receive. Default deny. Routing reaches everything; this is what is allowed to use it.

FROM ↓ · TO → Core services Security & fuel servers Staff (any bldg) Security / OT VLANs Internet Staff · V101 ✓ ✓ UIs ✓ ✕ ✓ Ticketing · V103 ◐ DHCP·DNS·NTP ✕ ✕ ✕ ◐ 443 Customs · V106 ◐ DNS·NTP ✕ ✕ ✕ ◐ 443 CCTV · V104 ◐ NTP·logs ◐ NVR replies ✕ — ✕ Access ctrl · V105 ◐ NTP ◐ ACS 443 ✕ — ✕ VTS · V108 ◐ NTP·logs ✕ ✕ — ✕ Fuel OT · V109 ◐ NTP ◐ poll replies ✕ — ✕ allowed limited to the host/port shown denied (default) same kind / n.a. Enforced inbound on every SVI of every core, by the same seven ACLs. Internet egress is further limited by NAT-OUT on both edges.

The interesting column is Security / OT VLANs: nothing may start a connection into it. The NVR, the access-control server and the fuel-management server reach their devices because the devices' ACLs let replies out, not because anything is allowed in. A compromised staff PC has no route through the policy to a camera, a door controller or a fuel PLC, even though OSPF has a route to all of them.

04b

Requirements Traceability

Every requirement from the brief, the steps that implement it, the config that does it, and the test that proves it.

RequirementImplemented inKey configProven by
R1 Survive a cut ductstep 1 · step 2 · step 6ring + diagonal; p2p adjacencies; BFD 3×100 ms; SPF throttle 50 ms"Cut a duct" drill, section 16
R2 Two ways outstep 5tracked statics; default-information originate E1 10 / 100; DHCP distance 100"Fibre ISP down" drill
R3 Security systems fenced offstep 8 · step 9seven SVI ACLs; NAT-OUT excludes CCTV/ACCESS/VTS/FUEL"Staff scan" drill
R4 The tower stands alonestep 4tower VLANs routed on CORE-TOWER; NTP/logs only"Tower island" drill
R5 No one joins the routingstep 2 · step 3passive-interface default; HMAC-SHA-256 key chain; TTL security"Rogue router" drill
R6 Small yard footprintstep 7area 20 stub / no-summary; area 20 rangeshow ip route on YARD
R7 Work during the seasonstep 10max-metric router-lsa on-startup 300; cost-out runbook"Reload a core" drill
R8 Evidencestep 11NTP; syslog; log-adjacency-changes detail; OSPF traps; config archiveLog review after every drill
R9 Passengers stay outsidestep 4separate router, ISP and fibre pairsPhysical audit

The build

Bottom to Top, One Layer at a Time

Fibre first, routing second, policy last. Every step ends with a checkpoint.

Eleven steps: the routed ring, OSPF area 0, authentication, the buildings' networks, the two edges, fast failure detection, the yard's stub area, the security ACLs, the edge firewall, maintenance behaviour, and logging. Each step that adds equipment opens with the topology: built parts solid, the step's additions in orange, later steps faded.

05 · Step 1 of 11

The Ring: Routed Fibre Along the Quay

Four core switches, five fibre links, no spanning tree anywhere along the quay.

▲ Show step 1 in the interactive topology · see what this step adds, and click any device for its config

Each building has one Catalyst 9300 that routes for the whole building. The links between them are routed ports with /31 addresses: no VLAN stretches from one building to another, so a loop or a broadcast storm in the cargo shed stays in the cargo shed. The four cores form a ring along two different duct routes (the quay and the port access road), plus one diagonal from administration to cargo through the access road, so every core has at least two ways to every other core.

CORE-ADMIN — loopback and ring ports
hostname CORE-ADMIN
! the cores route; a ring of routed ports means no spanning tree across the quay
ip routing
interface Loopback0
 description router-id + management anchor
 ip address 10.255.0.1 255.255.255.255
interface TenGigabitEthernet1/1/1
 description RING to CORE-TERM Te1/1/1
 no switchport
 ip address 10.255.1.0 255.255.255.254
 no shutdown
interface TenGigabitEthernet1/1/2
 description RING to CORE-TOWER Te1/1/2
 no switchport
 ip address 10.255.1.7 255.255.255.254
 no shutdown
interface TenGigabitEthernet1/1/3
 description RING to CORE-CARGO Te1/1/3 (diagonal)
 no switchport
 ip address 10.255.1.8 255.255.255.254
 no shutdown
CoreLoopbackRing ports (local address)
CORE-ADMIN10.255.0.1Te1/1/1 → TERM .0 · Te1/1/2 → TOWER .7 · Te1/1/3 → CARGO .8
CORE-TERM10.255.0.2Te1/1/1 → ADMIN .1 · Te1/1/2 → CARGO .2
CORE-CARGO10.255.0.3Te1/1/1 → TERM .3 · Te1/1/2 → TOWER .4 · Te1/1/3 → ADMIN .9
CORE-TOWER10.255.0.4Te1/1/1 → CARGO .5 · Te1/1/2 → ADMIN .6

The other three cores follow the same template; click any of them in the explorer above for its exact config.

Why /31s, and why routed ports instead of a VLAN ring

A /31 (RFC 3021) is the natural size for a link with exactly two ends: no network or broadcast address to waste, and the address plan for the whole ring fits in one /28. Both IOS-XE and RouterOS 7 accept it.

The alternative, trunking a "core VLAN" round the ring and letting spanning tree block one side, is how many ports were built. It works until someone plugs a loop into a container office, and then four buildings go down together. Routed ports turn every building into its own failure domain.

Checkpoint: test this before building the next step

06 · Step 2 of 11

OSPF Area 0

One area for the backbone, point-to-point adjacencies, and silence on every port that has no router behind it.

▲ Show step 2 in the interactive topology · see what this step adds, and click any device for its config

The whole ring and both edges are area 0. With four core routers there is no reason for more areas in the backbone: the link-state database is a few dozen LSAs, and one area means every router computes the same picture of the port. The only other area is the fuel yard in step 7, which exists for a different reason.

CORE-ADMIN — OSPF process, area 0 on the ring
router ospf 1
 router-id 10.255.0.1
! 100G reference: 10G = cost 10, 1G = cost 100 (the default 100M makes them all 1)
 auto-cost reference-bandwidth 100000
! nothing talks OSPF unless named below: no hellos into a user VLAN, ever
 passive-interface default
 no passive-interface TenGigabitEthernet1/1/1
 no passive-interface TenGigabitEthernet1/1/2
 no passive-interface TenGigabitEthernet1/1/3
interface Loopback0
 ip ospf 1 area 0
interface TenGigabitEthernet1/1/1
! two routers on a cable: no DR/BDR election, adjacency comes up faster
 ip ospf network point-to-point
 ip ospf 1 area 0
interface TenGigabitEthernet1/1/2
 ip ospf network point-to-point
 ip ospf 1 area 0
interface TenGigabitEthernet1/1/3
 ip ospf network point-to-point
 ip ospf 1 area 0

Three choices in those few lines matter more than they look:

The reference bandwidth must be the same on every router

IOS defaults to a 100 Mb/s reference, so a 1G link and a 10G link both cost 1 and OSPF can't tell them apart. With auto-cost reference-bandwidth 100000, 10G costs 10 and the 1G links to the edges and the yard cost 100. Set it on one router and forget another, and that router computes different costs and can choose paths the others don't expect. RouterOS has no reference bandwidth at all, so on a mixed network the MikroTik side sets cost= explicitly to the value Cisco computes.

Checkpoint: test this before building the next step

07 · Step 3 of 11

Locking the Routing Domain

A routing protocol that believes every packet it hears is an open door. Close it before any user port goes live.

▲ Show step 3 in the interactive topology · see what this step adds, and click any device for its config

OSPF trusts its neighbours completely: one forged LSA can pull a building's traffic towards a laptop, or blackhole the default route. A port is exactly where that risk is real: contractors, ship crews and visiting technicians plug into whatever socket is nearest. Passive interfaces already keep OSPF off user VLANs; authentication and TTL security make sure that even on a ring port, only a router with the key that is physically one hop away is believed.

CORE-ADMIN — HMAC-SHA-256 key chain on every adjacency
key chain OSPF-KEYS
 key 1
  key-string ********
! RFC 5709: HMAC-SHA-256, not MD5 and never plain text
  cryptographic-algorithm hmac-sha-256
interface TenGigabitEthernet1/1/1
 ip ospf authentication key-chain OSPF-KEYS
interface TenGigabitEthernet1/1/2
 ip ospf authentication key-chain OSPF-KEYS
interface TenGigabitEthernet1/1/3
 ip ospf authentication key-chain OSPF-KEYS
router ospf 1
! drop any OSPF packet that didn't come from a directly connected neighbour
 ttl-security all-interfaces hops 1

ttl-security all-interfaces hops 1 makes the router send OSPF with TTL 255 and accept only packets that still have 255 (or 254 with hops 1), so OSPF packets injected from further away than a directly connected neighbour are dropped before they are processed. RouterOS has no equivalent knob, so the MikroTik pane gets the same effect with an input-chain rule that accepts OSPF only on ring ports.

Plan the key rollover before you need it

A key chain can hold two keys with overlapping lifetimes. To rotate, add key 2 on every router with a send-lifetime starting at an agreed time, wait until the moment passes, then remove key 1. Because each router accepts both keys during the overlap, the adjacencies never drop. Changing the single key-string on one router at a time drops each adjacency for as long as the two ends disagree.

In Packet Tracer

Packet Tracer supports only MD5 authentication (ip ospf message-digest-key 1 md5 with ip ospf authentication message-digest) and has no key chains or TTL security. Use MD5 there to see an adjacency refuse a wrong key; build the SHA-256 version on CML or EVE-NG.

Checkpoint: test this before building the next step

08 · Step 4 of 11

The Buildings' Networks

Every building routes its own VLANs locally, advertises them passively, and gets DHCP from the data room across the ring.

▲ Show step 4 in the interactive topology · see what this step adds, and click any device for its config

Each core carries the VLANs its building needs and is their default gateway. A cut on the ring therefore never affects traffic inside a building: the tower's radar consoles keep talking to each other with every fibre down. Each core connects to its building's access switch stack over one 10G trunk.

CORE-TERM — passenger terminal VLANs, SVIs and access trunk
vlan 101
 name STAFF
vlan 102
 name VOICE
vlan 103
 name TICKETING
vlan 104
 name CCTV
vlan 105
 name ACCESS-CTRL
vlan 115
 name MGMT
! every building's VLAN 1xx lives in 10.<building>.xx.0/24: the plan is the ACL
interface Vlan101
 description STAFF
 ip address 10.20.1.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 0
interface Vlan102
 description VOICE
 ip address 10.20.2.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 0
interface Vlan103
 description TICKETING
 ip address 10.20.3.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 0
interface Vlan104
 description CCTV
 ip address 10.20.4.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 0
interface Vlan105
 description ACCESS-CTRL
 ip address 10.20.5.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 0
interface Vlan115
 description MGMT
 ip address 10.20.15.1 255.255.255.0
 ip ospf 1 area 0
interface TenGigabitEthernet1/1/8
 description TRUNK to ACC-TERM (building access stack)
 switchport mode trunk
 switchport nonegotiate
 switchport trunk allowed vlan 101,102,103,104,105,115
The address plan is the ACL

VLAN 1xx is always 10.<building>.xx.0/24: CCTV is VLAN 104 and the .4 subnet in every building. That makes one wildcard match every camera at the port, 10.0.4.0 0.255.0.255, and it is why step 8 needs only seven ACLs for five buildings. Each building's /20 (10.10.0.0/20 for administration, 10.20.0.0/20 for the terminal) also means each core could be summarised as one route if the port ever grows to the point where that matters.

DHCP for every building comes from one server in the data room (10.10.12.10). ip helper-address turns each client's broadcast into a unicast from the SVI's address, which OSPF already knows how to route back. The server keeps one scope per building VLAN.

The passengers are not on this network at all

The terminal's passenger and tenant Wi-Fi (thousands of phones a day in summer, the café, the car-rental desks) runs on its own router with its own ISP line, on separate fibre pairs, and is not connected to the ring. Putting it in a VRF across the ring would also work, but it would make the port's routers handle traffic for people with no business there, and an ISP-managed passenger service is what most port operators buy anyway. The cleanest segmentation is no connection.

Checkpoint: test this before building the next step

09 · Step 5 of 11

Two Ways Out: Fibre and Starlink

Each edge advertises a way out only while its own way out works. Fibre is preferred; Starlink waits on the tower roof.

▲ Show step 5 in the interactive topology · see what this step adds, and click any device for its config

EDGE1 in the administration building has the fibre line with a static /29. EDGE2 in the tower has a Starlink dish on the roof in bypass mode. Both join area 0 over a 1G routed link to their core, and both inject a default route into OSPF, but only while their own uplink passes a health check.

EDGE1 — fibre, tracked default, NAT and default origination
hostname EDGE1
interface Loopback0
 ip address 10.255.0.11 255.255.255.255
interface GigabitEthernet0/0/1
 description LAN to CORE-ADMIN Te1/1/4
 ip address 10.255.1.11 255.255.255.254
 ip nat inside
 ip ospf network point-to-point
 ip ospf 1 area 0
 ip ospf authentication key-chain OSPF-KEYS
key chain OSPF-KEYS
 key 1
  key-string ********
  cryptographic-algorithm hmac-sha-256
interface GigabitEthernet0/0/0
 description WAN fibre ISP (static /29)
 ip address 203.0.113.2 255.255.255.248
 ip nat outside
! the probe target is pinned to the ISP so it can't follow OSPF's default
ip route 9.9.9.9 255.255.255.255 203.0.113.1
ip sla 1
 icmp-echo 9.9.9.9 source-interface GigabitEthernet0/0/0
 frequency 5
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
 delay down 10 up 30
ip route 0.0.0.0 0.0.0.0 203.0.113.1 track 1
! the building /20s plus anything unknown inside: never leak 10/8 to the ISP
ip route 10.0.0.0 255.0.0.0 Null0
ip access-list extended NAT-OUT
 permit ip 10.0.1.0 0.255.0.255 any
 permit ip 10.0.2.0 0.255.0.255 any
 permit ip 10.20.3.0 0.0.0.255 any
 permit ip 10.30.6.0 0.0.0.255 any
 permit ip 10.10.12.0 0.0.0.255 any
ip nat inside source list NAT-OUT interface GigabitEthernet0/0/0 overload
router ospf 1
 router-id 10.255.0.11
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface GigabitEthernet0/0/1
 ttl-security all-interfaces hops 1
! only while this edge's own default is installed (no 'always')
 default-information originate metric 10 metric-type 1
interface Loopback0
 ip ospf 1 area 0
EDGE2 — Starlink by DHCP, tracked, and a higher metric
hostname EDGE2
interface Loopback0
 ip address 10.255.0.12 255.255.255.255
interface GigabitEthernet0/0/1
 description LAN to CORE-TOWER Te1/1/4
 ip address 10.255.1.13 255.255.255.254
 ip nat inside
 ip ospf network point-to-point
 ip ospf 1 area 0
 ip ospf authentication key-chain OSPF-KEYS
key chain OSPF-KEYS
 key 1
  key-string ********
  cryptographic-algorithm hmac-sha-256
interface GigabitEthernet0/0/0
 description WAN Starlink (bypass mode, CGNAT)
! the DHCP default must beat OSPF's E1 default (AD 110) or EDGE2 never originates
 ip dhcp client default-router distance 100
 ip dhcp client route track 2
 ip address dhcp
 ip nat outside
ip route 1.1.1.1 255.255.255.255 GigabitEthernet0/0/0 dhcp
ip sla 2
 icmp-echo 1.1.1.1 source-interface GigabitEthernet0/0/0
 frequency 5
ip sla schedule 2 life forever start-time now
track 2 ip sla 2 reachability
 delay down 10 up 30
! the building /20s plus anything unknown inside: never leak 10/8 to the ISP
ip route 10.0.0.0 255.0.0.0 Null0
ip access-list extended NAT-OUT
 permit ip 10.0.1.0 0.255.0.255 any
 permit ip 10.0.2.0 0.255.0.255 any
 permit ip 10.20.3.0 0.0.0.255 any
 permit ip 10.30.6.0 0.0.0.255 any
 permit ip 10.10.12.0 0.0.0.255 any
ip nat inside source list NAT-OUT interface GigabitEthernet0/0/0 overload
router ospf 1
 router-id 10.255.0.12
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface GigabitEthernet0/0/1
 ttl-security all-interfaces hops 1
! only while this edge's own default is installed (no 'always')
 default-information originate metric 100 metric-type 1
interface Loopback0
 ip ospf 1 area 0
CORE-ADMIN — the link to EDGE1 (CORE-TOWER does the same towards EDGE2)
interface TenGigabitEthernet1/1/4
 description EDGE1 Gi0/0/1 (1G optic)
 no switchport
 ip address 10.255.1.10 255.255.255.254
 ip ospf network point-to-point
 ip ospf 1 area 0
 ip ospf authentication key-chain OSPF-KEYS
 no shutdown
router ospf 1
 no passive-interface TenGigabitEthernet1/1/4

Without the always keyword, default-information originate injects a default only while the router has a default route of its own from something other than this OSPF process. On EDGE1 that is the tracked static: when the ISP stops answering, the track goes down, the static disappears, and the E1 default from EDGE1 is withdrawn. Every core then uses EDGE2's default.

Both defaults are type E1, so each core adds its own path cost to the advertised metric. With 10 against 100, EDGE1 always wins while it is alive; with E2 the internal cost would be ignored and only the 10 against 100 would count. That would give the same result here, but E1 is the one that still behaves sensibly if a third exit is ever added.

EDGE2's DHCP default needs a distance lower than 110

A DHCP-learned default has an administrative distance of 254. EDGE2 also hears EDGE1's default through OSPF at distance 110, so OSPF's route wins, the DHCP default never enters the routing table, and EDGE2 has nothing of its own to originate. It only starts originating after EDGE1 dies and its OSPF default has been withdrawn, which adds seconds to the failover. ip dhcp client default-router distance 100 keeps the Starlink default installed all the time, so EDGE2's E1 default is always in the database, ready to take over.

Pin the probe target, and accept that sessions reset

The IP SLA probe has a host route to its target through the ISP. Without it, when the fibre default is withdrawn the probe follows OSPF's default out through Starlink, succeeds, and brings the fibre route back up: a flap every few seconds. Each edge also does its own NAT, so an edge failover resets every open connection. For a port that is acceptable: ticketing retries, email reconnects, and nothing important lives in a long TCP session.

Checkpoint: test this before building the next step

10 · Step 6 of 11

Sub-Second Reroute: BFD and SPF Timers

Light leaving a fibre is noticed instantly. A neighbour that stops answering through a media converter is not, unless you ask.

▲ Show step 6 in the interactive topology · see what this step adds, and click any device for its config

A cleanly cut fibre takes the port down and OSPF reacts immediately. The failures that hurt are the quiet ones: a media converter that keeps the link up but stops passing frames, a switch that hangs, a unidirectional fibre after a crane catches a duct. OSPF's own dead interval is 40 seconds on these links. BFD detects the same failure in 300 ms and tells OSPF.

CORE-ADMIN — BFD on every adjacency, faster SPF
interface TenGigabitEthernet1/1/1
! 3 x 100 ms: a dead neighbour is declared in 300 ms, not 40 s
 bfd interval 100 min_rx 100 multiplier 3
interface TenGigabitEthernet1/1/2
 bfd interval 100 min_rx 100 multiplier 3
interface TenGigabitEthernet1/1/3
 bfd interval 100 min_rx 100 multiplier 3
interface TenGigabitEthernet1/1/4
 bfd interval 100 min_rx 100 multiplier 3
router ospf 1
 bfd all-interfaces
! react to the first change in 50 ms, back off if the ring starts flapping
 timers throttle spf 50 200 5000
 timers throttle lsa 50 200 5000
 timers lsa arrival 100

The throttle timers decide how quickly a router recomputes after a change: the first SPF runs 50 ms after the trigger, then waits at least 200 ms before the next one, doubling up to 5 s if changes keep coming. That gives a fast first reaction and protection against a flapping link making every router recompute non-stop.

Why not just set the hello timers to one second?

ip ospf dead-interval minimal hello-multiplier 4 also detects failure in under a second, but it does it by sending full OSPF hellos every 250 ms on every link, each one processed by the routing process. BFD is a small protocol built for exactly this job, and one BFD session per neighbour can serve OSPF and any other protocol that registers with it. Leave OSPF's timers at their defaults and let BFD do the fast part.

Checkpoint: test this before building the next step

11 · Step 7 of 11

The Fuel Yard: A Totally Stubby Area

An outdoor cabinet by the fuel tanks needs one route in and has one route to give out.

▲ Show step 7 in the interactive topology · see what this step adds, and click any device for its config

The fuel and cargo gate yard sits behind the cargo shed: the gate cameras with number-plate recognition, the gate barrier controller, and the PLCs on the fuel dispensers that refuel the ferries. Everything there is in an IP-rated cabinet with an industrial IE-3400 switch that routes for the yard and connects to CORE-CARGO over 1G single-mode fibre.

The yard is area 20, totally stubby. CORE-CARGO is the area border router. It gives the yard exactly one route, a default, and gives area 0 exactly one route for the yard, its /20. The IE-3400 never has to process the port's external routes, and a change in the yard can only ever add or remove one prefix in the backbone.

YARD — IE-3400 in area 20
hostname YARD
! IE-3400 needs the Network Advantage licence for OSPF
ip routing
interface Loopback0
 ip address 10.255.0.21 255.255.255.255
 ip ospf 1 area 20
interface GigabitEthernet1/1
 description UPLINK to CORE-CARGO Gi1/0/1
 no switchport
 ip address 10.255.1.15 255.255.255.254
 ip ospf network point-to-point
 ip ospf 1 area 20
 ip ospf authentication key-chain OSPF-KEYS
 bfd interval 100 min_rx 100 multiplier 3
key chain OSPF-KEYS
 key 1
  key-string ********
  cryptographic-algorithm hmac-sha-256
vlan 104
 name CCTV
vlan 105
 name ACCESS-CTRL
vlan 109
 name FUEL-OT
vlan 115
 name MGMT
interface Vlan104
 description CCTV
 ip address 10.50.4.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 20
interface Vlan105
 description ACCESS-CTRL
 ip address 10.50.5.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 20
interface Vlan109
 description FUEL-OT
 ip address 10.50.9.1 255.255.255.0
 ip helper-address 10.10.12.10
 ip ospf 1 area 20
interface Vlan115
 description MGMT
 ip address 10.50.15.1 255.255.255.0
 ip ospf 1 area 20
interface range GigabitEthernet1/3 - 6
 description GATE CAMERAS + OCR
 switchport mode access
 switchport access vlan 104
interface GigabitEthernet1/7
 description GATE ACCESS CONTROLLER
 switchport mode access
 switchport access vlan 105
interface range GigabitEthernet1/8 - 10
 description FUEL DISPENSER PLCs
 switchport mode access
 switchport access vlan 109
router ospf 1
 router-id 10.255.0.21
 auto-cost reference-bandwidth 100000
 passive-interface default
 no passive-interface GigabitEthernet1/1
 ttl-security all-interfaces hops 1
 bfd all-interfaces
! stub: no external LSAs; the ABR's no-summary makes it totally stubby
 area 20 stub
CORE-CARGO — the ABR side: totally stubby and one summary
interface GigabitEthernet1/0/1
 ip ospf network point-to-point
 ip ospf 1 area 20
 ip ospf authentication key-chain OSPF-KEYS
 bfd interval 100 min_rx 100 multiplier 3
router ospf 1
 no passive-interface GigabitEthernet1/0/1
! the yard gets one route in (a default) and sends one route out (its /20)
 area 20 stub no-summary
 area 20 range 10.50.0.0 255.255.240.0
Both ends must agree on the area type

A stub area is signalled in the hello packets (the E-bit). If the IE-3400 says area 20 stub and CORE-CARGO doesn't, their hellos don't match and the adjacency never forms; debug ip ospf hello shows Mismatched stub/transit area option bit. no-summary is different: it only belongs on the ABR, because it changes what the ABR sends, not what the hellos say.

One uplink is a single point of failure, on purpose

The yard has one fibre to the cargo shed. A second uplink to the tower would need a new duct across the cargo apron, and the yard's systems all fail safe: barriers stay shut, the PLCs keep a local interlock, the cameras record to an SD card. Write that decision down in the risk register (section 17) rather than leaving it to be discovered.

Checkpoint: test this before building the next step

12 · Step 8 of 11

Who May Talk to Whom

Routing makes every subnet reachable from every other. The ACLs decide which of those paths may actually be used.

▲ Show step 8 in the interactive topology · see what this step adds, and click any device for its config

OSPF has done its job: every building can reach every other. Now the ISPS Code's port facility security plan, and NIS2 for a port operator, need the security systems separated from everything else. CCTV, door and gate access control, the VTS radar and AIS, and the fuel PLCs must not be reachable from staff PCs, and must not start connections to anything except the few servers they report to.

The policy is enforced inbound on every SVI, on the core that owns it, so traffic is filtered at the first router hop and never crosses the ring if it would be dropped. Thanks to the address plan, the same seven ACLs are pasted on all five routers.

CORE-TERM — the terminal's SVI ACLs (CORE-ADMIN, CARGO, TOWER and YARD use the same ACL text)
ip access-list extended STAFF-IN
 remark staff: anywhere useful, never into the security or OT segments
 deny   ip any 10.0.4.0 0.255.0.255
 deny   ip any 10.0.5.0 0.255.0.255
 deny   ip any 10.0.8.0 0.255.0.255
 deny   ip any 10.0.9.0 0.255.0.255
 deny   ip any 10.0.15.0 0.255.0.255
 permit ip any any
ip access-list extended TICKET-IN
 remark ticket desks + boarding gates: DHCP/DNS/NTP inside, booking platform outside
 permit udp any eq bootpc any eq bootps
 permit udp any host 10.10.12.10 eq domain
 permit udp any host 10.10.12.5 eq ntp
 deny   ip any 10.0.0.0 0.255.255.255
 permit tcp any any eq 443
ip access-list extended CCTV-IN
 remark cameras answer the NVR, get time, send logs: nothing else
 permit tcp 10.0.4.0 0.255.0.255 host 10.10.12.30 established
 permit udp any eq bootpc any eq bootps
 permit udp 10.0.4.0 0.255.0.255 host 10.10.12.5 eq ntp
 permit udp 10.0.4.0 0.255.0.255 host 10.10.12.20 eq syslog
ip access-list extended ACCESS-IN
 remark door and gate controllers talk to the access-control server only
 permit tcp 10.0.5.0 0.255.0.255 host 10.10.12.40 eq 443
 permit tcp 10.0.5.0 0.255.0.255 host 10.10.12.40 established
 permit udp any eq bootpc any eq bootps
 permit udp 10.0.5.0 0.255.0.255 host 10.10.12.5 eq ntp
interface Vlan101
 ip access-group STAFF-IN in
interface Vlan103
 ip access-group TICKET-IN in
interface Vlan104
 ip access-group CCTV-IN in
interface Vlan105
 ip access-group ACCESS-IN in
CORE-TOWER, CORE-CARGO, YARD — the segment-specific ACLs
! CORE-TOWER Vlan108
ip access-list extended VTS-IN
 remark radar, AIS and VHF: local to the tower; time and logs only
 permit udp 10.40.8.0 0.0.0.255 host 10.10.12.5 eq ntp
 permit udp 10.40.8.0 0.0.0.255 host 10.10.12.20 eq syslog
! CORE-CARGO Vlan106
ip access-list extended CUSTOMS-IN
 remark customs: own circuit to their systems; here only DNS, time and HTTPS out
 permit udp any host 10.10.12.10 eq domain
 permit udp any host 10.10.12.5 eq ntp
 deny   ip any 10.0.0.0 0.255.255.255
 permit tcp any any eq 443
! YARD Vlan109
ip access-list extended FUEL-IN
 remark fuel PLCs answer the fuel-management server's polls; nothing they start
 permit tcp 10.50.9.0 0.0.0.255 host 10.10.12.50 established
 permit udp 10.50.9.0 0.0.0.255 host 10.10.12.5 eq ntp
Stateless ACLs and the word "established"

Catalyst SVI ACLs have no connection state. established matches TCP segments with ACK or RST set, which is what replies look like, so CCTV-IN lets cameras answer the NVR's RTSP sessions but not open new connections of their own. UDP replies have no such flag, which is why the cameras' NTP and syslog are permitted by explicit port. On the MikroTik pane the same policy is shorter, because a stateful firewall only has to describe who may start a connection.

Why the VTS has no internet path, at all

The tower's radar, AIS receivers and VHF recorders are the systems that keep ships from colliding in the approach channel. Their only network needs are time and logging; their data goes to the coast guard over the authority's own circuit, outside this design. VTS-IN therefore has two permits and an implicit deny, and NAT-OUT on the edges doesn't include the VTS subnet, so even a mistake in one place can't give the radar a route to the internet.

Checkpoint: test this before building the next step

13 · Step 9 of 11

The Edge Firewall

Both edges get the same zone firewall: inside may go out if NAT-OUT says so, and nothing from the internet starts anything.

▲ Show step 9 in the interactive topology · see what this step adds, and click any device for its config

EDGE2 — zones, inspection, and a self zone that answers only its own probes
zone security INSIDE
zone security OUTSIDE
class-map type inspect match-any INSIDE-TO-INET
 match access-group name NAT-OUT
policy-map type inspect INSIDE-TO-INET
 class type inspect INSIDE-TO-INET
  inspect
 class class-default
  drop log
zone-pair security IN-OUT source INSIDE destination OUTSIDE
 service-policy type inspect INSIDE-TO-INET
! the router itself: replies to its own probes and DHCP from the dish
ip access-list extended WAN-TO-SELF
 permit udp any eq bootps any eq bootpc
 permit icmp any any echo-reply
 permit icmp any any unreachable
class-map type inspect match-any WAN-TO-SELF
 match access-group name WAN-TO-SELF
policy-map type inspect WAN-TO-SELF
 class type inspect WAN-TO-SELF
  pass
 class class-default
  drop log
zone-pair security OUT-SELF source OUTSIDE destination self
 service-policy type inspect WAN-TO-SELF
interface GigabitEthernet0/0/1
 zone-member security INSIDE
interface GigabitEthernet0/0/0
 zone-member security OUTSIDE

The class that allows traffic out reuses NAT-OUT, so "what may reach the internet" is written once and used for both translation and inspection. EDGE1 has the same config without the DHCP line. OSPF to the core is traffic between the INSIDE zone and the router itself, and with no INSIDE↔self zone-pair configured, IOS allows it. That is exactly what we want here: the core side is trusted and already filtered by step 3.

The self zone needs its own policy, in one direction only

Defining OUTSIDE → self means everything arriving on the WAN for the router is dropped unless a class passes it. The router's own IP SLA probes and EDGE2's DHCP renewals start from the router, so their replies have to be passed explicitly: pass is stateless, which is fine for ICMP echo-replies and DHCP. Leave self → OUTSIDE undefined so the router can still originate them.

Checkpoint: test this before building the next step

14 · Step 10 of 11

Maintenance Without Outages

A core reloads, or a fibre gets spliced, while ferries are boarding. Move the traffic away first.

▲ Show step 10 in the interactive topology · see what this step adds, and click any device for its config

When a core boots, OSPF can form adjacencies before BFD, the routing table and the line cards are fully programmed, and for a few seconds the ring sends transit traffic through a router that drops it. max-metric router-lsa on-startup 300 makes a freshly booted core advertise its transit links at the maximum metric for five minutes: its own building's networks are still reachable through it, but nobody uses it as a shortcut until it has settled.

All routers — stub-router behaviour after a reload
router ospf 1
! after a reboot, carry no transit traffic for 5 minutes (tables and BFD settle first)
 max-metric router-lsa on-startup 300
Maintenance taskRunbook
Splice or replace one ring fibreip ospf cost 65535 on both ends of that link: traffic moves to the other side of the ring with no loss. Do the work, then no ip ospf cost.
Upgrade or reload a corerouter ospf 1 → max-metric router-lsa (no timer): the ring stops sending transit through it. Its own building still loses connectivity for the reload. Remove the command afterwards.
Replace an edgeShut the WAN interface first: the track drops, its default is withdrawn, and the other edge carries everything.
Before and after every changeshow ip ospf neighbor, show bfd neighbors, show ip route 0.0.0.0 on two cores, saved to the change ticket.
max-metric does not hide the router's own networks

Stub-router mode raises the cost of a router's links to other routers, not of its connected subnets. That is what we want: the tower's VLANs stay reachable while CORE-TOWER is being drained, and only transit traffic goes round the other way. include-stub would hide the tower's own subnets too, which is only useful when moving them to a different router.

Checkpoint: test this before building the next step

15 · Step 11 of 11

Logs, Time and Traps

When something happens at 03:00 in August, the evidence has to exist already, with timestamps that agree.

▲ Show step 11 in the interactive topology · see what this step adds, and click any device for its config

As a port operator, the authority is an essential entity under NIS2 and must report significant incidents within 24 hours. That only works if every router logs to one place, with the same clock, and records every routing change and every configuration change with the user who made it.

All routers — time, logging, OSPF state traps, config archive
service timestamps log datetime msec localtime show-timezone
clock timezone EET 2 0
clock summer-time EEST recurring last Sun Mar 3:00 last Sun Oct 4:00
ntp server 10.10.12.5
logging host 10.10.12.20
logging trap informational
router ospf 1
! every neighbour state change, with the reason, to syslog
 log-adjacency-changes detail
snmp-server group NOC v3 priv
snmp-server user nms NOC v3 auth sha ******** priv aes 128 ********
snmp-server enable traps ospf state-change
snmp-server host 10.10.12.20 version 3 priv nms
archive
 log config
  logging enable
  notify syslog contenttype plaintext

log-adjacency-changes detail logs every state transition, not only FULL and DOWN, so a neighbour stuck in EXSTART (an MTU mismatch) or flapping between INIT and 2WAY (a one-way fibre) shows up in the log with a reason. The OSPF state-change traps let the monitoring system raise an alarm on a lost adjacency within seconds instead of discovering it at the next poll.

Checkpoint: test this before building the next step

16

Verify, Then Break It Before the Season

Run these in April, before the timetable gets busy. Record each result with date and time; they are also the evidence the port facility security plan asks for.

Drill (requirement)What must happen
Cut a duct (R1)Pull both fibres of the quay duct between TERM and CARGO during a continuous ping and a live camera stream: under 1 s of loss, the stream doesn't freeze, and the syslog shows BFD node down from both ends.
Fibre ISP down (R2)Unplug EDGE1's WAN: staff browsing resumes via Starlink within ~25 s. Plug it back: traffic returns to fibre 30 s after the probe recovers.
Staff scan (R3)From a staff laptop in every building, scan 10.0.4–9.x: nothing answers. From a ticket desk, only HTTPS out and DNS/NTP inside work.
Tower island (R4)Shut both of CORE-TOWER's ring ports: radar, AIS and VHF recording continue; operators keep their consoles; only NTP and logs pause.
Rogue router (R5)Plug a laptop running FRR with OSPF into a staff port and into a spare ring-side port in the lab: no adjacency in either case; the second attempt logs an authentication failure.
Yard footprint (R6)On YARD, show ip route has one OSPF route; on CORE-ADMIN, the yard is one /20.
Reload a core (R7)Reload CORE-CARGO during a ping between ADMIN and TERM: no loss when it goes down or when it comes back.
Log review (R8)Every drill above appears at the collector with timestamps within a second of each other across routers.

17

The Attacker's View

Where the residual risk sits once routing and segmentation are in place, and what covers it.

18

Building It in Packet Tracer

The routing core of this post runs well in Packet Tracer. The fast-failure and edge features need CML or EVE-NG.

This postIn Packet Tracer
Four cores, ring, /31s3650-24PS with ip routing and no switchport ports. /31 masks are accepted.
OSPF area 0, p2p, passive default, reference bandwidthAll work. Watch the adjacencies come up and show ip ospf neighbor show no DR.
AuthenticationMD5 only (ip ospf message-digest-key); no key chains, no SHA, no TTL security.
Stub area, no-summary, area rangeWork on routers (use an ISR4331 or 2911 in place of the IE-3400).
Default origination, tracked staticsdefault-information originate works; IP SLA tracking is partial and varies by version.
Not availableBFD, SPF/LSA throttle timers, max-metric, ZBF on the edges, DHCP client distance. Build these on CML or EVE-NG with Cat9000v and Cat8000v images.

19

Bill of Materials

Indicative EU street prices, late 2026, excluding VAT. Public bodies buy through framework contracts and pricing varies.

ItemIndicative (EUR, ex VAT)
4× C9300-24S-A + C9300-NM-8X, Network Advantage30,000 – 38,000
2× C8200-1N-4T (EDGE1, EDGE2)3,200 – 4,400
IE-3400-8P2S + Network Advantage, IP66 cabinet with heater3,500 – 4,800
Optics: 12× 10G-LR, 6× 1G-LX1,800 – 2,800
Starlink Standard kit, pole mount on the tower450 – 600, plus the Business plan
UPS in each building and the yard cabinet4,000 – 6,000
Network total≈ 43,000 – 57,000, plus access switches per building, the ducts and fibre (usually the largest cost), and the security systems themselves

Appendix

The Same Design on MikroTik

Same ring, same areas, same addresses, for a fraction of the hardware. The MikroTik tabs on the config blocks above show each step side by side; this is what changes underneath.

RoleThis post → MikroTik
Four coresC9300-24S-A → CCR2116-12G-4S+ (4× SFP+ for ring and edge, ether12 trunk to the access stack)
EDGE1, EDGE2C8200-1N-4T → CCR2004-16G-2S+
YARDIE-3400-8P2S → RB5009UPr+S+ in the same IP66 cabinet (not industrially rated: add a heater and surge protection)
Indicative total≈ 43,000 – 57,000 → ≈ 6,000 – 8,000 EUR ex VAT
FeatureThis post → MikroTik
OSPF per interfaceip ospf 1 area 0 → /routing ospf interface-template by interface or network
Reference bandwidthauto-cost reference-bandwidth → none; set cost= on each template
Authenticationkey chain HMAC-SHA-256 → auth=sha256 auth-id=1 auth-key= (interoperates with the Cisco key id)
TTL securityttl-security all-interfaces → input-chain rule: OSPF only from ring ports
Conditional defaultdefault-information originate + tracked static → originate-default=if-installed + check-gateway=ping
Default metric/typemetric 10 metric-type 1 → routing filter set ospf-ext-metric / ospf-ext-type type1
Stub-router on startupmax-metric router-lsa → no equivalent; drain by raising template costs
SVI ACLsstateless, on each core → stateful forward chain, shorter but evaluated in software unless offloaded
What actually changes in the design

Forwarding moves into software on the CCR routers, which is fine at port traffic levels but means the ring's throughput is the router's, not a switch ASIC's. There is no stub-router mode, so maintenance relies on the cost-out runbook. And on a mixed network the MikroTik side must set its costs by hand to match what the Cisco side computes, or the two halves of the ring will disagree about the best path.

Takeaways

  1. Route between buildings, switch inside them. Routed /31s turn each building into its own failure domain and let OSPF, not spanning tree, decide paths.
  2. Silence first, then authenticate. passive-interface default keeps OSPF off every user port; SHA-256 and TTL security protect the ports that remain.
  3. Let BFD detect, let OSPF compute. Sub-second failover comes from BFD plus throttled SPF, not from aggressive hello timers.
  4. A default route should follow health. Conditional origination with tracked statics, E1 metrics and the right administrative distance makes failover a property of the routing, not a script.
  5. Stub areas are about blast radius, not size. One small cabinet gets one route in and gives one route out.
  6. Plan the maintenance, not just the failure. Stub-router on startup and a cost-out runbook move traffic away before anyone touches a fibre.

This is part 13 of the Build series. Earlier: the resort hotel, the marina, the café chain.

Running a multi-building site in Crete?

Ports, campuses, resorts and industrial sites: I design routed networks that survive a cut fibre and test the failover before it is needed.

Book a Discovery Call →