OSPF
Init hello
Two way state – all ospf config match
LB database list exchange
DD packet, ospf description,
BDR copy DR routing so it can take over
LSU is the packet and LSA is the structure LSDB take in
Issue with large OSPF design
- Too much CPU to run SPF algorith in topology
- Requires more meomry in ram
- A single interface status change, anyhwere in the internetwork forces every router to run spf again.
Advantage of Area design
- Smaller per area LSDB requires less memory.
- Routers require fewer CPU cycles to process the smaller per area LSDB with the SPF algorithm, reducing CPU overhead and improving convergence time.
- Changes in the network ( for example links failing and recovering) require SPF calculation only on routers connected to the area where the link changed state, reducing the number of routers that must rerun SPF.
- Less information must be advertised between areas, reducing the bandwidth required to send LSAs.
Term | Description |
Area Border Router | An OSPF router with interfaces cconnected to the backbone area and to at least one other area |
Backbone router | A router connected to the backbone are (includes ABRs) |
Internal router | A router in one area (not the backbone area) |
Area | A set of routers and links that shares the same detailed LSDB information, but not with routers in other areas, for better efficincy |
Backbone area | A special OSPF area to which all other areas must connect — area 0 |
Interarea route | A route to a subnet in an area of which the router iss not a par |
Ospf config
Router ospf 1 (process-id can be 1-65535)
Router-id 1.1.1.1 ( staticlly configure router-id or loopback with highest numeric ip address, or other highest ip address from other interface)
Network 10.0.0.0 0.255.255.255 area 0
Interface S0/0/0
Ip address 10.1.1.1 255.255.255.0
Show ip ospf neighbor- neighbor id, state, address, interface
Show ip ospf database – area, neighbor link id, age,
Show ip ospf interface- passive interface
Show ip ospf interfaces brief – ospf enabled interface, ip, area, cost, state
Show ip route – ospf routes in O
Show ip protocol – routing protocol, routing id, routing network, neighbor router
Passive-interface <interface >
- Quit sedding OSPF hellos on the itnerface
- Ignor receiving hellow in the interface
- Do not form neighbor relationship over the interface
Default route
Default-information originate
Default-information originate always
Cost
Interface | Interface Default Bandwidth | Formula | OSPF Cost |
Serial | 1544 Kbps | 100,000/1544 | 64 |
Ethernet | 10,000 Kbps | 100,000/100,000 | 10 |
Fast Ethernet | 100,000Kbps | 100,000/100,000 | 1 |
Auto-cost reference-bandwidth <mbps>
Load Balancing
-
Maximum-paths <number>
- Under router ospf , Max hop to destination
Interface configuration
- No network <netowrk id> area <area id>
-
Ip ospf <process-id> area <area id>
- On to the interface
Hello message every 10 seconds
OSPF ipv6
-
OSPF2 vs OSPF3
-
Similarity
- Both are link-state protocol
- Both use the same area design concepts and design terms
- Both reuire that the routing protocol be enabled on an interface.
- Once enabled on an interface, both then attempt to discover neighbors connecteed to the data link connected to an interface.
- Both perform a check of certain setting before rouers become neighbors
- After two router becom neighbors, both OSPFv2 and 3 proceed by exchanging the contents of their LSDB – the LSA and describe the network topology, between the two neighbors.
- After all the LSAs have been exchanged, both OSPFv2 and v3 use the shortest path first (SPF) algorithm to calculate the best route to each subnet.
- Both use the same metric concept, based on the interface cost of each interface, with the same default cost values.
- Both use LSAs to describe the topology, with some differences in how LSAs work.
-
-
Configure
-
Int gi 0/0
- Ipv6 address xxxxx
- Ipv6 ospf 2 area 23
- # Ipv6 ospf cost x
- # bandwidth [speed]
- # Auto-cost reference-bandwidth
- # maximum-paths [number]
-
Int s0
- Ipv6 ospf 2 area 23
- Ipv6 address xxxx
-
Ipv6 router ospf 2
- Router-id 2.2.2.2
- # passive-interface gi0/1
- Default-information originate (advertise default route)
-
- Troubleshoot
Config | Show running-config | |||
Enabled interfaces
Must pass any neighbor authentication Hello and dead timers must match. Must be in the same area. Interface can not be passive |
Show ipv6 protocols
Show ipv6 ospf interface Show ipv6 ospf interface <type number> Show ipv6 ospf interface brief |
|||
Discover with hello
Neighbors Router id must be unique |
Show ipv6 ospf neighbor
Show ipv6 ospf neighbor <type number> Debug ipv6 ospf adj |
|||
Flood LSAs
LSDB |
Show ipv6 ospf database | |||
SPF Calculation | Show ipv6 route
Show ipv6 route ospf Show ipv6 route <ipv6> Show ipv6 route | section <subnet> |
|||
Requirement | OSPFv2 | OSPFv3 | ||
Interfaes must be in an up/up state | Yes | Yes | ||
Interfaces must be in the same subnet | Yes | No | ||
ACLs must not filter routing protocol messages | Yes | Yes | ||
Must pass routing protocol neighbor authentication (if configured) | Yes | Yes | ||
Hello and dead timers must match. | Yes | Yes | ||
Router IDs must be unique. | Yes | Yes | ||
Must use the same process ID on the router configuration command | No | Yes |
EIGRP
-
Uses update messages from neighbors 10 seconds
- Full updae means that a router advertised all its routes using one or more rip update messages.
- Periodic means rhe router sends message short timed period
- Split horizon is a DV feature that tells the reouting protocol to not advertisse some routers in an update sent out the same inteerface as the outgoing interface.
-
Route poisoning advertising a failed or deleted route with a metric infinity
- Router receive the advertisement for subnet with inifnity, it decides to mark route as unusable and delete later or removes the route.
- Hello timer 5 sec
- Hold timer 15 sec
Feature | RIPv2 | EIGRP | OSPFv2 |
Metric is based on | Hop count | Bandwidth and delay | Cost |
Sends periodic full updates | Yes | No | No |
Sends periodic Hello messages | No | Yes | Yes |
Uses route poisoning for failed routes | Yes | Yes | Yes |
Uses split horizon to limit updates | Yes | Yes | No |
Address to which messages are sent (multicast) | 224.0.0.9 | 224.0.0.10 | 224.0.0.5-224.0.0.6 |
Metric considered to be infinite | 16 | 2^32 – 1 | 2^24 -1 |
-
For a neighbor relationship
- Pass authentificaiton
- ASN configured
- Network subnet
- Uses RTP instead of udp or tcp
-
For metric , eigrp uses bandwidth and delay in default
- Support interface load
- Reliability
- Mtu
- Find delay in show interface and bandwith then ue show ip eigrp topogy for eigrp updates
- Feasible distance (FD) the local router;s composite metric of the best route to reach a subnet, as calculated on the local router
- Reported distance (RD) the next hop router best composite metric for that same subnet
-
RD and FD determine the feasable successor route
- Feasable successor are alternate immediately usable routes
- Best metric route is called successor
- ((10^7/bandwith)+delay)*256
-
Diffusing Update Algorithm(DUAL) sends queriess looking for a loop free route to the sbnet and when the new route is found DUAL adds it to the routing table.
- Eigrp query is sent from the router with no feasible successor route and the router receives a eigrp reply message and add to the routing table..
Config | Show running-config | |
Network command | Enabled Interfaces | Show ip eigrp interfaces
Eigrp interfaces, statics Show ip eigrp interfaces detail Eigrp interface hello interval, hold interval, split horizon Show ip eigrp interfaces <int> Show interface enabled for eigrp but Does not list passive interfaces Show ip protocol Eigrp, eigrp router id, distance, max metric, networks |
Discover with hello | Neighbors | Show ip eigrp neighbors
Neighbor id, state, dead time, address , int Show ip eigrp neighbors <int> Show ip protocols |
Update | Topology | Show ip eigrp topology
Networks, successors, and feasible distance, metric, reported distance Show ip eigrp topology <subnet/prefix> ASN, id, network, metric, minimum bandwidth, delay, reliability, load, mtu, hop count Show ip eigrp topology | section <subnet> RD < FD: Meets feasibility condition |
Calculate | Routes | Show ip route
Show ip route eigrp Show ip route <subnet mask> Show ip route | section <subnet> |
Vriance, a eigrp setting allowing routes whose metrics are relatively close in value to be considered equal. Multiplies by the current FD.
Command | Key Information | Lists Passive Interfaces |
Show ip eigrp interfaces | Lists the interfaces on which EIGRP is enabled (based on the network commands), excluding passive interface. | No |
Show ip ospf interface brief | Lists the interfaces on which the OSPFv2 is enabled including passive interface | Yes |
Show Ip protocol | Lists the contents of the network configuration commands for each routing process and lists enabled but passive interfaces
Show k value, which must match |
Yes |
Requirement | EIGRP | OSPF |
Interfaces must be in an up/up state | Yes | Yes |
Interfaces must be in the same subnet | Yes | Yes |
ACL must not filter routing protocol message | Yes | Yes |
Must pass routing protocol neighbor authentication if configured | Yes | Yes |
Must use the same ASN/PID on the router configuration | Yes | No |
Hello and hold/dead timers must match. | No | Yes |
Router IDs (RID) must be unique. | No | Yes |
K-values must match | Yes | N/A |
Must be in the same area | N/A | Yes |
Debug eigrp packets
Debug ospf hello
EIGRP IPv6
Function | EIGRP for IPv4 | EIGRP for IPv6 |
Create process, define ASN | Router eigrp [asn] | Ippv6 router eigrp [asn] |
Define router ID explicity (router mode) | Eigrp router-id [number] | = |
Change number of concurrent routes (router mode) | Maximum-paths [#] | = |
Set the variance multiplier (router mode) | Variane [multiplier] | = |
Influence metric calculation (interface mode) | Bandwidth [value]
Delay [value] |
= |
Change Hello and hold timers (interface mode) | Ip hello-interval eigrp [asn time ] ip hold-time eigrp [asn time] | Ipv6 hello-interval eigrp [asn time ] ipv6 hold-time eigrp [asn time] |
Enable EIGRP on an interface | Network [ip] [wildcard] | Ipv6 eigrp [asn] (interface subcommand) |
Disable and enable automatic summarization (router mode) | [no] auto-summary | No need |
-
Config
- Ipv6 unicast-routing
-
Ipv6 router eigrp 1
- Eigrp router-id 1.1.1.1
- # maximum-paths x
- # variance 4
-
Int gi0/0
- Ipv6 address 2001:db8:1:1::1/64
- Ipv6 eigrp 1
-
Int s0
- Ipv6 address xxxxxxx
- Ipv6 eigrp 1
-
Int s1
- Ipv6 address xxxxxxxxx
- Ipv6 eigrp1
- Troubleshooting
Config | Show running-config | |||
Ipv6 eigrp asn
Enabled interfaces |
Show ipv6 eigrp interfaces
Show ipv6 eigrp interfaces detail Show ipv6 eigrp interfaces <type number> Show ipv6 protocols |
|||
Discover with Hello
Neighbors |
Show ipv6 eigrp neighbors
Show ipv6 eigrp neighbors <type number> Show ipv6 protocols |
|||
Update
Topology |
Show ipv6 eigrp topology
Show ipv6 eigrp topology <subnet/prefix> Show ipv6 eigrp topology | section <subnet> |
|||
Calculate
Routes |
Show ipv6 route
Show ipv6 route eigrp Show ipv6 route <subnet/prefix> Show ipv6 route | section <subnet/prefix> |
|||
Requirement | EIGRP for IPv4 | EIGRP for IPv6 | ||
Interfaces must be in an up/up state | Yes | Yes | ||
Interfaces must be in the same subnet | Yes | No | ||
Access control lists (ACL) must not filter routing protocol message. | Yes | Yes | ||
Must pass routing protocol neighbor authentication | Yes | Yes | ||
Must use the same ASN on the router config command | Yes | Yes | ||
K values must match | Yes | Yes | ||
Hello and hold timers must match | No | No | ||
Router ID must be unique | No | No |
BGP
- Uses path attributes insead of metrics
- Uses process called best path selection to choose the best route.
- Internet edge PE to CE
-
Predefine neighbors with
- Neighbor <ip> remote-as <asn>
-
Advertise about prefixes that have been added to the BGP table using
- The BGP network command
- Route redistribution
- By learning prefixes from a neighbor
- Use TCP port 179
- BGP peer send update messags which hold prefix/length(NLRI) informaiton and associated path attributes (PA).
-
Config
-
Router bgp 1
- Neighbor <ip> remote-as <asn>
-
-
Show tcp brief
- Show tcp connection
-
Show ip bgp summary
- Show as number, router id, neighbor ip and asn state
BGP Neighbor state | Typical Reason |
Idle | The neighbor has been administratively disabled (neighbor shutdown), or the router is waiting before the next retry. |
Connect | The TCP connection is being attempted but has not completed. |
Active | The TCP connection has been completed, but no BGP messages have been sent yet. |
Opensent | The TCP connection exists, and this router has sent the first message to establish the BGP neighbor relationship ( a BGP Open Message) |
Openconfirm | The TCP connection exists and the local router has received an Open message from the other router. The neighbor relationship may still be rejected. |
Established | The routers are now neighbors/peers and can exchange update messages. |
-
Neighbor <ip> shutdown
- Administratively disabling neighbor
-
Network <ip> mask <subnet>
- Inject the network to the bgp routing table
- Show ip route <ip> <subnet> longer-prefix