User Tools

Site Tools


documentation:examples:simple_bgp-rip-ospf_lab

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
Next revisionBoth sides next revision
documentation:examples:simple_bgp-rip-ospf_lab [2019/08/10 14:15] – [Router 6] olivierdocumentation:examples:simple_bgp-rip-ospf_lab [2020/11/10 22:44] – [Routers configuration] olivier
Line 20: Line 20:
 More information on these BSDRP lab scripts available on [[documentation:examples:How to build a BSDRP router lab]]. More information on these BSDRP lab scripts available on [[documentation:examples:How to build a BSDRP router lab]].
  
-Start the lab with 5 routers, here is an example with VirtualBox: 
  
-<code>./BSDRP-lab-vbox.sh -i BSDRP-1.91-full-amd64-serial.img.xz -n 7</code> 
  
 ===== Routers configuration ===== ===== Routers configuration =====
 +=== VM mode: 7 VMs ===
  
 All these routers can be configured with labconfig tool (use it only on a lab, because it will replace your current running configuration): All these routers can be configured with labconfig tool (use it only on a lab, because it will replace your current running configuration):
 +
 +Start the lab with 7 routers, here is an example with VirtualBox:
 +
 +<code>./BSDRP-lab-vbox.sh -i BSDRP-1.97-full-amd64-serial.img.xz -n 7</code>
 +
 +Then on each:
 <code> <code>
 labconfig frr_vm[VM-NUMBER] labconfig frr_vm[VM-NUMBER]
 +</code>
 +
 +=== Jail mode: 1 VM running 7 jails ===
 +
 +
 +Or just using one router:
 +<code>./BSDRP-lab-vbox.sh -i BSDRP-1.97-full-amd64-serial.img.xz -n 1</code>
 +
 +
 +Then you can use the jail/vnet version with command:
 +<code>
 +labconfig frr_jails
 </code> </code>
 ==== Router 1 ==== ==== Router 1 ====
Line 48: Line 65:
 cat > /usr/local/etc/frr/frr.conf <<EOF cat > /usr/local/etc/frr/frr.conf <<EOF
 log syslog log syslog
-! 
-interface em0 
- ip address 192.168.12.1/24 
- ipv6 address 2001:db8:12::1/64 
 ! !
 interface lo1 interface lo1
Line 84: Line 97:
 bfd bfd
  peer 2001:db8:12::2 local-address 2001:db8:12::1  peer 2001:db8:12::2 local-address 2001:db8:12::1
-  label router2-6 
   no shutdown   no shutdown
  !  !
  peer 192.168.12.2  peer 192.168.12.2
-  label router2-4 
   no shutdown   no shutdown
  !  !
Line 121: Line 132:
  key 1  key 1
   key-string rippassword   key-string rippassword
-! 
-interface em0 
- ip address 192.168.12.2/24 
- ipv6 address 2001:db8:12::2/64 
-! 
-interface em1 
- ip address 192.168.23.2/24 
- ip rip authentication key-chain rippass 
- ip rip authentication mode md5 
- ipv6 address 2001:db8:23::2/64 
 ! !
 interface vtnet0 interface vtnet0
Line 143: Line 144:
 ! !
 router rip router rip
- network em1 
  network vtnet1  network vtnet1
  redistribute bgp  redistribute bgp
Line 150: Line 150:
 ! !
 router ripng router ripng
- network em1 
  network vtnet1  network vtnet1
  redistribute bgp  redistribute bgp
Line 181: Line 180:
 bfd bfd
  peer 192.168.12.1  peer 192.168.12.1
-  label router1-4 
   no shutdown   no shutdown
  !  !
  peer 2001:db8:12::1 local-address 2001:db8:12::2  peer 2001:db8:12::1 local-address 2001:db8:12::2
-  label router1-6 
   no shutdown   no shutdown
  !  !
Line 209: Line 206:
  key 1  key 1
   key-string rippassword   key-string rippassword
-! 
-interface em1 
- ip address 192.168.23.3/24 
- ip rip authentication key-chain rippass 
- ip rip authentication mode md5 
- ipv6 address 2001:db8:23::3/64 
-! 
-interface em2 
- ip address 192.168.34.3/24 
- ip ospf bfd 
- ip ospf message-digest-key 1 md5 superpass 
- ipv6 address 2001:db8:34::3/64 
- ipv6 ospf6 bfd 
 ! !
 interface vtnet1 interface vtnet1
Line 237: Line 221:
 ! !
 router rip router rip
- network em1 
  network vtnet1  network vtnet1
  redistribute connected  redistribute connected
Line 244: Line 227:
 ! !
 router ripng router ripng
- network em1 
  network vtnet1  network vtnet1
  redistribute connected  redistribute connected
Line 260: Line 242:
  redistribute ripng  redistribute ripng
  interface vtnet2 area 0.0.0.0  interface vtnet2 area 0.0.0.0
- interface em2 area 0.0.0.0 
 ! !
 bfd bfd
  peer 2001:db8:34::4 local-address 2001:db8:34::3  peer 2001:db8:34::4 local-address 2001:db8:34::3
-  label router4-6 
   no shutdown   no shutdown
  !  !
  peer 192.168.34.4  peer 192.168.34.4
-  label router4-4 
   no shutdown   no shutdown
  !  !
 ! !
 EOF EOF
 +
 hostname router3 hostname router3
 service frr start service frr start
Line 284: Line 264:
 cat > /usr/local/etc/frr/frr.conf <<EOF cat > /usr/local/etc/frr/frr.conf <<EOF
 log syslog log syslog
-! 
-interface em2 
- ip address 192.168.34.4/24 
- ip ospf bfd 
- ip ospf message-digest-key 1 md5 superpass 
- ipv6 address 2001:db8:34::4/64 
- ipv6 ospf6 bfd 
-! 
-interface em3 
- ip address 192.168.45.4/24 
- ip router isis BSDRP 
- ipv6 address 2001:db8:45::4/64 
- ipv6 router isis BSDRP 
- isis circuit-type level-2-only 
 ! !
 interface vtnet2 interface vtnet2
Line 323: Line 289:
  redistribute connected  redistribute connected
  redistribute isis  redistribute isis
- interface em2 area 0.0.0.0 
  interface vtnet2 area 0.0.0.0  interface vtnet2 area 0.0.0.0
 ! !
Line 336: Line 301:
 bfd bfd
  peer 2001:db8:34::3 local-address 2001:db8:34::4  peer 2001:db8:34::3 local-address 2001:db8:34::4
-  label router3-6 
   no shutdown   no shutdown
  !  !
  peer 192.168.34.3  peer 192.168.34.3
-  label router3-4 
   no shutdown   no shutdown
  !  !
Line 358: Line 321:
 cat > /usr/local/etc/frr/frr.conf <<EOF cat > /usr/local/etc/frr/frr.conf <<EOF
 log syslog log syslog
-! 
-interface em3 
- ip address 192.168.45.5/24 
- ip router isis BSDRP 
- ipv6 address 2001:db8:45::5/64 
- ipv6 router isis BSDRP 
- isis circuit-type level-2-only 
-! 
-interface em4 
- ip address 192.168.56.5/24 
- ip router isis BSDRP 
- ipv6 address 2001:db8:56::5/64 
- ipv6 router isis BSDRP 
- isis circuit-type level-2-only 
- isis passive 
 ! !
 interface vtnet3 interface vtnet3
Line 390: Line 338:
 ! !
 router babel router babel
- network em3 
  network vtnet3  network vtnet3
- network em4 
  network vtnet4  network vtnet4
  redistribute ipv4 isis  redistribute ipv4 isis
Line 420: Line 366:
 ip route 192.168.70.0/24 192.168.67.7 ip route 192.168.70.0/24 192.168.67.7
 ipv6 route 2001:db8:70::/64 2001:db8:67::7 ipv6 route 2001:db8:70::/64 2001:db8:67::7
-! 
-interface em4 
- ip address 192.168.56.6/24 
- ipv6 address 2001:db8:56::6/64 
-! 
-interface em5 
- ip address 192.168.67.6/24 
- ipv6 address 2001:db8:67::6/64 
 ! !
 interface vtnet4 interface vtnet4
Line 438: Line 376:
 ! !
 router babel router babel
- network em4 
  network vtnet4  network vtnet4
  redistribute ipv4 connected  redistribute ipv4 connected
Line 458: Line 395:
 sysrc cloned_interfaces=lo1 sysrc cloned_interfaces=lo1
 sysrc frr_enable=YES sysrc frr_enable=YES
-cat > /usr/local/etc/frr/zebra.conf <<EOF+cat > /usr/local/etc/frr/frr.conf <<EOF
 log syslog log syslog
-interface em5 +
- ip address 192.168.67.7/24 +ip route 0.0.0.0/0 192.168.67.6 
- ipv6 address 2001:db8:57::7/64+ipv6 route ::/0 2001:db8:67::
 +
 +interface lo1 
 + ip address 192.168.70.7/24 
 + ipv6 address 2001:db8:70::7/64 
 +!
 interface vtnet5 interface vtnet5
  ip address 192.168.67.7/24  ip address 192.168.67.7/24
  ipv6 address 2001:db8:67::7/64  ipv6 address 2001:db8:67::7/64
-interface lo1 +!
- ip address 192.168.70.7/24 +
- ipv6 address 2001:db8:70::7/64 +
-EOF +
-cat > /usr/local/etc/frr/staticd.conf <<EOF +
-ip route 0.0.0.0/0 192.168.67.6 +
-ipv6 route ::/0 2001:db8:67::6+
 EOF EOF
 hostname router7 hostname router7
 service netif restart service netif restart
 service frr start service frr start
 +config save
 </code> </code>
 ===== Final testing ===== ===== Final testing =====
documentation/examples/simple_bgp-rip-ospf_lab.txt · Last modified: 2023/05/01 07:03 by olivier

Except where otherwise noted, content on this wiki is licensed under the following license: BSD 2-Clause
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki