├── LICENSE ├── README.md ├── containerlab ├── README.md ├── ceos-evpn-overlaid.clab.yml ├── configs │ ├── leaf1-full.cfg │ ├── leaf1-start.cfg │ ├── leaf2-full.cfg │ ├── leaf2-start.cfg │ ├── leaf3-full.cfg │ ├── leaf3-start.cfg │ ├── leaf4-full.cfg │ ├── leaf4-start.cfg │ ├── leaf5-full.cfg │ ├── leaf5-start.cfg │ ├── leaf6-full.cfg │ ├── leaf6-start.cfg │ ├── leaf7-full.cfg │ ├── leaf7-start.cfg │ ├── leaf8-full.cfg │ ├── leaf8-start.cfg │ ├── spine1-full.cfg │ ├── spine1-start.cfg │ ├── spine2-full.cfg │ └── spine2-start.cfg ├── lab3-full.yml ├── lab3-start.yml ├── scripts │ ├── ansible_hosts.sh │ ├── fingerprints.sh │ ├── id_rsa │ ├── id_rsa.pub │ └── lab-management.sh ├── solutions │ ├── lab1.yml │ ├── lab2.yml │ ├── lab3-full.yml │ └── lab3-start.yml └── srlceos01.clab.yml ├── labs ├── README.md ├── lab-0 │ ├── README.md │ └── images │ │ ├── 0_overview.png │ │ ├── 10_terminal.png │ │ ├── 11_terminal.png │ │ ├── 1_welcome.png │ │ ├── 2_selection.png │ │ ├── 3_extensions.png │ │ ├── 4_extensions.png │ │ ├── 5_extensions.png │ │ ├── 6_folder.png │ │ ├── 7_trust.png │ │ ├── 8_file.png │ │ └── 9_file.png ├── lab-1 │ ├── README.md │ ├── accept.png │ ├── ansible_network_testing.png │ ├── containerlab_overview.png │ ├── solutions │ │ ├── arp_check.yml │ │ ├── backup_arista.yml │ │ ├── check_port.yml │ │ ├── eos_facts.yml │ │ ├── network_documentation.yml │ │ ├── ping.yml │ │ └── show_info.yml │ └── terminal.png ├── lab-2 │ ├── README.md │ ├── lab2-config.png │ ├── lab2-overview.png │ └── solutions │ │ ├── cmd_config │ │ ├── cmd_config.yml │ │ └── host_vars │ │ │ ├── clab-lab2-leaf1 │ │ │ └── clab-lab2-leaf2 │ │ ├── config_lines │ │ ├── config_lines.yml │ │ ├── host_vars │ │ │ ├── clab-lab2-leaf1 │ │ │ └── clab-lab2-leaf2 │ │ ├── leaf1.cfg │ │ └── leaf2.cfg │ │ ├── config_static │ │ ├── config_static.yml │ │ ├── leaf1.cfg │ │ └── leaf2.cfg │ │ └── module_config │ │ ├── host_vars │ │ ├── clab-lab2-leaf1 │ │ └── clab-lab2-leaf2 │ │ └── module_config.yml └── lab-3 │ ├── README.md │ ├── overview-evpn-bgp.png │ └── todo.md ├── provision ├── README.md ├── containerlab-setup.yml ├── install.sh ├── install.yml ├── rhel9-instance.yml ├── roles │ ├── containerlab │ │ ├── README.md │ │ ├── defaults │ │ │ └── main.yml │ │ ├── files │ │ │ ├── advanced-networking-workshop_id_rsa │ │ │ ├── bash_profile │ │ │ ├── collections.tar.gz │ │ │ └── student │ │ ├── handlers │ │ │ └── main.yml │ │ ├── meta │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml │ │ ├── tests │ │ │ ├── inventory │ │ │ └── test.yml │ │ └── vars │ │ │ └── main.yml │ └── vscodeserver │ │ ├── README.md │ │ ├── defaults │ │ └── main.yml │ │ ├── files │ │ └── config.yaml │ │ ├── handlers │ │ └── main.yml │ │ ├── meta │ │ └── main.yml │ │ ├── tasks │ │ └── main.yml │ │ ├── templates │ │ ├── code-server.j2 │ │ ├── nginx-default.j2 │ │ └── nginx.j2 │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ ├── vars │ │ └── main.yml │ │ └── vscodeserver │ │ ├── README.md │ │ ├── defaults │ │ └── main.yml │ │ ├── files │ │ └── config.yaml │ │ ├── handlers │ │ └── main.yml │ │ ├── meta │ │ └── main.yml │ │ ├── tasks │ │ └── main.yml │ │ ├── templates │ │ ├── code-server.j2 │ │ ├── nginx-default.j2 │ │ └── nginx.j2 │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ └── vars │ │ └── main.yml ├── vars │ └── vars.yml └── vscode-server.yml └── scripts ├── ansible_hosts.sh ├── fingerprints.sh ├── id_rsa ├── id_rsa.pub └── install.sh /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # advanced-networking-workshop 2 | Hello and welcome to this more advanced Ansible workshop on the topic of network automation. 3 | 4 | Scroll down past the overview if you want information about how to install this workshop. 5 | 6 | :boom: If you are a person who are performing this workshop, click on the link of Section 0: Instroduction to the lab. 7 | 8 | :exclamation: If you find any issues, please consider to contribute a fix. 9 | 10 | ## Overview of lab excercises 11 | ### [Section 0: Introduction to the lab](labs/lab-0/README.md) 12 | ``` 13 | 0.1: Introduction to the workshop 14 | 0.2: Technical prerequisites 15 | 0.3: Knowledge prerequisites 16 | 0.4: What this workshop is NOT about 17 | 0.5: Lab graphics 18 | 0.6: If something goes wrong 19 | 0.7: Preparing to do the lab 20 | 0.8: Accessing the lab for the first time 21 | ``` 22 | 23 | ### [Section 1: Fundamentals, test automation, information related tasks](labs/lab-1/README.md) 24 | ``` 25 | 1.1: Different Ansible approaches to automating network devices 26 | 1.1.1: Vendor differences 27 | 1.1.2: Network test automation (using ContainerLab) 28 | 1.1.2.1: Creating a containerlab test environment 29 | 1.1.3: Gathering information 30 | 1.1.3.1: Using the command module 31 | 1.1.3.2: Performing backups 32 | 1.1.3.3: Documenting your network 33 | 1.1.3.4: Adding intelligence to your playbooks 34 | 1.1.3.5: Operational use-cases 35 | ``` 36 | 37 | ### [Section 2: Applying configuration to devices](labs/lab-2/README.md) 38 | ``` 39 | 2.1: Building a new containerlab environment 40 | 2.2: Reviewing the initial desired configuration state 41 | 2.3: Using the command module to accomplish our desired state 42 | 2.3.1: Assessing the use of the command module 43 | 2.4: Learning Network Resource modules 44 | 2.4.1: module state: "merged" (often the default) 45 | 2.4.2: module state: "replaced" 46 | 2.4.3: module state: "overridden" 47 | 2.4.4: module state: "deleted" 48 | 2.4.5: module state: "gathered" 49 | 2.4.6: module state: "rendered" and "parsed" 50 | 2.5: Reset your lab environment 51 | 2.6: Using network resource modules to archieve the desired configuration state 52 | 2.6.1: Assessing the use of purpose specific configuration modules 53 | 2.7: Using config modules to make changes 54 | 2.7.1: Using the config module to load static config files into devices 55 | 2.7.2: Using the config module to inject lines of config into devices 56 | 2.7.3: Using the config module to load dynamic config files into devices 57 | ``` 58 | 59 | ### [Section 3: Applying best practices to build a BGP EVPN architecture](labs/lab-3/README.md) 60 | ``` 61 | 3.1 Review of containerlab and desired state device configuration 62 | 3.2 Automating your network 63 | 3.3. Validating your setup 64 | ``` 65 | 66 | # Installation of lab infrastructure 67 | 68 | :exclamation: Below instructions are only for people who need to install the lab environment themselves, not for people who are students in a pre-setup workshop. 69 | :exclamation: The playbooks in the provision directory are for setting this workshop up at scale on AWS and may have to be adjusted if you are to use them. Below instructions allows you to setup this workshop on a local system, without a VScode instance. 70 | 71 | To get the containerlab setup working on Fedora 39 or Red Hat Enterprise Linux 9.4, using podman: 72 | 1. Install podman 73 | ``` 74 | $ sudo dnf install podman podman-docker git ansible 75 | ``` 76 | 77 | 2. Start podman services: 78 | ``` 79 | $ sudo systemctl enable podman --now 80 | ``` 81 | 82 | 3. Install containerlab and configure it to work with SELinux 83 | ``` 84 | $ sudo bash -c "$(curl -sL https://get.containerlab.dev)" 85 | $ sudo semanage fcontext -a -t textrel_shlib_t $(which containerlab) 86 | $ sudo restorecon $(which containerlab) 87 | ``` 88 | 89 | 4. Download the cEOS 4.32.0F container image from Arista 90 | 91 | 5. Do a podman import on this image (yeah, needs to be done as root, as containerlab requires things to be run as root). 92 | ``` 93 | $ sudo podman import cEOS64-lab-4.32.0F.tar.tar ceos:4.32.0F 94 | ``` 95 | 96 | 6. Clone this repository into your /home/user directory 97 | ``` 98 | cd ~ 99 | git clone https://github.com/mglantz/advanced-networking-workshop 100 | ``` 101 | 102 | 7. Configure environment 103 | ``` 104 | $ export LABDIR="$HOME/advanced-networking-workshop" 105 | $ eval $(ssh-agent -s) 106 | $ cp $LABDIR/scripts/id_rsa ~/.ssh/adv-networking 107 | $ chmod 600 ~/.ssh/adv-networking 108 | $ ssh-add ~/.ssh/adv-networking 109 | ``` 110 | 111 | 8. Do a test start of a containerlab 112 | ``` 113 | cd $LABDIR/containerlab 114 | sudo containerlab --runtime podman deploy -t solutions/lab1.yml 115 | ``` 116 | 117 | 9. Validate setup by accessing the switches. 118 | ``` 119 | ssh admin@IPv4-address-of-switch 120 | # User/password is: admin/admin but you should be automatically logged in via your ssh key. 121 | ``` 122 | 123 | 10. Now you are ready to start the lab. [Goto lab-0/README.md](labs/lab-0/README.md). 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /containerlab/README.md: -------------------------------------------------------------------------------- 1 | # ContainerLab setup 2 | 3 | ## ceos-evpn-overlaid.clab.yml 4 | This configuration file sets up an empty environment (switches are then not configured). 5 | 6 | ## ceos-evpn-overlaid.clab-full.yml 7 | This configuration file sets up the environment fully configured. 8 | 9 | ## Credentials 10 | The user / password for the switches is admin / admin. 11 | The private and public SSH keys used are located in the advanced-networking-workshop/scripts folder. 12 | -------------------------------------------------------------------------------- /containerlab/ceos-evpn-overlaid.clab.yml: -------------------------------------------------------------------------------- 1 | # https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/ 2 | name: EVPN-Overlaid 3 | topology: 4 | kinds: 5 | ceos: 6 | image: localhost/ceos:4.32.0F 7 | linux: 8 | image: ubuntu 9 | nodes: 10 | leaf1: 11 | kind: ceos 12 | leaf2: 13 | kind: ceos 14 | leaf3: 15 | kind: ceos 16 | leaf4: 17 | kind: ceos 18 | leaf5: 19 | kind: ceos 20 | leaf6: 21 | kind: ceos 22 | leaf7: 23 | kind: ceos 24 | leaf8: 25 | kind: ceos 26 | spine1: 27 | kind: ceos 28 | spine2: 29 | kind: ceos 30 | host1: 31 | kind: linux 32 | host2: 33 | kind: linux 34 | host3: 35 | kind: linux 36 | host4: 37 | kind: linux 38 | links: 39 | - endpoints: ["leaf1:eth7", "host1:eth1"] 40 | - endpoints: ["leaf1:eth8", "host1:eth2"] 41 | - endpoints: ["leaf2:eth7", "host1:eth3"] 42 | - endpoints: ["leaf2:eth8", "host1:eth4"] 43 | - endpoints: ["leaf1:eth9", "leaf2:eth9"] 44 | - endpoints: ["leaf1:eth10", "leaf2:eth10"] 45 | - endpoints: ["leaf1:eth11", "spine1:eth1"] 46 | - endpoints: ["leaf1:eth12", "spine2:eth1"] 47 | - endpoints: ["leaf2:eth11", "spine1:eth2"] 48 | - endpoints: ["leaf2:eth12", "spine2:eth2"] 49 | - endpoints: ["leaf3:eth7", "host2:eth1"] 50 | - endpoints: ["leaf3:eth8", "host2:eth2"] 51 | - endpoints: ["leaf4:eth7", "host2:eth3"] 52 | - endpoints: ["leaf4:eth8", "host2:eth4"] 53 | - endpoints: ["leaf3:eth9", "leaf4:eth9"] 54 | - endpoints: ["leaf3:eth10", "leaf4:eth10"] 55 | - endpoints: ["leaf3:eth11", "spine1:eth3"] 56 | - endpoints: ["leaf3:eth12", "spine2:eth3"] 57 | - endpoints: ["leaf4:eth11", "spine1:eth4"] 58 | - endpoints: ["leaf4:eth12", "spine2:eth4"] 59 | - endpoints: ["leaf5:eth7", "host3:eth1"] 60 | - endpoints: ["leaf5:eth8", "host3:eth2"] 61 | - endpoints: ["leaf6:eth7", "host3:eth3"] 62 | - endpoints: ["leaf6:eth8", "host3:eth4"] 63 | - endpoints: ["leaf5:eth9", "leaf6:eth9"] 64 | - endpoints: ["leaf5:eth10", "leaf6:eth10"] 65 | - endpoints: ["leaf5:eth11", "spine1:eth5"] 66 | - endpoints: ["leaf5:eth12", "spine2:eth5"] 67 | - endpoints: ["leaf6:eth11", "spine1:eth6"] 68 | - endpoints: ["leaf6:eth12", "spine2:eth6"] 69 | - endpoints: ["leaf7:eth7", "host4:eth1"] 70 | - endpoints: ["leaf7:eth8", "host4:eth2"] 71 | - endpoints: ["leaf8:eth7", "host4:eth3"] 72 | - endpoints: ["leaf8:eth8", "host4:eth4"] 73 | - endpoints: ["leaf7:eth9", "leaf8:eth9"] 74 | - endpoints: ["leaf7:eth10", "leaf8:eth10"] 75 | - endpoints: ["leaf7:eth11", "spine1:eth7"] 76 | - endpoints: ["leaf7:eth12", "spine2:eth7"] 77 | - endpoints: ["leaf8:eth11", "spine1:eth8"] 78 | - endpoints: ["leaf8:eth12", "spine2:eth8"] 79 | -------------------------------------------------------------------------------- /containerlab/configs/leaf1-full.cfg: -------------------------------------------------------------------------------- 1 | leaf1#sh run 2 | ! Command: show running-config 3 | ! device: leaf1 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$QrimPGGODJJrmHEp$5N/GvjbrC5j0o84ww9vAXkd3Roo57pGidW8l601OuXSBF/mBFDY5j4/z82S/JcVJiJmmyExIljTf4BZzi8HRH0 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | transceiver qsfp default-mode 4x10G 11 | ! 12 | service routing protocols model multi-agent 13 | ! 14 | hostname leaf1 15 | ! 16 | spanning-tree mode mstp 17 | no spanning-tree vlan-id 4090 18 | ! 19 | vlan 40 20 | name test-l2-vxlan 21 | ! 22 | vlan 4090 23 | name mlag-peer 24 | trunk group mlag-peer 25 | ! 26 | management api http-commands 27 | no shutdown 28 | ! 29 | management api gnmi 30 | transport grpc default 31 | ! 32 | management api netconf 33 | transport ssh default 34 | ! 35 | interface Port-Channel111 36 | description Host1 37 | switchport mode trunk 38 | mlag 111 39 | spanning-tree link-type point-to-point 40 | ! 41 | interface Port-Channel999 42 | description MLAG Peer 43 | switchport mode trunk 44 | switchport trunk group mlag-peer 45 | spanning-tree link-type point-to-point 46 | ! 47 | interface Ethernet7 48 | description Host1 49 | channel-group 111 mode active 50 | ! 51 | interface Ethernet8 52 | description Host1 53 | channel-group 111 mode active 54 | ! 55 | interface Ethernet9 56 | description mlag peer link 57 | channel-group 999 mode active 58 | ! 59 | interface Ethernet10 60 | description mlag peer link 61 | channel-group 999 mode active 62 | ! 63 | interface Ethernet11 64 | description spine1 65 | mtu 9214 66 | no switchport 67 | ip address 10.0.1.1/31 68 | ! 69 | interface Ethernet12 70 | description spine2 71 | mtu 9214 72 | no switchport 73 | ip address 10.0.2.1/31 74 | ! 75 | interface Loopback0 76 | ip address 10.0.250.11/32 77 | ! 78 | interface Loopback1 79 | ip address 10.0.255.11/32 80 | ! 81 | interface Management0 82 | ip address 172.20.20.6/24 83 | ipv6 address 2001:172:20:20::6/64 84 | ! 85 | interface Vlan40 86 | ip address 192.168.215.10/24 87 | ! 88 | interface Vlan4090 89 | no autostate 90 | ip address 10.0.199.254/31 91 | ! 92 | interface Vxlan1 93 | vxlan source-interface Loopback1 94 | vxlan udp-port 4789 95 | vxlan vlan 40 vni 100040 96 | vxlan learn-restrict any 97 | ! 98 | ip virtual-router mac-address c0:01:ca:fe:ba:be 99 | ! 100 | ip routing 101 | ! 102 | mlag configuration 103 | domain-id leafs 104 | local-interface Vlan4090 105 | peer-address 10.0.199.255 106 | peer-link Port-Channel999 107 | ! 108 | router bgp 65001 109 | router-id 10.0.250.11 110 | no bgp default ipv4-unicast 111 | distance bgp 20 200 200 112 | maximum-paths 4 ecmp 64 113 | neighbor evpn peer group 114 | neighbor evpn remote-as 65000 115 | neighbor evpn update-source Loopback0 116 | neighbor evpn ebgp-multihop 3 117 | neighbor evpn send-community extended 118 | neighbor evpn maximum-routes 12000 warning-only 119 | neighbor underlay peer group 120 | neighbor underlay remote-as 65000 121 | neighbor underlay maximum-routes 12000 warning-only 122 | neighbor underlay_ibgp peer group 123 | neighbor underlay_ibgp remote-as 65001 124 | neighbor underlay_ibgp next-hop-self 125 | neighbor underlay_ibgp maximum-routes 12000 warning-only 126 | neighbor 10.0.1.0 peer group underlay 127 | neighbor 10.0.2.0 peer group underlay 128 | neighbor 10.0.199.255 peer group underlay_ibgp 129 | neighbor 10.0.250.1 peer group evpn 130 | neighbor 10.0.250.2 peer group evpn 131 | ! 132 | vlan 40 133 | rd 65001:100040 134 | route-target both 40:100040 135 | redistribute learned 136 | ! 137 | address-family evpn 138 | neighbor evpn activate 139 | ! 140 | address-family ipv4 141 | neighbor underlay activate 142 | neighbor underlay_ibgp activate 143 | network 10.0.250.11/32 144 | network 10.0.255.11/32 145 | ! 146 | aaa authorization exec default local 147 | ! 148 | end 149 | leaf1# 150 | -------------------------------------------------------------------------------- /containerlab/configs/leaf1-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf1 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$pgp7vrOg4hZb1nqq$xpnPvPleMFtnajboQ2zvrKfsQwAQZ4HkTpz1M83o/TiGxRvxvks/3mpmbea2BD8PX1PH/P70WPTvLd0OkJjzn1 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf1 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.2/24 43 | ipv6 address 2001:172:20:20::2/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | -------------------------------------------------------------------------------- /containerlab/configs/leaf2-full.cfg: -------------------------------------------------------------------------------- 1 | leaf2#sh run 2 | ! Command: show running-config 3 | ! device: leaf2 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$J68eOBIgDwrSUcR7$xVCES1LpRwcrCM53N/BY98g0CI.MF1M2ui7ZB/Q8M5/.dHKvaZpDFy.QIDLL5.XVY.e2D3GpZQ12pgv8nk.xv1 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | transceiver qsfp default-mode 4x10G 11 | ! 12 | service routing protocols model multi-agent 13 | ! 14 | hostname leaf2 15 | ! 16 | spanning-tree mode mstp 17 | no spanning-tree vlan-id 4090 18 | ! 19 | vlan 40 20 | name test-l2-vxlan 21 | ! 22 | vlan 4090 23 | name mlag-peer 24 | trunk group mlag-peer 25 | ! 26 | management api http-commands 27 | no shutdown 28 | ! 29 | management api gnmi 30 | transport grpc default 31 | ! 32 | management api netconf 33 | transport ssh default 34 | ! 35 | interface Port-Channel111 36 | description Host1 37 | switchport mode trunk 38 | mlag 111 39 | spanning-tree link-type point-to-point 40 | ! 41 | interface Port-Channel999 42 | description MLAG Peer 43 | switchport mode trunk 44 | switchport trunk group mlag-peer 45 | spanning-tree link-type point-to-point 46 | ! 47 | interface Ethernet7 48 | description Host1 49 | channel-group 111 mode active 50 | ! 51 | interface Ethernet8 52 | description Host1 53 | channel-group 111 mode active 54 | ! 55 | interface Ethernet9 56 | description mlag peer link 57 | channel-group 999 mode active 58 | ! 59 | interface Ethernet10 60 | description mlag peer link 61 | channel-group 999 mode active 62 | ! 63 | interface Ethernet11 64 | description spine1 65 | mtu 9214 66 | no switchport 67 | ip address 10.0.1.3/31 68 | ! 69 | interface Ethernet12 70 | description spine2 71 | mtu 9214 72 | no switchport 73 | ip address 10.0.2.3/31 74 | ! 75 | interface Loopback0 76 | ip address 10.0.250.12/32 77 | ! 78 | interface Loopback1 79 | ip address 10.0.255.11/32 80 | ! 81 | interface Management0 82 | ip address 172.20.20.3/24 83 | ipv6 address 2001:172:20:20::3/64 84 | ! 85 | interface Vlan40 86 | ip address 192.168.215.12/24 87 | ! 88 | interface Vlan4090 89 | no autostate 90 | ip address 10.0.199.255/31 91 | ! 92 | interface Vxlan1 93 | vxlan source-interface Loopback1 94 | vxlan udp-port 4789 95 | vxlan vlan 40 vni 100040 96 | vxlan learn-restrict any 97 | ! 98 | ip virtual-router mac-address c0:01:ca:fe:ba:be 99 | ! 100 | ip routing 101 | ! 102 | mlag configuration 103 | domain-id leafs 104 | local-interface Vlan4090 105 | peer-address 10.0.199.254 106 | peer-link Port-Channel999 107 | ! 108 | router bgp 65001 109 | router-id 10.0.250.12 110 | no bgp default ipv4-unicast 111 | distance bgp 20 200 200 112 | maximum-paths 4 ecmp 64 113 | neighbor evpn peer group 114 | neighbor evpn remote-as 65000 115 | neighbor evpn update-source Loopback0 116 | neighbor evpn ebgp-multihop 3 117 | neighbor evpn send-community extended 118 | neighbor evpn maximum-routes 12000 warning-only 119 | neighbor underlay peer group 120 | neighbor underlay remote-as 65000 121 | neighbor underlay maximum-routes 12000 warning-only 122 | neighbor underlay_ibgp peer group 123 | neighbor underlay_ibgp remote-as 65001 124 | neighbor underlay_ibgp next-hop-self 125 | neighbor underlay_ibgp maximum-routes 12000 warning-only 126 | neighbor 10.0.1.2 peer group underlay 127 | neighbor 10.0.2.2 peer group underlay 128 | neighbor 10.0.199.254 peer group underlay_ibgp 129 | neighbor 10.0.250.1 peer group evpn 130 | neighbor 10.0.250.2 peer group evpn 131 | ! 132 | vlan 40 133 | rd 65001:100040 134 | route-target both 40:100040 135 | redistribute learned 136 | ! 137 | address-family evpn 138 | neighbor evpn activate 139 | ! 140 | address-family ipv4 141 | neighbor underlay activate 142 | neighbor underlay_ibgp activate 143 | network 10.0.250.12/32 144 | network 10.0.255.11/32 145 | ! 146 | end 147 | leaf2# 148 | -------------------------------------------------------------------------------- /containerlab/configs/leaf2-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf2 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$ElaJtr6Urk1INtjC$sHwCvu10Q3WXFrgNx9spTtPPkJrjgjTotSByUwEvUiWcrQgS2D6DmSjn5AiaDTIgKVZFqkL24m92BzLLZbb.b. 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf2 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.10/24 43 | ipv6 address 2001:172:20:20::a/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | 49 | -------------------------------------------------------------------------------- /containerlab/configs/leaf3-full.cfg: -------------------------------------------------------------------------------- 1 | leaf3#term len 0 2 | Pagination disabled. 3 | leaf3#sh run 4 | ! Command: show running-config 5 | ! device: leaf3 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 6 | ! 7 | no aaa root 8 | ! 9 | username admin privilege 15 role network-admin secret sha512 $6$a/XjDa3AQzMWSnBs$uOLTlamhY2g8O63aEkAzQEReeNRmGPSU0wAZvWZpOVcDYQw0sNhXSvQzmkdQ68YEk5eVDSmgw8iGNpJPsfiof0 10 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | service routing protocols model multi-agent 15 | ! 16 | hostname leaf3 17 | ! 18 | spanning-tree mode mstp 19 | no spanning-tree vlan-id 4090 20 | ! 21 | vlan 34 22 | ! 23 | vlan 4090 24 | name mlag-peer 25 | trunk group mlag-peer 26 | ! 27 | vrf instance gold 28 | ! 29 | management api http-commands 30 | no shutdown 31 | ! 32 | management api gnmi 33 | transport grpc default 34 | ! 35 | management api netconf 36 | transport ssh default 37 | ! 38 | interface Port-Channel999 39 | description MLAG Peer 40 | switchport mode trunk 41 | switchport trunk group mlag-peer 42 | spanning-tree link-type point-to-point 43 | ! 44 | interface Ethernet7 45 | ! 46 | interface Ethernet8 47 | ! 48 | interface Ethernet9 49 | description mlag peer link 50 | channel-group 999 mode active 51 | ! 52 | interface Ethernet10 53 | description mlag peer link 54 | channel-group 999 mode active 55 | ! 56 | interface Ethernet11 57 | description spine1 58 | mtu 9214 59 | no switchport 60 | ip address 10.0.1.5/31 61 | ! 62 | interface Ethernet12 63 | description spine2 64 | mtu 9214 65 | no switchport 66 | ip address 10.0.2.5/31 67 | ! 68 | interface Loopback0 69 | ip address 10.0.250.13/32 70 | ! 71 | interface Loopback1 72 | ip address 10.0.255.12/32 73 | ! 74 | interface Management0 75 | ip address 172.20.20.15/24 76 | ipv6 address 2001:172:20:20::f/64 77 | ! 78 | interface Vlan34 79 | vrf gold 80 | ip address 10.34.34.2/24 81 | ip virtual-router address 10.34.34.1 82 | ! 83 | interface Vlan4090 84 | no autostate 85 | ip address 10.0.199.254/31 86 | ! 87 | interface Vxlan1 88 | vxlan source-interface Loopback1 89 | vxlan udp-port 4789 90 | vxlan vrf gold vni 100001 91 | vxlan learn-restrict any 92 | ! 93 | ip virtual-router mac-address c0:01:ca:fe:ba:be 94 | ! 95 | ip routing 96 | ip routing vrf gold 97 | ! 98 | mlag configuration 99 | domain-id leafs 100 | local-interface Vlan4090 101 | peer-address 10.0.199.255 102 | peer-link Port-Channel999 103 | ! 104 | router bgp 65002 105 | router-id 10.0.250.13 106 | no bgp default ipv4-unicast 107 | distance bgp 20 200 200 108 | maximum-paths 4 ecmp 64 109 | neighbor evpn peer group 110 | neighbor evpn remote-as 65000 111 | neighbor evpn update-source Loopback0 112 | neighbor evpn ebgp-multihop 3 113 | neighbor evpn send-community extended 114 | neighbor evpn maximum-routes 12000 warning-only 115 | neighbor underlay peer group 116 | neighbor underlay remote-as 65000 117 | neighbor underlay maximum-routes 12000 warning-only 118 | neighbor underlay_ibgp peer group 119 | neighbor underlay_ibgp remote-as 65002 120 | neighbor underlay_ibgp next-hop-self 121 | neighbor underlay_ibgp maximum-routes 12000 warning-only 122 | neighbor 10.0.1.4 peer group underlay 123 | neighbor 10.0.2.4 peer group underlay 124 | neighbor 10.0.199.255 peer group underlay_ibgp 125 | neighbor 10.0.250.1 peer group evpn 126 | neighbor 10.0.250.2 peer group evpn 127 | ! 128 | address-family evpn 129 | neighbor evpn activate 130 | ! 131 | address-family ipv4 132 | neighbor underlay activate 133 | neighbor underlay_ibgp activate 134 | network 10.0.250.13/32 135 | network 10.0.255.12/32 136 | ! 137 | vrf gold 138 | rd 10.0.250.13:1 139 | route-target import evpn 1:100001 140 | route-target export evpn 1:100001 141 | redistribute connected 142 | ! 143 | end 144 | leaf3# 145 | -------------------------------------------------------------------------------- /containerlab/configs/leaf3-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf3 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$Et2V1LVyxGAXw.mR$Sw9S/3iDvpzAFgwajQwKQ/TMbxNPcrGGZ5ujm8PIA/B0rj.21lke4N.KHSbxnX2XEtxOouDmBrgudmZYIrzJB. 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf3 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.4/24 43 | ipv6 address 2001:172:20:20::4/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | -------------------------------------------------------------------------------- /containerlab/configs/leaf4-full.cfg: -------------------------------------------------------------------------------- 1 | leaf4#sh run 2 | ! Command: show running-config 3 | ! device: leaf4 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$BWezX1nnyzEp0OAE$7qAgNv57FNm2t079Dis4LDxUjG1TFMHw0vteZT07LoyJJWMAmFM3QiLVBx15QpYiRGp7LkDCk8QpLxULlBPc1/ 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | transceiver qsfp default-mode 4x10G 11 | ! 12 | service routing protocols model multi-agent 13 | ! 14 | hostname leaf4 15 | ! 16 | spanning-tree mode mstp 17 | no spanning-tree vlan-id 4090 18 | ! 19 | vlan 34 20 | ! 21 | vlan 4090 22 | name mlag-peer 23 | trunk group mlag-peer 24 | ! 25 | vrf instance gold 26 | ! 27 | management api http-commands 28 | no shutdown 29 | ! 30 | management api gnmi 31 | transport grpc default 32 | ! 33 | management api netconf 34 | transport ssh default 35 | ! 36 | interface Port-Channel999 37 | description MLAG Peer 38 | switchport mode trunk 39 | switchport trunk group mlag-peer 40 | spanning-tree link-type point-to-point 41 | ! 42 | interface Ethernet7 43 | ! 44 | interface Ethernet8 45 | ! 46 | interface Ethernet9 47 | description mlag peer link 48 | channel-group 999 mode active 49 | ! 50 | interface Ethernet10 51 | description mlag peer link 52 | channel-group 999 mode active 53 | ! 54 | interface Ethernet11 55 | description spine1 56 | mtu 9214 57 | no switchport 58 | ip address 10.0.1.7/31 59 | ! 60 | interface Ethernet12 61 | description spine2 62 | mtu 9214 63 | no switchport 64 | ip address 10.0.2.7/31 65 | ! 66 | interface Loopback0 67 | ip address 10.0.250.14/32 68 | ! 69 | interface Loopback1 70 | ip address 10.0.255.12/32 71 | ! 72 | interface Management0 73 | ip address 172.20.20.7/24 74 | ipv6 address 2001:172:20:20::7/64 75 | ! 76 | interface Vlan34 77 | vrf gold 78 | ip address 10.34.34.3/24 79 | ip virtual-router address 10.34.34.1 80 | ! 81 | interface Vlan4090 82 | no autostate 83 | ip address 10.0.199.255/31 84 | ! 85 | interface Vxlan1 86 | vxlan source-interface Loopback1 87 | vxlan udp-port 4789 88 | vxlan vrf gold vni 100001 89 | vxlan learn-restrict any 90 | ! 91 | ip virtual-router mac-address c0:01:ca:fe:ba:be 92 | ! 93 | ip routing 94 | ip routing vrf gold 95 | ! 96 | mlag configuration 97 | domain-id leafs 98 | local-interface Vlan4090 99 | peer-address 10.0.199.254 100 | peer-link Port-Channel999 101 | ! 102 | router bgp 65002 103 | router-id 10.0.250.14 104 | no bgp default ipv4-unicast 105 | distance bgp 20 200 200 106 | maximum-paths 4 ecmp 64 107 | neighbor evpn peer group 108 | neighbor evpn remote-as 65000 109 | neighbor evpn update-source Loopback0 110 | neighbor evpn ebgp-multihop 3 111 | neighbor evpn send-community extended 112 | neighbor evpn maximum-routes 12000 warning-only 113 | neighbor underlay peer group 114 | neighbor underlay remote-as 65000 115 | neighbor underlay maximum-routes 12000 warning-only 116 | neighbor underlay_ibgp peer group 117 | neighbor underlay_ibgp remote-as 65002 118 | neighbor underlay_ibgp next-hop-self 119 | neighbor underlay_ibgp maximum-routes 12000 warning-only 120 | neighbor 10.0.1.6 peer group underlay 121 | neighbor 10.0.2.6 peer group underlay 122 | neighbor 10.0.199.254 peer group underlay_ibgp 123 | neighbor 10.0.250.1 peer group evpn 124 | neighbor 10.0.250.2 peer group evpn 125 | ! 126 | address-family evpn 127 | neighbor evpn activate 128 | ! 129 | address-family ipv4 130 | neighbor underlay activate 131 | neighbor underlay_ibgp activate 132 | network 10.0.250.14/32 133 | network 10.0.255.12/32 134 | ! 135 | vrf gold 136 | rd 10.0.250.13:1 137 | route-target import evpn 1:100001 138 | route-target export evpn 1:100001 139 | redistribute connected 140 | ! 141 | end 142 | leaf4# 143 | -------------------------------------------------------------------------------- /containerlab/configs/leaf4-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf4 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$pATQ9rrMtYmxQJ0g$dCkJD0e8qgkJ/1P5OC2YLbjkezUe/S9BsfQW.6XpyXXX0EbGQdMEJhoJ3ULH.kRr4twghlzIkNaJNG9XAt8ZE0 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf4 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.11/24 43 | ipv6 address 2001:172:20:20::b/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | -------------------------------------------------------------------------------- /containerlab/configs/leaf5-full.cfg: -------------------------------------------------------------------------------- 1 | leaf5#sh run 2 | ! Command: show running-config 3 | ! device: leaf5 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$UXZf1sw4TEU1eQCG$Q65hj27AdbGbt.hNWXEmuY2NeNbrY9vOvVVqrcP2ka6ggFizkkMMuM3bmRYClgHcZ.XsNRvpIbFFBRXu6WacT0 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | transceiver qsfp default-mode 4x10G 11 | ! 12 | service routing protocols model multi-agent 13 | ! 14 | hostname leaf5 15 | ! 16 | spanning-tree mode mstp 17 | no spanning-tree vlan-id 4090 18 | ! 19 | vlan 40 20 | name test-l2-vxlan 21 | ! 22 | vlan 4090 23 | name mlag-peer 24 | trunk group mlag-peer 25 | ! 26 | management api http-commands 27 | no shutdown 28 | ! 29 | management api gnmi 30 | transport grpc default 31 | ! 32 | management api netconf 33 | transport ssh default 34 | ! 35 | interface Port-Channel111 36 | description Host3 37 | switchport mode trunk 38 | mlag 111 39 | spanning-tree link-type point-to-point 40 | ! 41 | interface Port-Channel999 42 | description MLAG Peer 43 | switchport mode trunk 44 | switchport trunk group mlag-peer 45 | spanning-tree link-type point-to-point 46 | ! 47 | interface Ethernet7 48 | description Host1 49 | channel-group 111 mode active 50 | ! 51 | interface Ethernet8 52 | description Host1 53 | channel-group 111 mode active 54 | ! 55 | interface Ethernet9 56 | description mlag peer link 57 | channel-group 999 mode active 58 | ! 59 | interface Ethernet10 60 | description mlag peer link 61 | channel-group 999 mode active 62 | ! 63 | interface Ethernet11 64 | description spine1 65 | mtu 9214 66 | no switchport 67 | ip address 10.0.1.9/31 68 | ! 69 | interface Ethernet12 70 | description spine2 71 | mtu 9214 72 | no switchport 73 | ip address 10.0.2.9/31 74 | ! 75 | interface Loopback0 76 | ip address 10.0.250.15/32 77 | ! 78 | interface Loopback1 79 | ip address 10.0.255.13/32 80 | ! 81 | interface Management0 82 | ip address 172.20.20.8/24 83 | ipv6 address 2001:172:20:20::8/64 84 | ! 85 | interface Vlan40 86 | ip address 192.168.215.15/24 87 | ! 88 | interface Vlan4090 89 | no autostate 90 | ip address 10.0.199.254/31 91 | ! 92 | interface Vxlan1 93 | vxlan source-interface Loopback1 94 | vxlan udp-port 4789 95 | vxlan vlan 40 vni 100040 96 | vxlan learn-restrict any 97 | ! 98 | ip virtual-router mac-address c0:01:ca:fe:ba:be 99 | ! 100 | ip routing 101 | ! 102 | mlag configuration 103 | domain-id leafs 104 | local-interface Vlan4090 105 | peer-address 10.0.199.255 106 | peer-link Port-Channel999 107 | ! 108 | router bgp 65003 109 | router-id 10.0.250.15 110 | no bgp default ipv4-unicast 111 | distance bgp 20 200 200 112 | maximum-paths 4 ecmp 64 113 | neighbor evpn peer group 114 | neighbor evpn remote-as 65000 115 | neighbor evpn update-source Loopback0 116 | neighbor evpn ebgp-multihop 3 117 | neighbor evpn send-community extended 118 | neighbor evpn maximum-routes 12000 warning-only 119 | neighbor underlay peer group 120 | neighbor underlay remote-as 65000 121 | neighbor underlay maximum-routes 12000 warning-only 122 | neighbor underlay_ibgp peer group 123 | neighbor underlay_ibgp remote-as 65003 124 | neighbor underlay_ibgp next-hop-self 125 | neighbor underlay_ibgp maximum-routes 12000 warning-only 126 | neighbor 10.0.1.8 peer group underlay 127 | neighbor 10.0.2.8 peer group underlay 128 | neighbor 10.0.199.255 peer group underlay_ibgp 129 | neighbor 10.0.250.1 peer group evpn 130 | neighbor 10.0.250.2 peer group evpn 131 | ! 132 | vlan 40 133 | rd 65003:100040 134 | route-target both 40:100040 135 | redistribute learned 136 | ! 137 | address-family evpn 138 | neighbor evpn activate 139 | ! 140 | address-family ipv4 141 | neighbor underlay activate 142 | neighbor underlay_ibgp activate 143 | network 10.0.250.15/32 144 | network 10.0.255.13/32 145 | ! 146 | end 147 | leaf5# 148 | -------------------------------------------------------------------------------- /containerlab/configs/leaf5-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf5 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$SnxVSf27loD4kk2m$JBEw2d1SiJ4OJgztE.zgMKo1QuR4NIZrRWRnwN6hvPVZDdcQVjRFt1.Yz63MvSG7wxYx6cFLur741pYunqbkM. 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf5 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.5/24 43 | ipv6 address 2001:172:20:20::5/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | -------------------------------------------------------------------------------- /containerlab/configs/leaf6-full.cfg: -------------------------------------------------------------------------------- 1 | leaf6#sh run 2 | ! Command: show running-config 3 | ! device: leaf6 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$E2nOSyK11pGVFRTr$6dF93MPJjRTVH3Qh442/SXvaXvqdkE7VUKBHh7xdbvKSr1wlpd3RPq29osqJ9yN.FMwdrqcZ8e1z1fUuew7Gn0 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | transceiver qsfp default-mode 4x10G 11 | ! 12 | service routing protocols model multi-agent 13 | ! 14 | hostname leaf6 15 | ! 16 | spanning-tree mode mstp 17 | no spanning-tree vlan-id 4090 18 | ! 19 | vlan 40 20 | name test-l2-vxlan 21 | ! 22 | vlan 4090 23 | name mlag-peer 24 | trunk group mlag-peer 25 | ! 26 | management api http-commands 27 | no shutdown 28 | ! 29 | management api gnmi 30 | transport grpc default 31 | ! 32 | management api netconf 33 | transport ssh default 34 | ! 35 | interface Port-Channel111 36 | description Host3 37 | switchport mode trunk 38 | mlag 111 39 | spanning-tree link-type point-to-point 40 | ! 41 | interface Port-Channel999 42 | description MLAG Peer 43 | switchport mode trunk 44 | switchport trunk group mlag-peer 45 | spanning-tree link-type point-to-point 46 | ! 47 | interface Ethernet7 48 | description Host1 49 | channel-group 111 mode active 50 | ! 51 | interface Ethernet8 52 | description Host1 53 | channel-group 111 mode active 54 | ! 55 | interface Ethernet9 56 | description mlag peer link 57 | channel-group 999 mode active 58 | ! 59 | interface Ethernet10 60 | description mlag peer link 61 | channel-group 999 mode active 62 | ! 63 | interface Ethernet11 64 | description spine1 65 | mtu 9214 66 | no switchport 67 | ip address 10.0.1.11/31 68 | ! 69 | interface Ethernet12 70 | description spine2 71 | mtu 9214 72 | no switchport 73 | ip address 10.0.2.11/31 74 | ! 75 | interface Loopback0 76 | ip address 10.0.250.16/32 77 | ! 78 | interface Loopback1 79 | ip address 10.0.255.13/32 80 | ! 81 | interface Management0 82 | ip address 172.20.20.11/24 83 | ipv6 address 2001:172:20:20::b/64 84 | ! 85 | interface Vlan40 86 | ip address 192.168.215.16/2 87 | ! 88 | interface Vlan4090 89 | no autostate 90 | ip address 10.0.199.255/31 91 | ! 92 | interface Vxlan1 93 | vxlan source-interface Loopback1 94 | vxlan udp-port 4789 95 | vxlan vlan 40 vni 100040 96 | vxlan learn-restrict any 97 | ! 98 | ip virtual-router mac-address c0:01:ca:fe:ba:be 99 | ! 100 | ip routing 101 | ! 102 | mlag configuration 103 | domain-id leafs 104 | local-interface Vlan4090 105 | peer-address 10.0.199.254 106 | peer-link Port-Channel999 107 | ! 108 | router bgp 65003 109 | router-id 10.0.250.16 110 | no bgp default ipv4-unicast 111 | distance bgp 20 200 200 112 | maximum-paths 4 ecmp 64 113 | neighbor evpn peer group 114 | neighbor evpn remote-as 65000 115 | neighbor evpn update-source Loopback0 116 | neighbor evpn ebgp-multihop 3 117 | neighbor evpn send-community extended 118 | neighbor evpn maximum-routes 12000 warning-only 119 | neighbor underlay peer group 120 | neighbor underlay remote-as 65000 121 | neighbor underlay maximum-routes 12000 warning-only 122 | neighbor underlay_ibgp peer group 123 | neighbor underlay_ibgp remote-as 65003 124 | neighbor underlay_ibgp next-hop-self 125 | neighbor underlay_ibgp maximum-routes 12000 warning-only 126 | neighbor 10.0.1.10 peer group underlay 127 | neighbor 10.0.2.10 peer group underlay 128 | neighbor 10.0.199.254 peer group underlay_ibgp 129 | neighbor 10.0.250.1 peer group evpn 130 | neighbor 10.0.250.2 peer group evpn 131 | ! 132 | vlan 40 133 | rd 65003:100040 134 | route-target both 40:100040 135 | redistribute learned 136 | ! 137 | address-family evpn 138 | neighbor evpn activate 139 | ! 140 | address-family ipv4 141 | neighbor underlay activate 142 | neighbor underlay_ibgp activate 143 | network 10.0.250.16/32 144 | network 10.0.255.13/32 145 | ! 146 | end 147 | leaf6# 148 | -------------------------------------------------------------------------------- /containerlab/configs/leaf6-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf6 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$jinaJYjq5nGYD6Bc$dN51tFRnyRXZMTWXZLLHLUGjUOh/prX0YQgw1s5KtI7gg/bqcbmclTOMiY5OlqvJYRodjl0KEbdhksaDiPcOp0 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf6 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.6/24 43 | ipv6 address 2001:172:20:20::6/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | -------------------------------------------------------------------------------- /containerlab/configs/leaf7-full.cfg: -------------------------------------------------------------------------------- 1 | leaf7#sh run 2 | ! Command: show running-config 3 | ! device: leaf7 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$cWKArxj6dYgQH.xU$w.3LWbYgR1.jcF7ESBq.v1V9C30aDTojGweCkpWr8P/L7aVxfm2lzRGCcKAmJWW/oUpu3MBEQnpv6FWOdKeJm0 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | transceiver qsfp default-mode 4x10G 11 | ! 12 | service routing protocols model multi-agent 13 | ! 14 | hostname leaf7 15 | ! 16 | spanning-tree mode mstp 17 | no spanning-tree vlan-id 4090 18 | ! 19 | vlan 78 20 | ! 21 | vlan 4090 22 | name mlag-peer 23 | trunk group mlag-peer 24 | ! 25 | vrf instance gold 26 | ! 27 | management api http-commands 28 | no shutdown 29 | ! 30 | management api gnmi 31 | transport grpc default 32 | ! 33 | management api netconf 34 | transport ssh default 35 | ! 36 | interface Port-Channel999 37 | description MLAG Peer 38 | switchport mode trunk 39 | switchport trunk group mlag-peer 40 | spanning-tree link-type point-to-point 41 | ! 42 | interface Ethernet7 43 | ! 44 | interface Ethernet8 45 | ! 46 | interface Ethernet9 47 | description mlag peer link 48 | channel-group 999 mode active 49 | ! 50 | interface Ethernet10 51 | description mlag peer link 52 | channel-group 999 mode active 53 | ! 54 | interface Ethernet11 55 | description spine1 56 | mtu 9214 57 | no switchport 58 | ip address 10.0.1.13/31 59 | ! 60 | interface Ethernet12 61 | description spine2 62 | mtu 9214 63 | no switchport 64 | ip address 10.0.2.13/31 65 | ! 66 | interface Loopback0 67 | ip address 10.0.250.17/32 68 | ! 69 | interface Loopback1 70 | ip address 10.0.255.14/32 71 | ! 72 | interface Management0 73 | ip address 172.20.20.9/24 74 | ipv6 address 2001:172:20:20::9/64 75 | ! 76 | interface Vlan78 77 | vrf gold 78 | ip address 10.78.78.2/24 79 | ip virtual-router address 10.78.78.1 80 | ! 81 | interface Vlan4090 82 | no autostate 83 | ip address 10.0.199.254/31 84 | ! 85 | interface Vxlan1 86 | vxlan source-interface Loopback1 87 | vxlan udp-port 4789 88 | vxlan vrf gold vni 100001 89 | vxlan learn-restrict any 90 | ! 91 | ip virtual-router mac-address c0:01:ca:fe:ba:be 92 | ! 93 | ip routing 94 | ip routing vrf gold 95 | ! 96 | mlag configuration 97 | domain-id leafs 98 | local-interface Vlan4090 99 | peer-address 10.0.199.255 100 | peer-link Port-Channel999 101 | ! 102 | router bgp 65004 103 | router-id 10.0.250.17 104 | no bgp default ipv4-unicast 105 | distance bgp 20 200 200 106 | maximum-paths 4 ecmp 64 107 | neighbor evpn peer group 108 | neighbor evpn remote-as 65000 109 | neighbor evpn update-source Loopback0 110 | neighbor evpn ebgp-multihop 3 111 | neighbor evpn send-community extended 112 | neighbor evpn maximum-routes 12000 warning-only 113 | neighbor underlay peer group 114 | neighbor underlay remote-as 65000 115 | neighbor underlay maximum-routes 12000 warning-only 116 | neighbor underlay_ibgp peer group 117 | neighbor underlay_ibgp remote-as 65004 118 | neighbor underlay_ibgp next-hop-self 119 | neighbor underlay_ibgp maximum-routes 12000 warning-only 120 | neighbor 10.0.1.12 peer group underlay 121 | neighbor 10.0.2.12 peer group underlay 122 | neighbor 10.0.199.255 peer group underlay_ibgp 123 | neighbor 10.0.250.1 peer group evpn 124 | neighbor 10.0.250.2 peer group evpn 125 | ! 126 | address-family evpn 127 | neighbor evpn activate 128 | ! 129 | address-family ipv4 130 | neighbor underlay activate 131 | neighbor underlay_ibgp activate 132 | network 10.0.250.17/32 133 | network 10.0.255.14/32 134 | ! 135 | vrf gold 136 | rd 10.0.250.17:1 137 | route-target import evpn 1:100001 138 | route-target export evpn 1:100001 139 | redistribute connected 140 | ! 141 | end 142 | leaf7# 143 | -------------------------------------------------------------------------------- /containerlab/configs/leaf7-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf7 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$tq3lbBMS7JiW1q0i$b.qitxVBL9C3vzyr.Usx6s3psDmad67vlzEr4bDtbvv.fTSFgKmrjD1fSY/mlRtfRlDPj4vuqRZ7VYayw0XMN. 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf7 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.3/24 43 | ipv6 address 2001:172:20:20::3/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | -------------------------------------------------------------------------------- /containerlab/configs/leaf8-full.cfg: -------------------------------------------------------------------------------- 1 | leaf8#sh run 2 | ! Command: show running-config 3 | ! device: leaf8 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$6AwEb9fbaj4MIbvD$SwQPnbzzjyhShSasDA8mz7mCdpqNmALuwFkQ8un61XaAHRi7poFj3j2dLguizkhPv9BbJ9qZoM/2joaME23CE0 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | transceiver qsfp default-mode 4x10G 11 | ! 12 | service routing protocols model multi-agent 13 | ! 14 | hostname leaf8 15 | ! 16 | spanning-tree mode mstp 17 | no spanning-tree vlan-id 4090 18 | ! 19 | vlan 78 20 | ! 21 | vlan 4090 22 | name mlag-peer 23 | trunk group mlag-peer 24 | ! 25 | vrf instance gold 26 | ! 27 | management api http-commands 28 | no shutdown 29 | ! 30 | management api gnmi 31 | transport grpc default 32 | ! 33 | management api netconf 34 | transport ssh default 35 | ! 36 | interface Port-Channel999 37 | description MLAG Peer 38 | switchport mode trunk 39 | switchport trunk group mlag-peer 40 | spanning-tree link-type point-to-point 41 | ! 42 | interface Ethernet7 43 | ! 44 | interface Ethernet8 45 | ! 46 | interface Ethernet9 47 | description mlag peer link 48 | channel-group 999 mode active 49 | ! 50 | interface Ethernet10 51 | description mlag peer link 52 | channel-group 999 mode active 53 | ! 54 | interface Ethernet11 55 | description spine1 56 | mtu 9214 57 | no switchport 58 | ip address 10.0.1.15/31 59 | ! 60 | interface Ethernet12 61 | description spine2 62 | mtu 9214 63 | no switchport 64 | ip address 10.0.2.15/31 65 | ! 66 | interface Loopback0 67 | ip address 10.0.250.18/32 68 | ! 69 | interface Loopback1 70 | ip address 10.0.255.14/32 71 | ! 72 | interface Management0 73 | ip address 172.20.20.4/24 74 | ipv6 address 2001:172:20:20::4/64 75 | ! 76 | interface Vlan78 77 | vrf gold 78 | ip address 10.78.78.3/24 79 | ip virtual-router address 10.78.78.1 80 | ! 81 | interface Vlan4090 82 | no autostate 83 | ip address 10.0.199.255/31 84 | ! 85 | interface Vxlan1 86 | vxlan source-interface Loopback1 87 | vxlan udp-port 4789 88 | vxlan vrf gold vni 100001 89 | vxlan learn-restrict any 90 | ! 91 | ip virtual-router mac-address c0:01:ca:fe:ba:be 92 | ! 93 | ip routing 94 | ip routing vrf gold 95 | ! 96 | mlag configuration 97 | domain-id leafs 98 | local-interface Vlan4090 99 | peer-address 10.0.199.254 100 | peer-link Port-Channel999 101 | ! 102 | router bgp 65004 103 | router-id 10.0.250.18 104 | no bgp default ipv4-unicast 105 | distance bgp 20 200 200 106 | maximum-paths 4 ecmp 64 107 | neighbor evpn peer group 108 | neighbor evpn remote-as 65000 109 | neighbor evpn update-source Loopback0 110 | neighbor evpn ebgp-multihop 3 111 | neighbor evpn send-community extended 112 | neighbor evpn maximum-routes 12000 warning-only 113 | neighbor underlay peer group 114 | neighbor underlay remote-as 65000 115 | neighbor underlay maximum-routes 12000 warning-only 116 | neighbor underlay_ibgp peer group 117 | neighbor underlay_ibgp remote-as 65004 118 | neighbor underlay_ibgp next-hop-self 119 | neighbor underlay_ibgp maximum-routes 12000 warning-only 120 | neighbor 10.0.1.14 peer group underlay 121 | neighbor 10.0.2.14 peer group underlay 122 | neighbor 10.0.199.254 peer group underlay_ibgp 123 | neighbor 10.0.250.1 peer group evpn 124 | neighbor 10.0.250.2 peer group evpn 125 | ! 126 | address-family evpn 127 | neighbor evpn activate 128 | ! 129 | address-family ipv4 130 | neighbor underlay activate 131 | neighbor underlay_ibgp activate 132 | network 10.0.250.18/32 133 | network 10.0.255.14/32 134 | ! 135 | vrf gold 136 | rd 10.0.250.17:1 137 | route-target import evpn 1:100001 138 | route-target export evpn 1:100001 139 | redistribute connected 140 | ! 141 | end 142 | leaf8# 143 | -------------------------------------------------------------------------------- /containerlab/configs/leaf8-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: leaf8 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$lLkFIi2pYOSeFRym$N1SKzGH9OAp4ynbZT2r9fJlZu0bZ6i4KGCPD9K1qCBsQCRe/NihIV.dHsz/VTfhM7nxQ75VB.4/PovB.eMElW0 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname leaf8 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet7 30 | ! 31 | interface Ethernet8 32 | ! 33 | interface Ethernet9 34 | ! 35 | interface Ethernet10 36 | ! 37 | interface Ethernet11 38 | ! 39 | interface Ethernet12 40 | ! 41 | interface Management0 42 | ip address 172.20.20.7/24 43 | ipv6 address 2001:172:20:20::7/64 44 | ! 45 | no ip routing 46 | ! 47 | end 48 | -------------------------------------------------------------------------------- /containerlab/configs/spine1-full.cfg: -------------------------------------------------------------------------------- 1 | spine1#sh run 2 | ! Command: show running-config 3 | ! device: spine1 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$mHcklaGgvaTynxmZ$g5vShp8sTWzBjH7o5mWrqObQXqJftYgSlM9MS/uExuztN0gQNZ6qK9MW.hPkcQuMPGrXRKcsSUI5jUaYJTt/j1 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | switchport default mode routed 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | service routing protocols model multi-agent 15 | ! 16 | hostname spine1 17 | ! 18 | spanning-tree mode mstp 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet1 30 | description leaf1 31 | mtu 9214 32 | no switchport 33 | ip address 10.0.1.0/31 34 | ! 35 | interface Ethernet2 36 | description leaf2 37 | mtu 9214 38 | no switchport 39 | ip address 10.0.1.2/31 40 | ! 41 | interface Ethernet3 42 | description leaf3 43 | mtu 9214 44 | no switchport 45 | ip address 10.0.1.4/31 46 | ! 47 | interface Ethernet4 48 | description leaf4 49 | mtu 9214 50 | no switchport 51 | ip address 10.0.1.6/31 52 | ! 53 | interface Ethernet5 54 | description leaf5 55 | mtu 9214 56 | no switchport 57 | ip address 10.0.1.8/31 58 | ! 59 | interface Ethernet6 60 | description leaf6 61 | mtu 9214 62 | no switchport 63 | ip address 10.0.1.10/31 64 | ! 65 | interface Ethernet7 66 | description leaf7 67 | mtu 9214 68 | no switchport 69 | ip address 10.0.1.12/31 70 | ! 71 | interface Ethernet8 72 | description leaf8 73 | mtu 9214 74 | no switchport 75 | ip address 10.0.1.14/31 76 | ! 77 | interface Loopback0 78 | ip address 10.0.250.1/32 79 | ! 80 | interface Management0 81 | ip address 172.20.20.10/24 82 | ipv6 address 2001:172:20:20::a/64 83 | ! 84 | ip routing 85 | ! 86 | router bgp 65000 87 | router-id 10.0.250.1 88 | no bgp default ipv4-unicast 89 | distance bgp 20 200 200 90 | maximum-paths 4 ecmp 64 91 | neighbor evpn peer group 92 | neighbor evpn next-hop-unchanged 93 | neighbor evpn update-source Loopback0 94 | neighbor evpn ebgp-multihop 3 95 | neighbor evpn send-community extended 96 | neighbor evpn maximum-routes 12000 warning-only 97 | neighbor 10.0.1.1 remote-as 65001 98 | neighbor 10.0.1.3 remote-as 65001 99 | neighbor 10.0.1.5 remote-as 65002 100 | neighbor 10.0.1.7 remote-as 65002 101 | neighbor 10.0.1.9 remote-as 65003 102 | neighbor 10.0.1.11 remote-as 65003 103 | neighbor 10.0.1.13 remote-as 65004 104 | neighbor 10.0.1.15 remote-as 65004 105 | neighbor 10.0.250.11 peer group evpn 106 | neighbor 10.0.250.11 remote-as 65001 107 | neighbor 10.0.250.12 peer group evpn 108 | neighbor 10.0.250.12 remote-as 65001 109 | neighbor 10.0.250.13 peer group evpn 110 | neighbor 10.0.250.13 remote-as 65002 111 | neighbor 10.0.250.14 peer group evpn 112 | neighbor 10.0.250.14 remote-as 65002 113 | neighbor 10.0.250.15 peer group evpn 114 | neighbor 10.0.250.15 remote-as 65003 115 | neighbor 10.0.250.16 peer group evpn 116 | neighbor 10.0.250.16 remote-as 65003 117 | neighbor 10.0.250.17 peer group evpn 118 | neighbor 10.0.250.17 remote-as 65004 119 | neighbor 10.0.250.18 peer group evpn 120 | neighbor 10.0.250.18 remote-as 65004 121 | ! 122 | address-family evpn 123 | neighbor evpn activate 124 | ! 125 | address-family ipv4 126 | neighbor 10.0.1.1 activate 127 | neighbor 10.0.1.3 activate 128 | neighbor 10.0.1.5 activate 129 | neighbor 10.0.1.7 activate 130 | neighbor 10.0.1.9 activate 131 | neighbor 10.0.1.11 activate 132 | neighbor 10.0.1.13 activate 133 | neighbor 10.0.1.15 activate 134 | network 10.0.250.1/32 135 | ! 136 | end 137 | spine1# 138 | -------------------------------------------------------------------------------- /containerlab/configs/spine1-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: spine1 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$icwQwP3scG/HybDi$W9Oa0bJyHXrmO3gH3/LJJKFEhUL3aCcPZ5PolOTm5r8tsvibI83/kY6GzrC.ouTsLzoiKgYr1ectEJCCt3Bmw/ 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname spine1 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet1 30 | ! 31 | interface Ethernet2 32 | ! 33 | interface Ethernet3 34 | ! 35 | interface Ethernet4 36 | ! 37 | interface Ethernet5 38 | ! 39 | interface Ethernet6 40 | ! 41 | interface Ethernet7 42 | ! 43 | interface Ethernet8 44 | ! 45 | interface Management0 46 | ip address 172.20.20.9/24 47 | ipv6 address 2001:172:20:20::9/64 48 | ! 49 | no ip routing 50 | ! 51 | end 52 | -------------------------------------------------------------------------------- /containerlab/configs/spine2-full.cfg: -------------------------------------------------------------------------------- 1 | spine2#sh run 2 | ! Command: show running-config 3 | ! device: spine2 (cEOSLab, EOS-4.26.2.1F-23777891.42621F (engineering build)) 4 | ! 5 | no aaa root 6 | ! 7 | username admin privilege 15 role network-admin secret sha512 $6$8Ppvsn0Yl62JF.ff$x8t1b9zXCRAb.2ZKNdEWPZy9.jtRbqDOqBT2b3ofPYzl6kWUk5oXzktUvwLLQdXkIT8hAdaNM7EUfrT6WmzBL0 8 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 9 | ! 10 | switchport default mode routed 11 | ! 12 | transceiver qsfp default-mode 4x10G 13 | ! 14 | service routing protocols model multi-agent 15 | ! 16 | hostname spine2 17 | ! 18 | spanning-tree mode mstp 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet1 30 | description leaf1 31 | mtu 9214 32 | no switchport 33 | ip address 10.0.2.0/31 34 | ! 35 | interface Ethernet2 36 | description leaf2 37 | mtu 9214 38 | no switchport 39 | ip address 10.0.2.2/31 40 | ! 41 | interface Ethernet3 42 | description leaf3 43 | mtu 9214 44 | no switchport 45 | ip address 10.0.2.4/31 46 | ! 47 | interface Ethernet4 48 | description leaf4 49 | mtu 9214 50 | no switchport 51 | ip address 10.0.2.6/31 52 | ! 53 | interface Ethernet5 54 | description leaf5 55 | mtu 9214 56 | no switchport 57 | ip address 10.0.2.8/31 58 | ! 59 | interface Ethernet6 60 | description leaf6 61 | mtu 9214 62 | no switchport 63 | ip address 10.0.2.10/31 64 | ! 65 | interface Ethernet7 66 | description leaf7 67 | mtu 9214 68 | no switchport 69 | ip address 10.0.2.12/31 70 | ! 71 | interface Ethernet8 72 | description leaf8 73 | mtu 9214 74 | no switchport 75 | ip address 10.0.2.14/31 76 | ! 77 | interface Loopback0 78 | ip address 10.0.250.2/32 79 | ! 80 | interface Management0 81 | ip address 172.20.20.14/24 82 | ipv6 address 2001:172:20:20::e/64 83 | ! 84 | ip routing 85 | ! 86 | router bgp 65000 87 | router-id 10.0.250.2 88 | no bgp default ipv4-unicast 89 | distance bgp 20 200 200 90 | maximum-paths 4 ecmp 64 91 | neighbor evpn peer group 92 | neighbor evpn next-hop-unchanged 93 | neighbor evpn update-source Loopback0 94 | neighbor evpn ebgp-multihop 3 95 | neighbor evpn send-community extended 96 | neighbor evpn maximum-routes 12000 warning-only 97 | neighbor 10.0.2.1 remote-as 65001 98 | neighbor 10.0.2.3 remote-as 65001 99 | neighbor 10.0.2.5 remote-as 65002 100 | neighbor 10.0.2.7 remote-as 65002 101 | neighbor 10.0.2.9 remote-as 65003 102 | neighbor 10.0.2.11 remote-as 65003 103 | neighbor 10.0.2.13 remote-as 65004 104 | neighbor 10.0.2.15 remote-as 65004 105 | neighbor 10.0.250.11 peer group evpn 106 | neighbor 10.0.250.11 remote-as 65001 107 | neighbor 10.0.250.12 peer group evpn 108 | neighbor 10.0.250.12 remote-as 65001 109 | neighbor 10.0.250.13 peer group evpn 110 | neighbor 10.0.250.13 remote-as 65002 111 | neighbor 10.0.250.14 peer group evpn 112 | neighbor 10.0.250.14 remote-as 65002 113 | neighbor 10.0.250.15 peer group evpn 114 | neighbor 10.0.250.15 remote-as 65003 115 | neighbor 10.0.250.16 peer group evpn 116 | neighbor 10.0.250.16 remote-as 65003 117 | neighbor 10.0.250.17 peer group evpn 118 | neighbor 10.0.250.17 remote-as 65004 119 | neighbor 10.0.250.18 peer group evpn 120 | neighbor 10.0.250.18 remote-as 65004 121 | ! 122 | address-family evpn 123 | neighbor evpn activate 124 | ! 125 | address-family ipv4 126 | neighbor 10.0.2.1 activate 127 | neighbor 10.0.2.3 activate 128 | neighbor 10.0.2.5 activate 129 | neighbor 10.0.2.7 activate 130 | neighbor 10.0.2.9 activate 131 | neighbor 10.0.2.11 activate 132 | neighbor 10.0.2.13 activate 133 | neighbor 10.0.2.15 activate 134 | network 10.0.250.2/32 135 | ! 136 | end 137 | spine2# 138 | -------------------------------------------------------------------------------- /containerlab/configs/spine2-start.cfg: -------------------------------------------------------------------------------- 1 | ! device: spine2 (cEOSLab, EOS-4.32.0F-36401836.4320F (engineering build)) 2 | ! 3 | no aaa root 4 | ! 5 | username admin privilege 15 role network-admin secret sha512 $6$MU24oThZUreSBC5B$D1GMv4AvoHVwrwefLRStFikajmlC6vSld6Tf.y.Wije2pyAxCQTuHMHxv6BXjWFPFcSESZJ9ojhf5zLw970hF1 6 | username admin ssh-key ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 7 | ! 8 | transceiver qsfp default-mode 4x10G 9 | ! 10 | service routing protocols model multi-agent 11 | ! 12 | hostname spine2 13 | ! 14 | spanning-tree mode mstp 15 | ! 16 | system l1 17 | unsupported speed action error 18 | unsupported error-correction action error 19 | ! 20 | management api http-commands 21 | no shutdown 22 | ! 23 | management api gnmi 24 | transport grpc default 25 | ! 26 | management api netconf 27 | transport ssh default 28 | ! 29 | interface Ethernet1 30 | ! 31 | interface Ethernet2 32 | ! 33 | interface Ethernet3 34 | ! 35 | interface Ethernet4 36 | ! 37 | interface Ethernet5 38 | ! 39 | interface Ethernet6 40 | ! 41 | interface Ethernet7 42 | ! 43 | interface Ethernet8 44 | ! 45 | interface Management0 46 | ip address 172.20.20.8/24 47 | ipv6 address 2001:172:20:20::8/64 48 | ! 49 | no ip routing 50 | ! 51 | end 52 | -------------------------------------------------------------------------------- /containerlab/lab3-full.yml: -------------------------------------------------------------------------------- 1 | # https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/ 2 | name: lab3 3 | topology: 4 | kinds: 5 | ceos: 6 | image: localhost/ceos:4.32.0F 7 | linux: 8 | image: ghcr.io/hellt/network-multitool 9 | nodes: 10 | leaf1: 11 | kind: ceos 12 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf1-full.cfg 13 | leaf2: 14 | kind: ceos 15 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf2-full.cfg 16 | leaf3: 17 | kind: ceos 18 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf3-full.cfg 19 | leaf4: 20 | kind: ceos 21 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf4-full.cfg 22 | leaf5: 23 | kind: ceos 24 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf5-full.cfg 25 | leaf6: 26 | kind: ceos 27 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf6-full.cfg 28 | leaf7: 29 | kind: ceos 30 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf7-full.cfg 31 | leaf8: 32 | kind: ceos 33 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf8-full.cfg 34 | spine1: 35 | kind: ceos 36 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine1-full.cfg 37 | spine2: 38 | kind: ceos 39 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine2-full.cfg 40 | host1: 41 | kind: linux 42 | host2: 43 | kind: linux 44 | host3: 45 | kind: linux 46 | host4: 47 | kind: linux 48 | links: 49 | - endpoints: ["leaf1:eth7", "host1:eth1"] 50 | - endpoints: ["leaf1:eth8", "host1:eth2"] 51 | - endpoints: ["leaf2:eth7", "host1:eth3"] 52 | - endpoints: ["leaf2:eth8", "host1:eth4"] 53 | - endpoints: ["leaf1:eth9", "leaf2:eth9"] 54 | - endpoints: ["leaf1:eth10", "leaf2:eth10"] 55 | - endpoints: ["leaf1:eth11", "spine1:eth1"] 56 | - endpoints: ["leaf1:eth12", "spine2:eth1"] 57 | - endpoints: ["leaf2:eth11", "spine1:eth2"] 58 | - endpoints: ["leaf2:eth12", "spine2:eth2"] 59 | - endpoints: ["leaf3:eth7", "host2:eth1"] 60 | - endpoints: ["leaf3:eth8", "host2:eth2"] 61 | - endpoints: ["leaf4:eth7", "host2:eth3"] 62 | - endpoints: ["leaf4:eth8", "host2:eth4"] 63 | - endpoints: ["leaf3:eth9", "leaf4:eth9"] 64 | - endpoints: ["leaf3:eth10", "leaf4:eth10"] 65 | - endpoints: ["leaf3:eth11", "spine1:eth3"] 66 | - endpoints: ["leaf3:eth12", "spine2:eth3"] 67 | - endpoints: ["leaf4:eth11", "spine1:eth4"] 68 | - endpoints: ["leaf4:eth12", "spine2:eth4"] 69 | - endpoints: ["leaf5:eth7", "host3:eth1"] 70 | - endpoints: ["leaf5:eth8", "host3:eth2"] 71 | - endpoints: ["leaf6:eth7", "host3:eth3"] 72 | - endpoints: ["leaf6:eth8", "host3:eth4"] 73 | - endpoints: ["leaf5:eth9", "leaf6:eth9"] 74 | - endpoints: ["leaf5:eth10", "leaf6:eth10"] 75 | - endpoints: ["leaf5:eth11", "spine1:eth5"] 76 | - endpoints: ["leaf5:eth12", "spine2:eth5"] 77 | - endpoints: ["leaf6:eth11", "spine1:eth6"] 78 | - endpoints: ["leaf6:eth12", "spine2:eth6"] 79 | - endpoints: ["leaf7:eth7", "host4:eth1"] 80 | - endpoints: ["leaf7:eth8", "host4:eth2"] 81 | - endpoints: ["leaf8:eth7", "host4:eth3"] 82 | - endpoints: ["leaf8:eth8", "host4:eth4"] 83 | - endpoints: ["leaf7:eth9", "leaf8:eth9"] 84 | - endpoints: ["leaf7:eth10", "leaf8:eth10"] 85 | - endpoints: ["leaf7:eth11", "spine1:eth7"] 86 | - endpoints: ["leaf7:eth12", "spine2:eth7"] 87 | - endpoints: ["leaf8:eth11", "spine1:eth8"] 88 | - endpoints: ["leaf8:eth12", "spine2:eth8"] 89 | -------------------------------------------------------------------------------- /containerlab/lab3-start.yml: -------------------------------------------------------------------------------- 1 | # https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/ 2 | name: lab3 3 | topology: 4 | kinds: 5 | ceos: 6 | image: localhost/ceos:4.32.0F 7 | linux: 8 | image: ghcr.io/hellt/network-multitool 9 | nodes: 10 | leaf1: 11 | kind: ceos 12 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf1-start.cfg 13 | leaf2: 14 | kind: ceos 15 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf2-start.cfg 16 | leaf3: 17 | kind: ceos 18 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf3-start.cfg 19 | leaf4: 20 | kind: ceos 21 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf4-start.cfg 22 | leaf5: 23 | kind: ceos 24 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf5-start.cfg 25 | leaf6: 26 | kind: ceos 27 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf6-start.cfg 28 | leaf7: 29 | kind: ceos 30 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf7-start.cfg 31 | leaf8: 32 | kind: ceos 33 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf8-start.cfg 34 | spine1: 35 | kind: ceos 36 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine1-start.cfg 37 | spine2: 38 | kind: ceos 39 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine2-start.cfg 40 | host1: 41 | kind: linux 42 | host2: 43 | kind: linux 44 | host3: 45 | kind: linux 46 | host4: 47 | kind: linux 48 | links: 49 | - endpoints: ["leaf1:eth7", "host1:eth1"] 50 | - endpoints: ["leaf1:eth8", "host1:eth2"] 51 | - endpoints: ["leaf2:eth7", "host1:eth3"] 52 | - endpoints: ["leaf2:eth8", "host1:eth4"] 53 | - endpoints: ["leaf1:eth9", "leaf2:eth9"] 54 | - endpoints: ["leaf1:eth10", "leaf2:eth10"] 55 | - endpoints: ["leaf1:eth11", "spine1:eth1"] 56 | - endpoints: ["leaf1:eth12", "spine2:eth1"] 57 | - endpoints: ["leaf2:eth11", "spine1:eth2"] 58 | - endpoints: ["leaf2:eth12", "spine2:eth2"] 59 | - endpoints: ["leaf3:eth7", "host2:eth1"] 60 | - endpoints: ["leaf3:eth8", "host2:eth2"] 61 | - endpoints: ["leaf4:eth7", "host2:eth3"] 62 | - endpoints: ["leaf4:eth8", "host2:eth4"] 63 | - endpoints: ["leaf3:eth9", "leaf4:eth9"] 64 | - endpoints: ["leaf3:eth10", "leaf4:eth10"] 65 | - endpoints: ["leaf3:eth11", "spine1:eth3"] 66 | - endpoints: ["leaf3:eth12", "spine2:eth3"] 67 | - endpoints: ["leaf4:eth11", "spine1:eth4"] 68 | - endpoints: ["leaf4:eth12", "spine2:eth4"] 69 | - endpoints: ["leaf5:eth7", "host3:eth1"] 70 | - endpoints: ["leaf5:eth8", "host3:eth2"] 71 | - endpoints: ["leaf6:eth7", "host3:eth3"] 72 | - endpoints: ["leaf6:eth8", "host3:eth4"] 73 | - endpoints: ["leaf5:eth9", "leaf6:eth9"] 74 | - endpoints: ["leaf5:eth10", "leaf6:eth10"] 75 | - endpoints: ["leaf5:eth11", "spine1:eth5"] 76 | - endpoints: ["leaf5:eth12", "spine2:eth5"] 77 | - endpoints: ["leaf6:eth11", "spine1:eth6"] 78 | - endpoints: ["leaf6:eth12", "spine2:eth6"] 79 | - endpoints: ["leaf7:eth7", "host4:eth1"] 80 | - endpoints: ["leaf7:eth8", "host4:eth2"] 81 | - endpoints: ["leaf8:eth7", "host4:eth3"] 82 | - endpoints: ["leaf8:eth8", "host4:eth4"] 83 | - endpoints: ["leaf7:eth9", "leaf8:eth9"] 84 | - endpoints: ["leaf7:eth10", "leaf8:eth10"] 85 | - endpoints: ["leaf7:eth11", "spine1:eth7"] 86 | - endpoints: ["leaf7:eth12", "spine2:eth7"] 87 | - endpoints: ["leaf8:eth11", "spine1:eth8"] 88 | - endpoints: ["leaf8:eth12", "spine2:eth8"] 89 | -------------------------------------------------------------------------------- /containerlab/scripts/ansible_hosts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # Create Ansible inventory from the containerlab output 3 | # Magnus Glantz, sudo@redhat.com, 2024 4 | 5 | install_dir="/home/mglantz/advanced-networking-workshop" 6 | inventory_file="$install_dir/inventory" 7 | 8 | cat << 'EOF' >$inventory_file 9 | [all:vars] 10 | # common variables 11 | ansible_user=admin 12 | ansible_ssh_private_key_file=~/.ssh/advanced-networking-workshop_id_rsa 13 | ansible_network_os=arista.eos.eos 14 | ansible_become=true 15 | ansible_become_method=enable 16 | ansible_connection=ansible.netcommon.network_cli 17 | EOF 18 | 19 | echo "[linux]" >>$inventory_file 20 | sudo containerlab inspect -t $install_dir/containerlab/ceos-evpn-overlaid.clab.yml 2>/dev/null|cut -d'|' -f3,8|grep clab-EVPN | grep host|sed -e "s@/24@@g" -e "s/ //g" -e "s/|/ ansible_host=/g" >>$inventory_file 21 | 22 | echo "" >>$inventory_file 23 | echo "[leafs]" >>$inventory_file 24 | sudo containerlab inspect -t $install_dir/containerlab/ceos-evpn-overlaid.clab.yml 2>/dev/null|cut -d'|' -f3,8|grep clab-EVPN | sed -e "s@/24@@g" -e "s/ //g" -e "s/|/ ansible_host=/g"|grep leaf >>$inventory_file 25 | 26 | echo "" >>$inventory_file 27 | echo "[spines]" >>$inventory_file 28 | sudo containerlab inspect -t $install_dir/containerlab/ceos-evpn-overlaid.clab.yml 2>/dev/null|cut -d'|' -f3,8|grep clab-EVPN | sed -e "s@/24@@g" -e "s/ //g" -e "s/|/ ansible_host=/g"|grep spine >>$inventory_file 29 | 30 | echo "" >>$inventory_file 31 | echo "[switches:children]" >>$inventory_file 32 | echo "leafs" >>$inventory_file 33 | echo "spines" >>$inventory_file 34 | -------------------------------------------------------------------------------- /containerlab/scripts/fingerprints.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # Accept fingerprints based on ansible inventory 3 | # Magnus Glantz, sudo@redhat.com, 2024 4 | 5 | install_dir="/home/mglantz/advanced-networking-workshop" 6 | inventory_file="$install_dir/inventory" 7 | 8 | cat $inventory_file | grep host | cut -d '=' -f 2 | xargs ssh-keyscan -H >> ~/.ssh/known_hosts 2>/dev/null 9 | -------------------------------------------------------------------------------- /containerlab/scripts/id_rsa: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEA0VSEb5QMEOKW8MiEo/UXpKcouoSknmMxgpmRtz6u/5oP3HpB 3 | 4YFkUqhTjNdwLCs0eo4khVO9/on0EjNIPKIt0febBQ2OEHhl2rLc4kN2h1IqONGL 4 | XhP5VAA2kcgcu8No5p7tPrHt4yvMMpqtjMGhW07THlAbzITr7rnYbxtXAf83B9Ey 5 | 52nU1vjqprtgrzaVJaatQyIiNdF1KYWh6RExXzmMiEO0k4ohHeIp5N4j8vMxps4E 6 | JHiuNXK8+hDXgZ4/LYC+KNqzJmFpUYI4/7fHtrFA898BFcQtiYWQ3sLmeiJidsjS 7 | 7fvMjoXNpE7t6KOKWdn/5HQqJan/wTFzrXz+QQIDAQABAoIBAQCU5fKCT6O5iwPk 8 | 6Cz5V0hnFYQyEFHsXBCGnmf5GXxvUg4APXKJTnmnFhbAMyqWMHFWz68Iq4WU/ln/ 9 | bDzw7Ed9eAvrrzWjX5DL3LijtWslXHuuCNeCpuCOMMygK+DManY+vUNyeiwFkEzi 10 | ngXe/oihI1Om10K+2rncCJP8jEz6nF6luFEBkJNkRJ9v5+2Hw6fj62zgFyB8AN+i 11 | WezXZTGgcRUcC8rv5riQpU/V+9cJ/1M2MtpfwhZONJnn0Ei+QmX9AHpeMVh8Gw2f 12 | b4un4rks130Jl7AAyLnAfsvteAHngDfJhfV4jntMXdG8DFzaAW8mUZBjq+fYHbL7 13 | yFCrh1mxAoGBAPQLSI6Z2XSmSRDInV/EvPJaJR7R0dGPGUOZ34UY7ePn6zPfu52e 14 | q+zEts2VwwKG+a7GR/32mulF21nk3LskvyKPx/9+yVLVTcCHZrvkGCVNbnOAdAIQ 15 | Y8yOSOVbVoNKlWV6j4wDkso4cfH/j5gcqEY4knjcJjViqEcWSq4BxiFtAoGBANuV 16 | 3SAdx1obPJ+PlJX90L1LRsU5PUoESGBgHGIZKLH4FEaKfOGpoUi4URn2v6K0d3sg 17 | JfwPc5WKye+s6Y3opFQqoIOVG7DvkNMOKdDQOO5SyS0YzaHddx82mQTqHEN4HZLq 18 | zk/9iZ0Bv6C951jhi5gslo13neY98BIpLwcQql+lAoGAPrVHh5zwy5CO5ckm5xze 19 | kEepkinICFkE3OIFFWY6en11anbq9q127/f8IQeCfHvCXK6GgTOEyrwwiQDN1yiy 20 | FGdttLEXejllKTuholYR/kPPRc6UAJPFkSJeiNDXghUAHntHt2qTpXKrlMteUm/K 21 | rYCL4pJvHvii1OFdfyjliGECgYEAxz9eDYVX3bg3MyWqkstjvE/w4IbGyUHHlsO/ 22 | HXhsx8guRa/mDzHHql+tH50ZWH7ep7eNIAG5RKlSAQvqRR0i90hSq/MB1HQc+pWw 23 | dcxqzD4MU8Jc3JJDQ+xbvuzbRpFYbHZpTIXnd7MdebK3mJvX+fYDikxO15u+GgyK 24 | oqOJpQ0CgYBYb2mmQc/xpk/JSd9WRZWu8/KC/68gcMiVScfW2x6gWxWWaMu9ro9y 25 | FqFZ/vfzypA1isLLp0kVDH195rbjZ7B78DtCLLX8crCSr2U0rXvSQUGqDVJHSVtC 26 | uY+57Bccfa3Z4lvmRl9ODPpPJhBhlX3694yzxSruue2Ri6UXr/vuNA== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /containerlab/scripts/id_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 2 | -------------------------------------------------------------------------------- /containerlab/scripts/lab-management.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # Lab management script 3 | # Magnus Glantz, sudo@redhat.com, 2024 4 | 5 | install_dir="/home/mglantz/advanced-networking-workshop" 6 | containerlab_file_start="$install_dir/containerlab/ceos-evpn-overload.clab-start.yml" 7 | containerlab_file_full="$install_dir/containerlab/ceos-evpn-overload.clab-full.yml" 8 | 9 | cd $install_dir/containerlab 10 | 11 | start_lab() 12 | { 13 | sudo containerlab --runtime podman deploy -t ceos-evpn-overlaid.clab-start.yml --reconfigure 14 | sh $install_dir/scripts/ansible_host.sh 15 | sh $install_dir/scripts/fingerprint.sh >/dev/null 2>&1 16 | cp $install_dir/scripts/id_rsa ~/.ssh/advanced-networking-workshop_id_rsa 17 | chmod ~/.ssh/advanced-networking-workshop_id_rsa 18 | ssh-add ~/.ssh/advanced-networking-workshop_id_rsa 19 | } 20 | 21 | start_lab_full() 22 | { 23 | sudo containerlab --runtime podman deploy -t ceos-evpn-overlaid.clab-ful.yml --reconfigure 24 | sh $install_dir/scripts/ansible_host.sh 25 | sh $install_dir/scripts/fingerprint.sh >/dev/null 2>&1 26 | cp $install_dir/scripts/id_rsa ~/.ssh/advanced-networking-workshop_id_rsa 27 | chmod ~/.ssh/advanced-networking-workshop_id_rsa 28 | ssh-add ~/.ssh/advanced-networking-workshop_id_rsa 29 | } 30 | 31 | print_usage() 32 | { 33 | echo "Usage: $0 [-s|-sf|--start|--start-full|help]" 34 | echo "-s|--start :: start lab" 35 | echo "-sf|--start-full :: start lab fully configured" 36 | exit 0 37 | } 38 | 39 | case $1 in 40 | start|-s|--start) 41 | start_lab 42 | ;; 43 | start-full|-sf|--start-full) 44 | start_lab_full 45 | ;; 46 | stop|-stop|--stop) 47 | stop_lab 48 | ;; 49 | *) 50 | print_usage 51 | ;; 52 | esac 53 | -------------------------------------------------------------------------------- /containerlab/solutions/lab1.yml: -------------------------------------------------------------------------------- 1 | name: lab1 2 | topology: 3 | kinds: 4 | ceos: 5 | image: localhost/ceos:4.32.0F 6 | nodes: 7 | leaf1: 8 | kind: ceos 9 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf1-start.cfg 10 | leaf2: 11 | kind: ceos 12 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf2-start.cfg 13 | links: 14 | - endpoints: ["leaf1:eth9", "leaf2:eth9"] 15 | - endpoints: ["leaf1:eth10", "leaf2:eth10"] 16 | -------------------------------------------------------------------------------- /containerlab/solutions/lab2.yml: -------------------------------------------------------------------------------- 1 | name: lab2 2 | topology: 3 | kinds: 4 | ceos: 5 | image: localhost/ceos:4.32.0F 6 | nodes: 7 | leaf1: 8 | kind: ceos 9 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf1-start.cfg 10 | leaf2: 11 | kind: ceos 12 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf2-start.cfg 13 | spine1: 14 | kind: ceos 15 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine1-full.cfg 16 | spine2: 17 | kind: ceos 18 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine2-full.cfg 19 | links: 20 | - endpoints: ["leaf1:eth9", "leaf2:eth9"] 21 | - endpoints: ["leaf1:eth10", "leaf2:eth10"] 22 | - endpoints: ["leaf1:eth11", "spine1:eth1"] 23 | - endpoints: ["leaf1:eth12", "spine2:eth1"] 24 | - endpoints: ["leaf2:eth11", "spine1:eth2"] 25 | - endpoints: ["leaf2:eth12", "spine2:eth2"] 26 | 27 | -------------------------------------------------------------------------------- /containerlab/solutions/lab3-full.yml: -------------------------------------------------------------------------------- 1 | # https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/ 2 | name: lab3 3 | topology: 4 | kinds: 5 | ceos: 6 | image: localhost/ceos:4.32.0F 7 | linux: 8 | image: ghcr.io/hellt/network-multitool 9 | nodes: 10 | leaf1: 11 | kind: ceos 12 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf1-full.cfg 13 | leaf2: 14 | kind: ceos 15 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf2-full.cfg 16 | leaf3: 17 | kind: ceos 18 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf3-full.cfg 19 | leaf4: 20 | kind: ceos 21 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf4-full.cfg 22 | leaf5: 23 | kind: ceos 24 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf5-full.cfg 25 | leaf6: 26 | kind: ceos 27 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf6-full.cfg 28 | leaf7: 29 | kind: ceos 30 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf7-full.cfg 31 | leaf8: 32 | kind: ceos 33 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf8-full.cfg 34 | spine1: 35 | kind: ceos 36 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine1-full.cfg 37 | spine2: 38 | kind: ceos 39 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine2-full.cfg 40 | host1: 41 | kind: linux 42 | host2: 43 | kind: linux 44 | host3: 45 | kind: linux 46 | host4: 47 | kind: linux 48 | links: 49 | - endpoints: ["leaf1:eth7", "host1:eth1"] 50 | - endpoints: ["leaf1:eth8", "host1:eth2"] 51 | - endpoints: ["leaf2:eth7", "host1:eth3"] 52 | - endpoints: ["leaf2:eth8", "host1:eth4"] 53 | - endpoints: ["leaf1:eth9", "leaf2:eth9"] 54 | - endpoints: ["leaf1:eth10", "leaf2:eth10"] 55 | - endpoints: ["leaf1:eth11", "spine1:eth1"] 56 | - endpoints: ["leaf1:eth12", "spine2:eth1"] 57 | - endpoints: ["leaf2:eth11", "spine1:eth2"] 58 | - endpoints: ["leaf2:eth12", "spine2:eth2"] 59 | - endpoints: ["leaf3:eth7", "host2:eth1"] 60 | - endpoints: ["leaf3:eth8", "host2:eth2"] 61 | - endpoints: ["leaf4:eth7", "host2:eth3"] 62 | - endpoints: ["leaf4:eth8", "host2:eth4"] 63 | - endpoints: ["leaf3:eth9", "leaf4:eth9"] 64 | - endpoints: ["leaf3:eth10", "leaf4:eth10"] 65 | - endpoints: ["leaf3:eth11", "spine1:eth3"] 66 | - endpoints: ["leaf3:eth12", "spine2:eth3"] 67 | - endpoints: ["leaf4:eth11", "spine1:eth4"] 68 | - endpoints: ["leaf4:eth12", "spine2:eth4"] 69 | - endpoints: ["leaf5:eth7", "host3:eth1"] 70 | - endpoints: ["leaf5:eth8", "host3:eth2"] 71 | - endpoints: ["leaf6:eth7", "host3:eth3"] 72 | - endpoints: ["leaf6:eth8", "host3:eth4"] 73 | - endpoints: ["leaf5:eth9", "leaf6:eth9"] 74 | - endpoints: ["leaf5:eth10", "leaf6:eth10"] 75 | - endpoints: ["leaf5:eth11", "spine1:eth5"] 76 | - endpoints: ["leaf5:eth12", "spine2:eth5"] 77 | - endpoints: ["leaf6:eth11", "spine1:eth6"] 78 | - endpoints: ["leaf6:eth12", "spine2:eth6"] 79 | - endpoints: ["leaf7:eth7", "host4:eth1"] 80 | - endpoints: ["leaf7:eth8", "host4:eth2"] 81 | - endpoints: ["leaf8:eth7", "host4:eth3"] 82 | - endpoints: ["leaf8:eth8", "host4:eth4"] 83 | - endpoints: ["leaf7:eth9", "leaf8:eth9"] 84 | - endpoints: ["leaf7:eth10", "leaf8:eth10"] 85 | - endpoints: ["leaf7:eth11", "spine1:eth7"] 86 | - endpoints: ["leaf7:eth12", "spine2:eth7"] 87 | - endpoints: ["leaf8:eth11", "spine1:eth8"] 88 | - endpoints: ["leaf8:eth12", "spine2:eth8"] 89 | -------------------------------------------------------------------------------- /containerlab/solutions/lab3-start.yml: -------------------------------------------------------------------------------- 1 | # https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/ 2 | name: lab3 3 | topology: 4 | kinds: 5 | ceos: 6 | image: localhost/ceos:4.32.0F 7 | linux: 8 | image: ghcr.io/hellt/network-multitool 9 | nodes: 10 | leaf1: 11 | kind: ceos 12 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf1-start.cfg 13 | leaf2: 14 | kind: ceos 15 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf2-start.cfg 16 | leaf3: 17 | kind: ceos 18 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf3-start.cfg 19 | leaf4: 20 | kind: ceos 21 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf4-start.cfg 22 | leaf5: 23 | kind: ceos 24 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf5-start.cfg 25 | leaf6: 26 | kind: ceos 27 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf6-start.cfg 28 | leaf7: 29 | kind: ceos 30 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf7-start.cfg 31 | leaf8: 32 | kind: ceos 33 | startup-config: ~/advanced-networking-workshop/containerlab/configs/leaf8-start.cfg 34 | spine1: 35 | kind: ceos 36 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine1-start.cfg 37 | spine2: 38 | kind: ceos 39 | startup-config: ~/advanced-networking-workshop/containerlab/configs/spine2-start.cfg 40 | host1: 41 | kind: linux 42 | host2: 43 | kind: linux 44 | host3: 45 | kind: linux 46 | host4: 47 | kind: linux 48 | links: 49 | - endpoints: ["leaf1:eth7", "host1:eth1"] 50 | - endpoints: ["leaf1:eth8", "host1:eth2"] 51 | - endpoints: ["leaf2:eth7", "host1:eth3"] 52 | - endpoints: ["leaf2:eth8", "host1:eth4"] 53 | - endpoints: ["leaf1:eth9", "leaf2:eth9"] 54 | - endpoints: ["leaf1:eth10", "leaf2:eth10"] 55 | - endpoints: ["leaf1:eth11", "spine1:eth1"] 56 | - endpoints: ["leaf1:eth12", "spine2:eth1"] 57 | - endpoints: ["leaf2:eth11", "spine1:eth2"] 58 | - endpoints: ["leaf2:eth12", "spine2:eth2"] 59 | - endpoints: ["leaf3:eth7", "host2:eth1"] 60 | - endpoints: ["leaf3:eth8", "host2:eth2"] 61 | - endpoints: ["leaf4:eth7", "host2:eth3"] 62 | - endpoints: ["leaf4:eth8", "host2:eth4"] 63 | - endpoints: ["leaf3:eth9", "leaf4:eth9"] 64 | - endpoints: ["leaf3:eth10", "leaf4:eth10"] 65 | - endpoints: ["leaf3:eth11", "spine1:eth3"] 66 | - endpoints: ["leaf3:eth12", "spine2:eth3"] 67 | - endpoints: ["leaf4:eth11", "spine1:eth4"] 68 | - endpoints: ["leaf4:eth12", "spine2:eth4"] 69 | - endpoints: ["leaf5:eth7", "host3:eth1"] 70 | - endpoints: ["leaf5:eth8", "host3:eth2"] 71 | - endpoints: ["leaf6:eth7", "host3:eth3"] 72 | - endpoints: ["leaf6:eth8", "host3:eth4"] 73 | - endpoints: ["leaf5:eth9", "leaf6:eth9"] 74 | - endpoints: ["leaf5:eth10", "leaf6:eth10"] 75 | - endpoints: ["leaf5:eth11", "spine1:eth5"] 76 | - endpoints: ["leaf5:eth12", "spine2:eth5"] 77 | - endpoints: ["leaf6:eth11", "spine1:eth6"] 78 | - endpoints: ["leaf6:eth12", "spine2:eth6"] 79 | - endpoints: ["leaf7:eth7", "host4:eth1"] 80 | - endpoints: ["leaf7:eth8", "host4:eth2"] 81 | - endpoints: ["leaf8:eth7", "host4:eth3"] 82 | - endpoints: ["leaf8:eth8", "host4:eth4"] 83 | - endpoints: ["leaf7:eth9", "leaf8:eth9"] 84 | - endpoints: ["leaf7:eth10", "leaf8:eth10"] 85 | - endpoints: ["leaf7:eth11", "spine1:eth7"] 86 | - endpoints: ["leaf7:eth12", "spine2:eth7"] 87 | - endpoints: ["leaf8:eth11", "spine1:eth8"] 88 | - endpoints: ["leaf8:eth12", "spine2:eth8"] 89 | -------------------------------------------------------------------------------- /containerlab/srlceos01.clab.yml: -------------------------------------------------------------------------------- 1 | # topology documentation: http://containerlab.dev/lab-examples/srl-ceos/ 2 | name: srlceos01 3 | 4 | topology: 5 | nodes: 6 | srl: 7 | kind: nokia_srlinux 8 | image: ghcr.io/nokia/srlinux 9 | ceos: 10 | kind: arista_ceos 11 | image: ceos:4.25.0F 12 | 13 | links: 14 | - endpoints: ["srl:e1-1", "ceos:eth1"] 15 | 16 | -------------------------------------------------------------------------------- /labs/README.md: -------------------------------------------------------------------------------- 1 | ## Overview of lab excercises 2 | ### [Section 0: Introduction to the lab](labs/lab-0/README.md) 3 | ``` 4 | 0.1: Introduction to the workshop 5 | 0.2: Technical prerequisites 6 | 0.3: Knowledge prerequisites 7 | 0.4: What this workshop is NOT about 8 | 0.5: Lab graphics 9 | 0.6: If something goes wrong 10 | 0.7: Preparing to do the lab 11 | 0.8: Accessing the lab for the first time 12 | ``` 13 | 14 | ### [Section 1: Fundamentals, test automation, information related tasks](lab-1/README.md) 15 | ``` 16 | 1.1: Different Ansible approaches to automating network devices 17 | 1.1.1: Vendor differences 18 | 1.1.2: Network test automation (using ContainerLab) 19 | 1.1.2.1: Creating a containerlab test environment 20 | 1.1.3: Gathering information 21 | 1.1.3.1: Using the command module 22 | 1.1.3.2: Performing backups 23 | 1.1.3.3: Documenting your network 24 | 1.1.3.4: Adding intelligence to your playbooks 25 | 1.1.3.5: Operational use-cases 26 | ``` 27 | 28 | ### [Section 2: Applying configuration to devices](lab-2/README.md) 29 | ``` 30 | 2.1: Building a new containerlab environment 31 | 2.2: Reviewing the initial desired configuration state 32 | 2.3: Using the command module to accomplish our desired state 33 | 2.3.1: Assessing the use of the command module. 34 | 2.4: Learning about purpose specific configuration modules 35 | 2.4.1: module state: "merged" (often the default) 36 | 2.4.2: module state: "replaced" 37 | 2.4.3: module state: "overridden" 38 | 2.4.4: module state: "deleted" 39 | 2.4.5: module state: "gathered" 40 | 2.4.6: module state: "rendered" / "parsed" 41 | 2.5: Reset your lab environment 42 | 2.6: Using purpose specific modules to archieve the desired configuration state 43 | 2.6.1: Assessing the use of purpose specific configuration modules 44 | 2.7: Using config modules to make changes 45 | 2.7.1: Using the config module to load static config files into devices 46 | 2.7.2: Using the config module to inject lines of config into devices 47 | 2.7.3: Using the config module to load dynamic config files into devices 48 | ``` 49 | 50 | ### [Section 3: Applying best practices to build a BGP EVPN architecture](lab-3/README.md) 51 | ``` 52 | 3.1 Review of containerlab and desired state device configuration 53 | 3.2 Automating your network 54 | 3.3. Validating your setup 55 | ``` 56 | -------------------------------------------------------------------------------- /labs/lab-0/README.md: -------------------------------------------------------------------------------- 1 | # Section 0: Introduction to the workshop 2 | #### Table of Contents 3 | [0.1: Introduction to the workshop](#01-introduction-to-the-workshop)
4 | [0.2: Technical prerequisites](#02-technical-prerequisites)
5 | [0.3: Knowledge prerequisites](#03-knowledge-prerequisites)
6 | [0.4: What this workshop is NOT about](#04-what-this-workshop-is-not-about)
7 | [0.5: Lab graphics](#05-lab-graphics)
8 | [0.6: If something goes wrong](#06-if-something-goes-wrong)
9 | [0.7: Preparations to do the lab](#07-preparations-to-do-the-lab)
10 | [0.8: Accessing the lab for the first time](#08-accessing-the-lab-for-the-first-time)
11 | 12 | # 0.1 Introduction to the workshop 13 | This workshop teaches advanced Ansible automation techniques for managing networking, meaning, switches and routers mainly. 14 | This lab is based on [https://containerlab.dev/](https://containerlab.dev), which will allows us to spin up network test environments which we perform the workshop on. 15 | 16 | A lot of the workshop material is inspired from: 17 | * [Arista Ansible getting started](https://arista.my.site.com/AristaCommunity/s/article/arista-ansible-getting-started) 18 | * [David Varnum's Arista BPG EVPN Configuration Example](https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/) 19 | * [Dharmesh Shah's and Dave Varnum's Arista BGP EVPN ContainerLab configs](https://clabs.netdevops.me/rs/arista-bgp-evpn/) 20 | 21 | This workshop uses Arista cEOS, because it is so very easy to work with. If you are using Cisco, Arista will feel very familiar, most commands are similiar between the two. If you are using some other network OS, don't worry, as techniques tought by this workshop can be re-used for any network vendor. 22 | 23 | # 0.2 Technical prerequisites 24 | To complete this lab you only need a web browser. While all web browsers should work, there is a known issue with Firefox where you cannot copy and paste content into your working environment. If you can, Chrome and Opera web browsers have been proven to work without issues. Edge and Safari browser likely also works without any issues. 25 | 26 | # 0.3 Knowledge prerequisites 27 | This work assumes a few things from the student of the workshop, such as: 28 | * The person has intermediate knowledge about Ansible. 29 | * The person has intermediate to expert knowledge about networking, more specific, about switching and routing (level 2 to 5). 30 | * It's useful (not required) if you have basic knowledge of how to navigate in a Linux shell. 31 | 32 | # 0.4: What this workshop is NOT about 33 | This workshop will not explain networking concepts. This is not a workshop which attempts to teach networking, routing or switching. 34 | 35 | How to implement network automation for production environents, which includes an enterprise framework such as Ansible Automation Platform. 36 | 37 | This workshop neither tries to explain the basics of Ansible, you are expected to understand what roles, playbooks, collections, variables, inventories are and know the differences between the different Ansible CLI and management tools such as Ansible Automation Platform. 38 | 39 | # 0.5 Lab graphics 40 | 41 | In this lab, we use some basic graphics to make the lab easier to understand. Such as: 42 | 43 | * :boom: This is something which you have to do. 44 | * :star: If you have time, you can also do this. 45 | * :exclamation: Take careful notice of this, or you may fall on your face. 46 | * :unlock: Show solution 47 | * :thumbsup: This text contains information about a best practice. 48 | ``` 49 | Here is some code that you need to run 50 | ``` 51 | ``` 52 | Here is an example of expected output when running commands 53 | ``` 54 | 55 | # 0.6: If something goes wrong 56 | If by some reason you get stuck in a lab - then here's what you should do. **Follow below steps 1-5**. _Do not skip any steps if not told to._ 57 | 58 | 1. If you do not understand what to do in a lab, or do not understand what you are doing, skip immediately to step 5. Also, the authors of this lab apologize for that. The purpose of this lab is so that everyone can do it and understand it. 59 | 2. This lab has seen plenty of use, so chances are that you have simply not followed the lab instructions. Start by reading the lab instructions again, carefully. 60 | 3. If you are sure that you are doing things as described in the labs, perhaps you typed something wrong or had a copy-paste accident. Double checking your files content and comparing them with the content described here in the lab. If you typed things manually, try doing a clean copy-paste from the lab page instead. 61 | 4. There are solutions documented in the labs/lab-1/solutions and labs/lab-2/solutions directories which containers playbooks, variable files, etc, which you can compare with. 62 | 5. Ask the person beside you if that person also had an issue with what you are doing. If so, that may indicate there is actually something wrong. 63 | 6. If you are doing this as a part of teacher lead workshop. Raise your hand and someone will come and help you... Otherwise, find the issue, and contribute a fix. You can do it. 64 | 65 | # 0.7 Preparations to do the lab 66 | 67 | :exclamation: To get started with the labs, you first need to get your assigned username and servers. This will be provided to you by the people who operate this lab. If you have deployed the lab yourself, well, then you know where to login. 68 | 69 | :exclamation: Do not skip any labs, the labs depend on the previous ones to be completed. You need to do them in sequencial order. 70 | 71 | The lab environment which is provided to each student runs in a single Linux server, which you are provided access to, as shown below: 72 | 73 | ![Overview](images/0_overview.png) 74 | 75 | :exclamation: On purpose, security in this lab has not been made a priority, that is so you as a student get more freedom to learn. You have passwordless admin access on all systems. With that said, if you do something which is outside of the labs and break your systems, _you get to keep all the pieces_ ;) 76 | 77 | :boom: Make sure you have the required tools to do the lab. The tools are listed below: 78 | * A web browser (to view this page and the code-server / terminal). 79 | 80 | :exclamation: The systems you will be working on runs Red Hat Enterprise Linux 9.4, if you are new to Linux, see below for a simple guide for common commands: 81 | * **Linux cheat sheet**: https://files.fosswire.com/2007/08/fwunixref.pdf 82 | 83 | :exclamation: If you edit files in the terminal, you have to use one of the text based text editors (nano, vim, emacs, joe) available. 84 | Use below links as reference when needed. For now, continue on: 85 | * **nano**: https://wiki.gentoo.org/wiki/Nano/Basics_Guide 86 | * **vi/vim**: https://vim.rtorr.com/ 87 | * **emacs** Congratulations, you obviously know what you are doing already 88 | 89 | # 0.8 Accessing the lab for the first time 90 | 91 | 1. Ensure you have received an URL which you access the lab using your web browser. Please note. This lab has been tested using Chrome and Firefox. If you use anything else, you are on your own. 92 | 93 | 2. Open up your web browser and access the web based Visual Studio code environment, as shown below and enter in the workshop password. 94 | The workshop password is _rhadvnetworkshop2024_ 95 | ![Logging in](images/1_welcome.png) 96 | 97 | 3. Next, you select a visual theme and also ensure to click on "Rich support for all your language". After that click "Mark as done". 98 | ![Selection](images/2_selection.png) 99 | 100 | 4. Now we will install the Ansible extention as well. Click on the three stripes on the left hand side menu and select View > Extentions. 101 | ![Extensions](images/3_extensions.png) 102 | 103 | 5. Type in "ansible" in the search field and click "Install" on the one labeled _redhat_. 104 | ![Extensions](images/4_extensions.png) 105 | 106 | 6. Validate that once the Ansible extension has been installed - it look as below. 107 | ![Extensions](images/5_extensions.png) 108 | 109 | 7. Next, click on the left hand side menu item symbolized by two documents, and select "Open Folder". Then select "/home/student/advanced-networking-workshop" in the drop-down which opens up and click on "OK". 110 | This is where you can browse files in the lab. 111 | ![Folder](images/6_folder.png) 112 | 113 | 8. Check the "Trust the authors of all files in the parent folder "student" and click "Yes, I trust the authors". 114 | ![Trust](images/7_trust.png) 115 | 116 | 9. You create new files by clicking on the "New file" symbol with a + superimposed over a document. Remember this for when you are asked to create files during the lab. 117 | ![Files](images/8_file.png) 118 | 119 | 10. Observe how files opened or created appears as separate tabs, just like in a web browser. 120 | ![Files](images/9_file.png) 121 | 122 | 11. Finally, we will open up a terminal to the underlying Linux operating system. Click on the three stripes on the top of the left hand side menu, then: Terminal > New Terminal. 123 | ![Terminal](images/10_terminal.png) 124 | 125 | 12. Please observe that if you are asked to run commands during the lab, this is where that happens. As shown below. Also observe that you can adjust how large part the various things in the browser (file browser, open files and the terminal) takes up. 126 | ![Terminal](images/11_terminal.png) 127 | 128 | You are now done with the introduction to the lab and are ready to start learn about advanced networking automation using Ansible. 129 | 130 | ``` 131 | End-of-lab 132 | ``` 133 | [Go to the next lab, lab 1](../lab-1/README.md) 134 | -------------------------------------------------------------------------------- /labs/lab-0/images/0_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/0_overview.png -------------------------------------------------------------------------------- /labs/lab-0/images/10_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/10_terminal.png -------------------------------------------------------------------------------- /labs/lab-0/images/11_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/11_terminal.png -------------------------------------------------------------------------------- /labs/lab-0/images/1_welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/1_welcome.png -------------------------------------------------------------------------------- /labs/lab-0/images/2_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/2_selection.png -------------------------------------------------------------------------------- /labs/lab-0/images/3_extensions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/3_extensions.png -------------------------------------------------------------------------------- /labs/lab-0/images/4_extensions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/4_extensions.png -------------------------------------------------------------------------------- /labs/lab-0/images/5_extensions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/5_extensions.png -------------------------------------------------------------------------------- /labs/lab-0/images/6_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/6_folder.png -------------------------------------------------------------------------------- /labs/lab-0/images/7_trust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/7_trust.png -------------------------------------------------------------------------------- /labs/lab-0/images/8_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/8_file.png -------------------------------------------------------------------------------- /labs/lab-0/images/9_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-0/images/9_file.png -------------------------------------------------------------------------------- /labs/lab-1/accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-1/accept.png -------------------------------------------------------------------------------- /labs/lab-1/ansible_network_testing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-1/ansible_network_testing.png -------------------------------------------------------------------------------- /labs/lab-1/containerlab_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-1/containerlab_overview.png -------------------------------------------------------------------------------- /labs/lab-1/solutions/arp_check.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check ARP table on port 3 | hosts: leafs 4 | vars: 5 | interface_name: Ethernet9 6 | tasks: 7 | - name: "Fetch ARP table for {{ interface_name }}" 8 | arista.eos.eos_command: 9 | commands: "show arp int {{ interface_name }}" 10 | register: arp_table 11 | 12 | - name: "Printing ARP table for {{ interface_name }}" 13 | ansible.builtin.debug: 14 | msg: " {{ arp_table.stdout_lines }}" 15 | -------------------------------------------------------------------------------- /labs/lab-1/solutions/backup_arista.yml: -------------------------------------------------------------------------------- 1 | - name: "Backup Arista switches" 2 | hosts: leafs 3 | gather_facts: no 4 | tasks: 5 | - name: Backup switch (eos) 6 | arista.eos.eos_config: 7 | backup: yes 8 | backup_options: 9 | dir_path: /home/student/advanced-networking-workshop/backups 10 | become: yes 11 | -------------------------------------------------------------------------------- /labs/lab-1/solutions/check_port.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check for port issues 3 | hosts: leafs 4 | vars: 5 | port_state: "notconnect" 6 | tasks: 7 | - name: "Fetch port status on switch" 8 | arista.eos.eos_command: 9 | commands: "show int stat|include Et" 10 | register: sh_int_stat 11 | 12 | - name: "Checking so that we DO NOT have {{ port_state }} port states on switch" 13 | ansible.builtin.assert: 14 | that: 15 | - "sh_int_stat.stdout_lines | select('search', port_state) | list | count < 1" 16 | fail_msg: "Found ports with line protocol down." 17 | success_msg: "All ports are connected." 18 | register: port_assessment 19 | ignore_errors: yes 20 | 21 | - name: "Fetch debug info in case of notconnect port states" 22 | block: 23 | - name: "Fetch interface information" 24 | arista.eos.eos_command: 25 | commands: 26 | - sh interfaces|inc Ethernet[0-9] 27 | - sh int stat 28 | - sh int counters errors 29 | register: port_status 30 | 31 | - name: "Print interface information" 32 | ansible.builtin.debug: 33 | msg: "{{ port_status.stdout_lines }}" 34 | when: port_assessment is failed 35 | 36 | 37 | -------------------------------------------------------------------------------- /labs/lab-1/solutions/eos_facts.yml: -------------------------------------------------------------------------------- 1 | - name: "Gather facts from Arista switches" 2 | hosts: leafs 3 | gather_facts: yes 4 | vars: 5 | strange_thing: "Kernel version: 6.5.0-9-generic" 6 | tasks: 7 | - name: Gather facts (eos) 8 | arista.eos.eos_facts: 9 | when: ansible_net_system == 'eos' 10 | 11 | - name: Load vars file based on ansible_net_system 12 | ansible.builtin.include_vars: "vars/{{ ansible_net_system }}.yml" 13 | 14 | - name: Tell user we found an Arista switch 15 | debug: 16 | msg: "Arista switch detected" 17 | when: ansible_net_system == 'eos' 18 | 19 | - name: Collect show version information 20 | arista.eos.eos_command: 21 | commands: "show version" 22 | register: show_version 23 | 24 | - name: Ensure no strange things are detected 25 | ansible.builtin.assert: 26 | that: 27 | - "show_version.stdout_lines | select('search', strange_thing) | list | count < 1" 28 | fail_msg: "Oh no" 29 | success_msg: "All is well" 30 | 31 | - name: Fail if SLA is not premium 32 | fail: 33 | msg: "Warning: SLA is {{ switch_sla }}" 34 | when: switch_sla != "premium" 35 | -------------------------------------------------------------------------------- /labs/lab-1/solutions/network_documentation.yml: -------------------------------------------------------------------------------- 1 | - name: "Document Arista switches" 2 | hosts: leafs 3 | gather_facts: no 4 | 5 | tasks: 6 | - name: Gather facts (eos) 7 | arista.eos.eos_facts: 8 | 9 | - name: Display some facts 10 | debug: 11 | msg: "Collecting information about {{ ansible_net_hostname }} running {{ ansible_net_system }} {{ ansible_net_version }}" 12 | 13 | - name: Write facts to disk using a template 14 | copy: 15 | content: | 16 | #jinja2: lstrip_blocks: True 17 | {% for host in groups['leafs'] %} 18 | Hostname: {{ hostvars[host].ansible_net_hostname }} 19 | OS: {{ hostvars[host].ansible_net_system }} 20 | Version: {{ hostvars[host].ansible_net_version }} 21 | Model: {{ hostvars[host].ansible_net_model }} 22 | Serial: {{ hostvars[host].ansible_net_serialnum }} 23 | 24 | {% endfor %} 25 | dest: ~/advanced-networking-workshop/switch-facts 26 | run_once: yes 27 | 28 | -------------------------------------------------------------------------------- /labs/lab-1/solutions/ping.yml: -------------------------------------------------------------------------------- 1 | - name: Ping leaf switches 2 | hosts: leafs 3 | tasks: 4 | - name: Validate that we have a working connection to each switch 5 | ansible.builtin.ping: 6 | data: pong 7 | -------------------------------------------------------------------------------- /labs/lab-1/solutions/show_info.yml: -------------------------------------------------------------------------------- 1 | - name: "Show int stat on leaf switches" 2 | hosts: leafs 3 | gather_facts: no 4 | become: yes 5 | tasks: 6 | - name: Show summary of interface statuses 7 | arista.eos.eos_command: 8 | commands: "sh int stat" 9 | register: sh_int_stat 10 | 11 | - name: Print collected interface information 12 | debug: 13 | msg: "{{ sh_int_stat.stdout_lines }}" 14 | 15 | -------------------------------------------------------------------------------- /labs/lab-1/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-1/terminal.png -------------------------------------------------------------------------------- /labs/lab-2/lab2-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-2/lab2-config.png -------------------------------------------------------------------------------- /labs/lab-2/lab2-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-2/lab2-overview.png -------------------------------------------------------------------------------- /labs/lab-2/solutions/cmd_config/cmd_config.yml: -------------------------------------------------------------------------------- 1 | - name: "Apply static desired network configuration" 2 | hosts: leafs 3 | gather_facts: no 4 | become: yes 5 | tasks: 6 | - name: Apply VLAN 39 configuration 7 | arista.eos.eos_command: 8 | commands: 9 | - config 10 | - vlan 39 11 | - name prod 12 | 13 | - name: Apply VLAN 40 configuration 14 | arista.eos.eos_command: 15 | commands: 16 | - config 17 | - vlan 40 18 | - name test-l2-vxlan 19 | 20 | - name: Apply Ethernet11 configuration 21 | arista.eos.eos_command: 22 | commands: 23 | - config 24 | - int Ethernet11 25 | - description spine1 26 | - mtu 9214 27 | - no switchport 28 | - ip address {{ eth11_ip_address }} 29 | 30 | - name: Apply Ethernet11 configuration 31 | arista.eos.eos_command: 32 | commands: 33 | - config 34 | - int Ethernet12 35 | - description spine2 36 | - mtu 9214 37 | - no switchport 38 | - ip address {{ eth12_ip_address }} 39 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/cmd_config/host_vars/clab-lab2-leaf1: -------------------------------------------------------------------------------- 1 | --- 2 | eth11_ip_address: "10.0.1.1/31" 3 | eth12_ip_address: "10.0.2.1/31" 4 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/cmd_config/host_vars/clab-lab2-leaf2: -------------------------------------------------------------------------------- 1 | --- 2 | eth11_ip_address: "10.0.1.3/31" 3 | eth12_ip_address: "10.0.2.3/31" 4 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_lines/config_lines.yml: -------------------------------------------------------------------------------- 1 | - name: "Apply desired static network configuration to leaf1" 2 | hosts: clab-lab2-leaf1 3 | gather_facts: no 4 | become: yes 5 | tasks: 6 | - name: Apply device configuration 7 | arista.eos.eos_config: 8 | src: leaf1.cfg 9 | 10 | - name: "Apply desired static network configuration to leaf2" 11 | hosts: clab-lab2-leaf2 12 | gather_facts: no 13 | become: yes 14 | tasks: 15 | - name: Apply device configuration 16 | arista.eos.eos_config: 17 | src: leaf2.cfg 18 | 19 | - name: "Apply dynamic network configuration to leaf switches" 20 | hosts: leafs 21 | gather_facts: no 22 | become: yes 23 | tasks: 24 | - name: Apply Ethernet11 configuration to leaf switches 25 | arista.eos.eos_config: 26 | lines: 27 | - "ip address {{ eth11_ip_address }}" 28 | parents: interface Ethernet11 29 | after: no switchport 30 | 31 | - name: Apply Ethernet12 configuration to leaf switches 32 | arista.eos.eos_config: 33 | lines: 34 | - "ip address {{ eth12_ip_address }}" 35 | parents: interface Ethernet12 36 | after: no switchport 37 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_lines/host_vars/clab-lab2-leaf1: -------------------------------------------------------------------------------- 1 | --- 2 | eth11_ip_address: "10.0.1.1/31" 3 | eth12_ip_address: "10.0.2.1/31" 4 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_lines/host_vars/clab-lab2-leaf2: -------------------------------------------------------------------------------- 1 | --- 2 | eth11_ip_address: "10.0.1.3/31" 3 | eth12_ip_address: "10.0.2.3/31" 4 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_lines/leaf1.cfg: -------------------------------------------------------------------------------- 1 | vlan 39 2 | name prod 3 | ! 4 | vlan 40 5 | name test-l2-vxlan 6 | ! 7 | interface Ethernet11 8 | description spine1 9 | mtu 9214 10 | no switchport 11 | ! 12 | interface Ethernet12 13 | description spine2 14 | mtu 9214 15 | no switchport 16 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_lines/leaf2.cfg: -------------------------------------------------------------------------------- 1 | vlan 39 2 | name prod 3 | ! 4 | vlan 40 5 | name test-l2-vxlan 6 | ! 7 | interface Ethernet11 8 | description spine1 9 | mtu 9214 10 | no switchport 11 | ! 12 | interface Ethernet12 13 | description spine2 14 | mtu 9214 15 | no switchport 16 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_static/config_static.yml: -------------------------------------------------------------------------------- 1 | - name: "Apply desired static network configuration to leaf1" 2 | hosts: clab-lab2-leaf1 3 | gather_facts: no 4 | become: yes 5 | tasks: 6 | - name: Apply device configuration 7 | arista.eos.eos_config: 8 | src: leaf1.cfg 9 | 10 | - name: "Apply desired static network configuration to leaf2" 11 | hosts: clab-lab2-leaf2 12 | gather_facts: no 13 | become: yes 14 | tasks: 15 | - name: Apply device configuration 16 | arista.eos.eos_config: 17 | src: leaf2.cfg 18 | 19 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_static/leaf1.cfg: -------------------------------------------------------------------------------- 1 | vlan 39 2 | name prod 3 | ! 4 | vlan 40 5 | name test-l2-vxlan 6 | ! 7 | interface Ethernet11 8 | description spine1 9 | mtu 9214 10 | no switchport 11 | ip address 10.0.1.1/31 12 | ! 13 | interface Ethernet12 14 | description spine2 15 | mtu 9214 16 | no switchport 17 | ip address 10.0.2.1/31 18 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/config_static/leaf2.cfg: -------------------------------------------------------------------------------- 1 | vlan 39 2 | name prod 3 | ! 4 | vlan 40 5 | name test-l2-vxlan 6 | ! 7 | interface Ethernet11 8 | description spine1 9 | mtu 9214 10 | no switchport 11 | ip address 10.0.1.3/31 12 | ! 13 | interface Ethernet12 14 | description spine2 15 | mtu 9214 16 | no switchport 17 | ip address 10.0.2.3/31 18 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/module_config/host_vars/clab-lab2-leaf1: -------------------------------------------------------------------------------- 1 | --- 2 | eth11_ip_address: "10.0.1.1/31" 3 | eth12_ip_address: "10.0.2.1/31" 4 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/module_config/host_vars/clab-lab2-leaf2: -------------------------------------------------------------------------------- 1 | --- 2 | eth11_ip_address: "10.0.1.3/31" 3 | eth12_ip_address: "10.0.2.3/31" 4 | -------------------------------------------------------------------------------- /labs/lab-2/solutions/module_config/module_config.yml: -------------------------------------------------------------------------------- 1 | - name: "Apply desired network configuration" 2 | hosts: leafs 3 | gather_facts: no 4 | become: yes 5 | tasks: 6 | - name: Apply VLAN configuration 7 | arista.eos.eos_vlans: 8 | config: 9 | - vlan_id: 39 10 | name: prod 11 | - vlan_id: 40 12 | name: test-l2-vxlan 13 | 14 | - name: Apply Ethernet interface base configuration 15 | arista.eos.eos_interfaces: 16 | config: 17 | - name: Ethernet11 18 | enabled: true 19 | mode: layer3 20 | mtu: 9214 21 | - name: Ethernet12 22 | enabled: true 23 | mode: layer3 24 | mtu: 9214 25 | 26 | - name: Apply Ethernet interface L3 configuration 27 | arista.eos.eos_l3_interfaces: 28 | config: 29 | - name: Ethernet11 30 | ipv4: 31 | - address: "{{ eth11_ip_address }}" 32 | - name: Ethernet12 33 | ipv4: 34 | - address: "{{ eth12_ip_address }}" 35 | -------------------------------------------------------------------------------- /labs/lab-3/README.md: -------------------------------------------------------------------------------- 1 | # Section 3: Applying best practices to build a BGP EVPN architecture 2 | This is the last and final part of the workshop, in which you will get to apply all your knowledge to create a fully functioning BGP EVPN spine/leaf setup. 3 | 4 | :exclamation: This is a free form excercise, so if you struggeled a little bit before, this may be an excercise you may want to do later on as you have built more experience. 5 | 6 | If you want to read up on BGP EVPN based architectures, you can read David Varnum's excellent writup on the topic, here: 7 | * [Arista BGP EVPN Overview and concepts](https://overlaid.net/2018/08/27/arista-bgp-evpn-overview-and-concepts/) 8 | 9 | And this blog, where David Varnum step-by-step reviews a setup: 10 | * [Arista BGP EVPN - Configuration example](https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/) 11 | 12 | ## Overview 13 | #### Table of Contents 14 | [3.1 Review of containerlab and desired state device configuration](#31-review-of-containerlab-and-desired-state-device-configuration)
15 | [3.2 Automating your network](#32-automating-your-network)
16 | [3.3. Validating your setup](#33-validating-your-setup)
17 | 18 | ## 3.1 Review of containerlab and desired state device configuration 19 | First off, what we want to accomplish, looks like this: 20 | 21 | ![overview](overview-evpn-bgp.png) 22 | 23 | Leaf switches are organized in pairs of two, which are then connected to our spine switches. Connected to each leaf pair, we have a Linux system which is connected to both leaf switches. This Linux system has the typical Linux network troubleshooting tools re-installed. 24 | 25 | For this lab, there are two already prepared containerlab files: 26 | * $LABDIR/containerlab/lab3-start.yml 27 | * $LABDIR/containerlab/lab3-full.yml 28 | 29 | * The -start version will setup your starting point for automation, switches with only auth and a management interface setup, like we before in our labs. 30 | * The -full version will setup everything fully configured, allowing you to explore the setup in details. 31 | 32 | :boom: Task 1: Destroy the previous environment and setup our starting point by running below commands: 33 | ``` 34 | cd $LABDIR/containerlab 35 | sudo containerlab --runtime podman destroy -t lab2.yml 36 | sudo containerlab --runtime podman deploy -t lab3-start.yml 37 | ../scripts/ansible_hosts.sh lab3 38 | ``` 39 | 40 | --- 41 | 42 | :boom: Task 2: Review the desired state configuration of each and every switch by looking at their running configurations: 43 | ``` 44 | $ cd $LABDIR/containerlab/configs 45 | $ ls *full* 46 | leaf1-full.cfg leaf2-full.cfg leaf3-full.cfg leaf4-full.cfg leaf5-full.cfg leaf6-full.cfg leaf7-full.cfg leaf8-full.cfg spine1-full.cfg spine2-full.cfg 47 | $ more leaf11-full.cfg 48 | $ more spine1-full.cfg 49 | ... 50 | ``` 51 | 52 | That is how your switches should look like when you are done. 53 | 54 | ## 3.2 Automating your network 55 | Now it's time for you to decide on how you will use Ansible to accomplish a working version of the EVPN BPG architecture. The easiest way to accomplish this will be to use the arista.eos.eos_config module and push the working running configs to each switch. In real life, that is not always the best approach. Consider what parts of this network's configuration which you may be changing more often. Are there parts of the network configuration which you would rather manage separately? 56 | 57 | :boom: Task 1: Decide on how you will setup the network, create your Ansible automation and run it. 58 | * :exclamation: If you end up in a dead end, you can always recreate the network by running the commands you ran to set it up first. 59 | * :exclamation: To tips on validating the setup, see next section 3.3. 60 | 61 | --- 62 | 63 | :boom: Task 2: Explore different approaches and consider how it would be to maintain this network more long term. As an example, if you push complete device configuration files initially, consider breaking off parts of it into separate plays, playbooks or even roles. 64 | 65 | ## 3.3 Validating your setup 66 | 67 | :boom: Show remote vteps 68 | 69 | ``` 70 | * leaf1#sh vxlan vtep 71 | Remote VTEPS for Vxlan1: 72 | 73 | VTEP Tunnel Type(s) 74 | ----------------- -------------- 75 | 10.0.255.12 unicast 76 | 10.0.255.13 flood 77 | 10.0.255.14 unicast 78 | 79 | Total number of remote VTEPS: 3 80 | ``` 81 | 82 | 10.0.255.12 in above example is the Loopback1 address on leaf3 and leaf4 (VTEP 2): 83 | ``` 84 | leaf3>sh int Loopback1 85 | Loopback1 is up, line protocol is up (connected) 86 | Hardware is Loopback 87 | Internet address is 10.0.255.12/32 88 | Broadcast address is 255.255.255.255 89 | IP MTU 65535 bytes (default) 90 | Up 1 hour, 37 minutes, 13 seconds 91 | ``` 92 | 93 | --- 94 | 95 | :boom: Show Type-5 EVPN routes which are the VRFs we are transporting across the EVPN fabric: 96 | ``` 97 | leaf1#show bgp evpn route-type ip-prefix ipv4 98 | BGP routing table information for VRF default 99 | Router identifier 10.0.250.11, local AS number 65001 100 | Route status codes: * - valid, > - active, S - Stale, E - ECMP head, e - ECMP 101 | c - Contributing to ECMP, % - Pending best path selection 102 | Origin codes: i - IGP, e - EGP, ? - incomplete 103 | AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop 104 | 105 | Network Next Hop Metric LocPref Weight Path 106 | * >Ec RD: 10.0.250.13:1 ip-prefix 10.34.34.0/24 107 | 10.0.255.12 - 100 0 65000 65002 i 108 | * ec RD: 10.0.250.13:1 ip-prefix 10.34.34.0/24 109 | 10.0.255.12 - 100 0 65000 65002 i 110 | * >Ec RD: 10.0.250.17:1 ip-prefix 10.78.78.0/24 111 | 10.0.255.14 - 100 0 65000 65004 i 112 | * ec RD: 10.0.250.17:1 ip-prefix 10.78.78.0/24 113 | 10.0.255.14 - 100 0 65000 65004 i 114 | ``` 115 | 116 | --- 117 | 118 | :boom: Connect to the Linux systems by using podman, such as: 119 | ``` 120 | $ sudo podman ps 121 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 122 | 569ae6a0a78f localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf5 123 | faf3b1939ebc localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf1 124 | aec63e3eeb99 localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf2 125 | 3b958aaa2d44 localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf8 126 | a300aea9782e localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf4 127 | 893e798c2671 localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf6 128 | b6ddf7d3acf8 localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-spine1 129 | 742e9737c371 localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-spine2 130 | a09acab104ae localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf7 131 | 805e0f444c0c localhost/ceos:4.32.0F bash -c /mnt/flas... 56 minutes ago Up 56 minutes (starting) clab-lab3-leaf3 132 | 8d442ecef3e5 ghcr.io/hellt/network-multitool:latest bash 56 minutes ago Up 56 minutes (starting) clab-lab3-host4 133 | e999c4e15ed4 ghcr.io/hellt/network-multitool:latest bash 56 minutes ago Up 56 minutes (starting) clab-lab3-host1 134 | 08c390e5909e ghcr.io/hellt/network-multitool:latest bash 56 minutes ago Up 56 minutes (starting) clab-lab3-host2 135 | 6bddbf3fac1a ghcr.io/hellt/network-multitool:latest bash 56 minutes ago Up 56 minutes (starting) clab-lab3-host3 136 | 137 | $ sudo podman exec -it clab-lab3-host1 bash 138 | 139 | bash-5.0# ping -c3 172.20.20.27 140 | PING 172.20.20.27 (172.20.20.27) 56(84) bytes of data. 141 | 64 bytes from 172.20.20.27: icmp_seq=1 ttl=64 time=0.018 ms 142 | 64 bytes from 172.20.20.27: icmp_seq=2 ttl=64 time=0.041 ms 143 | 64 bytes from 172.20.20.27: icmp_seq=3 ttl=64 time=0.016 ms 144 | 145 | --- 172.20.20.27 ping statistics --- 146 | 3 packets transmitted, 3 received, 0% packet loss, time 2058ms 147 | rtt min/avg/max/mdev = 0.016/0.025/0.041/0.011 ms 148 | bash-5.0# exit 149 | exit 150 | $ 151 | ``` 152 | 153 | If you made it all the way here, what else is there to learn? Well, plenty ofcourse. But you are well on your way already to be able to call yourself an Ansible network automation specialist. 154 | 155 | ``` 156 | End-of-workshop 157 | ``` 158 | [Go back to the start](../../README.md) 159 | 160 | -------------------------------------------------------------------------------- /labs/lab-3/overview-evpn-bgp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/labs/lab-3/overview-evpn-bgp.png -------------------------------------------------------------------------------- /labs/lab-3/todo.md: -------------------------------------------------------------------------------- 1 | # Section 3: Applying best practices to build a BGP EVPN architecture 2 | This is the last and final part of the workshop, in which you will get to apply all your knowledge to create a fully functioning BGP EVPN spine/leaf setup. 3 | 4 | :exclamation: This is a free form excercise, so if you struggeled a little bit before, this may be an excercise you may want to do later on as you have built more experience. 5 | 6 | If you want to read up on BGP EVPN based architectures, you can read David Varnum's excellent writup on the topic, here: 7 | * [Arista BGP EVPN Overview and concepts](https://overlaid.net/2018/08/27/arista-bgp-evpn-overview-and-concepts/) 8 | 9 | And this blog, where David Varnum walks through the required configuration: 10 | * [Arista BGP EVPN - Configuration example](https://overlaid.net/2019/01/27/arista-bgp-evpn-configuration-example/) 11 | 12 | ## Overview 13 | ``` 14 | 3.1 Review of containerlab and desired state device configuration 15 | 3.2 Option 1: Hackathon: Setup your network 16 | 3.3 TODO: Option 2: Step-by-step setup using Ansible 17 | 3.3.1. Configure Multi-Chassis Link Aggregation (MLAG) 18 | 3.3.2. Configure MLAG – Dual-Active Detection (aka Peer Keepalive) 19 | 3.3.3 Configure Underlay Point-to-Point Interfaces 20 | 3.3.4. Configure Underlay Point-to-Point Interfaces - Leaf-to-Leaf 21 | 3.3.5. Configure Loopbacks for BGP Peering 22 | 3.3.6. Configure BGP Process 23 | 3.3.7. Configure Underlay EBGP Neighbors 24 | 3.3.8. Configure Underlay IBGP Neighbors 25 | 3.3.9. Activating BGP 26 | 3.3.10. Enable EVPN Capability 27 | 3.3.11. Configure BGP EVPN Overlays - Leaf-to-Spine 28 | 3.3.12. Configure BGP EVPN Overlay - Spines-to-Leafs 29 | 3.3.13. Validating EVPN Neighbors 30 | 3.3.14. Configure VXLAN Tunnel Endpoints (VTEP) 31 | 3.3.15. Validating host to host communication 32 | ``` 33 | 34 | TODO 35 | 36 | 37 | -------------------------------------------------------------------------------- /provision/README.md: -------------------------------------------------------------------------------- 1 | # How to provision workshop on AWS EC2 2 | 1. Get access to quay.io/redhat_emp1/ee-ansible-ss or download the collection. 3 | 4 | 2. Download cEOS64-lab-4.32.0F.tar.tar from Arista or elsewhere and put into role file directory. 5 | ``` 6 | cp cEOS64-lab-4.32.0F.tar.tar advanced-networking-workshop/provision/roles/containerlab/files/ 7 | ``` 8 | 9 | 3. Modify advanced-networking-workshop/provision/vars/vars.yml file. 10 | 11 | 4. Run ansible-navigator or ansible-playbook on install.yml 12 | ``` 13 | ansible-navigator run install.yml --eei quay.io/redhat_emp1/ee-ansible-ssa --penv AWS_ACCESS_KEY_ID --penv AWS_SECRET_ACCESS_KEY --mode stdout 14 | ``` 15 | -------------------------------------------------------------------------------- /provision/containerlab-setup.yml: -------------------------------------------------------------------------------- 1 | - name: Install Grafana instance 2 | hosts: containerlab 3 | vars_files: 4 | - vars/vars.yml 5 | tasks: 6 | - name: Setup Containerlab environment 7 | ansible.builtin.include_role: 8 | name: containerlab 9 | -------------------------------------------------------------------------------- /provision/install.sh: -------------------------------------------------------------------------------- 1 | ansible-navigator run install.yml --eei quay.io/redhat_emp1/ee-ansible-ssa --penv AWS_ACCESS_KEY_ID --penv AWS_SECRET_ACCESS_KEY --mode stdout 2 | -------------------------------------------------------------------------------- /provision/install.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install advanced networking workshop 3 | hosts: localhost 4 | 5 | - name: Create RHEL 9 instances 6 | ansible.builtin.import_playbook: rhel9-instance.yml 7 | 8 | - name: Setup Containerlab environment 9 | ansible.builtin.import_playbook: containerlab-setup.yml 10 | 11 | - name: Setup VScode-server 12 | ansible.builtin.import_playbook: vscode-server.yml 13 | 14 | - name: Print list of lab systems 15 | hosts: all 16 | tasks: 17 | - name: Labsystems 18 | ansible.builtin.debug: 19 | msg: "https://{{ ansible_host }}" 20 | 21 | -------------------------------------------------------------------------------- /provision/rhel9-instance.yml: -------------------------------------------------------------------------------- 1 | - name: Install RHEL 9 instances 2 | hosts: localhost 3 | connection: local 4 | vars_files: 5 | - vars/vars.yml 6 | tasks: 7 | - name: Create VMs where Containerlab runs 8 | ansible.builtin.include_role: 9 | name: ansible_ssa.general.instance 10 | vars: 11 | instance_name: "{{lab_name}}{{item}}" 12 | with_sequence: 13 | - "1-{{ lab_system_nr }}" 14 | -------------------------------------------------------------------------------- /provision/roles/containerlab/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | Role to setup https://containerlab.dev on RHEL 9.3 5 | 6 | Requirements 7 | ------------ 8 | 9 | RHEL 9.3 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: containerlab } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | 36 | Author Information 37 | ------------------ 38 | 39 | Magnus Glantz, sudo@redhat.com, 2024 40 | -------------------------------------------------------------------------------- /provision/roles/containerlab/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for containerlab 3 | -------------------------------------------------------------------------------- /provision/roles/containerlab/files/advanced-networking-workshop_id_rsa: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEA0VSEb5QMEOKW8MiEo/UXpKcouoSknmMxgpmRtz6u/5oP3HpB 3 | 4YFkUqhTjNdwLCs0eo4khVO9/on0EjNIPKIt0febBQ2OEHhl2rLc4kN2h1IqONGL 4 | XhP5VAA2kcgcu8No5p7tPrHt4yvMMpqtjMGhW07THlAbzITr7rnYbxtXAf83B9Ey 5 | 52nU1vjqprtgrzaVJaatQyIiNdF1KYWh6RExXzmMiEO0k4ohHeIp5N4j8vMxps4E 6 | JHiuNXK8+hDXgZ4/LYC+KNqzJmFpUYI4/7fHtrFA898BFcQtiYWQ3sLmeiJidsjS 7 | 7fvMjoXNpE7t6KOKWdn/5HQqJan/wTFzrXz+QQIDAQABAoIBAQCU5fKCT6O5iwPk 8 | 6Cz5V0hnFYQyEFHsXBCGnmf5GXxvUg4APXKJTnmnFhbAMyqWMHFWz68Iq4WU/ln/ 9 | bDzw7Ed9eAvrrzWjX5DL3LijtWslXHuuCNeCpuCOMMygK+DManY+vUNyeiwFkEzi 10 | ngXe/oihI1Om10K+2rncCJP8jEz6nF6luFEBkJNkRJ9v5+2Hw6fj62zgFyB8AN+i 11 | WezXZTGgcRUcC8rv5riQpU/V+9cJ/1M2MtpfwhZONJnn0Ei+QmX9AHpeMVh8Gw2f 12 | b4un4rks130Jl7AAyLnAfsvteAHngDfJhfV4jntMXdG8DFzaAW8mUZBjq+fYHbL7 13 | yFCrh1mxAoGBAPQLSI6Z2XSmSRDInV/EvPJaJR7R0dGPGUOZ34UY7ePn6zPfu52e 14 | q+zEts2VwwKG+a7GR/32mulF21nk3LskvyKPx/9+yVLVTcCHZrvkGCVNbnOAdAIQ 15 | Y8yOSOVbVoNKlWV6j4wDkso4cfH/j5gcqEY4knjcJjViqEcWSq4BxiFtAoGBANuV 16 | 3SAdx1obPJ+PlJX90L1LRsU5PUoESGBgHGIZKLH4FEaKfOGpoUi4URn2v6K0d3sg 17 | JfwPc5WKye+s6Y3opFQqoIOVG7DvkNMOKdDQOO5SyS0YzaHddx82mQTqHEN4HZLq 18 | zk/9iZ0Bv6C951jhi5gslo13neY98BIpLwcQql+lAoGAPrVHh5zwy5CO5ckm5xze 19 | kEepkinICFkE3OIFFWY6en11anbq9q127/f8IQeCfHvCXK6GgTOEyrwwiQDN1yiy 20 | FGdttLEXejllKTuholYR/kPPRc6UAJPFkSJeiNDXghUAHntHt2qTpXKrlMteUm/K 21 | rYCL4pJvHvii1OFdfyjliGECgYEAxz9eDYVX3bg3MyWqkstjvE/w4IbGyUHHlsO/ 22 | HXhsx8guRa/mDzHHql+tH50ZWH7ep7eNIAG5RKlSAQvqRR0i90hSq/MB1HQc+pWw 23 | dcxqzD4MU8Jc3JJDQ+xbvuzbRpFYbHZpTIXnd7MdebK3mJvX+fYDikxO15u+GgyK 24 | oqOJpQ0CgYBYb2mmQc/xpk/JSd9WRZWu8/KC/68gcMiVScfW2x6gWxWWaMu9ro9y 25 | FqFZ/vfzypA1isLLp0kVDH195rbjZ7B78DtCLLX8crCSr2U0rXvSQUGqDVJHSVtC 26 | uY+57Bccfa3Z4lvmRl9ODPpPJhBhlX3694yzxSruue2Ri6UXr/vuNA== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /provision/roles/containerlab/files/bash_profile: -------------------------------------------------------------------------------- 1 | # .bash_profile 2 | 3 | # Get the aliases and functions 4 | if [ -f ~/.bashrc ]; then 5 | . ~/.bashrc 6 | fi 7 | 8 | # User specific environment and startup programs 9 | SSH_ENV="$HOME/.ssh/agent-environment" 10 | 11 | function start_agent { 12 | echo "Initialising new SSH agent..." 13 | /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" 14 | echo succeeded 15 | chmod 600 "${SSH_ENV}" 16 | . "${SSH_ENV}" > /dev/null 17 | /usr/bin/ssh-add; 18 | } 19 | 20 | # Source SSH settings, if applicable 21 | 22 | if [ -f "${SSH_ENV}" ]; then 23 | . "${SSH_ENV}" > /dev/null 24 | #ps ${SSH_AGENT_PID} doesn't work under cywgin 25 | ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { 26 | start_agent; 27 | } 28 | else 29 | start_agent; 30 | fi 31 | 32 | echo "Adding advanced networking workshop ssh key" 33 | ssh-add "$HOME/.ssh/advanced-networking-workshop_id_rsa" 34 | -------------------------------------------------------------------------------- /provision/roles/containerlab/files/collections.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mglantz/advanced-networking-workshop/77247dd70c810651de433f40ae0f6b44f6593ed9/provision/roles/containerlab/files/collections.tar.gz -------------------------------------------------------------------------------- /provision/roles/containerlab/files/student: -------------------------------------------------------------------------------- 1 | student ALL=(ALL) NOPASSWD:ALL 2 | -------------------------------------------------------------------------------- /provision/roles/containerlab/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for containerlab 3 | -------------------------------------------------------------------------------- /provision/roles/containerlab/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your role description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.1 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /provision/roles/containerlab/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for containerlab 3 | 4 | - name: Set hostname 5 | ansible.builtin.hostname: 6 | name: "{{ ansible_host }}" 7 | become: yes 8 | 9 | - name: Add Ansible Automation Platform subscription pool 10 | community.general.redhat_subscription: 11 | state: present 12 | username: "{{ rhn_user }}" 13 | password: "{{ rhn_pass }}" 14 | pool_ids: 15 | - "{{ rhn_pool_id }}" 16 | become: yes 17 | 18 | - name: Install RPM dependencies 19 | ansible.builtin.dnf: 20 | name: 21 | - podman 22 | - podman-docker 23 | - git 24 | - python3 25 | - python3-pip 26 | - curl 27 | - ansible-core 28 | - ansible-test 29 | become: yes 30 | ignore_errors: yes 31 | 32 | - name: Clear cache 33 | command: dnf clean all -y 34 | become: yes 35 | 36 | - name: Install RPM dependencies 37 | ansible.builtin.dnf: 38 | name: 39 | - podman 40 | - podman-docker 41 | - git 42 | - python3 43 | - python3-pip 44 | - curl 45 | - ansible-core 46 | - ansible-test 47 | become: yes 48 | 49 | - name: Install pip3 dependency 50 | ansible.builtin.pip: 51 | name: 52 | - ansible-pylibssh 53 | - ansible-lint 54 | become: yes 55 | 56 | - name: Enable podman service 57 | ansible.builtin.service: 58 | name: 59 | podman.socket 60 | state: started 61 | enabled: true 62 | become: yes 63 | 64 | - name: Check for containerlab installation 65 | ansible.builtin.stat: 66 | path: /usr/bin/containerlab 67 | register: c_install 68 | ignore_errors: yes 69 | 70 | - block: 71 | - name: Install containerlab 72 | ansible.builtin.shell: bash -c "$(curl -sL https://get.containerlab.dev)" 73 | become: yes 74 | 75 | - name: Containerlab relabling 76 | ansible.builtin.command: semanage fcontext -a -t textrel_shlib_t /usr/bin/containerlab 77 | become: yes 78 | 79 | - name: Containerlab restorecon 80 | ansible.builtin.command: restorecon /usr/bin/containerlab 81 | become: yes 82 | when: c_install.stat.exists is false 83 | 84 | - name: Create student user 85 | ansible.builtin.user: 86 | name: student 87 | password: "{{ student_pass }}" 88 | become: yes 89 | 90 | - name: Pre-install collections for student user 91 | ansible.builtin.unarchive: 92 | copy: true 93 | src: files/collections.tar.gz 94 | dest: /home/student/ 95 | owner: student 96 | group: student 97 | become: yes 98 | 99 | - name: Check for cloned repo 100 | ansible.builtin.stat: 101 | path: /home/student/advanced-networking-workshop 102 | register: git_cloned 103 | become: yes 104 | 105 | - name: Clone advanced networking workshop git repo 106 | ansible.builtin.git: 107 | repo: "https://github.com/mglantz/advanced-networking-workshop" 108 | dest: /home/student/advanced-networking-workshop 109 | clone: yes 110 | become: yes 111 | when: git_cloned.stat.exists is false 112 | 113 | - name: Change ownership of cloned repo 114 | ansible.builtin.command: "chown student:student /home/student/advanced-networking-workshop -R" 115 | become: yes 116 | 117 | - name: Configure student sudoers rights 118 | ansible.builtin.copy: 119 | src: files/student 120 | dest: /etc/sudoers.d/student 121 | owner: root 122 | group: root 123 | mode: 0644 124 | become: yes 125 | 126 | - name: Copy student bash_profile 127 | ansible.builtin.copy: 128 | src: files/bash_profile 129 | dest: /home/student/.bash_profile 130 | owner: student 131 | group: student 132 | mode: 0644 133 | become: yes 134 | 135 | - name: Make .ssh directory for student user 136 | ansible.builtin.file: 137 | path: /home/student/.ssh 138 | state: directory 139 | owner: student 140 | group: student 141 | mode: 0700 142 | become: yes 143 | 144 | - name: Put in-place the SSH key file for the student user 145 | copy: 146 | src: files/advanced-networking-workshop_id_rsa 147 | dest: /home/student/.ssh/advanced-networking-workshop_id_rsa 148 | owner: student 149 | group: student 150 | mode: 0400 151 | become: yes 152 | 153 | - name: Copy Arista cEOS container file to systems 154 | ansible.builtin.copy: 155 | src: files/cEOS64-lab-4.32.0F.tar.tar 156 | dest: /home/student/cEOS64-lab-4.32.0F.tar.tar 157 | owner: student 158 | group: student 159 | become: yes 160 | 161 | - name: Podman import on cEOS container file 162 | command: podman import /home/student/cEOS64-lab-4.32.0F.tar.tar ceos:4.32.0F 163 | become: yes 164 | -------------------------------------------------------------------------------- /provision/roles/containerlab/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /provision/roles/containerlab/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - containerlab 6 | -------------------------------------------------------------------------------- /provision/roles/containerlab/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for containerlab 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for vscodeserver 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/files/config.yaml: -------------------------------------------------------------------------------- 1 | bind-addr: 127.0.0.1:8080 2 | auth: password 3 | password: rhadvnetworkshop2024 4 | cert: false 5 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for vscodeserver 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your role description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.1 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for vscodeserver 3 | 4 | - name: Enable EPEL 9 5 | ansible.builtin.dnf: 6 | name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm 7 | disable_gpg_check: true 8 | state: present 9 | become: yes 10 | 11 | - name: Install nginx and certbot 12 | ansible.builtin.dnf: 13 | name: 14 | - nginx 15 | - certbot 16 | - python3-certbot-nginx 17 | become: yes 18 | 19 | - name: Check for vscode-server 20 | ansible.builtin.stat: 21 | path: /usr/bin/code-server 22 | register: vscode_server 23 | ignore_errors: yes 24 | 25 | - name: Ugly install of vscode-server 26 | ansible.builtin.shell: "curl -fsSL https://code-server.dev/install.sh | sh" 27 | when: vscode_server.stat.exists is false 28 | become: yes 29 | 30 | - name: Create vscode-server config directory 31 | ansible.builtin.file: 32 | path: /home/student/.config/code-server 33 | state: directory 34 | recurse: yes 35 | become: yes 36 | 37 | - name: Install vscode-server config 38 | ansible.builtin.copy: 39 | src: files/config.yaml 40 | dest: /home/student/.config/code-server/config.yaml 41 | owner: student 42 | group: student 43 | become: yes 44 | 45 | - name: Start vscode-server for student user 46 | ansible.builtin.command: systemctl enable --now code-server@student 47 | become: yes 48 | 49 | - name: Copy default nginx.conf configuration 50 | ansible.builtin.template: 51 | src: templates/nginx-default.j2 52 | dest: /etc/nginx/nginx.conf 53 | owner: root 54 | group: root 55 | become: yes 56 | 57 | - name: Get letsencrypt certficate 58 | command: "certbot --non-interactive --redirect --agree-tos --nginx -d {{ ansible_host }} -m {{ lab_email }}" 59 | become: yes 60 | 61 | - name: Copy proper nginx.conf configuration 62 | ansible.builtin.template: 63 | src: templates/nginx.j2 64 | dest: /etc/nginx/nginx.conf 65 | owner: root 66 | group: root 67 | become: yes 68 | 69 | - name: Enable nginx 70 | ansible.builtin.service: 71 | name: nginx 72 | state: started 73 | enabled: true 74 | become: yes 75 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/templates/code-server.j2: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen [::]:80; 4 | {% for host in groups['containerlab'] %} 5 | server_name {{ hostvars[host]['ansible_host']|default(host) }} 6 | {% endfor %} 7 | location / { 8 | proxy_pass http://localhost:8080/; 9 | proxy_set_header Host $http_host; 10 | proxy_set_header Upgrade $http_upgrade; 11 | proxy_set_header Connection upgrade; 12 | proxy_set_header Accept-Encoding gzip; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/templates/nginx-default.j2: -------------------------------------------------------------------------------- 1 | #user nobody; 2 | worker_processes 1; 3 | 4 | #error_log logs/error.log; 5 | #error_log logs/error.log notice; 6 | #error_log logs/error.log info; 7 | 8 | #pid logs/nginx.pid; 9 | 10 | 11 | events { 12 | worker_connections 1024; 13 | } 14 | 15 | 16 | http { 17 | include mime.types; 18 | default_type application/octet-stream; 19 | 20 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 21 | # '$status $body_bytes_sent "$http_referer" ' 22 | # '"$http_user_agent" "$http_x_forwarded_for"'; 23 | 24 | #access_log logs/access.log main; 25 | 26 | sendfile on; 27 | #tcp_nopush on; 28 | 29 | #keepalive_timeout 0; 30 | keepalive_timeout 65; 31 | 32 | #gzip on; 33 | 34 | server { 35 | listen 80; 36 | server_name {{ hostvars[inventory_hostname]['ansible_host']|default(host) }}; 37 | 38 | 39 | #charset koi8-r; 40 | 41 | #access_log logs/host.access.log main; 42 | 43 | location / { 44 | root html; 45 | index index.html index.htm; 46 | } 47 | 48 | #error_page 404 /404.html; 49 | 50 | # redirect server error pages to the static page /50x.html 51 | # 52 | error_page 500 502 503 504 /50x.html; 53 | location = /50x.html { 54 | root html; 55 | } 56 | 57 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 58 | # 59 | #location ~ \.php$ { 60 | # proxy_pass http://127.0.0.1; 61 | #} 62 | 63 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 64 | # 65 | #location ~ \.php$ { 66 | # root html; 67 | # fastcgi_pass 127.0.0.1:9000; 68 | # fastcgi_index index.php; 69 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 70 | # include fastcgi_params; 71 | #} 72 | 73 | # deny access to .htaccess files, if Apache's document root 74 | # concurs with nginx's one 75 | # 76 | #location ~ /\.ht { 77 | # deny all; 78 | #} 79 | } 80 | 81 | 82 | # another virtual host using mix of IP-, name-, and port-based configuration 83 | # 84 | #server { 85 | # listen 8000; 86 | # listen somename:8080; 87 | # server_name somename alias another.alias; 88 | 89 | # location / { 90 | # root html; 91 | # index index.html index.htm; 92 | # } 93 | #} 94 | 95 | 96 | # HTTPS server 97 | # 98 | #server { 99 | # listen 443 ssl; 100 | # server_name localhost; 101 | 102 | # ssl_certificate cert.pem; 103 | # ssl_certificate_key cert.key; 104 | 105 | # ssl_session_cache shared:SSL:1m; 106 | # ssl_session_timeout 5m; 107 | 108 | # ssl_ciphers HIGH:!aNULL:!MD5; 109 | # ssl_prefer_server_ciphers on; 110 | 111 | # location / { 112 | # root html; 113 | # index index.html index.htm; 114 | # } 115 | #} 116 | 117 | } 118 | 119 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/templates/nginx.j2: -------------------------------------------------------------------------------- 1 | worker_processes 1; 2 | 3 | events { 4 | worker_connections 1024; 5 | } 6 | 7 | http { 8 | include mime.types; 9 | default_type application/octet-stream; 10 | sendfile on; 11 | keepalive_timeout 65; 12 | 13 | server { 14 | listen 80; 15 | server_name {{ hostvars[inventory_hostname]['ansible_host']|default(host) }}; 16 | 17 | location / { 18 | rewrite ^ https://$host$request_uri? permanent; 19 | } 20 | 21 | error_page 500 502 503 504 /50x.html; 22 | location = /50x.html { 23 | root html; 24 | } 25 | } 26 | 27 | server { 28 | server_name {{ hostvars[inventory_hostname]['ansible_host']|default(host) }}; 29 | 30 | listen [::]:443 ssl ipv6only=on; # managed by Certbot 31 | listen 443 ssl; # managed by Certbot 32 | ssl_certificate /etc/letsencrypt/live/{{ hostvars[inventory_hostname]['ansible_host']|default(host) }}/fullchain.pem; # managed by Certbot 33 | ssl_certificate_key /etc/letsencrypt/live/{{ hostvars[inventory_hostname]['ansible_host']|default(host) }}/privkey.pem; # managed by Certbot 34 | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 35 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 36 | 37 | # Redirect to code-server 38 | location / { 39 | proxy_pass http://127.0.0.1:8080; 40 | proxy_set_header Host $host; 41 | proxy_set_header Upgrade $http_upgrade; 42 | proxy_set_header Connection upgrade; 43 | proxy_set_header Accept-Encoding gzip; 44 | } 45 | 46 | error_page 404 /404.html; 47 | location = /404.html { 48 | } 49 | 50 | error_page 500 502 503 504 /50x.html; 51 | location = /50x.html { 52 | } 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - vscodeserver 6 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for vscodeserver 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for vscodeserver 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/files/config.yaml: -------------------------------------------------------------------------------- 1 | bind-addr: 127.0.0.1:8080 2 | auth: password 3 | password: rhadvnetworkshop2024 4 | cert: false 5 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for vscodeserver 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: your name 3 | description: your role description 4 | company: your company (optional) 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 11 | # - BSD-3-Clause (default) 12 | # - MIT 13 | # - GPL-2.0-or-later 14 | # - GPL-3.0-only 15 | # - Apache-2.0 16 | # - CC-BY-4.0 17 | license: license (GPL-2.0-or-later, MIT, etc) 18 | 19 | min_ansible_version: 2.1 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # 25 | # Provide a list of supported platforms, and for each platform a list of versions. 26 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 27 | # To view available platforms and versions (or releases), visit: 28 | # https://galaxy.ansible.com/api/v1/platforms/ 29 | # 30 | # platforms: 31 | # - name: Fedora 32 | # versions: 33 | # - all 34 | # - 25 35 | # - name: SomePlatform 36 | # versions: 37 | # - all 38 | # - 1.0 39 | # - 7 40 | # - 99.99 41 | 42 | galaxy_tags: [] 43 | # List tags for your role here, one per line. A tag is a keyword that describes 44 | # and categorizes the role. Users find roles by searching for tags. Be sure to 45 | # remove the '[]' above, if you add tags to this list. 46 | # 47 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 48 | # Maximum 20 tags per role. 49 | 50 | dependencies: [] 51 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 52 | # if you add dependencies to this list. 53 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for vscodeserver 3 | 4 | - name: Enable EPEL 9 5 | ansible.builtin.dnf: 6 | name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm 7 | disable_gpg_check: true 8 | state: present 9 | become: yes 10 | 11 | - name: Install nginx and certbot 12 | ansible.builtin.dnf: 13 | name: 14 | - nginx 15 | - certbot 16 | - python3-certbot-nginx 17 | become: yes 18 | 19 | - name: Check for vscode-server 20 | ansible.builtin.stat: 21 | path: /usr/bin/code-server 22 | register: vscode_server 23 | ignore_errors: yes 24 | 25 | - name: Ugly install of vscode-server 26 | ansible.builtin.shell: "curl -fsSL https://code-server.dev/install.sh | sh" 27 | when: vscode_server.stat.exists is false 28 | become: yes 29 | 30 | - name: Create vscode-server config directory 31 | ansible.builtin.file: 32 | path: /home/student/.config/code-server 33 | state: directory 34 | recurse: yes 35 | become: yes 36 | 37 | - name: Install vscode-server config 38 | ansible.builtin.copy: 39 | src: files/config.yaml 40 | dest: /home/student/.config/code-server/config.yaml 41 | owner: student 42 | group: student 43 | become: yes 44 | 45 | - name: Start vscode-server for student user 46 | ansible.builtin.command: systemctl enable --now code-server@student 47 | become: yes 48 | 49 | - name: Copy default nginx.conf configuration 50 | ansible.builtin.template: 51 | src: templates/nginx-default.j2 52 | dest: /etc/nginx/nginx.conf 53 | owner: root 54 | group: root 55 | become: yes 56 | 57 | - name: Get letsencrypt certficate 58 | command: "certbot --non-interactive --redirect --agree-tos --nginx -d {{ ansible_host }} -m {{ lab_email }}" 59 | become: yes 60 | 61 | - name: Copy proper nginx.conf configuration 62 | ansible.builtin.template: 63 | src: templates/nginx.j2 64 | dest: /etc/nginx/nginx.conf 65 | owner: root 66 | group: root 67 | become: yes 68 | 69 | - name: Ugly nginx hack 70 | ansible.builtin.command: killall -9 nginx 71 | become: yes 72 | 73 | - name: Enable nginx 74 | ansible.builtin.service: 75 | name: nginx 76 | state: started 77 | enabled: true 78 | become: yes 79 | 80 | - name: Set httpd_can_network_connect flag on and keep it persistent across reboots 81 | ansible.builtin.seboolean: 82 | name: httpd_can_network_connect 83 | state: yes 84 | persistent: yes 85 | become: yes 86 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/templates/code-server.j2: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen [::]:80; 4 | {% for host in groups['containerlab'] %} 5 | server_name {{ hostvars[host]['ansible_host']|default(host) }} 6 | {% endfor %} 7 | location / { 8 | proxy_pass http://localhost:8080/; 9 | proxy_set_header Host $http_host; 10 | proxy_set_header Upgrade $http_upgrade; 11 | proxy_set_header Connection upgrade; 12 | proxy_set_header Accept-Encoding gzip; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/templates/nginx-default.j2: -------------------------------------------------------------------------------- 1 | #user nobody; 2 | worker_processes 1; 3 | 4 | #error_log logs/error.log; 5 | #error_log logs/error.log notice; 6 | #error_log logs/error.log info; 7 | 8 | #pid logs/nginx.pid; 9 | 10 | 11 | events { 12 | worker_connections 1024; 13 | } 14 | 15 | 16 | http { 17 | include mime.types; 18 | default_type application/octet-stream; 19 | 20 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 21 | # '$status $body_bytes_sent "$http_referer" ' 22 | # '"$http_user_agent" "$http_x_forwarded_for"'; 23 | 24 | #access_log logs/access.log main; 25 | 26 | sendfile on; 27 | #tcp_nopush on; 28 | 29 | #keepalive_timeout 0; 30 | keepalive_timeout 65; 31 | 32 | #gzip on; 33 | 34 | server { 35 | listen 80; 36 | {% for host in groups['containerlab'] %} 37 | server_name {{ hostvars[host]['ansible_host']|default(host) }}; 38 | {% endfor %} 39 | 40 | 41 | #charset koi8-r; 42 | 43 | #access_log logs/host.access.log main; 44 | 45 | location / { 46 | root html; 47 | index index.html index.htm; 48 | } 49 | 50 | #error_page 404 /404.html; 51 | 52 | # redirect server error pages to the static page /50x.html 53 | # 54 | error_page 500 502 503 504 /50x.html; 55 | location = /50x.html { 56 | root html; 57 | } 58 | 59 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 60 | # 61 | #location ~ \.php$ { 62 | # proxy_pass http://127.0.0.1; 63 | #} 64 | 65 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 66 | # 67 | #location ~ \.php$ { 68 | # root html; 69 | # fastcgi_pass 127.0.0.1:9000; 70 | # fastcgi_index index.php; 71 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 72 | # include fastcgi_params; 73 | #} 74 | 75 | # deny access to .htaccess files, if Apache's document root 76 | # concurs with nginx's one 77 | # 78 | #location ~ /\.ht { 79 | # deny all; 80 | #} 81 | } 82 | 83 | 84 | # another virtual host using mix of IP-, name-, and port-based configuration 85 | # 86 | #server { 87 | # listen 8000; 88 | # listen somename:8080; 89 | # server_name somename alias another.alias; 90 | 91 | # location / { 92 | # root html; 93 | # index index.html index.htm; 94 | # } 95 | #} 96 | 97 | 98 | # HTTPS server 99 | # 100 | #server { 101 | # listen 443 ssl; 102 | # server_name localhost; 103 | 104 | # ssl_certificate cert.pem; 105 | # ssl_certificate_key cert.key; 106 | 107 | # ssl_session_cache shared:SSL:1m; 108 | # ssl_session_timeout 5m; 109 | 110 | # ssl_ciphers HIGH:!aNULL:!MD5; 111 | # ssl_prefer_server_ciphers on; 112 | 113 | # location / { 114 | # root html; 115 | # index index.html index.htm; 116 | # } 117 | #} 118 | 119 | } 120 | 121 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/templates/nginx.j2: -------------------------------------------------------------------------------- 1 | worker_processes 1; 2 | 3 | events { 4 | worker_connections 1024; 5 | } 6 | 7 | http { 8 | include mime.types; 9 | default_type application/octet-stream; 10 | sendfile on; 11 | keepalive_timeout 65; 12 | 13 | server { 14 | listen 80; 15 | {% for host in groups['containerlab'] %} 16 | server_name {{ hostvars[host]['ansible_host']|default(host) }}; 17 | {% endfor %} 18 | 19 | location / { 20 | rewrite ^ https://$host$request_uri? permanent; 21 | } 22 | 23 | error_page 500 502 503 504 /50x.html; 24 | location = /50x.html { 25 | root html; 26 | } 27 | } 28 | 29 | server { 30 | {% for host in groups['containerlab'] %} 31 | server_name {{ hostvars[host]['ansible_host']|default(host) }}; 32 | {% endfor %} 33 | 34 | listen [::]:443 ssl ipv6only=on; # managed by Certbot 35 | listen 443 ssl; # managed by Certbot 36 | {% for host in groups['containerlab'] %} 37 | ssl_certificate /etc/letsencrypt/live/{{ hostvars[host]['ansible_host']|default(host) }}/fullchain.pem; # managed by Certbot 38 | ssl_certificate_key /etc/letsencrypt/live/{{ hostvars[host]['ansible_host']|default(host) }}/privkey.pem; # managed by Certbot 39 | {% endfor %} 40 | include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 41 | ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot 42 | 43 | # Redirect to code-server 44 | location / { 45 | proxy_pass http://127.0.0.1:8080; 46 | proxy_set_header Host $host; 47 | proxy_set_header Upgrade $http_upgrade; 48 | proxy_set_header Connection upgrade; 49 | proxy_set_header Accept-Encoding gzip; 50 | } 51 | 52 | error_page 404 /404.html; 53 | location = /404.html { 54 | } 55 | 56 | error_page 500 502 503 504 /50x.html; 57 | location = /50x.html { 58 | } 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - vscodeserver 6 | -------------------------------------------------------------------------------- /provision/roles/vscodeserver/vscodeserver/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for vscodeserver 3 | -------------------------------------------------------------------------------- /provision/vars/vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | # Name of your lab (becomes your hostname, when using DNS) 4 | lab_name: networklab 5 | 6 | # Number of lab systems to spin up 7 | lab_system_nr: 1 8 | 9 | type: ec2 10 | instance_name: studentlab 11 | instance_flavor: c5.4xlarge 12 | #instance_disk_size: 10 13 | instance_group: containerlab 14 | instance_wait_for_connection: true 15 | instance_additional_port: "3000" 16 | ec2_image_name: "RHEL-9.4.0_HVM-*x86_64*" 17 | ec2_key_pair: "" 18 | 19 | dns_update: true 20 | 21 | # the DNS sub domain .ansible-labs.de 22 | # MANDATORY if dns_update is true 23 | dns_suffix: mglantz 24 | 25 | # the key used to interact with the DNS server 26 | # NOTE: This is the content of the file, not the path to the file 27 | # MANDATORY if dns_update is true 28 | dns_key: "" 29 | 30 | # the private key to interact with the DNS server 31 | # NOTE: This is the content of the file, not the path to the file 32 | # MANDATORY if dns_update is true 33 | dns_private: "" 34 | 35 | rhn_user: "" 36 | rhn_pass: "" 37 | rhn_pool_id: "" 38 | -------------------------------------------------------------------------------- /provision/vscode-server.yml: -------------------------------------------------------------------------------- 1 | - name: Install vscode-server 2 | hosts: containerlab 3 | vars_files: 4 | - vars/vars.yml 5 | tasks: 6 | - name: Create VMs where Containerlab runs 7 | ansible.builtin.include_role: 8 | name: vscodeserver 9 | -------------------------------------------------------------------------------- /scripts/ansible_hosts.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # Create Ansible inventory from the containerlab output 3 | # Magnus Glantz, sudo@redhat.com, 2024 4 | 5 | install_dir="$HOME/advanced-networking-workshop" 6 | inventory_file="$install_dir/inventory" 7 | 8 | cat << 'EOF' >$inventory_file 9 | [all:vars] 10 | # common variables 11 | ansible_user=admin 12 | ansible_ssh_private_key_file=~/.ssh/advanced-networking-workshop_id_rsa 13 | ansible_network_os=arista.eos.eos 14 | ansible_connection=ansible.netcommon.network_cli 15 | 16 | EOF 17 | 18 | case $1 in 19 | lab1|--lab1|LAB1|Lab1) 20 | if [ ! -f $install_dir/containerlab/lab1.yml ] 21 | then 22 | echo "Please name your topology file lab1.yml and place it in $install_dir/containerlab/" 23 | exit 1 24 | fi 25 | echo "[leafs]" >>$inventory_file 26 | sudo containerlab inspect -t $install_dir/containerlab/lab1.yml 2>/dev/null|grep clab|awk '{ print $2 " ansible_host=" $8 }'|grep leaf >>$inventory_file 27 | ;; 28 | lab2|--lab2|LAB2|Lab2) 29 | if [ ! -f $install_dir/containerlab/lab2.yml ] 30 | then 31 | echo "Please name your topology file lab2.yml and place it in $install_dir/containerlab/" 32 | exit 1 33 | fi 34 | 35 | echo "[leafs]" >>$inventory_file 36 | sudo containerlab inspect -t $install_dir/containerlab/lab2.yml 2>/dev/null|grep clab|awk '{ print $2 " ansible_host=" $8 }'|grep leaf >>$inventory_file 37 | echo "" >>$inventory_file 38 | echo "[spines]" >>$inventory_file 39 | sudo containerlab inspect -t $install_dir/containerlab/lab2.yml 2>/dev/null|grep clab|awk '{ print $2 " ansible_host=" $8 }'|grep spine >>$inventory_file 40 | 41 | echo "" >>$inventory_file 42 | echo "[switches:children]" >>$inventory_file 43 | echo "leafs" >>$inventory_file 44 | echo "spines" >>$inventory_file 45 | ;; 46 | lab3-full|--lab3-full|LAB3-FULL|lab3|LAB3) 47 | echo "[linux]" >>$inventory_file 48 | sudo containerlab inspect -t $install_dir/containerlab/lab3-full.yml 2>/dev/null|grep clab | awk '{ print $2 " ansible_host=" $8 }'|grep lab3-host >>$inventory_file 49 | 50 | echo "" >>$inventory_file 51 | echo "[leafs]" >>$inventory_file 52 | sudo containerlab inspect -t $install_dir/containerlab/lab3-full.yml 2>/dev/null|grep clab | awk '{ print $2 " ansible_host=" $8 }'|grep leaf >>$inventory_file 53 | 54 | echo "" >>$inventory_file 55 | echo "[spines]" >>$inventory_file 56 | sudo containerlab inspect -t $install_dir/containerlab/lab3-full.yml 2>/dev/null|grep clab | awk '{ print $2 " ansible_host=" $8 }'|grep spine >>$inventory_file 57 | 58 | echo "" >>$inventory_file 59 | echo "[switches:children]" >>$inventory_file 60 | echo "leafs" >>$inventory_file 61 | echo "spines" >>$inventory_file 62 | ;; 63 | esac 64 | 65 | $install_dir/scripts/fingerprints.sh 2>/dev/null 66 | -------------------------------------------------------------------------------- /scripts/fingerprints.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # Accept fingerprints based on ansible inventory 3 | # Magnus Glantz, sudo@redhat.com, 2024 4 | 5 | install_dir="$HOME/advanced-networking-workshop" 6 | inventory_file="$install_dir/inventory" 7 | 8 | cat $inventory_file | grep host | cut -d '=' -f 2 | xargs ssh-keyscan -H >> ~/.ssh/known_hosts 9 | -------------------------------------------------------------------------------- /scripts/id_rsa: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEpAIBAAKCAQEA0VSEb5QMEOKW8MiEo/UXpKcouoSknmMxgpmRtz6u/5oP3HpB 3 | 4YFkUqhTjNdwLCs0eo4khVO9/on0EjNIPKIt0febBQ2OEHhl2rLc4kN2h1IqONGL 4 | XhP5VAA2kcgcu8No5p7tPrHt4yvMMpqtjMGhW07THlAbzITr7rnYbxtXAf83B9Ey 5 | 52nU1vjqprtgrzaVJaatQyIiNdF1KYWh6RExXzmMiEO0k4ohHeIp5N4j8vMxps4E 6 | JHiuNXK8+hDXgZ4/LYC+KNqzJmFpUYI4/7fHtrFA898BFcQtiYWQ3sLmeiJidsjS 7 | 7fvMjoXNpE7t6KOKWdn/5HQqJan/wTFzrXz+QQIDAQABAoIBAQCU5fKCT6O5iwPk 8 | 6Cz5V0hnFYQyEFHsXBCGnmf5GXxvUg4APXKJTnmnFhbAMyqWMHFWz68Iq4WU/ln/ 9 | bDzw7Ed9eAvrrzWjX5DL3LijtWslXHuuCNeCpuCOMMygK+DManY+vUNyeiwFkEzi 10 | ngXe/oihI1Om10K+2rncCJP8jEz6nF6luFEBkJNkRJ9v5+2Hw6fj62zgFyB8AN+i 11 | WezXZTGgcRUcC8rv5riQpU/V+9cJ/1M2MtpfwhZONJnn0Ei+QmX9AHpeMVh8Gw2f 12 | b4un4rks130Jl7AAyLnAfsvteAHngDfJhfV4jntMXdG8DFzaAW8mUZBjq+fYHbL7 13 | yFCrh1mxAoGBAPQLSI6Z2XSmSRDInV/EvPJaJR7R0dGPGUOZ34UY7ePn6zPfu52e 14 | q+zEts2VwwKG+a7GR/32mulF21nk3LskvyKPx/9+yVLVTcCHZrvkGCVNbnOAdAIQ 15 | Y8yOSOVbVoNKlWV6j4wDkso4cfH/j5gcqEY4knjcJjViqEcWSq4BxiFtAoGBANuV 16 | 3SAdx1obPJ+PlJX90L1LRsU5PUoESGBgHGIZKLH4FEaKfOGpoUi4URn2v6K0d3sg 17 | JfwPc5WKye+s6Y3opFQqoIOVG7DvkNMOKdDQOO5SyS0YzaHddx82mQTqHEN4HZLq 18 | zk/9iZ0Bv6C951jhi5gslo13neY98BIpLwcQql+lAoGAPrVHh5zwy5CO5ckm5xze 19 | kEepkinICFkE3OIFFWY6en11anbq9q127/f8IQeCfHvCXK6GgTOEyrwwiQDN1yiy 20 | FGdttLEXejllKTuholYR/kPPRc6UAJPFkSJeiNDXghUAHntHt2qTpXKrlMteUm/K 21 | rYCL4pJvHvii1OFdfyjliGECgYEAxz9eDYVX3bg3MyWqkstjvE/w4IbGyUHHlsO/ 22 | HXhsx8guRa/mDzHHql+tH50ZWH7ep7eNIAG5RKlSAQvqRR0i90hSq/MB1HQc+pWw 23 | dcxqzD4MU8Jc3JJDQ+xbvuzbRpFYbHZpTIXnd7MdebK3mJvX+fYDikxO15u+GgyK 24 | oqOJpQ0CgYBYb2mmQc/xpk/JSd9WRZWu8/KC/68gcMiVScfW2x6gWxWWaMu9ro9y 25 | FqFZ/vfzypA1isLLp0kVDH195rbjZ7B78DtCLLX8crCSr2U0rXvSQUGqDVJHSVtC 26 | uY+57Bccfa3Z4lvmRl9ODPpPJhBhlX3694yzxSruue2Ri6UXr/vuNA== 27 | -----END RSA PRIVATE KEY----- 28 | -------------------------------------------------------------------------------- /scripts/id_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRVIRvlAwQ4pbwyISj9Rekpyi6hKSeYzGCmZG3Pq7/mg/cekHhgWRSqFOM13AsKzR6jiSFU73+ifQSM0g8oi3R95sFDY4QeGXastziQ3aHUio40YteE/lUADaRyBy7w2jmnu0+se3jK8wymq2MwaFbTtMeUBvMhOvuudhvG1cB/zcH0TLnadTW+Oqmu2CvNpUlpq1DIiI10XUphaHpETFfOYyIQ7STiiEd4ink3iPy8zGmzgQkeK41crz6ENeBnj8tgL4o2rMmYWlRgjj/t8e2sUDz3wEVxC2JhZDewuZ6ImJ2yNLt+8yOhc2kTu3oo4pZ2f/kdColqf/BMXOtfP5B 2 | -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Installation script for workshop, meant to be run by cloud init or such 3 | # Magnus Glantz, sudo@redhat.com, 2024 4 | 5 | # Install and enable podman 6 | sudo dnf install podman podman-docker git python3-pip curl 7 | sudo systemctl enable podman --now 8 | 9 | # Install containerlab and configure SELinux so it works 10 | sudo bash -c "$(curl -sL https://get.containerlab.dev)" 11 | sudo semanage fcontext -a -t textrel_shlib_t $(which containerlab) 12 | sudo restorecon $(which containerlab) 13 | 14 | cd ~ 15 | git clone https://github.com/mglantz/advanced-networking-workshop 16 | 17 | cp advanced-networking-workshop/scripts/id_rsa ~/.ssh/advanced-networking-workshop 18 | chmod 600 ~/.ssh/advanced-networking-workshop 19 | eval $(ssh-agent -s) 20 | ssh-add ~/.ssh/advanced-networking-workshop 21 | 22 | echo "export LABDIR=~/advanced-networking-workshop" >>~/.bashrc 23 | export LABDIR=~/advanced-networking-workshop 24 | 25 | echo 'eval $(ssh-agent -s)' >>~/.bashrc 26 | 27 | read -p "Transfer cEOS image file to home directory. Press enter when done." donenow 28 | 29 | sudo podman import ~/cEOS64-lab-4.32.0F.tar.tar ceos:4.32.0F 30 | 31 | 32 | --------------------------------------------------------------------------------