Beruflich Dokumente
Kultur Dokumente
IP Routing
Contents
Introduction
This document shows sample configurations for Open Shortest Path First (OSPF) authentication which allows the flexibility to authenticate OSPF neighbors. You can enable authentication in OSPF in order to exchange routing update information in a secure manner. OSPF authentication can either be none (or null), simple, or MD5. The authentication method "none" means that no authentication is used for OSPF and it is the default method. With simple authentication, the password goes in clear-text over the network. With MD5 authentication, the password does not pass over the network. MD5 is a message-digest algorithm specified in RFC 1321. MD5 is considered the most secure OSPF authentication mode. When you configure authentication, you must configure an entire area with the same type of authentication. Starting with Cisco IOS Software Release 12.0(8), authentication is supported on a perinterface basis. This is also mentioned in RFC 2328 , Appendix D. This feature is added in Cisco bug ID CSCdk33792 (registered customers only) .
Prerequisites
Requirements
Readers of this document should be familiar with basic concepts of OSPF routing protocol. Refer to the Open Shortest Path First documentation for information on OSPF routing protocol.
Components Used
The information in this document is based on these software and hardware versions. Cisco 2503 routers Cisco IOS Software Release 12.2(27) The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Conventions
Refer to Cisco Technical Tips Conventions for more information on document conventions.
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
Background Information
1/8
2/3/2014
Background Information
These are the three different types of authentication supported by OSPF. Null AuthenticationThis is also called Type 0 and it means no authentication information is included in the packet header. It is the default. Plain Text AuthenticationThis is also called Type 1 and it uses simple clear-text passwords. MD5 AuthenticationThis is also called Type 2 and it uses MD5 cryptographic passwords. Authentication does not need to be set. However, if it is set, all peer routers on the same segment must have the same password and authentication method. The examples in this document demonstrate configurations for both plain text and MD5 authentication.
Configure
This section presents you with the information to configure the features this document describes. Note: Use the Command Lookup Tool (registered customers only) to find additional information on the commands used in this document.
Network Diagram
This document uses this network setup.
R1-2503
i n t e r f a c eL o o p b a c k 0 i pa d d r e s s1 7 2 . 1 6 . 1 0 . 3 62 5 5 . 2 5 5 . 2 5 5 . 2 4 0 ! i n t e r f a c eS e r i a l 0 i pa d d r e s s1 9 2 . 1 6 . 6 4 . 12 5 5 . 2 5 5 . 2 5 5 . 0
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
2/8
2/3/2014
! -P l a i nt e x ta u t h e n t i c a t i o ni se n a b l e d ! -f o ra l li n t e r f a c e si nA r e a0 .
Note: The area authentication command in the configuration enables authentication for all the interfaces of the router in a particular area. You can also use the ip ospf authentication command under the interface to configure plain text authentication for the interface. This command can be used if a different authentication method or no authentication method is configured under the area to which the interface belongs. It overrides the authentication method configured for the area. This is useful if different interfaces that belong to the same area need to use different authentication methods.
! -M D 5a u t h e n t i c a t i o ni se n a b l e df o r ! -a l li n t e r f a c e si nA r e a0 .
R1-2503
i n t e r f a c eL o o p b a c k 0 i pa d d r e s s1 7 2 . 1 6 . 1 0 . 3 62 5 5 . 2 5 5 . 2 5 5 . 2 4 0 ! i n t e r f a c eS e r i a l 0
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
3/8
2/3/2014
i n t e r f a c eS e r i a l 0 i pa d d r e s s1 9 2 . 1 6 . 6 4 . 12 5 5 . 2 5 5 . 2 5 5 . 0 i po s p fm e s s a g e d i g e s t k e y1m d 5c 1 $ c 0
Note: The area authentication message-digest command in this configuration enables authentication for all of the router interfaces in a particular area. You can also use the ip ospf authentication message-digest command under the interface to configure MD5 authentication for the specific interface. This command can be used if a different authentication method or no authentication method is configured under the area to which the interface belongs. It overrides the authentication method configured for the area. This is useful if different interfaces that belong to the same area need to use different authentication methods.
Verify
These sections provide information you can use to confirm your configurations work properly. Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.
The show ip ospf neighbor command displays the neighbor table that consists of the neighbor details, as this output shows.
R 1 2 5 0 3 #s h o wi po s p fn e i g h b o r N e i g h b o rI D 7 0 . 7 0 . 7 0 . 7 0 P r i 1 S t a t e F U L L / D e a dT i m e 0 0 : 0 0 : 3 1 A d d r e s s 1 9 2 . 1 6 . 6 4 . 2 I n t e r f a c e S e r i a l 0
The show ip route command displays the routing table, as this output shows.
R 1 2 5 0 3 #s h o wi pr o u t e C o d e s :C-c o n n e c t e d ,S-s t a t i c ,I-I G R P ,R-R I P ,M-m o b i l e ,B-B G P D-E I G R P ,E X-E I G R Pe x t e r n a l ,O-O S P F ,I A-O S P Fi n t e ra r e a N 1-O S P FN S S Ae x t e r n a lt y p e1 ,N 2-O S P FN S S Ae x t e r n a lt y p e2 E 1-O S P Fe x t e r n a lt y p e1 ,E 2-O S P Fe x t e r n a lt y p e2 ,E-E G P i-I S I S ,L 1-I S I Sl e v e l 1 ,L 2-I S I Sl e v e l 2 ,i a-I S I Si n t e ra r e a *-c a n d i d a t ed e f a u l t ,U-p e r u s e rs t a t i cr o u t e ,o-O D R P-p e r i o d i cd o w n l o a d e ds t a t i cr o u t e G a t e w a yo fl a s tr e s o r ti sn o ts e t 7 0 . 0 . 0 . 0 / 3 2i ss u b n e t t e d ,1s u b n e t s 7 0 . 7 0 . 7 0 . 7 0[ 1 1 0 / 6 5 ]v i a1 9 2 . 1 6 . 6 4 . 2 ,0 0 : 0 3 : 2 8 ,S e r i a l 0 1 7 2 . 1 6 . 0 . 0 / 2 8i ss u b n e t t e d ,1s u b n e t s 1 7 2 . 1 6 . 1 0 . 3 2i sd i r e c t l yc o n n e c t e d ,L o o p b a c k 0 1 9 2 . 1 6 . 6 4 . 0 / 2 4i sd i r e c t l yc o n n e c t e d ,S e r i a l 0
O C C
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
4/8
2/3/2014
The show ip ospf neighbor command displays the neighbor table that consists of the neighbor details, as this output shows.
R 1 2 5 0 3 #s h o wi po s p fn e i g h b o r N e i g h b o rI D 7 0 . 7 0 . 7 0 . 7 0 R 1 2 5 0 3 # P r i 1 S t a t e F U L L / D e a dT i m e 0 0 : 0 0 : 3 4 A d d r e s s 1 9 2 . 1 6 . 6 4 . 2 I n t e r f a c e S e r i a l 0
The show ip route command displays the routing table, as this output shows.
R 1 2 5 0 3 #s h o wi pr o u t e C o d e s :C-c o n n e c t e d ,S-s t a t i c ,I-I G R P ,R-R I P ,M-m o b i l e ,B-B G P D-E I G R P ,E X-E I G R Pe x t e r n a l ,O-O S P F ,I A-O S P Fi n t e ra r e a N 1-O S P FN S S Ae x t e r n a lt y p e1 ,N 2-O S P FN S S Ae x t e r n a lt y p e2 E 1-O S P Fe x t e r n a lt y p e1 ,E 2-O S P Fe x t e r n a lt y p e2 ,E-E G P i-I S I S ,L 1-I S I Sl e v e l 1 ,L 2-I S I Sl e v e l 2 ,i a-I S I Si n t e ra r e a *-c a n d i d a t ed e f a u l t ,U-p e r u s e rs t a t i cr o u t e ,o-O D R P-p e r i o d i cd o w n l o a d e ds t a t i cr o u t e G a t e w a yo fl a s tr e s o r ti sn o ts e t 7 0 . 0 . 0 . 0 / 3 2i ss u b n e t t e d ,1s u b n e t s 7 0 . 7 0 . 7 0 . 7 0[ 1 1 0 / 6 5 ]v i a1 9 2 . 1 6 . 6 4 . 2 ,0 0 : 0 1 : 2 3 ,S e r i a l 0 1 7 2 . 1 6 . 0 . 0 / 2 8i ss u b n e t t e d ,1s u b n e t s 1 7 2 . 1 6 . 1 0 . 3 2i sd i r e c t l yc o n n e c t e d ,L o o p b a c k 0 1 9 2 . 1 6 . 6 4 . 0 / 2 4i sd i r e c t l yc o n n e c t e d ,S e r i a l 0
O C C
Troubleshoot
These sections provide information you can use to troubleshoot your configurations. Issue the debug ip ospf adj command in order to capture the authentication process. This debug command should be issued before the neighbor relationship is established. Note: Refer to Important Information on Debug Commands before you use debug commands.
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
0 0 : 5 1 : 0 4 :% L I N E P R O T O 5 U P D O W N :L i n ep r o t o c o lo nI n t e r f a c eS e r i a l 0 ,
5/8
2/3/2014
This is the output of the debug ip ospf adj command when there is a mismatch in the type of authentication configured on the routers. This output shows that Router R1-2503 uses type 1 authentication whereas router R2-2503 is configured for type 0 authentication. This means that Router R1-2503 is configured for plain text authentication (Type 1) whereas Router R2-2503 is configured for null authentication (Type 0).
R 1 2 5 0 3 #d e b u gi po s p fa d j 0 0 : 5 1 : 2 3 :O S P F :R c vp k tf r o m1 9 2 . 1 6 . 6 4 . 2 ,S e r i a l 0:M i s m a t c h A u t h e n t i c a t i o nt y p e . ! -I n p u tp a c k e ts p e c i f i e dt y p e0 ,y o uu s et y p e1 .
This is the output of the debug ip ospf adj command when there is a mismatch in the authentication key (password) values. In this case, both routers are configured for plain text authentication (Type 1) but there is a mismatch in the key (password) values.
R 1 2 5 0 3 #d e b u gi po s p fa d j 0 0 : 5 1 : 3 3 :O S P F :R c vp k tf r o m1 9 2 . 1 6 . 6 4 . 2 ,S e r i a l 0:M i s m a t c h A u t h e n t i c a t i o nK e y-C l e a rT e x t
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
6/8
2/3/2014
This is the output of the debug ip ospf adj command when there is a mismatch in the type of authentication configured on the routers. This output shows that the router R1-2503 uses type 2 (MD5) authentication whereas Router R2-2503 uses type 1 authentication (plain text authentication).
R 1 2 5 0 3 #d e b u gi po s p fa d j 0 0 : 5 9 : 3 3 :O S P F :R c vp k tf r o m1 9 2 . 1 6 . 6 4 . 2 ,S e r i a l 0:M i s m a t c h A u t h e n t i c a t i o nt y p e . ! -I n p u tp a c k e ts p e c i f i e dt y p e1 ,y o uu s et y p e2 .
This is the output of the debug ip ospf adj command when there is a mismatch in the key IDs that are used for authentication. This output shows that the router R1-2503 uses MD5 authentication with Key ID 1, whereas the Router R2-2503 uses MD5 authentication with Key ID 2.
R 1 2 5 0 3 #d e b u gi po s p fa d j 0 0 : 5 9 : 3 3 :O S P F :S e n dw i t hy o u n g e s tK e y1 0 0 : 5 9 : 4 3 :O S P F :R c vp k tf r o m1 9 2 . 1 6 . 6 4 . 2 ,S e r i a l 0:M i s m a t c h A u t h e n t i c a t i o nK e y-N om e s s a g ed i g e s tk e y2o ni n t e r f a c e
This debug ip ospf adj command output for R1-2503 shows when both Key 1 and Key 2 for MD5 authentication are configured as part of migration.
R 1 2 5 0 3 #d e b u gi po s p fa d j 0 0 : 5 9 : 4 3 :O S P F :S e n dw i t hy o u n g e s tK e y1 0 0 : 5 9 : 5 3 :O S P F :S e n dw i t hy o u n g e s tK e y2 ! -I n f o r m st h a tt h i sr o u t e ri sa l s oc o n f i g u r e d ! -f o rK e y2a n db o t hr o u t e r sn o wu s eK e y2 . 0 1 : 0 0 : 5 3 :O S P F :2W a yC o m m u n i c a t i o nt o7 0 . 7 0 . 7 0 . 7 0 o nS e r i a l 0 ,s t a t e2 W A Y R 1 2 5 0 3 #
Related Information
Configuring OSPF Authentication on a Virtual Link Why Does the show ip ospf neighbor Command Reveal Neighbors in the Init State? OSPF Commands OSPF Configuration Examples OSPF Technology Support Page Technical Support & Documentation - Cisco Systems
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
7/8
2/3/2014
Yes
No
The Cisco Support Community is a forum for you to ask and answer questions, share suggestions, and collaborate with your peers. Refer to Cisco Technical Tips Conventions for information on conventions used in this document.
Information For
Small Business Midsize Business Service Provider Executives Home (Linksys)
Support
Dow nloads Documentation
About Cisco
Investor Relations Corporate Social Responsibility Environmental Sustainability Tomorrow Starts Here Career Opportunities
Communities
Developer Netw ork Learning Netw ork Support Community
Technology Trends
Cloud IPv6 Mobility Open Netw ork Environment Trustw orthy Systems
Industries Contacts
Contact Cisco Find a Partner
Programs
Cisco Designated VIP Program Cisco Pow ered Financing Options
Video Portal
Contacts |
Feedback | Help | Site Map | Terms & Conditions | Privacy Statement | Cookie Policy | Trademarks
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094069.shtml
8/8