Routing
Configuring and Verifying BGP
On the Internet, BGP should never be used to advertise a private network address
In very large organizations private addresses may be used in the BGP
The IP addresses used for BGP are normally registered, routable addresses which identify unique organizations
Once all of customer premise equipment is installed and t routing protocols configured, customer has both local and Internet connectivity. Now the customer is able to fully participate in other services the ISP may offer
When an ISP customer has its own registered IP address block, may want routes to some of its internal networks to be known on Internet. To use BGP to advertise an internal route, a network command is needed.
network [network address]
Identify ISP router that is the BGP neighbor with which the Customer Premise Equipment (CPE) router exchanges information
neighbor [IP Address] remote-as [AS number]
The first step in enabling BGP on a router is to configure the AS number
router bgp [AS number]
Sometimes an ISP may want router to be included in its autonomous system and to participate in BGP., so router must be configed to enable BGP
When an ISP puts a border router at a customer location, they usually configure it with a default static route to the ISP
Exterior Routing Protocols and ISP
It is important to be able to limit or even prohibit certain types of messages from going to or from an AS, for security reasons or to prevent overloading.
Flow of traffic between Autonomous Systems is carefully controlled.
Transit Traffic - Traffic that was generated outside that AS and can travel through internal AS network in route to be delivered to destinations outside AS. This is like through traffic on a street.
Many Autonomous Systems are not willing to carry transit traffic
Can cause routers to overload and fail, if those routers do not have the capacity to handle large amounts of traffic.
Local Traffic - Traffic carried within an AS that either originated in that same AS, or is intended to be delivered within that AS. This is like local traffic on a street.
Flow of messages in the internet = TRAFFIC. Two types of traffic:
EGP Povide method by which ISPs can set and enforce policies and local preferences so that traffic flow through ISP is efficient and none of the internal routes are overloaded with transit traffic
Regular route fails, then ISP sends an exterior protocol update message to advertise backup route instead
ISP advertises regular route to other Autonomous Systems.
ISPS provide backup routes and routers in case the regular route fails
EGP allow traffic to be routed across the Internet to remote destinations
EGP - Exterior Gateway Protocols
The most common exterior routing protocol on Internet today is Border Gateway Protocol (BGP)
Most current version of BGP is version 4 (BGP-4) in RFC 4271
95% of Autonomous Systems use BGP
Exterior routing protocols seek to find best path through Internet as a sequence of Autonomous Systems
Exterior routers exchange information about how to reach various networks using exterior protocols
Exterior routers are also called border gateways
EGP protocols run on the exterior routers, the routers that are located at the border of an AS
EGP serves as a translator for ensuring that external routing information gets successful interpreted inside each AS network
Each AS is managed by a different administration and may use different interior protocols, networks must use a protocol that can communicate between diverse systems.
Exterior gateway protocols are designed to exchange routing information between different Autonomous Systems
IGP - Interior Gateway Protocols
Examples of interior gateway protocols are RIP, EIGRP and OSPF
IGPs run on the interior routers, that is, the routers inside an organization and exchange individual routes
Purpose of an interior routing protocol is to find best path through internal network
Used to exchange routing information within an autonomous system or individual organization
Autonomous Systems (AS)
See "Packets routed across Internet in several steps"
A private AS number is required when connecting to multiple ISPs
Same ASN applies to all network devices within the AS routing domain
AS is administered by ISP and therefore not only includes its own netwk routes, but also manages routes to all business and other customer netwks that are connected to it
Most common example of an AS is the ISP
Each AS is identified by a unique AS number (ASN)
AS is a set of networks controlled by a single administrative authority using same internal routing policy throughou
Configure and Verify RIP
Uses router processor resources, which can affect network operation
Displays router activity in real time
Can be used to observe networks advertised in the routing updates as they are sent and received
Features of debug ip rip command:
show ip route command shows routing table, which verifies that routes received by RIP neighbors are installed in routing table
show ip protocols command verifies that RIP routing is configured, tcorrect interfaces are sending and receiving RIP updates, and router is advertising correct networks
One way to verify that routing is working properly is to ping devices on remote networks.
After configuring RIP -Compare running config with an accurate topology diagram to verify netwk numbers and interface IP addresses
Basic RIP configuration:
Router(config-router)#network [network-number]
Router (config-router)#version 2
Router(config)#router rip
On serial links, set clock rate on master router.
Assign an IP address and enable all the physical interfaces that will participate in routing.
Before configuring RIP:
Routing within an Organization
Efficiency - How much bandwidth does routng protocol take up while in steady state, and how much could it take up, when converging in response to a major netwk event?
Ease of configuration - How many commands will average config require? Is it possible to config several routers in your network with same config?
Ease of management - What information does protocol keep about itself? What show commands are available?
3 main criterias for choosing protocol:
For larger networks, EIGRP and OSPF are common
As organization grows , RIPv2 can be used. Easy to config in small networks . Netwk exceed 15 routers,=RIP no longer good choice.
Small networks with only one gateway to Internet can use static routes
OSPF - Open Shortest Path First (RFC 2328)
Routers send link state advertisements to each other when a change occurs
All routers update their topology databases accordingly, regenerate their SPF trees to find new shortest paths to each network, and update their routing tables with changed routes
Network topology changes, = routers affected by change send update LSAs to rest of the network.
Ex: A new neighbor is added, a link fails, or a link is restored
Provides route authentication
Supports VLSM and discontiguous subnets
Provides fast convergence
Sends routing updates only when topology changes; doesn't send periodic updates of entire routing table.
Uses SPF algorithm to calculate lowest cost to destination
Advantages of OSPF:
Link-State Routing
Each time a new LSA packet causes a change to link-state database; SPF recalculates best paths and updates routing table
When LSAs are received from other routers SPF algorithm analyzes information in database to construct SPF tree
Based on SPF tree, SPF algorithm then calculates shortest paths to other networks
SPF (Shortest Path First) algorithm - Calculation performed on database that results in SPF tree.
SPF tree is a map of network as seen from point of view of the router. Information in this tree is used to build the routing table
Topological database - Collection of information gathered from all LSAs received by router
Link-state advertisement (LSA) - Small packet of routing information that is sent between routers
LSAs describe state of interfaces (links) of a router, and other info like IP address of each link
Routing table - List of the known paths and interfaces
Link-state routing has following features:
Link-state routing algorithm maintains a full database of distant routers and how they interconnect
Routers useing distance vector routing algorithm have little information about distant networks and none about distant routers
EIGRP - Enhanced Interior Gateway Routing Protocol
EIGRP is ideal for larger, more complex networks up to 224 hops in size that require fast convergence
If no alternate route exists in topology table, EIGRP queries its neighbors to find a new path to destination
Topology table enablesa router running EIGRP to find best alternate path quickly when network change occurs
Calculate shortest path to a destination within a network and to install this route into routing table
Depends on routing algorithm called Diffused Update Algorithm (DUAL) to:
Builds topology table from each advertisements of its neighbors
Topology table contains all routes advertised by the neighbor routers
Neighbor table
Includes information like interface IP addresses, interface type, and bandwidth
Stores data about neighboring routers on directly connected local networks.
Unlike RIP, does not rely only on routing table in router to hold all information it needs to operate. EIGRP creates two additional database tables: the neighbor table and the topology table
Has maximum hop count of 224 hops
Combines next hop and metric features of distance vector protocols, with additional database and update features
Uses a variety of metrics to calculate cost of a route
Advantages of EIGRP:
Cisco proprietary enhanced distance vector routing protocol
Developed to address some limitations of other distance vector routing protocols such as RIP
Limitations include use of hop count metric and max netwk size of 15 hops
RIP - Routing Information Protocol (RFC 1058)
RIPv1 relies on classfull default subnet masks
Most imp. diff. btw RIPv1 and RIPv2 - RIPv2 can support classless routing, because it includes the subnet mask information in routing updates.
Converges slowly on larger networks, when network changes
Periodiclly sends complete copies of entire routng tble to directly conncted neighbors. In large netwk, this can cause signific. amt of netwk traffic for ea. updt
Allows a maximum of 15 hops - can only be used for networks that connect no more than 16 routers in series
Disadvantages of RIP:
RIP is simple, easy to implement, and available free of cost with most routers
After updating routing table, router immediately begins transmittng routng updtes to inform other netwk routers of the change
These "triggered updates" are sent independently of regularly scheduled updates that RIP routers forward.
Router uses local netwk address of directly connected router which sent update as next hop address
When router receives routing update = Hop count value is increased by one on each router
Sends routing table contents every 30 seconds, by default
Defines hop count greater than 15 as unreachable route
Uses hop count as metric for path selection
Distance Vector
Topology change updates proceed step-by-step by sending copies of routing tables from router to router.
Best path = Path with shortest distance or smallest metric.
Each router communicates routing information to its neighbors
As distance vector discovery process proceeds, routers discover the best path to destination networks based on information received from each neighbor
Each router receives a routing table from directly connected neighbor routers.
Each of network entries in the routing table has an accumulated distance vector to show how far away that network is in a given direction
Neighbor routers share a directly connected network
Interface leading to each directly connected network has a distance of 0
Vector - In what direction should packet be sent to reach this network?
Address of the next hop along the path to the network named in the route
Distance - How far away is network from this router?
Number of hops,Administrative cost,Bandwidth,Transmission speed,Likelihood of delays,Reliability
Sends periodic copies of a routing table from router to router/communicate topology changes
Routing Algorithm
For two routers to exchange routes, must be using same routing protocol and same routing algorithm
All routers in a netwk have updated their tables to reflect the new route = Routers converged
Topology of network changes due to reconfiguration or failure, routing tables in all routers must change to reflect accurate view of new topology
Two main classes: 1. Distance Vector 2. Link State
Method routing protocol uses to determine best route to destin netwk = routing algorithm
Dynamic routing protocol
Removes routes when they are no longer valid
Places best routes into routing table
Learns all available routes
Routing protocols
Can be configured to manage manually entered routes
Dynamically manage information received from own interfaces and other routers
Configuring Static Route
larger networks generally use dynamic routing rather than static routes
Router1(config) #ip route 192.168.16.0 255.255.255.0 192.168.15.1
Dynamically-Updated Routes (Dynamic Routes)
Subnet has only one router = that router automatically becomes default gateway
because all network traffic to and from that local network has no option but to travel through that router
Common for default routes to point to next router in path to ISP
Def. route = type of static rout specif gateway to use when ruting tble doesn't contain path to use to reach destina netwk
Static Routes
Ident. with prefix 'S'
Doesn't change until Admin manually reconfigs it
Admin manually configures static route to a specif. netwk
Directly Connected Routes
Ident. in routing tble with prefix 'C'
Automat. updtd when int is reconfiged or shutdwn
As interfaces beome opertionl = Routr stores directly attach loc. netwk addr's as connectd routs in routng tble
Routr powers up, configured interfaces are enabled
Router looks up subnet mask assigned to each potential route table
Applies each subnet mask to destination IP address in packet
No Router entries match= Routr directs message to gateway specif by default route if configured
Netwk addr match >1 rt.= Routr uses route w/specif or longst, netwk addr. match from table
Match is found = Packets forwarded out correct interface/ appropriate gateway
Resulting network address compared to network address of route in table
Dest. values in routing table = Destination network addresses
A router directs message to correct destination by
Looking for matching route in routing table
Looking at destination IP Address in packet
Must find out bits representing network address
Routing table makes decision where to send packets
4 main components of a route: Destination Value, Mask,Gateway or Interface Address, and Route cost or metric
Each route describes gateway or interface router needs to reach specific network
Contains set of routes