中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

5.5.3.7 BSD with Zebra

In this example the router is configured to advertise the 6to4 anycast prefix 192.88.99.0/24 using OSPFv2 [RFC3068], and to advertise the 6to4 prefix 2002::/16 [RFC3056] via BGP.

With FreeBSD, the file "/etc/rc.conf" is use for system-level configuration. Here one should add:

 The first listed command configures the IPv4 anycast prefix as an alias for the x10 interface. Note that in real deployments, x10 will have to be replaced by an address corresponding to the used physical interface with IPv4 connectivity. The second command specifies the address with which the IPv6 6to4 address for the relay router is created (the bits 16-47 of the IPv6 address). The third command sets all the site and interface-id bits to zero. The last command finally enables IPv6 forwarding on the router.

However, the file "rc.conf" can't be used to configure everything. For that reason some manual\ tuning of the file “rc.local” is also needed; the script is run after the processing of rc.conf has finished.

The first command adds an “anycast” flag to the IPv6 6to4 address, so that it is not used as a source address in outgoing packets. The next three commands start zebra routing processes in the background. Finally the last command leads to “/usr/local/etc/Zebra.conf” being read and fed to the respective routing process as a configuration file.

The relevant parts of the Zebra configuration file /usr/local/etc/Zebra.conf” are:

router bgp 1741
no bgp default ipv4-unicast
neighbor 2001:708::2 remote-as 1741
neighbor 2001:708::2 description 6net-rtr
neighbor 2001:708:0:1::625 remote-as 1741

neighbor 2001:708:0:1::625 description v6-rtr
!
address-family ipv6
network 2002::/16
neighbor 2001:708::2 activate
neighbor 2001:708::2 soft-reconfiguration inbound
neighbor 2001:708:0:1::625 activate
neighbor 2001:708:0:1::625 soft-reconfiguration inbound
exit-address-family
!
router ospf
ospf router-id 128.214.231.106
network 128.214.231.104/29 area 3248883125
network 192.88.99.0/24 area 3248883125
!

Here, the BGP sessions have been configured using AS1741 for two routers in the same autonomous system. The configuration syntax is similar to one used with Cisco IOS. The main difference is the Statement “network 2002::/16” under IPv6 address-family, which will originate a BGP advertisement for the 6to4 prefix.

The prefix 192.88.99.0/24 is advertised using OSPFv2 under a stub area. The simplest way is to use area 0 though. IPv4 BGP has been configured to advertise 192.88.99.0/24, but this will not work unless there exists an IGP route to it. Using static routes would be an option, but in this case the traffic would be blackholed should the relay router go down. For this purpose, OSPF was chosen so the BGP advertisements would cease immediately if the OSPF process on the relay router halts for any reason.