IP Addressing and Routing Fundamentals (Static Routing, OSPF Basics)
Addressing and subnetting
Know the classful ranges, private space (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback 127.0.0.0/8 and link-local 169.254.0.0/16. Subnet maths: hosts per subnet = 2^h − 2; subnets created by borrowing n bits = 2^n. Be able to convert a mask to prefix length and to find the network/broadcast address of a given host quickly.
Forwarding logic
A router chooses the longest prefix match first, and only among equal prefixes does it compare administrative distance (direct 0, OSPF 10, static 60, RIP 100, BGP 255 on Huawei VRP). Static routes may be written with a next hop, an outbound interface, or both (the last is safest on multi-access links). A floating static route uses a deliberately raised preference as a backup. Default route 0.0.0.0/0 matches everything but is beaten by any more specific route.
OSPF basics
OSPF is a link-state protocol using IP protocol 89, multicast 224.0.0.5/224.0.0.6, and cost = reference bandwidth ÷ interface bandwidth (default reference 100 Mbit/s). Routers become neighbours through Hello packets (10 s hello / 40 s dead on broadcast and point-to-point), must agree on area ID, hello/dead timers, MTU and authentication, and elect a DR/BDR on broadcast segments by priority then Router ID. Router ID is the highest loopback address, else the highest active physical interface address, unless set manually. All non-backbone areas must touch Area 0; ABRs sit between areas, ASBRs inject external routes.
Worked example
Split 192.168.10.0/24 into /26 subnets: 2^2 = 4 subnets (192.168.10.0, .64, .128, .192), each with 2^6 − 2 = 62 usable hosts.