documentation:examples:simple_bgp-rip-ospf_lab
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | documentation:examples:simple_bgp-rip-ospf_lab [2018/10/22 08:48] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== BGP/ | ||
+ | This Labs is done with BSDRP under qemu and it explains how to use BSDRP using FRRouting (Quagga fork). | ||
+ | |||
+ | ===== Presentation ===== | ||
+ | |||
+ | ==== Network diagram ==== | ||
+ | |||
+ | Here is the logical and physical view: | ||
+ | |||
+ | {{: | ||
+ | ===== Setting-up the lab ===== | ||
+ | |||
+ | ==== Downloading BSD Router Project images ==== | ||
+ | |||
+ | Download BSDRP serial image (prevent to have to use an X display) on Sourceforge. | ||
+ | |||
+ | ==== Download Lab scripts ===== | ||
+ | |||
+ | More information on these BSDRP lab scripts available on [[documentation: | ||
+ | |||
+ | Start the lab with 5 routers, here is an example with VirtualBox: | ||
+ | |||
+ | < | ||
+ | |||
+ | ===== Routers configuration ===== | ||
+ | |||
+ | All these routers can be configured with labconfig tool (use it only on a lab, because it will replace your current running configuration): | ||
+ | < | ||
+ | labconfig frr_vm[VM-NUMBER] | ||
+ | </ | ||
+ | ==== Router 1 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=router1 | ||
+ | sysrc cloned_interfaces=lo1 | ||
+ | sysrc ipsec_enable=YES | ||
+ | sysrc ipsec_file="/ | ||
+ | sysrc frr_enable=yes | ||
+ | cat <<EOF > / | ||
+ | flush ; | ||
+ | add 192.168.12.1 192.168.12.2 tcp 0x1000 -A tcp-md5 " | ||
+ | add 192.168.12.2 192.168.12.1 tcp 0x1001 -A tcp-md5 " | ||
+ | add -6 2001: | ||
+ | add -6 2001: | ||
+ | EOF | ||
+ | |||
+ | cat > / | ||
+ | log syslog | ||
+ | interface em0 | ||
+ | ip address 192.168.12.1/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet0 | ||
+ | ip address 192.168.12.1/ | ||
+ | ipv6 address 2001: | ||
+ | interface lo1 | ||
+ | ip address 192.168.10.1/ | ||
+ | ipv6 address 2001: | ||
+ | EOF | ||
+ | |||
+ | cat > / | ||
+ | router bgp 12 | ||
+ | bgp router-id 192.168.10.1 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ! | ||
+ | | ||
+ | network 192.168.10.0/ | ||
+ | neighbor 192.168.12.2 soft-reconfiguration inbound | ||
+ | no neighbor 2001: | ||
+ | | ||
+ | ! | ||
+ | | ||
+ | network 2001: | ||
+ | neighbor 2001: | ||
+ | neighbor 2001: | ||
+ | | ||
+ | EOF | ||
+ | |||
+ | cat > / | ||
+ | bfd | ||
+ | peer 2001: | ||
+ | label router2-6 | ||
+ | no shutdown | ||
+ | peer 192.168.12.2 | ||
+ | label router2-4 | ||
+ | no shutdown | ||
+ | EOF | ||
+ | |||
+ | hostname router1 | ||
+ | service netif restart | ||
+ | service ipsec start | ||
+ | service frr start | ||
+ | config save | ||
+ | </ | ||
+ | ==== Router 2 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=router2 | ||
+ | sysrc ipsec_enable=YES | ||
+ | sysrc ipsec_file="/ | ||
+ | sysrc frr_enable=YES | ||
+ | cat <<EOF > / | ||
+ | flush ; | ||
+ | add 192.168.12.1 192.168.12.2 tcp 0x1000 -A tcp-md5 " | ||
+ | add 192.168.12.2 192.168.12.1 tcp 0x1001 -A tcp-md5 " | ||
+ | add -6 2001: | ||
+ | add -6 2001: | ||
+ | EOF | ||
+ | cat > / | ||
+ | log syslog | ||
+ | interface em0 | ||
+ | ip address 192.168.12.2/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet0 | ||
+ | ip address 192.168.12.2/ | ||
+ | ipv6 address 2001: | ||
+ | interface em1 | ||
+ | ip address 192.168.23.2/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet1 | ||
+ | ip address 192.168.23.2/ | ||
+ | ipv6 address 2001: | ||
+ | EOF | ||
+ | cat > / | ||
+ | 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 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | router ripng | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | router bgp 12 | ||
+ | bgp router-id 192.168.10.2 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ! | ||
+ | | ||
+ | network 192.168.12.0/ | ||
+ | redistribute rip | ||
+ | neighbor 192.168.12.1 soft-reconfiguration inbound | ||
+ | neighbor 192.168.12.1 next-hop-self | ||
+ | no neighbor 2001: | ||
+ | | ||
+ | ! | ||
+ | | ||
+ | network 2001: | ||
+ | redistribute ripng | ||
+ | neighbor 2001: | ||
+ | neighbor 2001: | ||
+ | | ||
+ | EOF | ||
+ | |||
+ | cat > / | ||
+ | bfd | ||
+ | peer 2001: | ||
+ | label router1-6 | ||
+ | no shutdown | ||
+ | peer 192.168.12.1 | ||
+ | label router1-4 | ||
+ | no shutdown | ||
+ | EOF | ||
+ | |||
+ | hostname router2 | ||
+ | service ipsec start | ||
+ | service frr start | ||
+ | config save | ||
+ | </ | ||
+ | ==== Router 3 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=router3 | ||
+ | sysrc frr_enable=YES | ||
+ | cat > / | ||
+ | log syslog | ||
+ | interface em1 | ||
+ | ip address 192.168.23.3/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet1 | ||
+ | ip address 192.168.23.3/ | ||
+ | ipv6 address 2001: | ||
+ | interface em2 | ||
+ | ip address 192.168.34.3/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet2 | ||
+ | ip address 192.168.34.3/ | ||
+ | ipv6 address 2001: | ||
+ | EOF | ||
+ | cat > / | ||
+ | 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 | ||
+ | ospf router-id 3.3.3.3 | ||
+ | | ||
+ | | ||
+ | | ||
+ | area 0.0.0.0 authentication message-digest | ||
+ | EOF | ||
+ | cat > / | ||
+ | interface em2 | ||
+ | ipv6 ospf6 bfd | ||
+ | interface vtnet2 | ||
+ | ipv6 ospf6 bfd | ||
+ | router ospf6 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | 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 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | router ripng | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | bfd | ||
+ | peer 2001: | ||
+ | label router2-6 | ||
+ | no shutdown | ||
+ | peer 192.168.34.4 | ||
+ | label router4-4 | ||
+ | no shutdown | ||
+ | EOF | ||
+ | hostname router3 | ||
+ | service frr start | ||
+ | </ | ||
+ | ==== Router 4 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=router4 | ||
+ | sysrc frr_enable=YES | ||
+ | cat > / | ||
+ | log syslog | ||
+ | interface em2 | ||
+ | ip address 192.168.34.4/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet2 | ||
+ | ip address 192.168.34.4/ | ||
+ | ipv6 address 2001: | ||
+ | interface em3 | ||
+ | ip address 192.168.45.4/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet3 | ||
+ | ip address 192.168.45.4/ | ||
+ | ipv6 address 2001: | ||
+ | EOF | ||
+ | cat > / | ||
+ | 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 | ||
+ | ospf router-id 4.4.4.4 | ||
+ | | ||
+ | | ||
+ | | ||
+ | area 0.0.0.0 authentication message-digest | ||
+ | EOF | ||
+ | cat > / | ||
+ | interface em2 | ||
+ | ipv6 ospf6 bfd | ||
+ | interface vtnet2 | ||
+ | ipv6 ospf6 bfd | ||
+ | router ospf6 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | 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 | ||
+ | net 49.0000.0000.0004.00 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | bfd | ||
+ | peer 2001: | ||
+ | label router3-6 | ||
+ | no shutdown | ||
+ | peer 192.168.34.3 | ||
+ | label router3-4 | ||
+ | no shutdown | ||
+ | EOF | ||
+ | hostname router4 | ||
+ | service frr start | ||
+ | </ | ||
+ | |||
+ | ==== Router 5 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=router5 | ||
+ | sysrc frr_enable=YES | ||
+ | cat > / | ||
+ | log syslog | ||
+ | interface em3 | ||
+ | ip address 192.168.45.5/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet3 | ||
+ | ip address 192.168.45.5/ | ||
+ | ipv6 address 2001: | ||
+ | interface em4 | ||
+ | ip address 192.168.56.5/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet4 | ||
+ | ip address 192.168.56.5/ | ||
+ | ipv6 address 2001: | ||
+ | EOF | ||
+ | cat > / | ||
+ | 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 | ||
+ | interface em4 | ||
+ | ip router isis BSDRP | ||
+ | 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 | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | router babel | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | hostname router5 | ||
+ | service netif restart | ||
+ | service frr start | ||
+ | </ | ||
+ | |||
+ | ==== Router 6 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=router6 | ||
+ | sysrc frr_enable=YES | ||
+ | cat > / | ||
+ | log syslog | ||
+ | interface em4 | ||
+ | ip address 192.168.56.6/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet4 | ||
+ | ip address 192.168.56.6/ | ||
+ | ipv6 address 2001: | ||
+ | interface em5 | ||
+ | ip address 192.168.67.6/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet5 | ||
+ | ip address 192.168.67.6/ | ||
+ | ipv6 address 2001: | ||
+ | EOF | ||
+ | cat > / | ||
+ | router babel | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | EOF | ||
+ | cat > / | ||
+ | ip route 192.168.70.0/ | ||
+ | ipv6 route 2001: | ||
+ | EOF | ||
+ | hostname router6 | ||
+ | service netif restart | ||
+ | service frr start | ||
+ | </ | ||
+ | |||
+ | ==== Router 7 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=router7 | ||
+ | sysrc cloned_interfaces=lo1 | ||
+ | sysrc frr_enable=YES | ||
+ | cat > / | ||
+ | log syslog | ||
+ | interface em5 | ||
+ | ip address 192.168.67.7/ | ||
+ | ipv6 address 2001: | ||
+ | interface vtnet5 | ||
+ | ip address 192.168.67.7/ | ||
+ | ipv6 address 2001: | ||
+ | interface lo1 | ||
+ | ip address 192.168.70.7/ | ||
+ | ipv6 address 2001: | ||
+ | EOF | ||
+ | cat > / | ||
+ | ip route 0.0.0.0/0 192.168.67.6 | ||
+ | ipv6 route ::/0 2001: | ||
+ | EOF | ||
+ | hostname router7 | ||
+ | service netif restart | ||
+ | service frr start | ||
+ | </ | ||
+ | ===== Final testing ===== | ||
+ | |||
+ | Ping router7 loopback from router1 loopback: | ||
+ | |||
+ | < | ||
+ | [root@router1]~# | ||
+ | PING 192.168.70.7 (192.168.70.7) from 192.168.10.1: | ||
+ | 64 bytes from 192.168.70.7: | ||
+ | 64 bytes from 192.168.70.7: | ||
+ | 64 bytes from 192.168.70.7: | ||
+ | 64 bytes from 192.168.70.7: | ||
+ | |||
+ | --- 192.168.70.7 ping statistics --- | ||
+ | 4 packets transmitted, | ||
+ | round-trip min/ | ||
+ | |||
+ | [root@router1]~# | ||
+ | PING6(56=40+8+8 bytes) 2001: | ||
+ | 16 bytes from 2001: | ||
+ | 16 bytes from 2001: | ||
+ | 16 bytes from 2001: | ||
+ | 16 bytes from 2001: | ||
+ | |||
+ | --- 2001: | ||
+ | 4 packets transmitted, | ||
+ | round-trip min/ | ||
+ | </ | ||
+ | |||
+ | Don't forget to " |
documentation/examples/simple_bgp-rip-ospf_lab.txt · Last modified: 2023/05/01 07:03 by olivier