User Tools

Site Tools


network_stuff:juniper:vmx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network_stuff:juniper:vmx [2019/11/15 12:58] jotasandokunetwork_stuff:juniper:vmx [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 7: Line 7:
  
 INSTALLATION:\\ INSTALLATION:\\
-  * Preaparations: {{ :network_stuff:juniper:host-preparation.docx |}} +  * [[https://panda314159.duckdns.org/doku.php?id=network_stuff:juniper:host-preparation|host preparation]] 
-  * Install: {{ :network_stuff:step-by-step-vmx.docx |}}+  * Install:  [[https://panda314159.duckdns.org/doku.php?id=network_stuff:juniper:vmx:step-by-step|step-by-step-guide]]
     * based on : [[https://codingpackets.com/blog/juniper-vmx-vagrant-libvirt-box-install]]     * based on : [[https://codingpackets.com/blog/juniper-vmx-vagrant-libvirt-box-install]]
   * Troubleshooting: {{ :network_stuff:juniper:troubleshooting-vqfx-vmx-install.docx |}}   * Troubleshooting: {{ :network_stuff:juniper:troubleshooting-vqfx-vmx-install.docx |}}
-  * Provision vagrant file with ansible : see this file tree (note we do **1 vagrant up & then 2 run.ansible.sh**) : {{ :network_stuff:juniper:root_vmx-test-2.tar.gz |}}+  * Provision vagrant file with ansible : see this file tree (note we do **1 vagrant up & then 2 run.ansible.sh**) : {{ :network_stuff:juniper:root_vmx-test.tar.gz |}} 
 +    * [[https://www.linkedin.com/pulse/network-automation-using-ansibleplaybookspart-4-ahnaf-shahriar/]] 
 +    * [[https://github.com/JNPRAutomate/ansible-junos-examples]] 
 + 
 +  # vagrant up 
 +   
 +  # genhost.sh file 
 +  #!/bin/bash 
 +  vagrant ssh-config > ssh-config 
 +  echo -e " 
 +  [VMX] 
 +  R1-vcp ansible_host=`egrep -A 1 "Host R1-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  R2-vcp ansible_host=`egrep -A 1 "Host R2-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  R3-vcp ansible_host=`egrep -A 1 "Host R3-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  R4-vcp ansible_host=`egrep -A 1 "Host R4-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  R5-vcp ansible_host=`egrep -A 1 "Host R5-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  R6-vcp ansible_host=`egrep -A 1 "Host R6-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  R7-vcp ansible_host=`egrep -A 1 "Host R7-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  P1-vcp ansible_host=`egrep -A 1 "Host P1-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  DC1-vcp ansible_host=`egrep -A 1 "Host DC1-vcp" ssh-config | egrep HostName | cut -d' ' -f 4` 
 +  [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=~/.vagrant.d/insecure_private_key -u vagrant -i ini/hosts -l VMX playbook-vmx.yml 
 +  ansible-playbook --private-key=~/.vagrant.d/insecure_private_key -u vagrant -i ini/hosts -l CSR playbook-csr.yml 
 +   
 +   
 + 
 +---- 
 +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:05:86:ce:b0:03 
 + 
 +---- 
 + 
 +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't give a def route 
 +    * 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] 
 +  +       address 192.168.121.87/24; 
 +  [edit routing-options static] 
 +       route 10.8.40.0/23 { ... } 
 +  +    route 192.0.0.0/8 next-hop 192.168.121.1;
network_stuff/juniper/vmx.1573822713.txt.gz · Last modified: (external edit)