Wednesday, December 28, 2011

OSPF OVERVIEW

Today I looked at ospf version 2
- classless link state protocol
- use dijski spf algorithm
-maintains active adjacencies
-supports vlsm
-supports topology + nlri summarization (summarise out of classful boundary)
The rfc relation to ospf is 2328
- higer bandwidth is lower cost
- each router should have full map of it local area and does independent calculation 
 of the spf algorithm
- For external routes local router calculate there best path to the Area Border  
Router
to enable ospf
router ospf "proccess id" = process id is only locally significatnt does not need to 
                           match to form adjancies
you must have a up up interface in order for ospf to run  as it will be used for ospf
router id
enable the ospf process on interface with
router ospf 1
network "address" "wildcard mask" area "area id"
or
you could enable directly on interface
int fa0/0
ip ospf "process-id" area "area id"

network statements can overlap most specfic wins

for unnumbered interfaces you would use the network statement for the interface the
unnumbered is referencing

verfication of ospf is enable
-----------------------------
show ip ospf
show ip ospf interface "brief"
verify adjacencies
------------------
show ip ospf neighbor
debug ip ospf adj
verify ospf database
---------------------
sh ip ospf database " router | network | summary | "
Neighbor & Topology discovery
-------------------------------
like eigrp ospf uses hello packets default is dependent on network type
 - transport via ip protocol 89 (ospf)
 - send multicast to 224.0.0.5 or 224.0.0.6 or unicasts
hello packets contain attributes that the neighbors must agree on to form adjacency
not all ospf neighbors form a adjacency
unique attributes for a ospf router
-local router id
- locatl interface ip address
common attributes
- interface area-id - so what lsa flooding domain you are in
- hello & dead interval - should match,dead interval opposite to eigrp this means how
                          long i willwait before declaring a neighbor down
-inteface network address  - on same subnet (you may run in to trouble with ppp with 
                            mismatch subets or ip unnumbered interfaces
-interface mtu - this should match across neighbors
-network type- needs to be compatiable so p2p or nmba or broadcast etc
-authentication- null,clear text and md5
-stub flag- nssa,stub,totally stub etc

Router id
--------------
The ospf router id is selected by the following if no manual router id is specfied it
highest loopback ip address on the router if no loopback are configured it is the
highest ip on phyical interface


ospf states in neighbor forming
================================
down
init
2-way(recieved a hello with it router id in it)
exstart
exchange
loading
full

OSPF PACKET TYPES
-----------------------------

OSPF has 5 main packet types Hello,DBD,LSR,LSU and LSACK

They all share the same 20 byte common packet header

 


 Type will describe whether a hello,dbd,lsr,lsu,lsack follows

Hello- used for neighbor discovery and maintains supervision on neighbor relationship



DBD- Database desciption used to send a the lsa headers of all know ospf routes as scaled down description of database for   neighboring routers.  It is also used in the master slave election  The first dbd from each neighbor is used for this purpose.




LSR- Link State Request used to retrieve precise information from neighboring database that is missing in our database typically a neighbor will compare it database to DBD sent if inconsistent it will request the particular missing attributes via LSR request packet





LSU - Link State Update Packets are used in the flooding of the database to other neighbors a LSU contains multiple lsa (link state advertisements) LSU are also used for giving specfic information in regard to LSR requests




LSACK

Is used to acknowledge each lsa it is sent in response to a LSU packet



OSPF LSA TYPES Local Area
--------------------------
OSPF TYPE 1 LSA- Router - local link states of router
OSPF TYPE 2 LSA-NETWORK- Generated by DR for summary of links on segment



 OSPF TYPE 3 + 4 LSA these are the summary lsa generated by ABR. Type 3 summary of networks in a rea Type 4 to advertise route to ASBR


 TYPE 5 LSA Generated by ASBR  Describing external routes



 OSPF
OSPF TYPE 2 LSA- Network- generated by DR on broadcast segment listing what          
                networks are joined togther by the segment

LAB
----
For the LAB i will just setup a singular OSPF area and look at the show commands check the DR election show ip ospf database lsa types in singular area




sw4 (layer 2 switch)
=====================
switch4(config)#no ip routing
switch4(config)#vlan 100
switch4(config-vlan)#exit
switch4(config)#int fa0/6
switch4(config-if)#switchport
switch4(config-if)#switchport access vlan 100
switch4(config-if)#int fa0/4
switch4(config-if)#switchport
switch4(config-if)#switchport access vlan 100
switch4(config-if)#interface range fa0/16 - 18
switch4(config-if-range)#shut
switch4(config-if-range)#switchport
switch4(config-if-range)#channel-group 2 mode desira
Creating a port-channel interface Port-channel 2
switch4(config-if-range)#exit
switch4(config)#int po2
switch4(config-if)#switchport access vlan 100
switch4(config-if)#


r4
---

r4(config)#int fa0/0
r4(config-if)#ip address 10.229.254.4 255.255.255.0
r4(config-if)#no shut
r4(config)#int lo0
r4(config-if)#ip address 4.4.4.4 255.255.255.255
4(config)#router ospf 1
r4(config-router)#network 10.229.254.0 0.0.0.255 area 0
r4(config-router)#exit

sw2
----
switch2(config)#int po8
switch2(config-if)#ip address 10.229.254.2 255.255.255.0
switch2(config-if)#int lo0
switch2(config-if)#ip address 2.2.2.2 255.255.255.255
switch2(config-if)#exit
switch2(config)#

I will put a debug just to watch the neighbor relationship form between r4 and sw2p
switch2#debug ip ospf adj
OSPF adjacency events debugging is on
switch2#debug ip ospf event
OSPF events debugging is on
switch2#debug packet
Packet debugging is on
switch2#

switch2(config)#router ospf 1
switch2(config-router)#network 10.229.254.0 0.0.0.255 area 0

00:13:47: OSPF: Interface Port-channel8 going Up
00:13:47: OSPF: Send hello to 224.0.0.5 area 0 on Port-channel8 from 10.229.254.2
00:13:48: OSPF: Rcv hello from 4.4.4.4 area 0 from Port-channel8 10.229.254.4
00:13:48: OSPF: 2 Way Communication to 4.4.4.4 on Port-channel8, state 2WAY
00:13:48: OSPF: Backup seen Event before WAIT timer on Port-channel8
00:13:48: OSPF: DR/BDR election on Port-channel8
00:13:48: OSPF: Elect BDR 2.2.2.2
00:13:48: OSPF: Elect DR 4.4.4.4
00:13:48: OSPF: Elect BDR 2.2.2.2
00:13:48: OSPF: Elect DR 4.4.4.4
00:13:48:        DR: 4.4.4.4 (Id)   BDR: 2.2.2.2 (Id)
00:13:48: OSPF: Send DBD to 4.4.4.4 on Port-channel8 seq 0x75D opt 0x52 flag 0x7 len 32
00:13:48: OSPF: End of hello processing
00:13:48: OSPF: Rcv DBD from 4.4.4.4 on Port-channel8 seq 0x105B opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
00:13:48: OSPF: NBR Negotiation Done. We are the SLAVE
00:13:48: OSPF: Send DBD to 4.4.4.4 on Port-channel8 seq 0x105B opt 0x52 flag 0x0 len 32
00:13:48: OSPF: Rcv DBD from 4.4.4.4 on Port-channel8 seq 0x105C opt 0x52 flag 0x3 len 52  mtu 1500 state EXCHANGE
00:13:48: OSPF: Send DBD to 4.4.4.4 on Port-channel8 seq 0x105C opt 0x52 flag 0x0 len 32
00:13:48: OSPF: Rcv DBD from 4.4.4.4 on Port-channel8 seq 0x105D opt 0x52 flag 0x1 len 32  mtu 1500 state EXCHANGE
00:13:48: OSPF: Exchange Done with 4.4.4.4 on Port-channel8
00:13:48: OSPF: Send LS REQ to 4.4.4.4 length 12 LSA count 1
00:13:48: OSPF: Send DBD to 4.4.4.4 on Port-channel8 seq 0x105D opt 0x52 flag 0x0 len 32
00:13:48: OSPF: Rcv LS UPD from 4.4.4.4 on Port-channel8 length 64 LSA count 1
00:13:48: OSPF: Synchronized with 4.4.4.4 on Port-channel8, state FULL
00:13:48: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Port-channel8 from LOADING to FULL, Loading Done
00:13:48: OSPF: Build router LSA for area 0, router ID 2.2.2.2, seq 0x80000001
00:13:48: OSPF: Rcv LS UPD from 4.4.4.4 on Port-channel8 length 64 LSA count 1
00:13:48: OSPF: Rcv LS UPD from 4.4.4.4 on Port-channel8 length 60 LSA count 1
00:13:53: OSPF: Rcv LS UPD from 4.4.4.4 on Port-channel8 length 64 LSA count 1
00:13:57: OSPF: Send hello to 224.0.0.5 area 0 on Port-channel8 from 10.229.254.2
00:13:58: OSPF: Rcv hello from 4.4.4.4 area 0 from Port-channel8 10.229.254.4

ok the first thing we notice straight away is the router id being used are 4.4.4.4 and 2.2.2.2 these are the highest ip address on the loopbacks so they automatically being decided as the router id.
We start in down then when s2 recieves a hello packet back from r4 with s2 router id in it we go to the two way state. THen we start the election the highest ip is 4.4.4.4 r4 and is selected as the DR while s2 2.2.2.2 is selected a bdr for the broadcast segment we go into exstart when we recieved database descriptor dbd packet
. We next go into exchange where we are sending + recieving ls request and ls responses for networks we done not have. Once the exchange is done we go to loading state once we are decieded we are synchonised we go to the full state.

Now lets bring r6 into the equation 

lets advertise the loopback 2.2.2.2 network via ospf on sw2
router ospf 1
network 2.2.2.2 0.0.0.0 area 0
switch2(config-router)#
00:25:24: OSPF: Interface Loopback0 going Up
00:25:25: OSPF: Build router LSA for area 0, router ID 2.2.2.2, seq 0x80000004
00:25:25: OSPF: Add Type 1 LSA ID 2.2.2.2 Adv rtr 2.2.2.2 Seq 80000004 to Port-channel8 4.4.4.4 retransmission list
00:25:25: OSPF: Add Type 1 LSA ID 2.2.2.2 Adv rtr 2.2.2.2 Seq 80000004 to Port-channel8 flood list
00:25:25: OSPF: Sending update over Port-channel8 without pacing
00:25:25: OSPF: Flooding update on Port-channel8 to 224.0.0.5 Area 0
00:25:25: OSPF: Send Type 1, LSID 2.2.2.2, Adv rtr 2.2.2.2, age 1, seq 0x80000004 (0)
00:25:25: OSPF: Remove Type 1 LSA ID 2.2.2.2 Adv rtr 2.2.2.2 Seq 80000004 from Port-channel8 flood list
00:25:25: OSPF: Stop Port-channel8 flood timer
00:25:27: OSPF: rcv. v:2 t:5 l:44 rid:4.4.4.4
      aid:0.0.0.0 chk:B0FF aut:0 auk: from Port-channel8
00:25:27: OSPF: Received ACK from 4.4.4.4 on Port-channel8
00:25:27: OSPF: Rcv Ack Type 1, LSID 2.2.2.2, Adv rtr 2.2.2.2, age 1, seq 0x80000004
00:25:27: OSPF: Remove Type 1 LSA ID 2.2.2.2 Adv rtr 2.2.2.2 Seq 80000004 from 4.4.4.4 retransmission list
00:25:28: OSPF: rcv. v:2 t:1 l:48 rid:4.4.4.4
      aid:0.0.0.0 chk:CEBC aut:0 auk: from Port-channel8
so we can see we are building the router lsa type 1 and multicasting the update to 224.0.0.5

ok lets bring r6 in the equation now. Remeber the DR and BDR have been elected r6 has a higher loopback we will check will preempt the previous election

r6
---

r6(config)#int fa0/0
r6(config-if)#ip address 10.229.254.6 255.255.255.0
r6(config-if)#no shut
r6(config)#int lo0
r6(config-if)#ip address 6.6.6.6 255.255.255.0
r6(config-if)#exit

r6(config)#router ospf 1
r6(config-router)#network 10.229.254.0 0.0.0.255 area 0
r6(config-router)#network 6.6.6.6 0.0.0.255 area 0
r6(config-router)#

*Dec 28 14:16:42.007: OSPF: Interface FastEthernet0/1 going Up
*Dec 28 14:16:42.007: OSPF: Send hello to 224.0.0.5 area 0 on FastEthernet0/1 from 10.229.254.6
*Dec 28 14:16:42.475: OSPF: rcv. v:2 t:1 l:52 rid:4.4.4.4
      aid:0.0.0.0 chk:C2AC aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:42.475: OSPF: Rcv hello from 4.4.4.4 area 0 from FastEthernet0/1 10.229.254.4
*Dec 28 14:16:42.479: OSPF: 2 Way Communication to 4.4.4.4 on FastEthernet0/1, state 2WAY
*Dec 28 14:16:42.479: OSPF: End of hello processing
*Dec 28 14:16:42.507: OSPF: Build router LSA for area 0, router ID 6.6.6.6, seq 0x80000002, process 1
*Dec 28 14:16:43.047: OSPF: rcv. v:2 t:1 l:52 rid:2.2.2.2
      aid:0.0.0.0 chk:C2AC aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:43.047: OSPF: Rcv hello from 2.2.2.2 area 0 from FastEthernet0/1 10.229.254.2
*Dec 28 14:16:43.047: OSPF: 2 Way Communication to 2.2.2.2 on FastEthernet0/1, state 2WAY
*Dec 28 14:16:43.047: OSPF: Backup seen Event before WAIT timer on FastEthernet0/1
*Dec 28 14:16:43.047: OSPF: DR/BDR election on FastEthernet0/1
*Dec 28 14:16:43.047: OSPF: Elect BDR 2.2.2.2
*Dec 28 14:16:43.047: OSPF: Elect DR 4.4.4.4
*Dec 28 14:16:43.047:        DR: 4.4.4.4 (Id)   BDR: 2.2.2.2 (Id)ex
*Dec 28 14:16:43.047: OSPF: Send DBD to 2.2.2.2 on FastEthernet0/1 seq 0x1F3D opt 0x52 flag 0x7 len 32
*Dec 28 14:16:43.047: OSPF: Send DBD to 4.4.4.4 on FastEthernet0/1 seq 0x1C90 opt 0x52 flag 0x7 len 32
*Dec 28 14:16:43.047: OSPF: End of hello processing
*Dec 28 14:16:48.047: OSPF: Send DBD to 2.2.2.2 on FastEthernet0/1 seq 0x1F3D opt 0x52 flag 0x7 len 32
*Dec 28 14:16:48.047: OSPF: Retransmitting DBD to 2.2.2.2 on FastEthernet0/1 [1]
*Dec 28 14:16:48.047: OSPF: Send DBD to 4.4.4.4 on FastEthernet0/1 seq 0x1C90 opt 0x52 flag 0x7 len 32
*Dec 28 14:16:48.047: OSPF: Retransmitting DBD to 4.4.4.4 on FastEthernet0/1 [1]
*Dec 28 14:16:48.047: OSPF: rcv. v:2 t:2 l:32 rid:4.4.4.4
      aid:0.0.0.0 chk:9146 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.047: OSPF: Rcv DBD from 4.4.4.4 on FastEthernet0/1 seq 0xCAC opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Dec 28 14:16:48.047: OSPF: First DBD and we are not SLAVE
*Dec 28 14:16:48.047: OSPF: rcv. v:2 t:2 l:92 rid:4.4.4.4
      aid:0.0.0.0 chk:ABE9 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.047: OSPF: Rcv DBD from 4.4.4.4 on FastEthernet0/1 seq 0x1C90 opt 0x52 flag 0x2 len 92  mtu 1500 state EXSTART
*Dec 28 14:16:48.047: OSPF: NBR Negotiation Done. We are the MASTER
*Dec 28 14:16:48.051: OSPF: Send DBD to 4.4.4.4 on FastEthernet0/1 seq 0x1C91 opt 0x52 flag 0x3 len 52
*Dec 28 14:16:48.051: OSPF: Database request to 4.4.4.4
*Dec 28 14:16:48.051: OSPF: sent LS REQ packet to 10.229.254.4, length 36
*Dec 28 14:16:48.051: OSPF: rcv. v:2 t:2 l:32 rid:2.2.2.2
      aid:0.0.0.0 chk:8093 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.051: OSPF: rcv. v:2 t:2 l:92 rid:2.2.2.2
      aid:0.0.0.0 chk:AD40 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.051: OSPF: Rcv DBD from 2.2.2.2 on FastEthernet0/1 seq 0x2163 opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Dec 28 14:16:48.051: OSPF: First DBD and we are not SLAVE
*Dec 28 14:16:48.051: OSPF: Rcv DBD from 2.2.2.2 on FastEthernet0/1 seq 0x1F3D opt 0x52 flag 0x2 len 92  mtu 1500 state EXSTART
*Dec 28 14:16:48.051: OSPF: NBR Negotiation Done. We are the MASTER
*Dec 28 14:16:48.051: OSPF: Send DBD to 2.2.2.2 on FastEthernet0/1 seq 0x1F3E opt 0x52 flag 0x3 len 52
*Dec 28 14:16:48.055: OSPF: Database request to 2.2.2.2
*Dec 28 14:16:48.055: OSPF: sent LS REQ packet to 10.229.254.2, length 36
*Dec 28 14:16:48.055: OSPF: rcv. v:2 t:2 l:32 rid:4.4.4.4
      aid:0.0.0.0 chk:8168 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.055: OSPF: rcv. v:2 t:3 l:36 rid:4.4.4.4
      aid:0.0.0.0 chk:DDB7 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.055: OSPF: rcv. v:2 t:4 l:156 rid:4.4.4.4
      aid:0.0.0.0 chk:DB48 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.055: OSPF: Rcv DBD from 4.4.4.4 on FastEthernet0/1 seq 0x1C91 opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Dec 28 14:16:48.055: OSPF: Send DBD to 4.4.4.4 on FastEthernet0/1 seq 0x1C92 opt 0x52 flag 0x1 len 32
*Dec 28 14:16:48.055: OSPF: rcv. v:2 t:2 l:32 rid:2.2.2.2
      aid:0.0.0.0 chk:82BF aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.055: OSPF: rcv. v:2 t:4 l:156 rid:2.2.2.2
      aid:0.0.0.0 chk:DF4C aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.059: OSPF: Rcv DBD from 2.2.2.2 on FastEthernet0/1 seq 0x1F3E opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Dec 28 14:16:48.059: OSPF: Send DBD to 2.2.2.2 on FastEthernet0/1 seq 0x1F3F opt 0x52 flag 0x1 len 32
*Dec 28 14:16:48.059: OSPF: rcv. v:2 t:2 l:32 rid:4.4.4.4
      aid:0.0.0.0 chk:8167 aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.059: OSPF: rcv. v:2 t:4 l:76 rid:4.4.4.4
      aid:0.0.0.0 chk:98C aut:0 auk: from FastEthernet0/1
*Dec 28 14:16:48.059: OSPF: Rcv DBD from 4.4.4.4 on FastEthernet0/1 seq 0x1C92 opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Dec 28 14:16:48.059: OSPF: Exchange Done with 4.4.4.4 on FastEthernet0/1
*Dec 28 14:16:48.059: OSPF: Synchronized with 4.4.4.4 on FastEthernet0/1, state FULL
*Dec 28 14:16:48.059: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet0/1 from LOADING to FULL, Loading Done

ok we can see here that the dr and bdr were already set so even though we have a higher rid it does not come into play
unless r4 which is the dr there will not be another reelection

ok we will bring r5 into the equation now
so firstly we will configure the interface on
r4
---
r4(config)#int s0/1/0
r4(config-if)#ip address 172.25.13.4 255.255.255.0
r4(config-if)#no shut
r4(config)#router ospf 1
r4(config-router)#network 172.25.13.0 0.0.0.255 area 0
r4(config-router)#

r5
---

r5#config t
Enter configuration commands, one per line.  End with CNTL/Z.
r5(config)#int s0/1/0
r5(config-if)#ip address 172.25.13.5 255.255.255.0
r5(config-if)#ip ospf 1 area 0
just to show configuring on singular interface


*Dec 28 14:24:03.115: OSPF: Interface Serial0/1/0 going Up
*Dec 28 14:24:03.115: OSPF: Send hello to 224.0.0.5 area 0 on Serial0/1/0 from 172.25.13.5
*Dec 28 14:24:03.615: OSPF: Build router LSA for area 0, router ID 5.5.5.5, seq 0x80000001, process 1
*Dec 28 14:24:08.231: OSPF: rcv. v:2 t:1 l:48 rid:4.4.4.4
      aid:0.0.0.0 chk:DA88 aut:0 auk: from Serial0/1/0
*Dec 28 14:24:08.231: OSPF: Rcv hello from 4.4.4.4 area 0 from Serial0/1/0 172.25.13.4
*Dec 28 14:24:08.235: OSPF: 2 Way Communication to 4.4.4.4 on Serial0/1/0, state 2WAY
*Dec 28 14:24:08.235: OSPF: Send DBD to 4.4.4.4 on Serial0/1/0 seq 0x24BF opt 0x52 flag 0x7 len 32
*Dec 28 14:24:08.235: OSPF: End of hello processing
*Dec 28 14:24:08.235: OSPF: rcv. v:2 t:2 l:32 rid:4.4.4.4
      aid:0.0.0.0 chk:99EA aut:0 auk: from Serial0/1/0
*Dec 28 14:24:08.235: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1/0 seq 0x408 opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Dec 28 14:24:08.235: OSPF: First DBD and we are not SLAVE
*Dec 28 14:24:08.235: OSPF: rcv. v:2 t:2 l:132 rid:4.4.4.4
      aid:0.0.0.0 chk:A306 aut:0 auk: from Serial0/1/0
*Dec 28 14:24:08.235: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1/0 seq 0x24BF opt 0x52 flag 0x2 len 132  mtu 1500 state EXSTART
*Dec 28 14:24:08.239: OSPF: NBR Negotiation Done. We are the MASTER
*Dec 28 14:24:08.239: OSPF: Send DBD to 4.4.4.4 on Serial0/1/0 seq 0x24C0 opt 0x52 flag 0x3 len 52
*Dec 28 14:24:08.239: OSPF: Database request to 4.4.4.4
*Dec 28 14:24:08.239: OSPF: sent LS REQ packet to 172.25.13.4, length 60
*Dec 28 14:24:08.239: OSPF: rcv. v:2 t:2 l:32 rid:4.4.4.4
      aid:0.0.0.0 chk:7939 aut:0 auk: from Serial0/1/0
*Dec 28 14:24:08.239: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1/0 seq 0x24C0 opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Dec 28 14:24:08.239: OSPF: Send DBD to 4.4.4.4 on Serial0/1/0 seq 0x24C1 opt 0x52 flag 0x1 len 32
*Dec 28 14:24:08.243: OSPF: rcv. v:2 t:4 l:268 rid:4.4.4.4
      aid:0.0.0.0 chk:7237 aut:0 auk: from Serial0/1/0
*Dec 28 14:24:08.243: OSPF: rcv. v:2 t:2 l:32 rid:4.4.4.4
      aid:0.0.0.0 chk:7938 aut:0 auk: from Serial0/1/0
*Dec 28 14:24:08.243: OSPF: Rcv DBD from 4.4.4.4 on Serial0/1/0 seq 0x24C1 opt 0x52 flag 0x0 len 32  mtu 1500 state EXCHANGE
*Dec 28 14:24:08.243: OSPF: Exchange Done with 4.4.4.4 on Serial0/1/0
*Dec 28 14:24:08.243: OSPF: Synchronized with 4.4.4.4 on Serial0/1/0, state FULL
*Dec 28 14:24:08.243: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial0/1/0 from LOADING to FULL, Loading Done
notice that as we are directly connected to r4 from r5 the network type is point to point we have dr bdr election as it is network type point there is master slave for the commmunication of flooding lsa but that is it

ok now we will bring  r2 into the area to complete the config this will be the same as the above a point to point network so dr/bdr election
r2
---

r2(config)#int lo0
r2(config-if)#ip address
*Mar  1 03:36:31.699: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed
r2(config-if)#ip address 22.22.22.22 255.255.255.0
r2(config-if)#int f0/0
r2(config-if)#ip address 10.164.49.22 255.255.255.0
r2(config-if)#no shut
r2(config-if)#router ospf 1
r2(config-router)#network 22.22.22.0 0.0.0.255 area 0
r2(config-router)#network 10.164.49.0 0.0.0.255 area 0
r2(config-router)#

s2
--
switch2(config)#int fa0/2
switch2(config-if)#no switchport
switch2(config-if)#ip ospf network point-to-point
switch2(config-if)#ip address 10.164.49.2 255.255.255.0
switch2(config-if)#no shut
switch2(config)#router ospf 1
switch2(config-router)#network 10.164.49.0 0.0.0.255 area 0

ok we will have a look a few of the commands
switch2#sh ip ospf
 Routing Process "ospf 1" with ID 2.2.2.2
 Start time: 00:13:33.745, Time elapsed: 00:47:27.957
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Router is not originating router-LSAs with maximum metric
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Incremental-SPF disabled
 Minimum LSA interval 5 secs
 Minimum LSA arrival 1000 msecs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 Number of areas transit capable is 0
 External flood list length 0
 Reference bandwidth unit is 100 mbps
    Area BACKBONE(0)
        Number of interfaces in this area is 3 (1 loopback)
        Area has no authentication
        SPF algorithm last executed 00:01:16.051 ago
        SPF algorithm executed 20 times
        Area ranges are
        Number of LSA 7. Checksum Sum 0x03D1F1
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
from the sh ip ospf we can see we have a router id of 2.2.2.2 we min hold time between 2 consective runs of spf of 10000 msecs that means if we run the spf algorithm and another change comes along we will wait 10000 msecs before rerunning the spf this is to prevent overloading of the processing
we can see timere lsa intervals of 5 seconds etc
we can see we have 3 interfaces in area 0 one of the m is loopback only 1 area is int the router area 0
we have no authentication switched on in the area

switch2#sh ip ospf neigh
Neighbor ID     Pri   State           Dead Time   Address         Interface
22.22.22.22       0   FULL/  -        00:00:35    10.164.49.22    FastEthernet0/2
4.4.4.4           1   FULL/DR         00:00:38    10.229.254.4    Port-channel8
6.6.6.6           1   FULL/DROTHER    00:00:37    10.229.254.6    Port-channel8
switch2#
from the sh ip ospf neighbors we can see we have 3 adjacncies one 22.22.22.22 is point to point signified by FULL/- meaning there is no DR requirement this interface could be point to point point to multi point to multi non broadcast
we have full adjacncy with 4.4.4.4 and 4.4.4.4 is the DR
we have full adjacency with 6.6.6.6 and is a DROTHER meaning it is not dr or bdr
witch2#sh ip ospf neigh detail
 Neighbor 22.22.22.22, interface address 10.164.49.22
    In the area 0 via interface FastEthernet0/2
    Neighbor priority is 0, State is FULL, 6 state changes
    DR is 0.0.0.0 BDR is 0.0.0.0
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:34
    Neighbor is up for 00:06:55
    Index 3/3, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
 Neighbor 4.4.4.4, interface address 10.229.254.4
    In the area 0 via interface Port-channel8
    Neighbor priority is 1, State is FULL, 6 state changes
    DR is 10.229.254.4 BDR is 10.229.254.2
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:37
    Neighbor is up for 00:52:42
    Index 1/1, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
 Neighbor 6.6.6.6, interface address 10.229.254.6
    In the area 0 via interface Port-channel8
    Neighbor priority is 1, State is FULL, 6 state changes
    DR is 10.229.254.4 BDR is 10.229.254.2
    Options is 0x52
    LLS Options is 0x1 (LR)
    Dead timer due in 00:00:35
    Neighbor is up for 00:36:58
    Index 2/2, retransmission queue length 0, number of retransmission 1
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 1, maximum is 1
    Last retransm
if we do the detail version of the command we get more info in regard to our adjacncies

switch2#sh ip ospf int
FastEthernet0/2 is up, line protocol is up (connected)
  Internet Address 10.164.49.2/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:07
  Supports Link-local Signaling (LLS)
  Index 3/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 22.22.22.22
  Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
  Internet Address 2.2.2.2/32, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub Host
Port-channel8 is up, line protocol is up (connected)
  Internet Address 10.229.254.2/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 4.4.4.4, Interface address 10.229.254.4
  Backup Designated router (ID) 2.2.2.2, Interface address 10.229.254.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 2
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 4.4.4.4  (Designated Router)
    Adjacent with neighbor 6.6.6.6
  Suppress hello fo
if we use sh ip ospf interfaces we can see what interfaces are running ospf + what cost the interface is which will be used by spf + what network type + dr + bdr
We can see the hello + dead intervals



switch2#sh ip ospf database
            OSPF Router with ID (2.2.2.2) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         709         0x8000000B 0x00756C 4
4.4.4.4         4.4.4.4         1886        0x80000009 0x00CED8 4
5.5.5.5         5.5.5.5         1686        0x80000004 0x00ABED 3
6.6.6.6         6.6.6.6         529         0x80000004 0x00A846 2
22.22.22.22     22.22.22.22     710         0x80000005 0x00D355 2
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
10.229.254.4    4.4.4.4         688         0x80000003 0x003FC1
switch2#

ok this should match across all routers in this area 
we can see that for example link id 4.4.4.4 has 4 attached links(interfaces) in ospf

We can get details of these links by doing the
switch2#sh ip ospf database router 4.4.4.4
            OSPF Router with ID (2.2.2.2) (Process ID 1)
                Router Link States (Area 0)
  LS age: 65
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 4.4.4.4
  Advertising Router: 4.4.4.4
  LS Seq Number: 8000000A
  Checksum: 0xCCD9
  Length: 72
  Number of Links: 4
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 5.5.5.5
     (Link Data) Router Interface address: 172.25.13.4
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.25.13.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 4.4.4.4
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
    Link connected to: a Transit Network
     (Link ID) Designated Router address: 10.229.254.4
     (Link Data) Router Interface address: 10.229.254.4
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

The DR is 4.4.4.4 is sending out network lsa in regard to what is attached to the segment. So all routers are aware of what is attached to the segment.
switch2#sh ip ospf database network 10.229.254.4
            OSPF Router with ID (2.2.2.2) (Process ID 1)
                Net Link States (Area 0)
  Routing Bit Set on this LSA
  LS age: 916
  Options: (No TOS-capability, DC)
  LS Type: Network Links
  Link State ID: 10.229.254.4 (address of Designated Router)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000003
  Checksum: 0x3FC1
  Length: 36
  Network Mask: /24
        Attached Router: 4.4.4.4
        Attached Router: 2.2.2.2
        Attached Router: 6.6.6.6

so if you see here 4.4.4.4 is saying that the following are attached to the broadcast segment which are 4.4.4.4,2.2.2.2,6.6.6.6

so for example sw2 2.2.2.2 knows in order to have a full picture of the area it needs to recieve the router lsa with the local link states from these attached routers.
so look at r4 router lsa
r2#sh ip ospf database router 4.4.4.4
            OSPF Router with ID (22.22.22.22) (Process ID 1)
                Router Link States (Area 0)
  LS age: 633
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 4.4.4.4
  Advertising Router: 4.4.4.4
  LS Seq Number: 8000000A
  Checksum: 0xCCD9
  Length: 72
  Number of Links: 4
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 5.5.5.5
     (Link Data) Router Interface address: 172.25.13.4
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 172.25.13.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 4.4.4.4
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
    Link connected to: a Transit Network
     (Link ID) Designated Router address: 10.229.254.4
     (Link Data) Router Interface address: 10.229.254.4
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

r2#
it is telling r2 about it local connections 172.25.13.0/24 network and the r5 loopback 5.5.5.5

so in this way r2 can learn complete topology

all routers in the topology should have the exact same database a full information of all networks + layout in the topology
r2#sh ip ospf database
            OSPF Router with ID (22.22.22.22) (Process ID 1)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         221         0x8000000D 0x00716E 4
4.4.4.4         4.4.4.4         760         0x8000000A 0x00CCD9 4
5.5.5.5         5.5.5.5         559         0x80000005 0x00A9EE 3
6.6.6.6         6.6.6.6         1347        0x80000004 0x00A846 2
22.22.22.22     22.22.22.22     221         0x80000007 0x00889C 3
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
10.229.254.4    4.4.4.4         1506        0x80000003 0x003FC1
r2#

they will independently run the spf algorithm for the best paths to the network but it can be done in this way as all the routers will have the same info so loops will not happen.

Monday, December 26, 2011

EIGRP MISC

Ok we will now look at some miscellaneous EIGRP Features this will wrap up on eigrp.

next hop self
-------------
on updates say in nbma hub and spoke topology the spoke advertised to the hub we may
on the hub wish to specify our selves as the next hop when advertising down the route
to other spokes
this can be done with the
ip eigrp next-hop-self command at interface level

ip eigrp next-hop-self is default on the newer ios

maximum prefix
---------------
on a neighbor basis we can specify a limit on the number of prefix we will accept
from a neighbor if it goes over limit the adjacency will be torn down
router eigrp
neighbor ip address maximum-prefix " no"
Bandwidth Pacing
-----------------
This can be used in situation where several neighbor are connected to the same router
using a serial link over a single low speed frame relay network. By default eigrp limits that it can only use 50 percent of the bandwidth on the link. if it is very slow link we might starve eigrp with this so can change it
you put on an interface level
int fa0/0
ip bandwidth percent eigrp "as no" " percent"

EIGRP NEIGHBOR LOGGING
------------------------
We can log eigrp changes + warnings to the buffer
using the
router eigrp 1
eigrp log-neighbor-changes - will log changes in neighbor  state changes
router eigrp 1
eigrp log-neighbor-warnings - will log neighbor warning messages

these two logging are on by default
EIGRP MAX HOP COUNT
----------------------
EIGRP as distant vector protocol does have ahop and there is a hop maximum of 254
meaning the network should not be more than 254 hops end to end. The default is 100
hops you manual change to 254 hops or lower if you want
you can do this with the command
metric-maximum-hops "number" this is under the eigrp process
hops are not used for metric computation is eigrp 

LAB
-----
For the lab we will setup a frame relay partial mesh r1 will be the hub will connect
to both r4 and r5. R4 and R5 will have no direct connection

r4
---

r4(config)#int s0/0/0
r4(config-if)#encap frame-relay
r4(config-if)#no frame-relay  inverse
r4(config-if)#ip address 10.229.254.4 255.255.255.0
r4(config-if)#frame-relay  map ip 10.229.254.1 401 broadcast

r4(config)#int lo4
r4(config-if)#ip address 4.4.4.4 255.255.255.255
r4(config-if)#
r4(config)#router eigrp 1
r4(config-router)#no auto
r4(config-router)#network 10.229.254.0 0.0.0.255
r4(config-router)#network 4.4.4.4 0.0.0.0
r4(config-router)#

r1
---
interface Serial0/0
 ip address 10.229.254.1 255.255.255.0
 encapsulation frame-relay
 no ip split-horizon eigrp 1
 frame-relay map ip 10.229.254.4 104 broadcast
 frame-relay map ip 10.229.254.5 105 broadcast
 frame-relay lmi-type cisco

notice i do no ip split as it is a multipoint frame relay hub router
r1#sh run | begin router eigrp
router eigrp 1
 network 1.1.1.1 0.0.0.0
 network 10.229.254.0 0.0.0.255
 no auto-summary
r5
---
r5(config)#int s0/0/0
r5(config-if)#encap frame
r5(config-if)#frame-relay map ip 10.229.254.1 501 broadcast
r5(config-if)#ip address 10.229.254.5 255.255.255.0
r5(config-if)#no frame-relay  inverse

r5(config)#router eigrp 1
r5(config-router)#network 5.5.5.5 0.0.0.0
r5(config-router)#network 10.229.254.0 0.0.0.255
r5(config-router)#
r5(config-router)#no auto

ok so it is all setup
ok to show the ip next hop behaviour on the newer ios like the one i am currently
using on the interface the default behaviour is ip next-hop-self eigrp 1 we will
change this to no ip next-hop-self eigrp 1 on r1 s0/0/0 int

r1
---
r1(config)#int s0/0
r1(config-if)#no ip next-hop-self eigrp 1
r1(config-if)#

r5
---

r5#sh ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "eigrp 1", distance 90, metric 129152000, type internal
  Redistributing via eigrp 1
  Last update from 10.229.254.4 on Serial0/0/0, 00:01:02 ago
  Routing Descriptor Blocks:
  * 10.229.254.4, from 10.229.254.1, 00:01:02 ago, via Serial0/0/0
      Route metric is 129152000, traffic share count is 1
      Total delay is 45000 microseconds, minimum bandwidth is 20 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 2
r5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
   
     4.0.0.0/32 is subnetted, 1 subnets
D       4.4.4.4 [90/129152000] via 10.229.254.4, 00:01:23, Serial0/0/0
if you notice the 4.4.4.4 is using 10.229.254.4 as a next hop

we have no direct connection to 10.229.254.4

r5#
r5#sh frame-relay map
Serial0/0/0 (up): ip 10.229.254.1 dlci 501(0x1F5,0x7C50), static,
              broadcast,
              CISCO, status defined, active
r5#

r5#ping 4.4.4.4 source 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
.....
Success rate is 0 percent (0/5)
r5#

ok now on r1 we will change the behaviour back to ip next-hop-self eigrp 1 on r1 s0/0

r1
--

r1(config)#int s0/0
r1(config-if)#ip next-hop-self eigrp 1
r1(config-if)#

r5
--
r5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/2297856] via 10.229.254.1, 00:01:16, Serial0/0/0
     4.0.0.0/32 is subnetted, 1 subnets
D       4.4.4.4 [90/129152000] via 10.229.254.1, 00:01:14, Serial0/0/0
r5#sh ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "eigrp 1", distance 90, metric 129152000, type internal
  Redistributing via eigrp 1
  Last update from 10.229.254.1 on Serial0/0/0, 00:01:55 ago
  Routing Descriptor Blocks:
  * 10.229.254.1, from 10.229.254.1, 00:01:55 ago, via Serial0/0/0
      Route metric is 129152000, traffic share count is 1
      Total delay is 45000 microseconds, minimum bandwidth is 20 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 2

the 4.4.4.4 next hop is not 10.229.254.1 r1 which is directly connected
r5#ping 10.229.254.1 source 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.229.254.1, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/65/68 ms
r5#

i can now ping successifully

Friday, December 23, 2011

EIGRP ROUTER ID

EIGRP ROUTER ID
EIGRP router id is for a sole purpose of loop prevention with regard to external routes
What could occur is the protocol i am redistributing has a higher admin distance than
the eigrp external routes.So we could possible end up with route feedback.

With internal routes loops are prevented with the dual algorithm the issue with
external routes is the originator metric is not clear  we are effectively breaking the loop prevention when we redistributes

so we could potentially be in case for routing loops this is why we use the router id the idea being that is if
recieve an external route with my router id as the  originator i will reject the
route.
Router id is auto selected with ip of highest loopback or if no loopback highest ip
on interface same as ospf
You can also manual assign with the command
router eigrp 1
eigrp route-d "ip address"
Where you could potential run int issues with this is if you have duplicate route ids

sh ip eigrp top- will allow you to see the route id

lab
----
   


sw4
----
switch4(config)#do sh ip int brief | inc up
FastEthernet0/13       unassigned      YES NVRAM  up                    up
FastEthernet0/14       unassigned      YES NVRAM  up                    up
FastEthernet0/15       unassigned      YES NVRAM  up                    up
FastEthernet0/16       unassigned      YES NVRAM  up                    up
FastEthernet0/17       unassigned      YES NVRAM  up                    up
FastEthernet0/18       unassigned      YES NVRAM  up                    up
Port-channel9          172.25.10.2     YES NVRAM  up                    up
Port-channel10         172.25.11.2     YES NVRAM  up                    up
Loopback0              4.4.4.4         YES manual up                    up
switch4(config)#
router eigrp 1
 network 4.4.4.4 0.0.0.0
 network 172.25.10.0 0.0.0.255
 network 172.25.11.0 0.0.0.255
 no auto-summary

sw2
----
switch2#sh ip int brief | inc up
FastEthernet0/4        10.10.4.4       YES NVRAM  up                    up
FastEthernet0/13       unassigned      YES NVRAM  up                    up
FastEthernet0/14       unassigned      YES NVRAM  up                    up
FastEthernet0/15       unassigned      YES NVRAM  up                    up
FastEthernet0/19       unassigned      YES NVRAM  up                    up
FastEthernet0/20       unassigned      YES NVRAM  up                    up
FastEthernet0/21       unassigned      YES NVRAM  up                    up
Port-channel2          10.229.254.2    YES NVRAM  up                    up
Port-channel8          172.25.10.1     YES NVRAM  up                    up
Loopback0              2.2.2.2         YES manual up                    up
switch2#

switch2#sh run | begin router ei
router eigrp 1
 network 10.229.254.0 0.0.0.255
 network 172.25.10.0 0.0.0.255
 network 2.2.2.2.2   0.0.0.0
 no auto-summary
switch2(config)#router rip
switch2(config-router)#version 2
switch2(config-router)#no auto
switch2(config-router)#network 10.10.4.0  >>> to distribute external routes into     
                                        eigrp

r4
----
r4#sh ip int brief | inc up
FastEthernet0/0            10.10.4.1       YES manual up                    up 
Loopback0                  20.20.20.1      YES manual up                    up 
Loopback1                  30.30.30.1      YES manual up                    up 
Loopback2                  40.40.40.1      YES manual up                    up 
r4#


r4(config)#router rip
r4(config-router)#version 2
r4(config-router)#no auto
r4(config-router)#network 20.20.20.0
r4(config-router)#network 30.30.30.0
r4(config-router)#network 40.40.40.0
r4(config-router)#network 10.10.4.0
r4(config-router)#

sw1
---


switch1(config)#do sh ip int brief | inc up
FastEthernet0/5        unassigned      YES unset  up                    up
FastEthernet0/13       unassigned      YES NVRAM  up                    up
FastEthernet0/14       unassigned      YES NVRAM  up                    up
FastEthernet0/15       unassigned      YES NVRAM  up                    up
FastEthernet0/19       unassigned      YES NVRAM  up                    up
FastEthernet0/20       unassigned      YES NVRAM  up                    up
FastEthernet0/21       unassigned      YES NVRAM  up                    up
Port-channel2          10.229.254.1    YES NVRAM  up                    up
Port-channel7          172.25.11.1     YES NVRAM  up                    up
Loopback0              1.1.1.1         YES manual up                    up
switch1(config)#

router eigrp 1
 network 1.1.1.1 0.0.0.0
 network 10.229.254.0 0.0.0.255
 network 172.25.11.0 0.0.0.255
 no auto-summary
!

We will look at the routing table on

sw4
----
switch4#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/136704] via 172.25.11.1, 00:02:07, Port-channel10
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/139008] via 172.25.10.1, 00:02:04, Port-channel9
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     172.25.0.0/24 is subnetted, 2 subnets
C       172.25.11.0 is directly connected, Port-channel10
C       172.25.10.0 is directly connected, Port-channel9
     10.0.0.0/24 is subnetted, 2 subnets
D       10.10.4.0 [90/30720] via 172.25.10.1, 00:02:04, Port-channel9
D       10.229.254.0 [90/11264] via 172.25.11.1, 00:02:07, Port-channel10
switch4#

sw1
---
switch1(config-router)#exit
switch1(config)#do sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/139008] via 10.229.254.2, 00:02:48, Port-channel2
     4.0.0.0/32 is subnetted, 1 subnets
D       4.4.4.4 [90/139008] via 172.25.11.2, 00:02:45, Port-channel7
     172.25.0.0/24 is subnetted, 2 subnets
C       172.25.11.0 is directly connected, Port-channel7
D       172.25.10.0 [90/13568] via 172.25.11.2, 00:02:48, Port-channel7
     10.0.0.0/24 is subnetted, 2 subnets
D       10.10.4.0 [90/30720] via 10.229.254.2, 00:02:48, Port-channel2
C       10.229.254.0 is directly connected, Port-channel2
switch1(config)#

Ok so thats all the base config setup so know i will generate a duplicate router id
with no external routes firstly so on sw1
router eigrp 1
switch1(config-router)#eigrp router-id 7.7.7.7

sw4
---

switch4(config)#router eigrp 1
switch4(config-router)#eigrp router-id 7.7.7.7
switch4(config-router)#

switch4#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/136704] via 172.25.11.1, 00:02:08, Port-channel10
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/139008] via 172.25.10.1, 00:02:08, Port-channel9
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     172.25.0.0/24 is subnetted, 2 subnets
C       172.25.11.0 is directly connected, Port-channel10
C       172.25.10.0 is directly connected, Port-channel9
     7.0.0.0/32 is subnetted, 1 subnets
C       7.7.7.7 is directly connected, Loopback1
     10.0.0.0/24 is subnetted, 2 subnets
D       10.10.4.0 [90/30720] via 172.25.10.1, 00:02:08, Port-channel9
D       10.229.254.0 [90/11264] via 172.25.11.1, 00:02:09, Port-channel10
switch4#

ok so no affect the route id being duplicate makes no affect on internal routes

ok on
sw2
---
switch2(config)#router eigrp 1
switch2(config-router)#redistribute rip metric 100 100 100 100 100
switch2(config-router)#

ok i am just realising something here this not going to work
The reason being that the process looks at the originator id which is sw2 so it will
make no difference in this particular example if sw1 and sw4 have duplicates as sw1
is the one advertising the external routes
switch1#sh ip eigrp top 20.20.20.1/32
IP-EIGRP (AS 1): Topology entry for 20.20.20.1/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 25628160
  Routing Descriptor Blocks:
  10.229.254.2 (Port-channel2), from 10.229.254.2, Send flag is 0x0
      Composite metric is (25628160/25625600), Route is External
      Vector metric:
        Minimum bandwidth is 100 Kbit
        Total delay is 1100 microseconds
        Reliability is 100/255
        Load is 100/255
        Minimum MTU is 100
        Hop count is 1
      External data:
        Originating router is 1.1.1.1
        AS number of route is 0
        External protocol is RIP, external metric is 1
        Administrator tag is 0 (0x00000000)
switch1#
if you look at the originator id it is sw2 router id  i gave it

so now i will give sw2 the same 7.7.7.7 eigrp router id

switch2(config)#router eigrp 1
switch2(config-router)#eigrp router-id 7.7.7.7
switch2(config-router)#

now on sw1
-----------
switch1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/139008] via 10.229.254.2, 00:00:09, Port-channel2
     4.0.0.0/32 is subnetted, 1 subnets
D       4.4.4.4 [90/139008] via 172.25.11.2, 00:27:40, Port-channel7
     172.25.0.0/24 is subnetted, 1 subnets
C       172.25.11.0 is directly connected, Port-channel7
     7.0.0.0/32 is subnetted, 1 subnets
C       7.7.7.7 is directly connected, Loopback11
     10.0.0.0/24 is subnetted, 2 subnets
D       10.10.4.0 [90/30720] via 10.229.254.2, 00:00:10, Port-channel2
C       10.229.254.0 is directly connected, Port-channel2
switch1#

the external route are gone

switch1#sh ip eigrp event
Event information for AS 1:
1    01:40:58.395 Change queue emptied, entries: 2
2    01:40:58.395 Ignored route, metric: 40.40.40.1 25628160
3    01:40:58.395 Ignored route, neighbor info: 10.229.254.2 Port-channel7
4    01:40:58.395 Ignored route, dup router: 7.7.7.7
5    01:40:58.395 Ignored route, metric: 30.30.30.1 25628160
6    01:40:58.395 Ignored route, neighbor info: 10.229.254.2 Port-channel7
7    01:40:58.395 Ignored route, dup router: 7.7.7.7

i am seeing ignored routes from duplicate id 7.7.7.7
so as the orignator router id (router doing the redistribution) is duplicate it is
not accepting the external routes notice it does still allow internal routes this is
solely for external redistributed routes as loop prevention as dual will deal with
the internal.
The eigrp router id does not have to be an active interface or advertised in eigrp

Thursday, December 22, 2011

EIGRP DEFAULT ROUTING

EIGRP DEFAULT ROUTING
we have a few options with default routing in eigrp we could use
* we could use ip default-network "network"
* we could use native advertisements of the 0.0.0.0./0 prefix
* default-information command

With the default information originate command it acts differently it eigrp this
command is used to specify what you will do we a default route rather than generate
one. So for example if you say no default-information originate it means you will
reject a default route if sent to you,
if you said
no default information out it means if you learn a default route you will not
advertise it out

IP Default Network
-------------------
This concept for default routing was brought about for mainly IGRP compatability.
IGRP will not accept routes of 0.0.0.0/0 it does not comprehend that as  default
route. So default network was brought in. It is quite restrictive the following
criteria must be met
the default-network must be
  - dynamically learned through EIGRP
  - Not directly connected
  -a classfull network
So it has limited application in modern networks

An example you have a sp router sending a few networks to your ce router you might
mark one of this networks as a default route  and it will be sent through your
interior routing domain as candidate default route it get over the issue of igrp not
been able to understand you sending 0.0.0.0/0. It is legacy at this stage

Advertising 0.0.0.0/0
----------------------
we could advertise this in 3 ways
1) static default route point to ip route 0.0.0.0 0.0.0.0 to put the route in the
table and then do a network 0.0.0.0 255.255.255.255
2) redistribution- we could do the above static route but instead of using the
network command redistribute the static in to eigrp the only difference here is tha
it will come in at higher admin disstance as it is a eigrp external route vs eigrp
internal route
3)We can summarize on the interface a summary route. For example on the interface do
a ip summary address eigrp 1 0.0.0.0 0.0.0.0

For the LAB
------------
r4 connects to sw2 which has a single connection sw4 which has a connection to sw1
which connects to r5
we will do firstly default network then static default route with eigrp advertising a
redistributed eigrp network and a summary route






Lab1 Default NETWORK
---------------------
ok so r4 is running rip with sw2 fa0/4 interface sw2 connects to sw1 which connects
to r5
sw2 will redistribute a prefix learnt from r4 (4.4.4.4) and we will mark it as a
default network to the rest of the eigrp domain

r4
---
r4(config)#do sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            10.229.253.1    YES manual up                    up 
FastEthernet0/1            unassigned      YES TFTP   administratively down down
Serial0/0/0                unassigned      YES NVRAM  administratively down down
Serial0/1/0                unassigned      YES TFTP   administratively down down
Loopback0                  10.10.9.1       YES manual up                    up 
Loopback1                  4.4.4.4         YES manual up                    up 
r4(config)#router rip
r4(config-router)#version 2
r4(config-router)#no auto
r4(config-router)#network 10.229.253.0
r4(config-router)#network 4.4.4.4 0.0.0.0


sw2
----
switch2#sh ip int brief | inc up
FastEthernet0/4        10.229.253.2    YES manual up                    up
FastEthernet0/13       unassigned      YES NVRAM  up                    up
FastEthernet0/14       unassigned      YES NVRAM  up                    up
FastEthernet0/15       unassigned      YES NVRAM  up                    up
Port-channel2          10.229.254.2    YES NVRAM  up                    up
Loopback1              2.2.2.2         YES manual up                    up
switch2#
switch2(config)#router rip
switch2(config-router)#network 10.229.253.0
switch2(config-router)#version 2
switch2(config-router)#no auto
switch2(config-router)#
router eigrp 1
 network 10.229.254.0 0.0.0.255
 no auto-summary
redistribute rip metric 100 100 100 100 100

in global config
switch2(config)#ip default-network 4.4.4.0
switch2(config)#
ok so in the above i redistribute rip into eigrp this will bring the 4.4.4.4 network
into the eigrp domain i also setting this as default network

ok sw1 and r5 are in the eigrp domain lets look what the above config has on there
routing table
ok it is not working the problem is that it is not classfull so breaks the rules the
4.4.4.4 network
so what i have done is on rip changed it to v1 and summary now i am recieving
4.0.0.0/8
switch2(config)#ip default-network 4.0.0.0
switch2(config)#


switch1(config)#exit
switch1#sh ip ro
02:33:56: %SYS-5-CONFIG_I: Configured from console by consoleute
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.229.254.2 to network 4.0.0.0
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     169.254.0.0/32 is subnetted, 1 subnets
S       169.254.0.1 is directly connected, Null0
     4.0.0.0/8 is subnetted, 1 subnets
D*EX    4.0.0.0 [170/25628160] via 10.229.254.2, 00:02:05, Port-channel2
     5.0.0.0/32 is subnetted, 1 subnets
S       5.5.5.5 is directly connected, FastEthernet0/5
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C       10.14.1.0/24 is directly connected, Loopback1
D EX    10.10.9.1/32 [170/25628160] via 10.229.254.2, 00:17:52, Port-channel2
C       10.229.254.0/24 is directly connected, Port-channel2
D EX    10.229.253.0/24
           [170/25628160] via 10.229.254.2, 00:17:52, Port-channel2
C       10.164.50.0/24 is directly connected, FastEthernet0/5
switch1#
now we have default route set via 4.0.0.0 in rip domain

r5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.164.50.2 to network 4.0.0.0
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/156160] via 10.164.50.2, 00:13:30, FastEthernet0/0
     4.0.0.0/8 is subnetted, 1 subnets
D*EX    4.0.0.0 [170/25630720] via 10.164.50.2, 00:02:57, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D       10.14.1.0/24 [90/156160] via 10.164.50.2, 00:13:30, FastEthernet0/0
D EX    10.10.9.1/32 [170/25630720] via 10.164.50.2, 00:13:30, FastEthernet0/0
D       10.229.254.0/24 [90/30720] via 10.164.50.2, 00:13:30, FastEthernet0/0
D EX    10.229.253.0/24
           [170/25630720] via 10.164.50.2, 00:13:30, FastEthernet0/0
C       10.164.50.0/24 is directly connected, FastEthernet0/0
     12.0.0.0/32 is subnetted, 1 subnets
C       12.12.12.12 is directly connected, Loopback2
r5#
same on r5 ok so lets try ping a the other loopback on r4 which was not advertised so
we do not have the route
first i will put a reply static route on r4 so it knows how to get back to r5

r5#ping 10.10.9.1 source 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.9.1, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r5#

i can ping a route not advertised in rip or eigrp on r4 from r5 so it is working


LAB 2
------
OK same lab setup but this we will advertise a default route using network statement
and ip route on sw2

ok on
sw2
-----
switch2(config)#no ip default-network 4.0.0.0
switch2(config)#ip route 0.0.0.0 0.0.0.0 fa0/4
switch2(config)#router eigrp 1
switch2(config-router)#network 0.0.0.0
switch2(config-router)#

ok on r5
---------
r5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.164.50.2 to network 0.0.0.0
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/156160] via 10.164.50.2, 00:28:09, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/158720] via 10.164.50.2, 00:00:54, FastEthernet0/0
     4.0.0.0/8 is subnetted, 1 subnets
D EX    4.0.0.0 [170/25630720] via 10.164.50.2, 00:01:41, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D       10.14.1.0/24 [90/156160] via 10.164.50.2, 00:28:09, FastEthernet0/0
D EX    10.10.9.1/32 [170/25630720] via 10.164.50.2, 00:28:09, FastEthernet0/0
D       10.229.254.0/24 [90/30720] via 10.164.50.2, 00:28:09, FastEthernet0/0
D       10.229.253.0/24 [90/33280] via 10.164.50.2, 00:00:53, FastEthernet0/0
C       10.164.50.0/24 is directly connected, FastEthernet0/0
     12.0.0.0/32 is subnetted, 1 subnets
C       12.12.12.12 is directly connected, Loopback2
D*   0.0.0.0/0 [90/33280] via 10.164.50.2, 00:00:59, FastEthernet0/0


r5#ping 10.10.9.1 source 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.9.1, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r5#
ok so this alternative solution for a default route
LAB3
-----
Another alternate solution is to redistribute the static
instead of advertising on s2
switch2(config)#router eigrp 1
switch2(config-router)#no network 0.0.0.0 0.0.0.0
switch2(config-router)#redistribute static metric 100 100 100 100 100
r5#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is 10.164.50.2 to network 0.0.0.0
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/156160] via 10.164.50.2, 00:05:48, FastEthernet0/0
D EX 4.0.0.0/8 [170/25630720] via 10.164.50.2, 00:05:48, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D       10.14.1.0/24 [90/156160] via 10.164.50.2, 00:05:48, FastEthernet0/0
D EX    10.10.9.1/32 [170/25630720] via 10.164.50.2, 00:05:48, FastEthernet0/0
D       10.229.254.0/24 [90/30720] via 10.164.50.2, 00:05:48, FastEthernet0/0
D EX    10.229.253.0/24
           [170/25630720] via 10.164.50.2, 00:01:42, FastEthernet0/0
C       10.164.50.0/24 is directly connected, FastEthernet0/0
     12.0.0.0/32 is subnetted, 1 subnets
C       12.12.12.12 is directly connected, Loopback2
D*EX 0.0.0.0/0 [170/25630720] via 10.164.50.2, 00:00:29, FastEthernet0/0
r5#

r5#ping 10.10.9.1 source 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.9.1, timeout is 2 seconds:
Packet sent with a source address of 5.5.5.5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r5#
notice difference here it is a ex route in the rib with admin distance of 170