I. Understanding routing protocols
Routing protocol (Routing Protocol): Used for routers to dynamically find the best path on the network, ensuring that all routers have the same routing table. The general routing protocol determines the path of the packet's walk on the network. Examples of such protocols are OSPF, RIP, IGRP, EIGRP, and so on.
routable protocol (Routed Protocol): When all routers know the topology of the entire network, routable protocols can be used to send data. A generic routable protocol is assigned to an interface that determines how packets are delivered. Examples of this type are IP and IPX static routing.
Routing refers to sending 1 packets from 1 devices to another 1 devices on different networks, which are done by routers. Routers do not care about hosts, they only care about the state of the network and determine the best path in the network.
routers can route packets and must know at least the following conditions:
Static routing (static Routing)
Static routing refers to the connectivity provided to a remote network that is not directly connected to the router, and to provide end-to-end connectivity without using a routing protocol, static routes must be configured in two directions, and static routes are manually added by the administrator to the router's routing table.
The advantage is that there is no CPU burden on the extra routers, bandwidth savings, and increased security. The disadvantage is that the network administrator must understand the entire topology of the network, and if the network topology changes, the administrator will manually modify the routing table on all routers and not be suitable for use in large networks.
ii. configuration commands for static routes
IP route network [mask] [address|interface][distance] [Permanent]
Network: is the target or destination subnet.
Mask: Subnet mask.
Address: The router IP address of the next hop.
Interface: is the name of the interface used to reach the destination network.
Distance: is an optional parameter for specifying the administrative distance;
Permanent: is an optional parameter that specifies that the route will not be deleted, even if the interface is closed.
1. Static routing Topology
650) this.width=650; "title=" 01.jpg "alt=" wkiom1yfoccgbzzkaadnrh2a_ne386.jpg "src=" http://s3.51cto.com/wyfs02/M01/ 74/85/wkiom1yfoccgbzzkaadnrh2a_ne386.jpg "/>
2. Example
For example, a company's original 3 subsidiaries, respectively, Dongguan, Dongguan, Changan, India, Dongguan, Sha Tin as the headquarters, all network connectivity and can communicate normally. Now that the business needs to buy a small company to do office and access to the Headquarters network, the problem is that the office and the headquarters and outside the subsidiaries are unable to communicate (such as the network topology map).
3. Topology Table
650) this.width=650; "title=" 02.jpg "alt=" wkiom1yfozzzegaaaaf9gzmxfye641.jpg "src=" http://s3.51cto.com/wyfs02/M02/ 74/85/wkiom1yfozzzegaaaaf9gzmxfye641.jpg "/>
4. Analysis and Troubleshooting
because it is the new network node, there is no problem with the new network, and after the new problem. You can initially determine that there is no route out of the R4 router, let's look at its routing table:
R4#show IP route
CODES:C-connected, s-static, I-igrp, R-rip, M-mobile, B-BGP
D-EIGRP, Ex-eigrp External, O-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-is, L1-is-is level-1, L2-is-is level-2, ia-is-is Inter area
*-Candidate default, U-per-user static route, O-ODR
P-periodic downloaded static route
Gateway of last resort are not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.2.0.0/16 is directlyconnected, FASTETHERNET0/1
S 10.5.0.0/16 [1/0] via 10.2.0.2
S 10.6.0.0/16 [1/0] via 10.2.0.2
C 10.13.0.0/22 is directly connected, fastethernet0/0
if the red part already has a route to R2, R3, and there is a line connecting directly to the R1 LAN port, you can also ping the R4 by R1, R2, R3 all IP addresses (ping test below).
R4#ping 10.2.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to10.2.0.2, timeout is 2 seconds:
!!!!!
Success rate is percent (5/5), round-trip Min/avg/max = 0/0/1 ms
R4#ping 10.6.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to10.6.0.2, timeout is 2 seconds:
!!!!!
Success rate is percent (5/5), round-trip Min/avg/max = 1/1/2 ms
R4#ping 10.5.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to10.5.0.2, timeout is 2 seconds:
!!!!!
Success rate is percent (5/5), round-trip Min/avg/max = 1/5/20 ms
R4#ping 10.2.0.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to10.2.0.100, timeout is 2 seconds:
!!!!!
Success rate is percent (5/5), round-trip Min/avg/max = 0/3/15 ms
r4#
According to normal, the whole network should be normal, but here is a question is R1 know the office of the network segment exists? So let's take a look at its routing table as follows:
R1#show IP route
CODES:C-connected, s-static, I-igrp, R-rip, M-mobile, B-BGP
D-EIGRP, Ex-eigrp External, O-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-is, L1-is-is level-1, L2-is-is level-2, Ia-is-is Interarea
*-Candidate default, U-per-user static route, O-ODR
P-periodic downloaded static route
Gateway of last resort are not set
10.0.0.0/16is subnetted, 3 subnets
C 10.2.0.0is directly connected, fastethernet0/0
S 10.5.0.0 [1/0] via 192.168.10.2
S 10.6.0.0 [1/0] via 192.168.20.2
192.168.10.0/30is subnetted, 1 subnets
C 192.168.10.0is directly connected, serial0/0
192.168.20.0/30is subnetted, 1 subnets
C 192.168.20.0is directly connected, SERIAL0/1
r1#
From the R1 routing table we can see that there are also 2 static routes, respectively, to Dongguan Changan, India, but does not point to the R4 route, that is to say R4 do not know the existence of the Office, the following we will add a static route to see how?
R1 (config) #iproute 10.13.0.0 255.255.0.0 10.2.0.3
R1 (config) #end
r1#
%sys-5-config_i:configured from console by console
R1#show Iproute
Codes:c-connected, S-static, I-igrp, R-rip, M-mobile, B-BGP
D-EIGRP, Ex-eigrp External, O-OSPF, IA-OSPF Inter area
N1-OSPF NSSA External Type 1, N2-OSPF NSSA external type 2
E1-OSPF external Type 1, e2-ospfexternal type 2, E-EGP
I-is-is, L1-is-is level-1, L2-is-is level-2, ia-is-is Inter area
*-Candidate default, u-per-userstatic route, O-odr
P-periodic downloaded static route
Gateway Oflast Resort is not set
10.0.0.0/16 is subnetted, 4 subnets
C 10.2.0.0 is directly connected,fastethernet0/0
S 10.5.0.0[1/0] via 192.168.10.2
S 10.6.0.0[1/0] via 192.168.20.2
S 10.13.0.0 [1/0] via 10.2.0.3
192.168.10.0/30 is subnetted, 1 subnets
C 192.168.10.0 is directlyconnected, serial0/0
192.168.20.0/30 is subnetted, 1 subnets
C 192.168.20.0 is directlyconnected, SERIAL0/1
r1#ping10.13.0.2
Type escapesequence to abort.
Sending 5,100-byte ICMP Echos to 10.13.0.2, timeout is 2 seconds:
!!!!!
Successrate is percent (5/5), round-trip Min/avg/max = 0/0/1 ms
r1#ping10.13.0.100
Type escapesequence to abort.
Sending 5,100-byte ICMP Echos to 10.13.0.100, timeout is 2 seconds:
!!!!!
Successrate is percent (5/5), round-trip Min/avg/max = 0/0/1 ms
r1#
5. Summary
In this instance, we should think of two problems, one is the route forwarding, if a router does not know the existence of a network segment, it is natural that it cannot forward any packets. The second is the loop test, such as a ping command after the issue should have an out of the entry and a return of the entry to be counted to complete. Therefore, after solving these two problems, it is natural to solve the problems.
This article is from the "descendants of the Dragon" blog, please be sure to keep this source http://ytlong.blog.51cto.com/154153/1703354
Experimental design and one of the wrong static routes