User Tools

Site Tools


network_stuff:juniper:vmx
  • Create interfaces in KVM > VMX-VFP

INSTALLATION:

# 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.txt · Last modified: by 127.0.0.1