Static routing
Static routing in networking means manually configuring routes on routers, instead of relying on dynamic
routing protocols (like RIP, OSPF). It’s simple and useful in small networks or when someone wants full
control over routing paths.
Configuring static routing
● At first assign the IP addresses to every PC including default gateway. Then assign default
gateway for every interface of the routers.
● Then update the routing table of every router to recognize other existing networks.
● For router0 go to config -> static. Enter network address, subnet mask of the network it wants to
recognize and enter the next hop address it needs to go in order to reach the network.
● In router1 it only needs to recognize network 1 and 4, two different next hop is required for that.
● In router2 only network 1,2,3 needs recognition.
Routing Information Protocol
RIP version 1 is a classful, distance-vector routing protocol that:
● Shares routing tables between routers.
● Supports only classful routing (no subnet masks, so no VLSM/CIDR).
● Has a maximum hop count of 15.
Configuring RIP version 1
● At first assign the IP addresses to every PC including default gateway. Then assign default
gateway for every interface of the routers.
● Then in every router update RIP table with the network addresses with which the routers are
connected.
● For router0, it is connected to network 1 and 2.
● For router1, it is connected to network 2,3,5.
● For router2, it is connected to network 4,5.
Routing Information Protocol version 2
RIP v2 is a distance-vector routing protocol used to help routers share information about network paths.
It is an improvement over RIP v1.
How It Works
● Routers using RIP v2 exchange their routing tables with neighbors every 30 seconds.
● RIP v2 includes subnet masks, allowing it to support discontiguous networks, VLSM, and
CIDR.
● It chooses the route with the fewest hops.
● If a route has more than 15 hops, it's considered unreachable.
When to Use RIP v2
RIP v2 is useful in small to medium-sized networks but it's not suitable for large or complex networks
(use OSPF instead)
Configuring RIP version 2
● First we have to assign IP addresses to every PC according to their network. If they are in
network A,,B,E,G,I their address will be in network 10.0.0.0. If they are in network C,D,F their
address will be in network 192.168.10.0.
● If a network needs 4 hosts their subnet mask will be 248 or if they need 8 hosts it will be 252.
● In network A total 8 addresses are needed so their IP range will be from 10.0.0.0-10.0.0.7.
Similarly B(10.0.0.8-10.0.0.15), E(10.0.0.16-10.0.0.19), G(10.0.0.20-10.0.0.23),
I(10.0.0.24-10.0.0.27), C(192.168.10.0-192.168.10.7), D(192.168.10.8-192.168.10.11),
F(192.168.10.12-192.168.10.15).
● Router's interfaces will also have to be assigned to their IP address according to which network
they are in.
● Then in every router’s CLI write “enable-> config terminal-> router rip-> version 2->network
“network address”. For network address we have to include the network address of every single
network that the router is connected to. For example router1 is connected to network F,G and I.
Open shortest path first(OSPF)
OSPF (Open Shortest Path First) is a link-state, classless, interior gateway protocol (IGP) used for
routing IP packets within a single autonomous system (AS).
Configuring OSPF
● Creating subnet under 10.0.0.0. Network A,B,C needs 8 hosts so they will need addresses
10.0.0.0-10.0.0.23. Network D and E needs 4 hosts so they need IP 10.0.0.24-10.0.0.31
● Then in every router’s CLI write exit-> router ospf 10(process ID)-> network “network address”
wild card bit-> area 1.
● Process id can be from 1 to 65535 and the wild card card bit is the 1’s complement of that
networks subnet mask (8 host-0.0.0.7 / 4 host-0.0.0.3. For example router1 will be: