Configuring Static and Default Routes

Router vs. Switch: Routers operate at the network layer, forwarding data based on the “routing table” through route selection and route forwarding. Switches operate at the data link layer, forwarding data based on the “MAC address table” using hardware forwarding.

Routing Table: Routing entries maintained in the router. The router makes path selections based on the routing table——Directly Connected Route: When an interface IP address is configured on the router and the interface status is up, a directly connected route entry appears in the routing table——Static Route: Manually configured by the administrator; it is unidirectional. Suitable for small-scale networks with fixed topologies——Default Route: When the router cannot find a route entry for the destination network in the routing table, the router forwards the request to the default route interface. Used in stub networks with a single exit point, or as a supplement to other routes.

Configuring Static and Default Routes: Configuration steps: 1. Configure IP on router interfaces and enable the interfaces 2. Configure static routes 3. Check routing table entries and router configuration 4. Configure PC IP to verify ping connectivity——Static route configuration command Router(config)#ip route destination-network-address subnet-mask next-hop-address/local-interface——Default route configuration command Router(config)#ip route 0.0.0.0 0.0.0.0 next-hop-address/local-interface.

Example 1 Topology Diagram: