Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


zebra is an IP routing manager

https://frrouting.org/


FRR will
Install on Ubuntu

Install Ubuntu Server as VM on linux based from ISO or vmdk

username and password:  osboxes / osboxes.org


https://deb.frrouting.org/

# add GPG key
curl -s https://deb.frrouting.org/frr/keys.asc | sudo apt-key add -

# update and install FRR
sudo apt update && sudo apt install frr frr-pythontools
Start protocolsOSPF and BGP
start

vi /etc/frr/daemons

service frr restart
Add Interface

checkps -ef | grep frr
Add InterfaceFRR will use the linux interfaces
by default


Code Block
titleshow interfaces ( by default )
collapsetrue
Example 1:
-----------
osboxes# show interface brief 
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
ens33           up      default         192.168.235.226/24
ens38           up      default         10.1.4.220/24
lo              up      default         

osboxes# 


Example 2:
----------
FRRouting# show interface brief 
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
eth0            up      default         192.168.0.207/24
eth1            up      default         10.1.4.100/24
lo              up      default         1.1.40.1/24

FRRouting# 


add loopback

Link

FRR1

ifconfig lo:10 1.1.10.1 netmask 255.255.255.255 up

ifconfig lo:20 1.1.10.2 netmask 255.255.255.255 up

FRR2:

ifconfig lo:10 1.1.20.1 netmask 255.255.255.255 up

ifconfig lo:20 1.1.20.2 netmask 255.255.255.255 up


Code Block
titleloopback interface
collapsetrue
root@FRRouting:~# apt install net-tools

root@FRRouting:~# ifconfig lo:40 1.1.40.1 netmask 255.255.255.0 up

root@FRRouting:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet 1.1.40.1/24 scope global lo:40  <<<<<<<<<<<<<<<<<<<<<<<<<<<< New loopback interface 
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever


root@FRRouting:~# vtysh

show interface brief

Code Block
titlevtysh
FRRouting# show interface brief 
Interface       Status  VRF             Addresses
---------       ------  ---             ---------
eth0            up      default         192.168.0.207/24
eth1            up      default         10.1.4.100/24
lo              up      default         1.1.40.1/24

FRRouting# 


Access the FRRoutingsudo vtysh


show running-config


Code Block
titlebasic config
collapsetrue
internet-router# show running-config 
Building configuration...

Current configuration:
!
frr version 5.0.1
frr defaults traditional
hostname internet-router
no ipv6 forwarding
log stdout
!
password zebra
!
!
line vty
!
end
internet-router#


Code Block
titleBGP config
collapsetrue
!
router bgp 6000
 neighbor 1.1.1.128 remote-as 100
 neighbor 1.1.1.128 description -= Seattle Branch Office =-
 neighbor 1.1.1.128 interface bo1
 neighbor 2.2.2.128 remote-as 200
 neighbor 2.2.2.128 description -= Dallas Branch Office =-
 neighbor 2.2.2.128 interface bo2
 neighbor 3.3.3.128 remote-as 300
 neighbor 3.3.3.128 description -= Boston Datacenter =-
 neighbor 3.3.3.128 interface dc
 !
 address-family ipv4 unicast
  network 1.1.1.0/24
  network 2.2.2.0/24
  network 3.3.3.0/24
 exit-address-family
!


Code Block
titleOSPF config
collapsetrue
!
interface bo1
 ip ospf 1 area 0.0.0.1
!
interface bo2
 ip ospf 2 area 0.0.0.2
!
interface dc
 ip ospf 3 area 0.0.0.3
!
router ospf 1
 ospf router-id 1.1.1.1
 redistribute connected
 distribute-list blockmgmt out connected
!
router ospf 2
 ospf router-id 2.2.2.2
 redistribute connected
 distribute-list blockmgmt out connected
!
router ospf 3
 ospf router-id 3.3.3.3
 redistribute connected
 distribute-list blockmgmt out connected
!
access-list blockmgmt deny 192.168.7.0/24
access-list blockmgmt permit any
access-list all permit any



show bgp summary

Code Block
titlebgp summary
collapsetrue
internet-router# show bgp summary 

IPv4 Unicast Summary:
BGP router identifier 192.168.7.101, local AS number 6000 vrf-id 0
BGP table version 3
RIB entries 5, using 760 bytes of memory
Peers 3, using 62 KiB of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
1.1.1.128       4        100       0       0        0    0    0    never       Active
2.2.2.128       4        200       0       0        0    0    0    never       Active
3.3.3.128       4        300       0       0        0    0    0    never       Active

Total number of neighbors 3
internet-router#



show bgp neighbors



show bgp ipv4

Code Block
titlebgp ipv4 routes RiB
collapsetrue
internet-router# show bgp ipv4
BGP table version is 3, local router ID is 192.168.7.101, vrf id 0
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       0.0.0.0                  0         32768 i
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i

Displayed  3 routes and 3 total paths
internet-router#



show ip route


Code Block
titleshow routes
collapsetrue
internet-router# show ip route 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR,
       > - selected route, * - FIB route

O[1]   1.1.1.0/24 [110/100] is directly connected, bo1, 05:46:02
C>* 1.1.1.0/24 is directly connected, bo1, 05:46:02
O[2]   2.2.2.0/24 [110/100] is directly connected, bo2, 05:46:01
C>* 2.2.2.0/24 is directly connected, bo2, 05:46:01
O[3]   3.3.3.0/24 [110/100] is directly connected, dc, 05:46:02
C>* 3.3.3.0/24 is directly connected, dc, 05:46:02
C>* 4.4.4.0/24 is directly connected, yum, 05:46:01
C>* 192.168.7.0/24 is directly connected, mgmt, 05:46:01
internet-router# 


OSPF

show ip ospf 

border-routers     interface    mpls-te     route     vrf
database      json      neighbor      router-info     vrfs


show ip ospf neighbor

show ip ospf interface

show ip ospf database


Code Block
titleshow ip ospf
collapsetrue
FRR2-HQ# show ip ospf neighbor 

OSPF Instance: 1


Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
10.1.6.2          1 Full/DROther      30.224s 10.1.6.2        eth1:10.1.6.12                       0     0     0

FRR2-HQ# show ip ospf interface 

OSPF Instance: 1

eth1 is up
  ifindex 3, MTU 1500 bytes, BW 10000 Mbit <UP,BROADCAST,RUNNING,MULTICAST>
  Internet Address 10.1.6.12/24, Broadcast 10.1.6.255, Area 0.0.0.0
  MTU mismatch detection: enabled
  Router ID 10.1.6.12, Network Type POINTOPOINT, Cost: 10
  Transmit Delay is 1 sec, State Point-To-Point, Priority 1
  No backup designated router on this network
  Multicast group memberships: OSPFAllRouters
  Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
    Hello due in 7.340s
  Neighbor Count is 1, Adjacent neighbor count is 1

FRR2-HQ# show ip ospf database  

OSPF Instance: 1

       OSPF Router with ID (10.1.6.12)

                Router Link States (Area 0.0.0.0)

Link ID         ADV Router      Age  Seq#       CkSum  Link count
10.1.6.2        10.1.6.2         108 0x80000003 0xaf18 2
10.1.6.12       10.1.6.12        107 0x80000002 0x3f73 2

                AS External Link States

Link ID         ADV Router      Age  Seq#       CkSum  Route
10.1.16.1       10.1.6.12        117 0x80000001 0x8df7 E2 10.1.16.1/32 [0x0]
10.1.16.2       10.1.6.12        117 0x80000001 0x8301 E2 10.1.16.2/32 [0x0]
10.1.16.3       10.1.6.12        117 0x80000001 0x790a E2 10.1.16.3/32 [0x0]
192.168.0.0     10.1.6.12        117 0x80000001 0x2513 E2 192.168.0.0/24 [0x0]


FRR2-HQ#