Join Greg Sowell for an in-depth discussion in this video Directly connected and static routes, part of Foundations of Networking: Network Media (WANs).
- [Voiceover] Directly connected and static routes are often the least cost path to a destination. Directly connected routes are always the best path to a subnet. Since they are configured directly on a router's interface, they get an administrative distance of 0. When an IP address is added to an interface, the router will automatically create a directly connected route in its forwarding table. But only if the interface is connected and up. If an interface is down for any reason, like a cable is unplugged, then the directly connected route is retracted from the route table until that interface comes back online.
This behavior can often be used in other portions of the network for redistribution or redundancy policies. I have yet to see a network that used no static routes. In fact, I've seen many networks that exclusively use static routes. Static routes are well trusted by the router because they are manually entered by the administrator. This is why they have an AD of 1 by default. Static routes tend to be more stable than dynamic routes. They also use fewer resources on the router. A static route contains a few key data points: destination address, subnet mask, gateway, and administrative distance.
The destination address works in tandem with the subnet mask to define the size of the network block to be reached. The gateway will be the next top router to be used to forward these packets. These gateways should always be a directly connected router. Routers only care who to hand the packets to next. They're not overly concerned about anything beyond direct neighbors. With a static route, if a gateway isn't known to that router, it will invalidate the route and not install it in the route table. This means if the interface for a static route's gateway goes down, that route won't be used.
Some manufacturers implement a concept known as recursive routing. Recursive routing functions by looking up one route's gateway via another route installed on the routing table. It's usually not a best practice as it can sometimes lead to a black hole or routing loop. When troubleshooting, it can also become a little complicated. Static routes can also be used in tandem with dynamic routing. The process of artificially elevating a static route's administrative distance beyond that of the dynamic routing protocols puts it into a state called floating.
Since the dynamic protocol is preferred, that route will be used during normal operation. If, however, that route is removed from the routing table, say for example, due to failure of the protocol, the floating route will be installed into the route table and used. The floating concept isn't relegated to just dynamic protocols. Floating static routes can also be used to back-up other static routes. This now leads to the mother of all static routes, the static default route.
The default route is also sometimes known as the gateway of last resort. In essence, it is a route that says, "If you don't have a more specific route for this destination, go here." It is usually represented as 0.0.0.0/0 or 0.0.0.0 with a subnet mask of 0.0.0.0. Many simple single router networks will have only a static default route added.
If there are a few inside subnets in a single internet connection, a default route is all that is needed. If a network has a redundant internet connection, it can often use a floating static default route for the back-up link. Static and default routing is a foundational principal to nearly every network in existence.
He discusses different WAN technologies and features such as speeds, spans, and price points—including inexpensive options such as VPN. He then covers switches (the devices that connect computers in your building) and routers (devices that control the transmission of network data). Along the way, Greg shows how to build private connections, implement free networking over the Internet, build switch networks, and overlay-routed networks. He'll also introduce different routing protocols, such as OPSF link-state routing and distance-vector routing with RIPv2, EIGRP, and BGP.
Note that this course maps to domains 1 and 2 of the Microsoft Technology Associate (MTA) Networking Fundamentals certification exam (98-366).
- Understanding the technology: from dial-up to VPNs
- Working with hubs, bridges, and switches
- Ensuring hardware redundancy
- Using switching types and MAC tables
- Preventing bridge loops with STP
- Routing with routing tables
- Using NAT
- Securing your switches and routers
- Setting up firewalls
- Working with different routing protocols: RIPv2, OSPF, EIGRP, and more