Advertisement
D0cEvil

Cisco L3 Switch config example

Dec 6th, 2022
1,062
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.99 KB | None | 0 0
  1. hostname CORE1
  2. !----SERVICES----!
  3. service password-encryption
  4. service timestamps log datetime msec
  5. no service dhcp
  6. !----USERS, SECURITY`----!
  7. username admin privilege 1 secret admin
  8. enable secret cisco
  9. !----AAA----!
  10. aaa new-model
  11. aaa authentication login default local
  12. !----CONSOLE, VTY---!
  13. line console 0
  14. logging synchronous
  15. exec-timeout 5 0
  16. exit
  17. line vty 0 15
  18. logging synchronous
  19. exec-timeout 0 15
  20. exit
  21. line vty 0 4
  22. transport input ssh
  23. transport output ssh
  24. exit
  25. !----IP, DNS, SSH----!
  26. ip domain-name core1
  27. ip domain name contoso.com
  28. ip ssh version 2
  29. crypto key generate rsa
  30. 2048
  31.  
  32. ip routing
  33. ip route 0.0.0.0 0.0.0.0 10.1.1.2
  34. !----VLAN----!
  35. vlan 10
  36. name Users
  37. exit
  38. vlan 20
  39. name Management
  40. exit
  41. vlan 100
  42. name Native
  43. exit
  44. !----VTP----!
  45. vtp version 2
  46. vtp mode server
  47. vtp domain contoso.com
  48. vtp password P@ssw0rd
  49. !----STP----!
  50. spanning-tree mode rapid-pvst
  51. spanning-tree portfast default
  52. !----INTERFACES----!
  53. interface range fa0/1-2
  54. no spanning-tree portfast
  55. channel-group 1 mode active
  56. channel-protocol lacp
  57. description Po1
  58. exit
  59. interface Po1
  60. no spanning-tree portfast
  61. switchport trunk encapsulation dot1q
  62. switchport mode trunk
  63. switchport trunk allowed vlan all
  64. switchport trunk native vlan 100
  65. description SW1
  66. exit
  67. interface range fa0/3-4
  68. no spanning-tree portfast
  69. channel-group 2 mode active
  70. channel-protocol lacp
  71. description Po2
  72. exit
  73. interface Po2
  74. no spanning-tree portfast
  75. switchport trunk encapsulation dot1q
  76. switchport mode trunk
  77. switchport trunk allowed vlan all
  78. switchport trunk native vlan 100
  79. description SW2
  80. exit
  81. interface Gi 0/1
  82. no switchport
  83. ip address 10.1.1.1 255.255.255.252
  84. no shutdown
  85. description R1
  86. exit
  87. !----SVI----!
  88. interface vlan 1
  89. shutdown
  90. exit
  91. interface vlan 10
  92. ip address 172.16.10.1 255.255.255.0
  93. description VLAN 10 Users
  94. no shutdown
  95. exit
  96. interface vlan 20
  97. ip address 172.16.20.1 255.255.255.0
  98. description VLAN 20 Management
  99. no shutdown
  100. exit
  101. interface vlan 100
  102. description VLAN 100 Native
  103. description Native
  104. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement