[Routing and switching technology] Cisco Packet Tracer configures static routing

Topology

insert image description here

Configure IP

PC0:192.168.1.1/24
PC1:192.168.4.1/24
PC2:192.168.4.2/24

Router0:
Fa0/0:192.168.1.254/24
Fa0/1:192.168.2.1/24

Router1:
Fa0/0:192.168.2.2/24
Fa0/1:192.168.3.1/24

Router2:
Fa0/0: 192.168.3.2/24
Fa0/1: 192.168.4.254/24
For the full version, go to: [Routing and Switching Technology] Cisco Packet Tracer Basic Tutorial (2)

Directly connected network segment and non-directly connected network segment

What are the directly connected network segment and the non-directly connected network segment of the router?
As the name implies, the network segment next to the router is the directly connected network segment, and the network segment that is not directly adjacent to each other and is separated by something in the middle is called the non-directly connected network segment.
Take Router1 as an example:
insert image description here

Configure static routing

Static routing configuration is cumbersome, and the scope of application is small.
Each router needs to configure its non-directly connected network segment
Syntax:
ip router non-directly connected network segment subnet mask next hop address
Take router1 as an example:
it The non-directly connected network segment is 192.168.1.0/24 and 192.168.4.0/24. The
next hop address is the first port that the router passes through when it leads to the non-directly connected network segment you set.
It can be understood as going to The first station that the destination bus passes through.
For example, Router1 goes to the 192.168.1.0/24 network segment:
insert image description here
the IP address of f0/1 is its next-hop address.
The command is: (in global configuration mode) ip route 192.168.1.0 255.255.255.0 192.168.2.1
The complete process is as follows
Router0:
insert image description here

Router1: insert image description here
Router2:
insert image description here
You can wait for a while after the configuration, enter show ip route (sh ip ro) in the privileged mode to view the routing table
insert image description here
C is the directly connected network segment
S is the static route configured for us,
now you can access devices in different network segments (Ping once failed
insert image description here
, you can try to ping again)

Articles in the same series

Basic Getting Started Tutorial

[Routing and switching technology] Cisco Packet Tracer basic tutorial (1)
[Routing and switching technology] Cisco Packet Tracer basic tutorial (2)
[Routing and switching technology] Cisco Packet Tracer basic tutorial (3)

Specific function articles

Three Command Modes for Cisco Packet Tracer Configuration Operation
Cisco Packet Tracer How to Build a Topology and Connect (Basic)
Cisco Packet Tracer Configuration Dynamic Routing (RIP, OSPF, EIGRP)
Cisco Packet Tracer Switch VLAN Configuration
Cisco Packet Tracer Router Subinterface


My ability is limited, insufficient, please point out the mistakes, if you
have any questions, please leave a comment

Guess you like

Origin blog.csdn.net/m0_68681879/article/details/129278347