This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| network_stuff:juniper:vmx [2019/11/16 21:09] – jotasandoku | network_stuff:juniper:vmx [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| INSTALLATION: | INSTALLATION: | ||
| - | * Preaparations: | + | * [[https:// |
| - | * Install: | + | * Install: |
| * based on : [[https:// | * based on : [[https:// | ||
| * Troubleshooting: | * Troubleshooting: | ||
| - | * Provision vagrant file with ansible : see this file tree (note we do **1 vagrant up & then 2 run.ansible.sh**) : {{ : | + | * Provision vagrant file with ansible : see this file tree (note we do **1 vagrant up & then 2 run.ansible.sh**) : {{ : |
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | # vagrant up | ||
| + | | ||
| + | # genhost.sh file | ||
| #!/bin/bash | #!/bin/bash | ||
| - | # This file creates an ini/host files with the names and mgmt values assigned by vagrant so it can be used by | ||
| vagrant ssh-config > ssh-config | vagrant ssh-config > ssh-config | ||
| echo -e " | echo -e " | ||
| - | [TEST] | + | [VMX] |
| - | R1-vcp ansible_host=`egrep -A 1 " | + | R1-vcp ansible_host=`egrep -A 1 "Host R1-vcp" |
| - | R2-vcp ansible_host=`egrep -A 1 " | + | R2-vcp ansible_host=`egrep -A 1 "Host R2-vcp" |
| - | R3-vcp ansible_host=`egrep -A 1 " | + | R3-vcp ansible_host=`egrep -A 1 "Host R3-vcp" |
| - | R4-vcp ansible_host=`egrep -A 1 " | + | R4-vcp ansible_host=`egrep -A 1 "Host R4-vcp" |
| - | R5-vcp ansible_host=`egrep -A 1 " | + | R5-vcp ansible_host=`egrep -A 1 "Host R5-vcp" |
| - | R6-vcp ansible_host=`egrep -A 1 " | + | R6-vcp ansible_host=`egrep -A 1 "Host R6-vcp" |
| - | R7-vcp ansible_host=`egrep -A 1 " | + | R7-vcp ansible_host=`egrep -A 1 "Host R7-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` |
| - | " > ini/ | + | P1-vcp ansible_host=`egrep -A 1 "Host P1-vcp" |
| + | DC1-vcp ansible_host=`egrep -A 1 "Host DC1-vcp" | ||
| + | [CSR] | ||
| + | C1 ansible_host=`egrep -A 1 "Host C1" ssh-config | egrep HostName | cut -d' ' -f 4` | ||
| + | C2 ansible_host=`egrep -A 1 "Host C2" ssh-config | egrep HostName | cut -d' ' -f 4` | ||
| + | T1 ansible_host=`egrep -A 1 "Host T1" ssh-config | egrep HostName | cut -d' ' -f 4` | ||
| + | " > ini/hosts | ||
| | | ||
| + | #Then run ansible | ||
| + | ansible-playbook --private-key=~/ | ||
| + | ansible-playbook --private-key=~/ | ||
| | | ||
| - | | + | |
| + | |||
| + | ---- | ||
| + | KEY POINTS: | ||
| + | * If we use the same instance of vmx multiple times, irb macs with be the same and communication won't happen unless we do things like this: | ||
| + | |||
| + | set interfaces irb unit 400 mac 00: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | TODO:\\ | ||
| + | * Review project documentation | ||
| + | * libvirtd assigns the fxp address via dhcp but also gives a default route (ie 0/0 via fxp). we need to fix this | ||
| + | * option1: play with dhcp kvm settings so it doesn' | ||
| + | * option2: automate this: 1. grab ip in fxp0 2. remove dhcp config from fxp0 3. add static route (see below). | ||
| + | * option3: do it manually: | ||
| + | [edit interfaces fxp0 unit 0 family inet] | ||
| + | - dhcp; | ||
| + | [edit interfaces fxp0 unit 0 family inet] | ||
| + | + | ||
| + | [edit routing-options static] | ||
| + | route 10.8.40.0/ | ||
| + | + route 192.0.0.0/8 next-hop 192.168.121.1; | ||