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 revision Previous revision
Next revision
Previous revision
documentation:examples:simple_bgp-rip-ospf_lab [2019/08/10 13:21]
olivier [Router 1]
documentation:examples:simple_bgp-rip-ospf_lab [2020/09/22 22:18] (current)
olivier [Routers configuration]
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 routers, here is an example with VirtualBox:+Start the lab with routers, here is an example with VirtualBox:
  
 <code>./BSDRP-lab-vbox.sh -i BSDRP-1.91-full-amd64-serial.img.xz -n 7</code> <code>./BSDRP-lab-vbox.sh -i BSDRP-1.91-full-amd64-serial.img.xz -n 7</code>
Line 29: Line 29:
 <code> <code>
 labconfig frr_vm[VM-NUMBER] labconfig frr_vm[VM-NUMBER]
 +</code>
 +
 +Or just using one router, you can use the jail/vnet version with command:
 +<code>
 +labconfig frr_jails
 </code> </code>
 ==== Router 1 ==== ==== Router 1 ====
Line 48: Line 53:
 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 vtnet0 +
- ip address 192.168.12.1/24 +
- ipv6 address 2001:db8:12::1/64+
 interface lo1 interface lo1
  ip address 192.168.10.1/24  ip address 192.168.10.1/24
  ipv6 address 2001:db8:10::1/64  ipv6 address 2001:db8:10::1/64
 +!
 +interface vtnet0
 + ip address 192.168.12.1/24
 + ipv6 address 2001:db8:12::1/64
 +!
 router bgp 12 router bgp 12
  bgp router-id 192.168.10.1  bgp router-id 192.168.10.1
Line 77: Line 82:
   neighbor 2001:db8:12::2 soft-reconfiguration inbound   neighbor 2001:db8:12::2 soft-reconfiguration inbound
  exit-address-family  exit-address-family
 +!
 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
 + !
 +!
 EOF EOF
- 
 hostname router1 hostname router1
 service netif restart service netif restart
Line 106: Line 112:
 add -6 2001:db8:12::2 2001:db8:12::1 tcp 0x1003 -A tcp-md5 "abigpassword" ; add -6 2001:db8:12::2 2001:db8:12::1 tcp 0x1003 -A tcp-md5 "abigpassword" ;
 EOF EOF
-cat > /usr/local/etc/frr/zebra.conf <<EOF+cat > /usr/local/etc/frr/frr.conf <<EOF
 log syslog log syslog
-interface em0 +!
- ip address 192.168.12.2/24 +
- ipv6 address 2001:db8:12::2/64 +
-interface vtnet0 +
- ip address 192.168.12.2/24 +
- ipv6 address 2001:db8:12::2/64 +
-interface em1 +
- ip address 192.168.23.2/24 +
- ipv6 address 2001:db8:23::2/64 +
-interface vtnet1 +
- ip address 192.168.23.2/24 +
- ipv6 address 2001:db8:23::2/64 +
-EOF +
-cat > /usr/local/etc/frr/ripd.conf <<EOF+
 key chain rippass key chain rippass
 + key 1
 +  key-string rippassword
  key 1  key 1
   key-string rippassword   key-string rippassword
 ! !
-interface em1 +interface vtnet0 
- ip rip authentication key-chain rippass + ip address 192.168.12.2/24 
- ip rip authentication mode md5+ ipv6 address 2001:db8:12::2/64
 ! !
 interface vtnet1 interface vtnet1
 + ip address 192.168.23.2/24
  ip rip authentication key-chain rippass  ip rip authentication key-chain rippass
  ip rip authentication mode md5  ip rip authentication mode md5
 + ipv6 address 2001:db8:23::2/64
 ! !
 router rip router rip
- version 2 
- network em1 
  network vtnet1  network vtnet1
  redistribute bgp  redistribute bgp
  redistribute connected  redistribute connected
-EOF + version 2 
-cat > /usr/local/etc/frr/ripngd.conf <<EOF+!
 router ripng router ripng
- network em1 
  network vtnet1  network vtnet1
  redistribute bgp  redistribute bgp
  redistribute connected  redistribute connected
-EOF +!
-cat > /usr/local/etc/frr/bgpd.conf <<EOF+
 router bgp 12 router bgp 12
  bgp router-id 192.168.10.2  bgp router-id 192.168.10.2
Line 161: Line 154:
   network 192.168.12.0/24   network 192.168.12.0/24
   redistribute rip   redistribute rip
-  neighbor 192.168.12.1 soft-reconfiguration inbound 
   neighbor 192.168.12.1 next-hop-self   neighbor 192.168.12.1 next-hop-self
 +  neighbor 192.168.12.1 soft-reconfiguration inbound
   no neighbor 2001:db8:12::1 activate   no neighbor 2001:db8:12::1 activate
  exit-address-family  exit-address-family
Line 172: Line 165:
   neighbor 2001:db8:12::1 soft-reconfiguration inbound   neighbor 2001:db8:12::1 soft-reconfiguration inbound
  exit-address-family  exit-address-family
-EOF +!
- +
-cat > /usr/local/etc/frr/bfdd.conf <<EOF+
 bfd bfd
 + peer 192.168.12.1
 +  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 
- peer 192.168.12.1 
-  label router1-4 
   no shutdown   no shutdown
 + !
 +!
 EOF EOF
  
Line 194: Line 186:
 sysrc hostname=router3 sysrc hostname=router3
 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 em1 +! 
- ip address 192.168.23.3/24 +key chain rippass 
- ipv6 address 2001:db8:23::3/64+ key 1 
 +  key-string rippassword 
 + key 1 
 +  key-string rippassword 
 +!
 interface vtnet1 interface vtnet1
  ip address 192.168.23.3/24  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  ipv6 address 2001:db8:23::3/64
-interface em2 +!
- ip address 192.168.34.3/24 +
- ipv6 address 2001:db8:34::3/64+
 interface vtnet2 interface vtnet2
  ip address 192.168.34.3/24  ip address 192.168.34.3/24
- ipv6 address 2001:db8:34::3/64 
-EOF 
-cat > /usr/local/etc/frr/ospfd.conf <<EOF 
-interface em2 
- ip ospf message-digest-key 1 md5 superpass 
  ip ospf bfd  ip ospf bfd
-interface vtnet2 
  ip ospf message-digest-key 1 md5 superpass  ip ospf message-digest-key 1 md5 superpass
- ip ospf bfd + ipv6 address 2001:db8:34::3/64
-router ospf +
- ospf router-id 3.3.3.3 +
- redistribute rip +
- redistribute connected +
- network 192.168.34.0/24 area 0.0.0.0 +
- area 0.0.0.0 authentication message-digest +
-EOF +
-cat > /usr/local/etc/frr/ospf6d.conf <<EOF +
-interface em2+
  ipv6 ospf6 bfd  ipv6 ospf6 bfd
-interface vtnet2 
- ipv6 ospf6 bfd 
-router ospf6 
- router-id 2.2.2.2 
- redistribute ripng 
- redistribute connected 
- interface em2 area 0.0.0.0 
- interface vtnet2 area 0.0.0.0 
-EOF 
-cat > /usr/local/etc/frr/ripd.conf <<EOF 
-key chain rippass 
- key 1 
-  key-string rippassword 
-! 
-interface em1 
- ip rip authentication key-chain rippass 
- ip rip authentication mode md5 
-! 
-interface vtnet1 
- ip rip authentication key-chain rippass 
- ip rip authentication mode md5 
 ! !
 router rip router rip
- version 2 
- network em1 
  network vtnet1  network vtnet1
  redistribute connected  redistribute connected
  redistribute ospf  redistribute ospf
-EOF + version 2 
-cat > /usr/local/etc/frr/ripngd.conf <<EOF+!
 router ripng router ripng
- network em1 
  network vtnet1  network vtnet1
  redistribute connected  redistribute connected
  redistribute ospf6  redistribute ospf6
-EOF +! 
-cat > /usr/local/etc/frr/bfdd.conf <<EOF+router ospf 
 + ospf router-id 3.3.3.3 
 + redistribute connected 
 + redistribute rip 
 + network 192.168.34.0/24 area 0.0.0.0 
 + area 0.0.0.0 authentication message-digest 
 +
 +router ospf6 
 + redistribute connected 
 + redistribute ripng 
 + interface vtnet2 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 router2-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
 +config save
 </code> </code>
 ==== Router 4 ==== ==== Router 4 ====
Line 279: Line 250:
 sysrc hostname=router4 sysrc hostname=router4
 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 em2 +!
- ip address 192.168.34.4/24 +
- ipv6 address 2001:db8:34::4/64+
 interface vtnet2 interface vtnet2
  ip address 192.168.34.4/24  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 address 2001:db8:34::4/64
-interface em3 + ipv6 ospf6 bfd 
- ip address 192.168.45.4/24 +!
- ipv6 address 2001:db8:45::4/64+
 interface vtnet3 interface vtnet3
  ip address 192.168.45.4/24  ip address 192.168.45.4/24
 + ip router isis BSDRP
  ipv6 address 2001:db8:45::4/64  ipv6 address 2001:db8:45::4/64
-EOF + ipv6 router isis BSDRP 
-cat > /usr/local/etc/frr/ospfd.conf <<EOF + isis circuit-type level-2-only 
-interface em2 +!
- ip ospf message-digest-key 1 md5 superpass +
- ip ospf bfd +
-interface vtnet2 +
- ip ospf message-digest-key 1 md5 superpass +
- ip ospf bfd+
 router ospf router ospf
  ospf router-id 4.4.4.4  ospf router-id 4.4.4.4
- redistribute isis 
  redistribute connected  redistribute connected
 + redistribute isis
  network 192.168.34.0/24 area 0.0.0.0  network 192.168.34.0/24 area 0.0.0.0
  area 0.0.0.0 authentication message-digest  area 0.0.0.0 authentication message-digest
-EOF +!
-cat > /usr/local/etc/frr/ospf6d.conf <<EOF +
-interface em2 +
- ipv6 ospf6 bfd +
-interface vtnet2 +
- ipv6 ospf6 bfd+
 router ospf6 router ospf6
- router-id 4.4.4.4+ redistribute connected
  redistribute isis  redistribute isis
- redistribute connected 
- interface em2 area 0.0.0.0 
  interface vtnet2 area 0.0.0.0  interface vtnet2 area 0.0.0.0
-EOF +!
-cat > /etc/local/frr/isisd.conf <<EOF +
-interface em3 +
- ip router isis BSDRP +
- ipv6 router isis BSDRP +
- isis circuit-type level-2-only +
-interface vtnet3 +
- ip router isis BSDRP +
- ipv6 router isis BSDRP +
- isis circuit-type level-2-only+
 router isis BSDRP router isis BSDRP
 + is-type level-1-2
  net 49.0000.0000.0004.00  net 49.0000.0000.0004.00
- metric-style wide 
  redistribute ipv4 ospf level-2  redistribute ipv4 ospf level-2
 + redistribute ipv4 connected level-2
  redistribute ipv6 ospf6 level-2  redistribute ipv6 ospf6 level-2
- redistribute ipv4 connected level-2 
  redistribute ipv6 connected level-2  redistribute ipv6 connected level-2
-EOF +!
-cat > /usr/local/etc/frr/bfdd.conf <<EOF+
 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
 + !
 +!
 EOF EOF
 +
 hostname router4 hostname router4
 service frr start service frr start
 +config save
 </code> </code>
  
Line 355: Line 307:
 sysrc hostname=router5 sysrc hostname=router5
 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 em3 +!
- ip address 192.168.45.5/24 +
- ipv6 address 2001:db8:45::5/64+
 interface vtnet3 interface vtnet3
  ip address 192.168.45.5/24  ip address 192.168.45.5/24
 + ip router isis BSDRP
  ipv6 address 2001:db8:45::5/64  ipv6 address 2001:db8:45::5/64
-interface em4 + ipv6 router isis BSDRP 
- ip address 192.168.56.5/24 + isis circuit-type level-2-only 
- ipv6 address 2001:db8:56::5/64+!
 interface vtnet4 interface vtnet4
  ip address 192.168.56.5/24  ip address 192.168.56.5/24
 + ip router isis BSDRP
  ipv6 address 2001:db8:56::5/64  ipv6 address 2001:db8:56::5/64
-EOF 
-cat > /etc/local/frr/isisd.conf <<EOF 
-interface em3 
- ip router isis BSDRP 
  ipv6 router isis BSDRP  ipv6 router isis BSDRP
  isis circuit-type level-2-only  isis circuit-type level-2-only
-interface vtnet3 
- ip router isis BSDRP 
- ipv6 router isis BSDRP 
- isis circuit-type level-2-only 
-interface em4 
- ip router isis BSDRP 
  isis passive  isis passive
- ipv6 router isis BSDRP +!
- isis circuit-type level-2-only +
-interface vtnet4 +
- ip router isis BSDRP +
- isis passive +
- ipv6 router isis BSDRP +
- isis circuit-type level-2-only +
-router isis BSDRP +
- net 49.0000.0000.0005.00 +
- metric-style wide +
- redistribute ipv4 babel level-2 +
- redistribute ipv6 babel level-2 +
-EOF +
-cat > /usr/local/etc/frr/babeld.conf <<EOF+
 router babel router babel
- network em3 
  network vtnet3  network vtnet3
- network em4 
  network vtnet4  network vtnet4
  redistribute ipv4 isis  redistribute ipv4 isis
  redistribute ipv6 isis  redistribute ipv6 isis
 +!
 +router isis BSDRP
 + is-type level-1-2
 + net 49.0000.0000.0005.00
 + redistribute ipv4 babel level-2
 + redistribute ipv6 babel level-2
 +!
 EOF EOF
 hostname router5 hostname router5
 service netif restart service netif restart
 service frr start service frr start
 +config save
 </code> </code>
  
Line 414: Line 349:
 sysrc hostname=router6 sysrc hostname=router6
 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 em4 +! 
- ip address 192.168.56.6/24 +ip route 192.168.70.0/24 192.168.67.7 
- ipv6 address 2001:db8:56::6/64+ipv6 route 2001:db8:70::/64 2001:db8:67::
 +!
 interface vtnet4 interface vtnet4
  ip address 192.168.56.6/24  ip address 192.168.56.6/24
  ipv6 address 2001:db8:56::6/64  ipv6 address 2001:db8:56::6/64
-interface em5 +!
- ip address 192.168.67.6/24 +
- ipv6 address 2001:db8:67::6/64+
 interface vtnet5 interface vtnet5
  ip address 192.168.67.6/24  ip address 192.168.67.6/24
  ipv6 address 2001:db8:67::6/64  ipv6 address 2001:db8:67::6/64
-EOF +!
-cat > /usr/local/etc/frr/babeld.conf <<EOF+
 router babel router babel
- network em4 
  network vtnet4  network vtnet4
  redistribute ipv4 connected  redistribute ipv4 connected
Line 437: Line 369:
  redistribute ipv6 connected  redistribute ipv6 connected
  redistribute ipv6 static  redistribute ipv6 static
-EOF +!
-cat > /usr/local/etc/frr/staticd.conf <<EOF +
-ip route 192.168.70.0/24 192.168.67.7 +
-ipv6 route 2001:db8:70::/64 2001:db8:67::7+
 EOF EOF
 hostname router6 hostname router6
 service netif restart service netif restart
 service frr start service frr start
 +config save
 </code> </code>
  
Line 453: Line 383:
 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/192.168.67.6 
- ipv6 address 2001:db8:57::7/64 +ipv6 route ::/0 2001:db8:67::
-interface vtnet5 +!
- ip address 192.168.67.7/24 +
- ipv6 address 2001:db8:67::7/64+
 interface lo1 interface lo1
  ip address 192.168.70.7/24  ip address 192.168.70.7/24
  ipv6 address 2001:db8:70::7/64  ipv6 address 2001:db8:70::7/64
-EOF +! 
-cat > /usr/local/etc/frr/staticd.conf <<EOF +interface vtnet5 
-ip route 0.0.0.0/192.168.67.6 + ip address 192.168.67.7/24 
-ipv6 route ::/0 2001:db8:67::6+ ipv6 address 2001:db8:67::7/64 
 +!
 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.1565436108.txt.gz · Last modified: 2019/08/10 13:21 by olivier