BGP peering on the MetaNET will eventually involve two route-servers. For now, you can peer with deuterium on its own. If you really want to, you can peer with other MetaNET nodes, thats up to you and them to negotiate.
For BGP peering to work, both neighbors need to have entries for each other, describing their remote-as, and including things such as prefix-lists for route filtering.
Deuterium has the AS 64900. Its neighbor IP is 192.168.66.10
We'll setup a test network with the AS 64899. Its internal IP range is 10.255.255.0/24, and its routers IP address is 10.255.255.1 NOTE AS 64899 and the IP range 10.255.255.0/24 are EXAMPLEs only. DO NOT attempt to use these. Please get your own IP range and AS allocated. Read the section later on the registry to see how to obtain your AS number
In our /etc/zebra/bgpd.conf we have the usual garbage at the top: hostname, password, enable passwd etc.
NOTE Make sure you EDIT this bgp config before trying to run it. There is a cleaner formatted version at the bottom of this page. You will need to change your AS number (router bgp ...), your router-id, and the networks you wish to advertise - both in the network line, and in the prefix-list line.
Then we set up a bgp router process:
! the following sets up a bgp router process with the local AS of 64899 router bgp 64899 ! this assigns the bgp router-id of 10.255.255.1 to this router bgp router-id 10.255.255.1 ! we want to advertise this network to our bgp peers network 10.255.255.0/24 ! this sets up deuterium (as 64900) as a neighbor on 192.168.66.10 neighbor 192.168.66.10 remote-as 64900 neighbor 192.168.66.10 ebgp-multihop ! these commands apply the prefix-lists below neighbor 192.168.66.10 prefix-list as-64899 out neighbor 192.168.66.10 prefix-list as-64900 in ! ! these prefix lists limit which ip ranges we will send out ip prefix-list as-64899 seq 5 permit 10.255.255.0/24 ! and allow in. ip prefix-list as-64900 seq 5 permit 10.0.0.0/8 le 32
A word on prefix lists. The prefix-list for as-64899 will only permit 10.255.255.0/24 - it wont allow any other networks. If you had two networks you wished to advertise, you could that with
ip prefix-list as-64899 seq 5 permit 10.255.255.0/24 ip prefix-list as-64899 seq 10 permit 10.255.1.0/24
Also, note that the prefix-list for as-64900 has 'le 32' at the end. This allows a range of prefixes to match - it will match prefixes from 10.0.0.0/8 down to /32. This effectively matches all metanet routes, including the host route for deuterium (10.66.10.1/32)
Once you've set your end up, and you've updated your details in the metanet registry, deuterium (and eventually hoiho) will update their config, and very shortly you should be peering with the route servers.
Go to http://www.tla/maint if you are on the MetaNET already. If you aren't, go to http://www.meta.net.nz/maint. You will need a password for this, which you will need to get off one of the MetaNET admins.
Fill in all your informtion in the Personal Information field. You'll get an IP block allocated to you - you can allocate blocks under this to other people if you want. EG, if you own 10.66.0.0/16, you can allocated /24's under that to other people. Fill in the domains/ nameservers etc pages too.
AS Allocations. This will automatically allocate you the next available AS. Don't ask for a specific one - you wont get it. Make sure you add in the MetaNET IP of your bgp speaker. This is your 192.168 address.
IP to AS Allocation. In here, you specify which netblocks you will be advertising. You should only be able to advertise netblocks which are under your control. This step is important as it gives the route servers information about which routes to accept from you.
If you telnet to localhost port bgpd, and enter enable mode, you can inspect some parts of the bgp router process
show ip bgp BGP table version is 0, local router ID is 10.66.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric !LocPrf? Weight Path *> 10.1.12.0/24 192.168.1.12 0 64900 64914 i *> 10.21.1.0/24 192.168.21.1 0 64900 64902 ? *> 10.25.0.0/24 192.168.66.10 0 64900 64911 i *> 10.25.16.0/24 192.168.66.10 0 64900 64911 i *> 10.50.1.0/24 192.168.50.1 0 64900 64905 i *> 10.66.1.0/24 0.0.0.0 32768 i *> 10.66.2.0/24 192.168.66.2 20 0 64900 ? *> 10.66.10.1/32 192.168.66.10 0 64900 i *> 10.100.1.0/24 192.168.100.1 0 64900 64901 i *> 10.144.1.0/24 192.168.144.1 0 64900 64906 i *> 10.144.3.0/24 192.168.144.3 0 64900 64907 i *> 10.230.1.0/24 192.168.230.1 0 64900 64915 i Total number of prefixes 12
So this shows all the routes I have received, the next hop ip (gateway ip), any metrics that have been applied, weights, and the path - which shows which AS I received the routes through. Note that there is one entry which has a metric of 20. This is being received via OSPF, which sets the default metric to 20, by deuterium's OSPF routing process, and is being redistributed via BGP to my node.
# show ip bgp 10.66.10.1 BGP routing table entry for 10.66.10.1/32 Paths: (1 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer 64900 192.168.66.10 from 192.168.66.10 (10.66.10.1) Origin IGP, localpref 100, valid, external, best Last update: Thu Mar 6 14:11:26 2003
This shows the bgp entry for the route to 10.66.10.1/32 It shows the remote AS, and the path it takes, as well as some information about it
We have one metanet node that is connected via a tunnel to one of the other nodes. It is participating the BGP peering, and you will receive routes to it.
# show ip bgp 10.25.16.0 BGP routing table entry for 10.25.16.0/24 Paths: (1 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer 64900 64911 192.168.66.10 from 192.168.66.10 (10.66.10.1) Origin IGP, localpref 100, valid, external, best Last update: Thu Mar 6 14:11:26 2003
As you can see, there are two AS's in the AS list. This is because all traffic to 10.25.16.0 is routed via 192.168.66.10 (deuterium), as 10.25.16.0 connets to the metanet via a tunnel to deuterium.
To check your route is being seen by other machines on the wand network you might want to check http://www.feet.net.nz/route.php sample config:
! hostname bgpd password metanet enable password metanet log file /var/log/zebra/bgpd.log ! router bgp <YOUR AS NUMBER> bgp router-id <IP ADDRESS OF YOUR ROUTER> network <YOUR 10.* NETWORK>/24 neighbor 192.168.66.10 remote-as 64900 neighbor 192.168.66.10 ebgp-multihop neighbor 192.168.66.10 prefix-list as-<YOUR AS> out neighbor 192.168.66.10 prefix-list as-64900 in ! ip prefix-list as-<YOUR AS> seq 5 permit <YOUR 10.* NETWORK>/24 ip prefix-list as-64900 seq 5 permit 10.0.0.0/8 le 32
lib/main.php:944: Notice: PageInfo: Cannot find action page