Route Filtering for Advanced Static Routing (1)
1. Description 1. ip route command ip route [dest-network] [mask] {next-hop address | exit interface | ip-address]} [administrative distance] [permanent] dest -network: destination network mask: destination network subnet mask next-hop address: next hop IP address to destination network exit interface: Outbound interface to destination network administrative distance: Modify the static route management distance. By default, the Management Distance of static routes is 1. If you use exit interface instead of next-hop address, the management distance is 0. Permanent: If the interface is shut down or the router cannot communicate with the next hop, the route will be automatically deleted from the route table. You can use this parameter to ensure that the route entries remain in the routing table. 2. Use the difference between the next hop address and the outbound interface address: Suitable for MA/Multi-Channel Access (Ethernet, FR), used for P2P recursive table queries caused by P2P environments. Associated interface: Suitable for P2P/point-to-point (HDLC and PPP), which is used to generate a large number of ARP packets in the MA environment. Optimal Solution: configure the next hop address and the outbound interface at the same time. Ii. Use Static Routing to implement route filtering 1. Note that in a routing protocol, an interface is advertised to this Protocol to send and receive packets of this Protocol: all routes transmitted by the neighbors belong to the Protocol: the interface routes advertised to the Protocol, and the routes transmitted by the neighbors learned through these interfaces belong to the Protocol and are added to the route table. In the distance vector environment, you can use static routing to filter route entries. The link status environment is invalid. 2. Tutorial Topology 3. Objective To filter some routes using static routes in the RIP v2 protocol. Implement filtering of routes destined for 1.1.1.0/24 by R3. 4. configure a, enable RIP v2 on R1, R2, and R3, and enable direct connection to the network. R2, R3 view the route table and find that there is a route to 1.1.1.0/24 at this time. B. Run the filter configuration command "c" by configuring static routes in R2. Check the R2 and R3 route tables and find that the route to the 1.1.1.0/24 network disappears. D. Summary: Because the Management Distance of static routes is less than 120 of the Management Distance of RIP, the routing and table adding principle is based on the routing and table adding principle with a small management distance to the same destination network. Routes advertised through RIP are filtered by static routes.