[FROG] simple frr ospf example setup

Don Slice dslice at cumulusnetworks.com
Sat Aug 22 19:17:19 UTC 2020


“Show ip ospf interface” on both switches may be helpful. Also tcpdump on
the interface for proto ospf to see if hellos are being sent and received.

On Fri, Aug 21, 2020 at 5:21 PM Moritz Warning <moritzwarning at web.de> wrote:

> You are right, ping is not happy about 192.168.1.0. So I switched to
> 192.168.1.1 and 192.168.1.2.
>
> Ping works in both directions. But ospfd still list an empty table for
> "show ip ospf neighbor".
>
>
>
> All commands again for nodes 1 and 2:
>
>
>
> $ sudo netns add ns-1
>
>
>
> $ sudo netns add ns-2
>
>
>
> $ sudo ip netns exec ns-1 ip a a 192.168.1.1/24 dev uplink
>
>
>
> $ sudo ip netns exec ns-2 ip a a 192.168.1.2/24 dev uplink
>
>
>
> $ sudo ip netns exec ns-1 ip a
>
> 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
>
>     inet6 ::1/128 scope host
>
>        valid_lft forever preferred_lft forever
>
> 4: uplink at if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
> state UP group default qlen 1000
>
>     link/ether 12:bc:58:4f:6c:c5 brd ff:ff:ff:ff:ff:ff link-netns switch
>
>     inet 192.168.1.1/24 scope global uplink
>
>        valid_lft forever preferred_lft forever
>
>     inet6 fe80::10bc:58ff:fe4f:6cc5/64 scope link
>
>        valid_lft forever preferred_lft forever
>
>
>
> $ sudo ip netns exec ns-2 ip a
>
> 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
>
>     inet6 ::1/128 scope host
>
>        valid_lft forever preferred_lft forever
>
> 7: uplink at if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
> state UP group default qlen 1000
>
>     link/ether 9e:84:c2:86:90:d8 brd ff:ff:ff:ff:ff:ff link-netns switch
>
>     inet 192.168.1.2/24 scope global uplink
>
>        valid_lft forever preferred_lft forever
>
>     inet6 fe80::9c84:c2ff:fe86:90d8/64 scope link
>
>        valid_lft forever preferred_lft forever
>
>
>
> $ sudo ip netns exec ns-2 ip r
>
> 192.168.1.0/24 dev uplink proto kernel scope link src 192.168.1.2
>
>
>
> $ sudo ip netns exec ns-1 ip r
>
> 192.168.1.0/24 dev uplink proto kernel scope link src 192.168.1.1
>
>
>
> $ sudo ip netns exec ns-2 ping 192.168.1.1
>
> PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
>
> 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.110 ms
>
> ^C
>
> --- 192.168.1.1 ping statistics ---
>
> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
>
> rtt min/avg/max/mdev = 0.110/0.110/0.110/0.000 ms
>
>
>
> $ sudo ip netns exec ns-1 ping 192.168.1.2
>
> PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
>
> 64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.054 ms
>
> 64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=0.063 ms
>
> ^C
>
> --- 192.168.1.2 ping statistics ---
>
> 2 packets transmitted, 2 received, 0% packet loss, time 1022ms
>
> rtt min/avg/max/mdev = 0.054/0.058/0.063/0.004 ms
>
>
>
> $ cat ospf1.conf
>
> router ospf
>
> ospf router-id 192.168.1.1
>
> network 192.168.1.0/24 area 1
>
>
>
> $ cat ospf2.conf
>
> router ospf
>
> ospf router-id 192.168.1.2
>
> network 192.168.1.0/24 area 1
>
>
>
> $ sudo ip netns exec ns-1 ospfd --terminal -f ./ospf1.conf -i
> /run/frr/ospfd1.pid
>
>
>
> $ sudo ip netns exec ns-2 ospfd --terminal -f ./ospf2.conf -i
> /run/frr/ospfd2.pid
>
>
>
>
>
> On 8/21/20 10:33 PM, Don Slice wrote:
>
> > Can you ping between the pertinent interfaces?  In other words, did you
>
> > verify reachability between 192.168.1.1 and 192.168.1.0?  BTW, I
>
> > would avoid using the .0 address on a /24.  Historically, this has
>
> > represented the subnet and not one of the addresses on the subnet.  There
>
> > are circumstances it makes sense (/31 addressing for example) but is
>
> > normally not done, at least as far as I know.
>
> >
>
> > On Fri, Aug 21, 2020 at 3:08 PM Moritz Warning <moritzwarning at web.de>
> wrote:
>
> >
>
> >> Hi,
>
> >>
>
> >> I am a newbie with frr/ospf. My aim is to run two ospfd instances in a
>
> >> Linux network namesspace each and let them talk to each other via a
> virtual
>
> >> link (interface called uplink).
>
> >>
>
> >> My test setup is attached. But I do not see any traffic. This is
> probably
>
> >> some basic configuration error. I did have a look at the documentation,
> but
>
> >> it did not seem to cover such simple setups.
>
> >> A few pointer in the right direction would be helpful.
>
> >>
>
> >> thanks,
>
> >> mwarning
>
> >>
>
> >>
>
> >> $ ip netns add ns-0
>
> >> $ ip netns add ns-1
>
> >>
>
> >> # Node 0:
>
> >>
>
> >> $ sudo ip netns exec ns-0 ip a
>
> >> 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
>
> >>     inet6 ::1/128 scope host
>
> >>        valid_lft forever preferred_lft forever
>
> >> 4: uplink at if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
>
> >> state UP group default qlen 1000
>
> >>     link/ether ce:e6:b3:5d:d3:70 brd ff:ff:ff:ff:ff:ff link-netns switch
>
> >>     inet 192.168.1.0/24 scope global uplink
>
> >>        valid_lft forever preferred_lft forever
>
> >>     inet6 fe80::cce6:b3ff:fe5d:d370/64 scope link
>
> >>        valid_lft forever preferred_lft forever
>
> >>
>
> >> $ cat ospf0.conf
>
> >> router ospf
>
> >> ospf router-id 192.168.1.0
>
> >> network 192.168.1.0/24 area 1
>
> >>
>
> >> $ sudo ip netns exec ns-0 ospfd --terminal -f ./ospf0.conf -i
>
> >> /run/frr/ospfd0.pid
>
> >>
>
> >>
>
> >> # Node 1:
>
> >>
>
> >> $ sudo ip netns exec ns-1 ip a
>
> >> 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
>
> >>     inet6 ::1/128 scope host
>
> >>        valid_lft forever preferred_lft forever
>
> >> 7: uplink at if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
>
> >> state UP group default qlen 1000
>
> >>     link/ether 12:45:ca:46:19:52 brd ff:ff:ff:ff:ff:ff link-netns switch
>
> >>     inet 192.168.1.1/24 scope global uplink
>
> >>        valid_lft forever preferred_lft forever
>
> >>     inet6 fe80::1045:caff:fe46:1952/64 scope link
>
> >>        valid_lft forever preferred_lft forever
>
> >>
>
> >> $ cat ospf1.conf
>
> >> router ospf
>
> >> ospf router-id 192.168.1.1
>
> >> network 192.168.1.0/24 area
>
> >>
>
> >> $ sudo ip netns exec ns-1 ospfd --terminal -f ./ospf1.conf -i
>
> >> /run/frr/ospfd1.pid
>
> >>
>
> >> _______________________________________________
>
> >> frog mailing list
>
> >> frog at lists.frrouting.org
>
> >> https://lists.frrouting.org/listinfo/frog
>
> >>
>
> >
>
> >
>
>
>
> --
Don Slice
Cumulus Networks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/frog/attachments/20200822/691367cf/attachment.htm>


More information about the frog mailing list