Static route settings and related commands

Source: Internet
Author: User

This section mainly uses experiments on static routing settings to help readers deeply understand the concept of routing, and Master Common commands such as static routing settings, viewing route tables, and setting up classless routes.

1. Tutorial Purpose

Through this experiment, you can master the following skills:
Set static routes
Set to enable the router routing function
View route table
Use of ping and trace commands

2. device requirements

Three Cisco routers, one of which has two Ethernet interfaces, and the other two have at least one Ethernet interface;
Two hubs and four twisted pair wires (you can also use two crossover cables to directly connect the three routers)
One Terminal Server, such as the cisco 2509 router, and the corresponding cable used for reverse Telnet;
One PC with Super Terminal Program, as well as the Console cable and adapter.

3. topology and Configuration

The topology of this experiment is 4-2.

The three routers are named R1, R2, and R3 respectively. The interfaces used and the corresponding IP addresses are marked in section 4.2. The "/24" in the figure indicates that the subnet mask is 24 bits, that is, 255.255.255.0.
Static Routing settings should be used in the experiment. To achieve the connectivity between R2 and R3 on the IP layer, that is, ping from R2 to R3 is required, and vice versa.

4. Experiment configuration and monitoring results

First, configure the Ethernet interfaces of each vro according to the requirements of the topology.
The following experiment records start from the interface configuration. For details, see configuration list 4-1.

Configuration list 4-1 configure and Monitor static routes

Section 1st: Test basic connectivity
Term_Server #1
[Resuming connection I to R1...]
R1 # ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 MS
Ripping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 4/4/4 MS
R1 #
(Type ctrl + shift + 6, x, and switch back to the terminal server)
Term_Server #2
[Resuming connection 2 to R2...]
R2 # ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
.....
R2 # sh ip route
Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP
D-VPN, EX-VPN external, 0-OSPF, IA-OSPF inter area
N1-ospf nssa external type 1, N2-ospf nssa external type 2
E1-OSPF external type 1, E2-OSPF external type 2, E-EGP
I-IS, L1-IS level-1, L2-IS level-2, ia-IS inter area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route
Gateway of last resort is not set
Section 2nd: Add a static route and test connectivity
R2 # conft
Enter configuration commands, one per line. End with CNTL/Z,
R2 (config) # ip route 172.16.1.0 255.255.255.0 10.1.1.1
R2 (config) # end
R2 # sh ip route
Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP
D-VPN, EX-VPN external, 0-OSPF, IA-OSPF inter area
N1-ospf nssa external type 1, N2-ospf nssa external type 2
E1-OSPF external type 1, E2-OSPF external type 2, E-EGP
I-IS, L1-IS level-1, L2-IS level-2, ia-IS inter area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route
Gateway of last resort is not set
 
172.16.0.0/24 is subnetted, 1 subnets
S 172.16.1.0 [1/0] via 10.1.0.1
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, EthernetO
R2 # ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
HW
R2 # ping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos 10172.16.1.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R2 #
(Type ctrl + shift + 6, x, and switch back to the terminal server)
Term_Server #3
[Resuming connection 3 to R3...]
R3 # conft
Enter configuration commands, one per line. End with CNTL/Z.
R3 (config) # ip route 10.1.1.0 255.255.255.0 172.16.1.1
R3 (config) # ^ Z
R3 # ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/8 MS
R3 #
R3 # sh ip route
Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP
D-VPN, EX-VPN externa1, 0-OSPF, IA-OSPF inter area
N1-ospf nssa external type 1, N2-ospf nssa external type 2
E1-OSPF external type 1, E2-OSPF external type 2, E-EGP
I-IS, LI-IS level-1, L2-IS level-2, ia-IS inter area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C172.16.1.0 is directly connected, EthernetO
10.0.0.0/24 is subnetted, 1 subnets
S10.1.1.0 [1/0] via 172.16.1.1
.
R3 #
Term_Server #1
[Resuming connection I to R1...]
R1 # sh ip route
Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP
D-VPN, EX-VPN external, 0-OSPF, IA-OSPF inter area
N1-ospf nssa external type 1, N2-ospf nssa external type 2
E1-OSPF external type 1, E2-OSPF external type 2, E-EGP
I-IS, LI-IS level-1, L2-IS level-2, ia-IS inter area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C172.16.1.0 is directly connected Ethernet0
10.0.0.0/24 is subnetted, 1 subnets
C10.1.1.0 is directly connected Ethernet0
R1 #
(Type ctrl + shift + 6, and switch x back to the terminal server)
Term_Server #2
[Resuming connection 2 to R2...]
R2 # sh ip route
Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP
D-VPN, EX-VPN external, 0-OSPF, IA-OSPF inter area
N1-ospf nssa external type 1, N2-ospf nssa external type 2
E1-OSPF external type 1, E2-OSPF external type 2, E-EGP
I-IS, LI-IS level-1, L2-IS level-2, ia-IS inter area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route
Gateway of last resort is not set
S 172.16.0.0/24 is subnetted, 1 subnets
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Ethernet0
R2 #
(Type ctrl + shift + 6, and switch x back to the terminal server)
Section 3rd: Use the trace command
Term_Server #3
[Resuming connection 3 to R3...]
R3 # trace 10.1.1.2
Type escape sequence to abort.
Tracing the route to 10.1.1.2
1 172.16.1.14msec 4 msec 4 msec

Related Articles]

  • Vro static route configuration command
  • Static routes are then published to OSPF.
  • Solution to loop problems caused by multicast Static Routing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.