Age | Commit message (Collapse) | Author |
|
Fix a received data corruption bug when a partial read happens. Let's
use io.ReadFull() rather than the homemade one.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
[show]
% gobgp -u 10.0.255.1 policy prefix
Name Prefix MaskRange
ps0 192.168.0.0/16 16..24
ps1 192.168.20.0/24
192.168.200.0/24
ps2 192.168.20.0/24
ps3 2001:0:10:2::/64 64..128
ps4 2001:0:10:20::/64
2001:0:10:200::/64
ps5 2001:0:10:20::/64
% gobgp -u 10.0.255.1 policy prefix ps1
Address/Mask MaskRange
192.168.20.0/24
192.168.200.0/24
[add]
% gobgp -u 10.0.255.1 policy prefix add ps8 172.16.0.0/16 16..24
% gobgp -u 10.0.255.1 policy prefix add ps8 172.32.0.0/16
[del]
% gobgp -u 10.0.255.1 policy prefix del ps2 192.168.20.0/24
% gobgp -u 10.0.255.1 policy prefix del ps3
% gobgp -u 10.0.255.1 policy prefix del all
|
|
fix the above issue with route server use case.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
FSMHandler's holdTimer could be accessed by rx goroutine before it's
initialized. Let's use channel rather than sharing time.Timer pointer.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
/home/vagrant% gobgp -u 192.168.10.4 neighbor 192.168.10.2
BGP neighbor is 192.168.10.2, remote AS 65001
BGP version 4, remote router ID 192.168.10.2
BGP state = BGP_FSM_ESTABLISHED, up for 00:12:57
BGP OutQ = 0, Flops = 0
Neighbor capabilities:
MULTIPROTOCOL(IP,UNICAST): advertised
MULTIPROTOCOL(L2VPN,EVPN): advertised
MULTIPROTOCOL(IP,ENCAP): advertised
MULTIPROTOCOL(IP,ROUTE_TARGET_CONSTRTAINS): received
ROUTE_REFRESH: advertised
FOUR_OCTET_AS_NUMBER: advertised and received
Message statistics:
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 0 0
Keepalives: 26 26
Route Refesh: 0 0
Discarded: 0 0
Total: 27 27
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
fujita@ubuntu:~/git/gobgp/gobgp$ go run main.go neighbor 10.0.255.1
BGP neighbor is 10.0.255.1, remote AS 65001
BGP version 4, remote router ID 192.168.0.1
BGP state = BGP_FSM_ESTABLISHED, up for 00:11:55
BGP OutQ = 0, Flops = 0
Hold time is 30, keepalive interval is 10 seconds
Configured hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
MULTIPROTOCOL: advertised and received
ROUTE_REFRESH: advertised and received
FOUR_OCTET_AS_NUMBER: advertised and received
ROUTE_REFRESH_CISCO: received
Message statistics:
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 1 1
Keepalives: 72 73
Route Refesh: 0 0
Discarded: 0 0
Total: 74 75
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
If a negotiated hold time is smaller than a configured hold time, we use
one third of the negotiated hold time for a keepalive interval.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
add rtc route
$ gobgp global rib add 65000 77 -a rtc
check it
$ gobgp global rib -a rtc
Network Next Hop AS_PATH Age Attrs
*> 65001:65000:75 0.0.0.0 [65001] 00:15:35 [{Origin: IGP}]
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
solves gobgpd <=> gobgpd connectivity problem.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
add encap end point route(10.0.0.1) with vni 20
$ gobgp global rib add 10.0.0.1 20 -a encap
check it
$ gobgp global rib -a encap
Please specify one command of: add or del
Network Next Hop AS_PATH Age Attrs
*> 10.0.0.1 0.0.0.0 [64512] 00:00:01 [{Origin: IGP} {Encap: < VXLAN | color: 20 >}]
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
When route family is not supported for a peer's local rib,
gobgpd dies with following message.
$ gobgp show neighbor 10.0.0.1 local evpn
> panic: interface conversion: interface is nil, not *api.Destination
this patch fix this.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
peer/route sorting is for pretty priting. do it at the client side.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
- add ToApiStruct() for convertion of internal structs to protobuf structs
to avoid ugly convertion by json.Marshal() && json.Unmarshal()
- move grpc server code under /server instead of /api
- update proto file to include more detailed path information
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
add: curl -X POST -d prefix=10.0.0.0/24 http://localhost:8080/v1/bgp/global/ipv4
delete: curl -X DELETE -d prefix=10.0.0.0/24 http://localhost:8080/v1/bgp/global/ipv4
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
withdrawal paths don't have nexthop path attribute.
use GetSource() instead.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
somehow the bad code was merged.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
md5 auth is not supported yet for active conntion
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
We handle Global Rib as a Peer. Normail (non route server client) peer
has one sibling, Global Rib peer. Global Rib peer has all normal peers
as siblings.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
struct Path has a flag which can tell whether the path is withdrawal
path or not. so table.ProcessPaths() needs not to return withdrawal path
and non-withdrawal path separetly.
this removes such unnecessary distinction.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
When a peer closed a connection (e.g. after we send a notification),
rx goroutine finds it immediately since read() returns an error and
kills tomb. The problem is that tx goroutine doesn't check if tomb
Dying() so tx doesn't die until tx tries to write keepalive to the
socket (and it doesn't never happen if keepalive interval is zero). So
fsm does't become idle shortly.
This fixes tx to check Dying() and makes sure that it sends
notification messages befor dying if they exists.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
kill duplicated code.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Even if a peer is configured to support v4/v6, the peer might send
only v4 capability with Open message. In this case, we have to send
only ipv4 info.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
You can configure like the following:
[Global]
As = 65032
RouterId = "192.168.255.1"
[[NeighborList]]
NeighborAddress = "10.0.255.1"
PeerAs = 65001
[NeighborList.RouteServer]
RouteServerClient = true
[[NeighborList.AfiSafiList]]
AfiSafiName = "ipv4-unicast"
[[NeighborList.AfiSafiList]]
AfiSafiName = "ipv6-unicast"
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
NewTableManager creates tables for only specified route families.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
If it's not valid, log a warning and ignore.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Cleanup for supporting multiple route families.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
The modified openconfig yang files are available at:
https://github.com/osrg/yang/tree/gobgp
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This is part of work to remove time.Time in bgp_config.go since no
nice way to represent time.Time with yang. We replace time.Time with
int64.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
soft-reconfiguration inbound
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|