madwulf

CSR1

Jan 28th, 2022
2,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. #Definition of keyrings
  2. CSR1(config)#crypto ikev2 keyring MyRing
  3. CSR1(config-ikev2-keyring)#peer Site2
  4. CSR1(config-ikev2-keyring-peer)#address 110.95.22.2
  5. CSR1(config-ikev2-keyring-peer)#pre-shared-key local site1
  6. CSR1(config-ikev2-keyring-peer)#pre-shared-key remote site2
  7.  
  8. crypto ikev2 keyring MyRing
  9. peer Site2
  10. address 110.95.22.2
  11. pre-shared-key local site1
  12. pre-shared-key remote site2
  13. !
  14.  
  15. #IKEv2 proposal
  16. CSR1(config)#crypto ikev2 proposal Site2
  17. CSR1(config-ikev2-proposal)#encryption aes-cbc-256
  18. CSR1(config-ikev2-proposal)#integrity sha256
  19. CSR1(config-ikev2-proposal)#prf sha256
  20. CSR1(config-ikev2-proposal)#group 24
  21.  
  22. CSR1#sh crypto ikev2 proposal Site2
  23. IKEv2 proposal: Site2
  24. Encryption : AES-CBC-256
  25. Integrity : SHA256
  26. PRF : SHA256
  27. DH Group : DH_GROUP_2048_256_MODP/Group 24
  28.  
  29. #IKEv2 policy
  30. CSR1(config)#crypto ikev2 policy Site2
  31. CSR1(config-ikev2-policy)#proposal Site2
  32.  
  33. CSR1#sh crypto ikev2 policy Site2
  34. IKEv2 policy : Site2
  35. Match fvrf : global
  36. Match address local : any
  37. Proposal : Site2
  38.  
  39.  
  40. #IKEv2 Profile
  41. CSR1(config)#crypto ikev2 profile Site2
  42. CSR1(config-ikev2-profile)#match address local 197.65.213.2
  43. CSR1(config-ikev2-profile)#match identity remote address 110.95.22.2
  44. CSR1(config-ikev2-profile)#authentication local pre-share
  45. CSR1(config-ikev2-profile)#authentication remote pre-share
  46. CSR1(config-ikev2-profile)#keyring local MyRing
  47.  
  48. CSR1#sh crypto ikev2 profile Site2
  49.  
  50. IKEv2 profile: Site2
  51. Ref Count: 1
  52. Match criteria:
  53. Fvrf: global
  54. Local address/interface:
  55. 197.65.213.2
  56. Identities:
  57. address 110.95.22.2 255.255.255.255
  58. Certificate maps: none
  59. Local identity: none
  60. Remote identity: none
  61. Local authentication method: pre-share
  62. Remote authentication method(s): pre-share
  63. EAP options: none
  64. Keyring: MyRing
  65. Trustpoint(s): none
  66. Lifetime: 86400 seconds
  67. DPD: disabled
  68. NAT-keepalive: disabled
  69. Ivrf: none
  70. Virtual-template: none
  71. mode auto: none
  72. AAA AnyConnect EAP authentication mlist: none
  73. AAA EAP authentication mlist: none
  74. AAA Accounting: none
  75. AAA group authorization: none
  76. AAA user authorization: none
  77.  
  78. #Transofrm set
  79. CSR1(config)#crypto ipsec transform-set TS1 esp-aes 256
  80.  
  81. CSR1#sh crypto ipsec transform-set
  82. Transform set default: { esp-aes esp-sha-hmac }
  83. will negotiate = { Transport, },
  84.  
  85. Transform set TS1: { esp-256-aes }
  86. will negotiate = { Tunnel, },
  87.  
  88. #Interesting Traffic
  89. CSR1(config)#ip access-list extended IT
  90. CSR1(config-ext-nacl)#permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
  91.  
  92. #Crypto Map
  93. CSR1(config)#crypto map Crypto_Map 100 ipsec-isakmp
  94. CSR1(config-crypto-map)#set peer 110.95.22.2
  95. CSR1(config-crypto-map)#set ikev2-profile Site2
  96. CSR1(config-crypto-map)#set transform-set TS1
  97. CSR1(config-crypto-map)#match address IT
  98.  
  99. CSR1(config)#int GigabitEthernet1
  100. CSR1(config-if)#crypto map Crypto_Map
  101.  
  102. CSR1#sh crypto map
  103. Crypto Map IPv4 "Crypto_Map" 100 ipsec-isakmp
  104. Peer = 110.95.22.2
  105. IKEv2 Profile: Site2
  106. Extended IP access list IT
  107. access-list IT permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
  108. Current peer: 110.95.22.2
  109. Security association lifetime: 4608000 kilobytes/3600 seconds
  110. Responder-Only (Y/N): N
  111. PFS (Y/N): N
  112. Mixed-mode : Disabled
  113. Transform sets={
  114. TS1: { esp-256-aes } ,
  115. }
  116. Interfaces using crypto map Crypto_Map:
  117. GigabitEthernet1
  118.  
  119. Interfaces using crypto map NiStTeSt1:
  120.  
  121. #NAT
  122. CSR1(config)#ip access-list extended NAT
  123. CSR1(config-ext-nacl)#10 deny ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255
  124. CSR1(config-ext-nacl)#20 permit ip 192.168.1.0 0.0.0.255 any
  125. ip nat inside source list NAT interface GigabitEthernet1 overload
Advertisement
Add Comment
Please, Sign In to add comment