650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/CA/wKiom1WH02HhgynOAAD56vtzNwg484.jpg "title=" topology. jpg "alt=" Wkiom1wh02hhgynoaad56vtznwg484.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/C6/wKioL1WH1kLAdtH2AADBN_K92c8207.jpg "title=" Ping12.12.12.1.jpg "alt=" Wkiol1wh1kladth2aadbn_k92c8207.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/CA/wKiom1WH1IziBA86AADF7p9563Y351.jpg "style=" float: none; "title=" ping12.12.12.2.jpg "alt=" Wkiom1wh1iziba86aadf7p9563y351.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/C6/wKioL1WH1u3BgT8tAADl57q7ex0867.jpg "title=" R3 routing table. jpg "alt=" wkiol1wh1u3bgt8taadl57q7ex0867.jpg "/>
<1> Router is a 3-layer device, able to unpack the packet to see the IP header information of the 3-layer package, naturally know the source IP address, destination IP address;
<2> Read Packe's dest IP address, query its own routing table, make decisions Whether they can reach the destination address, the ability to forward, and vice versa;
<3> If there are multiple routes that reach dest, the rule is based on the longest mask matching
Now R3 not go to 12.12.12.0/24 the network segment of the route entry, had to discard the received packet.
<1> Static Routing : Specifies the specific processing method to go to a particular network segment (Specific processing means: from which interface to forward, from the next hop forward, etc.);
<2> default route: In this case, first anza by the table, no query to the time not discarded, unified to the default route specified processing mode processing;
<3> Dynamic routing: Learning from the dynamic routing protocol to route entries is added to the routing table, which is forwarded according to the check table.
<1> Association Interface----> This interface is associated with the interface of the local router and forwards the packet from that interface in the future
<2> Associate Next hop (the next hop)-----> interface IP with your own direct link
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/CA/wKiom1WH2R-hs96aAACJxptvSkc252.jpg "title=" Qq20150622174155.jpg "style=" Float:none; "alt=" wkiom1wh2r-hs96aaacjxptvskc252.jpg "/>
2 ways to set up after viewing the route table display is different, the associated interface is directly connected association next hop is via
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/C7/wKioL1WH2tfShIhPAABEgsuJ4MI148.jpg "style=" float: none; "title=" qq20150622174220.jpg "alt=" Wkiol1wh2tfshihpaabegsuj4mi148.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/CA/wKiom1WH2SCgZmOPAAAqn7mgL8E666.jpg "style=" float: none; "title=" qq20150622174301.jpg "alt=" Wkiom1wh2scgzmopaaaqn7mgl8e666.jpg "/>
Each of these 2 ways is unique:
<1> if the interface is connected, if the R3 FA0/1 interface is down then the route fails, which is not to be seen, usually applicable to point -to-dot networks;
<2> if associated next hop, will do 2 parse , the first is how to get to the next hop, followed by forwarding the packet from the next hop. So even if the interface is down, the router can continue to forward the message from the backup link (redundant) or other path (except possibly increased path overhead), while the static route is still valid; Span style= "line-height:0px;" > generally applies to broadcast network environment
<3> but the association next hop also has the disadvantage, if the R3 and the R2 direct topology has changed, but at this time the static route has not changed, may appear the association next hop cannot arrive the situation, thus mistakenly drops the packet.
added : Simple explanation of why the associated interface is suitable for peer-to-peer and associated next hop for MA Networks
In the peer network, the correlation interface and the next hop effect is the same, because the peer is unique, when forwarding the packet, only need one ARP request;
In the MA network, the associated interface, each forwarding packet will trigger an ARP request, both wasting bandwidth traffic, but also caused load on the buffer;
Associated with the next hop, only the first time the packet is forwarded to trigger an ARP request, in the future do not have to trigger a good mechanism!
The third Way of configuration
<3> correlation interface and Next hop (double insurance)
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/C7/wKioL1WH6PyxAUqeAABPaApwvOU922.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiol1wh6pyxauqeaabpaapwvou922.jpg "/>
Now look at the routing table below
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/CA/wKiom1WH50XhGFMXAABH3SKExrE073.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiom1wh50xhgfmxaabh3skexre073.jpg "/>
This approach is more comprehensive, which facilitates routing lookups while reducing the load on the ARP cache table.
After R3 successfully specified a static route to 12.12.12.0, let's ping it and compare it with the previous
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/C7/wKioL1WH7E_gxn__AAGOnpP8Mw0826.jpg "title=" 5.png " alt= "Wkiol1wh7e_gxn__aagonpp8mw0826.jpg"/>
Why can I ping the. 1 and still ping does not pass. 2? Let's debug and check.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/CB/wKiom1WH60yDznQYAADna_4FT_U732.jpg "style=" float: none; "title=" 62.jpg "alt=" Wkiom1wh60ydznqyaadna_4ft_u732.jpg "/>
The package was successfully reached on the R1 but why did the ping fail?
Analysis process: Ping packet on R3 DEST IP address=12.12.12.1 is reached 12.12.12.0/24 network segment, Query R3 routing table discovery needs static route forwarding, when packet successfully reached R2, R2 queried its own routing table
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/CB/wKiom1WH7HLxrYvcAACTPnFdDlA193.jpg "title=" Zczxc.jpg "alt=" wkiom1wh7hlxryvcaactpnfddla193.jpg "/> found to 12.12.12.1 by the interface fa0/0 go out to R1, and then we look at the R1 routing table
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/C7/wKioL1WH7QTyXz0CAADSmQOlFtM497.jpg "title=" 555. JPG "style=" float:none; "alt=" wkiol1wh7qtyxz0caadsmqolftm497.jpg "/>ping package successfully reached R1, but R1 has no route to 23.23.23.0/24 network segment, So the ping does not pass
And the reason to be able to ping successfully 12.12.12.2 because. 2 interface is the interface of R2 itself R2 has a route to 23.23.23.0/24 so can! Static routes should also be added on the R1. This is also one of the common mistakes!
This article is from the "Blue Warehouse" blog, be sure to keep this source http://bluebox.blog.51cto.com/8852456/1664194
Static routing small Feature configuration