Static routing is a routing method in computer networking where network routes are manually configured by an administrator. Unlike dynamic routing, which relies on routing protocols to determine the best paths, static routes are fixed and predefined.
Key Features:
- Manual Configuration: The administrator manually defines the route to each destination.
- Simplicity: Useful in small, stable networks with limited complexity.
- Low Overhead: No additional resources are required for route calculations, as in dynamic protocols.
- Lack of Adaptability: Static routes do not automatically adjust to network changes, such as link failures.
Example Use:
In a simple network with two routers, you can configure a static route on one router to reach a subnet on the other router by specifying the next-hop IP address or the exit interface.
Static routing is often used in combination with dynamic routing in larger networks for specific purposes, such as managing traffic to a backup link or providing default routes.
configuration:
Router0 (R0):
GigabitEthernet0/0:
- IP Address:
192.168.1.1
- Subnet Mask:
255.255.255.0
- IP Address:
GigabitEthernet0/1:
- IP Address:
10.0.0.1
- Subnet Mask:
255.0.0.0
- IP Address:
Router1 (R1):
GigabitEthernet0/0:
- IP Address:
10.0.0.2
- Subnet Mask:
255.0.0.0
- IP Address:
GigabitEthernet0/1:
- IP Address:
11.0.0.1
- Subnet Mask:
255.0.0.0
- IP Address:
GigabitEthernet0/2:
- IP Address:
192.168.2.1
- Subnet Mask:
255.255.255.0
- IP Address:
Router2 (R2):
GigabitEthernet0/0:
- IP Address:
11.0.0.2
- Subnet Mask:
255.0.0.0
- IP Address:
GigabitEthernet0/1:
- IP Address:
192.168.3.1
- Subnet Mask:
255.255.255.0
- IP Address:
Switch Ports:
Switches are Layer 2 devices, so their ports don’t have IP addresses assigned unless configured with VLAN interfaces. However, they forward traffic to connected devices.
PCs:
PC0:
- IP Address:
192.168.1.2
- Subnet Mask:
255.255.255.0
- Default Gateway:
192.168.1.1
- IP Address:
PC1:
- IP Address:
192.168.1.3
- Subnet Mask:
255.255.255.0
- Default Gateway:
192.168.1.1
- IP Address:
PC2:
- IP Address:
192.168.2.2
- Subnet Mask:
255.255.255.0
- Default Gateway:
192.168.2.1
- IP Address:
PC3:
- IP Address:
192.168.2.3
- Subnet Mask:
255.255.255.0
- Default Gateway:
192.168.2.1
- IP Address:
PC4:
- IP Address:
192.168.3.2
- Subnet Mask:
255.255.255.0
- Default Gateway:
192.168.3.1
- IP Address:
PC5:
- IP Address:
192.168.3.3
- Subnet Mask:
255.255.255.0
- Default Gateway:
192.168.3.1
- IP Address:
This configuration ensures all devices are correctly assigned IPs and gateways for proper communication across the network.
Router0 Configuration:
Access Router0 in the configuration interface.
- Go to Config > Routing > Static.
Add static routes:
- To Network 192.168.2.0/24:
- Network:
192.168.2.0
- Mask:
255.255.255.0
- Next Hop:
10.0.0.2
- Network:
- To Network 192.168.3.0/24:
- Network:
192.168.3.0
- Mask:
255.255.255.0
- Next Hop:
10.0.0.2
- Network:
- To Network 11.0.0.0/8:
- Network:
11.0.0.0
- Mask:
255.0.0.0
- Next Hop:
10.0.0.2
Router1 Configuration:
Access Router1 in the configuration interface.
- Go to Config > Routing > Static.
Add static routes:
- To Network 192.168.1.0/24:
- Network:
192.168.1.0
- Mask:
255.255.255.0
- Next Hop:
10.0.0.1
- Network:
- To Network 192.168.3.0/24:
- Network:
192.168.3.0
- Mask:
255.255.255.0
- Next Hop:
11.0.0.2
Router2 Configuration:
Access Router2 in the configuration interface.
- Go to Config > Routing > Static.
Add static routes:
- To Network 192.168.2.0/24:
- Network:
192.168.2.0
- Mask:
255.255.255.0
- Next Hop:
11.0.0.1
- Network:
- To Network 192.168.1.0/24:
- Network:
192.168.1.0
- Mask:
255.255.255.0
- Next Hop:
11.0.0.1
- Network:
- To Network 10.0.0.0/8:
- Network:
10.0.0.0
- Mask:
255.0.0.0
- Next Hop:
11.0.0.1
Verification:
Ping each network:
- From a PC in
192.168.1.0/24
, ping a PC in192.168.2.0/24
and192.168.3.0/24
to verify connectivity. - Similarly, test communication from PCs in other subnets.
Troubleshoot if needed:
- Check IP addresses and subnet masks.
- Verify static route entries in each router.
0 Comments