Static Routing IP routing __

1. Static routing advantages and disadvantages:

  Pros: For the router's CPU no administrative overhead, which means that if you do not use dynamic routing, you should probably buy cheaper router.

  No bandwidth between routers, it means that the WAN link You can save even more money.

  Cons: The administrator must truly understand the configuration of the Internet, as well as how each router is properly connected to properly configure these routes.

  If a network is added to the network, the administrator must add to its routing (manually) on all routers. For large networks, it almost is not feasible, because then the static route will lead to a huge amount of work.

2.ip route 10.1.6.0 255.255.255.0 10.1.2.2 150

  ip route 10.1.6.0 255.255.255.0 10.1.3.2 151

  For the network 10.1.6.0 and 10.l.7.0, I placed two paths leading to each network, but I let one of the links have a higher (151) AD. Thus, when the failure of another link. It is an alternative route.

  If I let both of them have the same AD, we will end up with a routing loop (static routes can not handle multiple links with the same distance).

  Note: The route with a higher administrative distance will not appear in the routing table, routing unless with a lower administrative distance away.

  You must not create a static route directly connected to any network, and since between the router R1 and the Corp only two links, can be used by only the next hop address 10.1.2.1 10.1.3.1 or two. I will change the next hop between the two, so that all the data will not only along a transmission link.

  Static routing, load balancing can not be achieved, the use of which link is not important. When you can use, such as dynamic routing RIP, EIGRP and OSPF and the like, we can use load balancing, but now, these links will only be able to provide backup routes for each network.

3. Default Route: data may be forwarded using the default route that the distal end of the destination network is not listed in the routing table packet to the next hop router. You can use the default route only on the stub network, because only one output connection between the network and the outside world.

  Be careful routing loop when using the default route.

  Default route is considered a wild card instead of using static routing network and subnet mask information.

4.ip classes: Because all Cisco routers are all class router, which means on each interface of the router they believe that the use of a default subnet mask. When the router receives a packet destination subnet is not in the routing table, the default, it will drop the packet.

  Therefore, if you use the default route, you must use classless command because the routing table does not contain a letter of acute distal subnet.

  Because IOS version on my router used to 12.x, therefore ip classless command when the default is set. If you want to use the default routing and router (this is not used) configuration does not use this command, you need to add this command. Here is the command to use:

  871W(config)#ip classless

  Note that this is a global command mode. Interestingly, for the command ip classless, sometimes without it, the default route can also work, but sometimes it can not. But for insurance reasons, when using the default route, you should always use the ip classless command.

The final command to configure the gateway, ip default network

  There are three gateways may be used to add a final point on the ISP gateway router commands (all commands can achieve the same result).

  Gateway(config)#ip route 0.0.0.0 0.0.0.0 217.124.6.1

  Gateway(config)#ip route 0.0.0.0 0.0.0.0 s0/0

  Gateway(config)#ip default-network 217.124.6.0

  As I said above, all three commands can achieve the same purpose, that is the ultimate gateway configuration, but there are some small differences between them. First, use the exit interface solutions than the other two high priority, because it's AD is 0. For the ip default-network command,

  When the router is configured to use the IGP (such as RIP), the IGP advertises the default gateway information. In this way, the other routers in the network will automatically receive this route and set as their default route.

  If an error is configured with a default route, what happens?

  Gateway of last resort is 172.19.22.2 to network 0.0.0.0

  C 172.17.22.0 is directly connected, FastEthernet0/0

  C 172.18.22.0 is directly connected, Serial0/0

  S * 0.0.0.0/0 [1/0] via 172.19.22.2

  See FIGS network through a router and routing tables directly connected, WAN network connections is 172.18.22.0, the default route to forward all packets to 172.19.22.0 network. This is wrong, the network will not work properly, so the problem here is the misconfigured default route.

  problem:

  If your routing table output is as follows, when a router receives from 10.1.6.100 and destination of the packet is 10.1.8.5, what will happen?

  Corp#sh ip route

  [output cut]

  Gateway of last resort is 10.1.5.5 to network 0.0.0.0

  R 10.1.3.0 [120/1] via 101.2.2, 00:00:00, Serial 0/0

  C 10.1.2.0 is directly connected, Serial0/0

  C 10.1.5.0 is directly connected, Serial0/1

  C 10.1.6.0 is directly connected, Fastethernet0/0

  R* 0.0.0.0/0 [120/0] via 10.1.5.5, 00:00:00 Serial 0/1

  This is a slightly different issue I mentioned earlier, because the default route is classified as R *, that is, that it is introduced by a RIP routing. This is because someone is configured with ip default-network command on a single remote router and configure the RIP, and the RIP will advertise the route to this network via the default route.

  Here, because the destination address is 10.1.8.5, and not to the routing table and routing of 10.1.8.0, the router will use the default route, the packet will be sent Serial 0/1 interface.

  Note: [120/1] in "120" represents a route from Management (AD), "1" indicates the number of hops reaches the remote network

 

Guess you like

Origin www.cnblogs.com/xinghen1216/p/11103207.html