mardi 13 novembre 2012

IP Routing

1. Routing Basics:

- static routing: the administrator must hand-type all network locations into the routing table;
- dynamic routing: a protocol on one router communicates with the same protocol running on neighbor routers. The routers then update each other about all the network they know about.
The command 'show ip route' display the routing table content.
In the command's output, the 'C' means that the networks listed are 'directly connected', and until adding a routing protocol (RIP, EIGRP, ...), we'll have only directed connected networks.

1.1. The IP Routing Process:

The command 'show ip arp' display the ARP cache, in the output, the dash (-) means that this is the physical interface on the router. Cisco routers will keep an entry in the ARP table for 4 hours.
"When a ping fail, most administrator think the packet never reached the destination host. Taht's not always the case, all it takes is for just one of the remote routers to be lacking a route back to the originating host's network and the packet is dropped on the return trip, not on its way to teh host".
If a packet is lost on the way back to the originating host, you'll get a "request time out" message because it is an unknown error. If the error occurs because of a known issue, such as if a route is not in the routing table on the way to the destination device, you will see a destination unreachable message.
Hardware addresses are always local, and they never pass a router's interface.

1.2. Testing Your IP routing Undestanding

In figure 6.7 (p 380), the Lab_A router has received the packet and will send it out Fa0/0 onto LAN toward the server. The source MAC address will be the Lab_A router's  Fa0/0 interface, and the destination will be the Sales server's MAC address. (All MAC addresses must be local on the LAN).
Host 4 is displaying two web documents from the Sales server in two different browser windows at the same time. TCP port numbers are used to direct the data to the correct application window.

1.3. Configuring IP Routing: (p 382)
steps to configure a router: erase startup-config, then reload, hostname, secret password, motd banner, interfaces (ip address, description, no shutdown, [rate clock, exec-timeout]), console, aux and telnet passwords, save a backup of the running config.
special configuration of a wireless interface, SSID is the Service Set IDentifier that creates a wireless network that hosts can connect to. The interface is a routed one, which is the reason why the IP address is placed under the physical interface--typically the IP address would be placed under he management VLAN or Bridge-Group Virtual Interface (BVI).
- The 'guest-mode' line means that the interface will broadcast the SSID so wireless hosts can connect to this interface.
- The 'Authentification open' means no authentification.
- The 'infrastructure-ssid' indicates that this interface can be used to communicate to other access points or other devices on the infrastructure.
Then, we need to configure the DHCP pool for the wireless clients:
- create the pool name 'ip dhcp pool Admin'.
- annd the network/subnet and gateway 'network 10.1.8.0 255.255.255.0', 'default-router 10.1.8.1'.
- exclude addresses you don't want handed out (like default gateway) 'ip dhcp excluded-address @'.

2. Configuring IP Routing in Our Network (p 403)

2.1. Static Routing:

It occurs when you manually add routes in each router's routing table.
ip route [destination_network] [mask] [next-hop_address or exitinterface] [administrative_distance] [perment].
- permanet: If the interface is shut down or the router can't communicate to the next-hop router, the route will automatically be discarded from the routing table. With this option you keep the entry in the routing table no matter what happens.

2.1.1. Corp

Each routing table automatically includes directly connected networks. To be able to route to all networks within the internetwork, the routing table must include information that describes where these networks are locaed and how to get them.

If you have two link between two routers, give to one a higher administrative-distance value, to make it a backup route if the other link fails. Static routing can't handle multiple links to the same destination. On the routing table, the route with the lower AD will be displayed only if the currently used link fails.
If you use exit interface instead of next-hop, you'll see the static routes as directly connected. And you don't need the "permanent" option.
To use default routing: ip route 0.0.0.0 0.0.0.0 10.1.11.1
                                ip classless
2.2. Default Routing: (p 415)
To create a default route, type:
      ip route 0.0.0.0 0.0.0.0 [next_hop or exit_interface]
      ip classless
If you show up the routing table, you'll see an S* which indicates that it's a candidate default route.
the command "ip default-network [next_hop]" can be used to define a default gateway.

3. Dynamic Routing (p 418)
Dynamic routing is when protocols are used to find networks and update routing tables. A routing protocol defines the set of rules used by a router when it commmunicates routing information between neighbor routers.

3.1. Routing Protocol Basics

3.1.1. Administrative Distances

The AD is used to rate the trustworthiness of routing information received on a router from a neighbor router. It is an integer from 0 (most trusted) to 255(means no traffioic will be passed via this route). If a router receives two updates listing the same remote network, the router checks the AD and choose the one with the lowest value to put in the routing table.
The following table show the default administrative distances used by a Cisco router.
Route Source            Default AD
Connected interface        0
Static route                     1
EIGRP                            90
IGRP                              100
OSPF                             110
RIP                                 120
External EIGRP             170
Unknown                       255 (this route will never be used)

3.1.2. Routing Protocols

- Distance vector: The route with the least number of hops to the network is determined to be the best route. Both RIP and IGRP are distance-vector routing protocols. They send the entire routing table to directly connected neighbors.
- Link state: alos called shortest-path-first protocols, each router create three tables, one keeps track to directly attached neighbors, one determine the topology of the entire internetwork, and one as the routing table. OPSF is completely link state.
- Hybrid: Those ones use aspects of bith type, like EIGRP.

4. Distance-Vector Routing Protocols (p 420)
The distance-vector routing algorithm passes complete routing table contents to neighboring routers. In case of having multiple links to the same network, the Administrative Distance is checked first. If the AD is same, the protocol will have to use other metrics to determine the best path.
RIP uses only hop count to determine the best path to a network. If more than one link exist for a remote network, RIP would consider them equal in term of cost. This little snag is called "pinhole congestion".

4.1. Routing Loops (p 421)
If a network ourtage happens, plus the slow convergence of distance-vector routing protocols can result in inconsistent routing tables and routing loops. Routings loops can occur because every router isn't updated simultaneously, or even close to it.

4.2. Maximum Hop Count:

The previous problem is called "counting to infinity", by defining a "maximum hop count" will allow solving that problem. RIP permits a hop count of up 15, anything that requires 16 hops is deemed unreachable and make the routing entries invalid.

4.3. Split Horizon:

The routing protocols differentiate which interface a network route was learned on, and once this is determined, it won't advertise the route back out that same interface.

4.4. Route Poisoning

When a network goes down, the directly attached router (router A) initiates route poisoning by advertising or unreachable (sometimes referred to as infinite). This poisoning of the route keeps the router B from being susceptible to incorrect updates about the route to network. When router B receives a route poisoning from RouterA, it sends an update, called a "poison revers" back to RouterA. This ensures that all routes on the segment have received the poisoned route information.

4.5. Holddowns

It prevents regular update messages from reinstating a route that is going up and down (called flapping). It prevents routes from changing too rapidly by allowing time for either the downed route to come back up or the network to stabilize somewhat before changing to the next best route. This also tell routers to restrict, for a specific time period, changes that might affect recently removed routes.

5. Routing Information Protocol (RIP) (page 424)
RIP sends hte complete routing table out to all active interfaces every 30s. RIP works well with small network. RIPv1 is classful (doesn't send subnet mask related information) instead of RIPv2 which is classless, it provides something called prefix routing and send subnet mask related information.

5.1. RIP Timers

- Route update timer: sets the interval between periodic routing updates.
- Route invalid timer: Determines the time that must elapse (180s) without receiving route updates to deemed that a route has become invalid.
- Holddown timer: Sets the amount of time during which routing information is suppressed. Routes will enter into holddown state when an update packet is received that indicated the route is unreachable. this continues either until an update packet is received with a better metric or until the holddown timer expires.
- Route flush timer: Sets the time between a route becoming invalid and its removal from the routing table.

5.2. Configuring RIP Routing

To configure RIP routing, use "router rip" and tell the RIP routing protocol which networks to advertise "netword remote_network".

5.3. Verifying the RIP Routing Tables (p 428)
5.4. Configuring RIP Routing Example 2

5.5. Holding Down RIP Propagations

The "passive-interface" command prevents RIP updates from being sent out a specified interface, yet that same interface can still receive RIP updates.

5.6. RIP Version 2 (RIPv2)

RIPv2, unlike RIPv1, is a classless routing protocol, it can support Variable Length Subnet Masks (VLSMs) as well as the summarization of network boundaries. It can support discontiguous networking.
example:
router rip
network 192.168.40.0
network 192.168.50.0
version 2
6. Interior Gateway Routing Protocol (IGRP) p 433
The main difference between RIP and IGRP is that when configuring IGRP, you supply the autonomous system number. All routers must use the same number in order to share routing table information.
IGRP is no longer supported in CISCO routers, use instead EIGRP.
7. Verifying Your Configurations (p 434)
The following commands can be used to verify the routed and routing protocols configured on CISCO routers:
- show ip route
- show ip protocols
- debug ip rip

7.1. The show ip protocols Command

This command shows you the routing protocols that are configured on the router.
- Troubleshooting with the show ip protocols Command
use command "show ip protocol" and "show ip interface brief" to see which interfaces are in a specific network.

7.2. The debug ip rip Command:

This command display, at the session console, the routing updates as they are sent and received. If you're telnetted to a router you've to use the terminal monitor command to view the debug output.

Aucun commentaire:

Enregistrer un commentaire