summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
AgeCommit message (Collapse)Author
2015-05-19cli: add the show command for routing policy of neighborNaoto Hanaue
% gobgp -u 10.0.255.1 neighbor 10.0.0.3 policy DefaultImportPolicy: ACCEPT DefaultImportPolicy: ACCEPT ImportPolicies: PolicyName policy0: StatementName st0: Conditions: PrefixSet: ps0 192.168.0.0/16 16..24 NeighborSet: ns0 10.0.0.2 MatchOption: ALL Actions: REJECT PolicyName policy5: ExportPolicies: PolicyName policy1: StatementName st1: Conditions: PrefixSet: ps1 192.168.20.0/24 192.168.200.0/24 NeighborSet: ns0 10.0.0.2 MatchOption: ALL Actions: REJECT
2015-05-19cli: add the show command for the routing policyNaoto Hanaue
% gobgp -u 10.0.255.1 policy routepolicy PolicyName policy0: StatementName st0: Conditions: PrefixSet: ps0 192.168.0.0/16 16..24 NeighborSet: ns0 10.0.0.2 MatchOption: ALL Actions: REJECT PolicyName policy1: StatementName st1: Conditions: PrefixSet: ps1 192.168.20.0/24 192.168.200.0/24 NeighborSet: ns0 10.0.0.2 MatchOption: ALL Actions: REJECT % gobgp -u 10.0.255.1 policy routepolicy policy0 PolicyName policy0: StatementName st0: Conditions: PrefixSet: ps0 192.168.0.0/16 16..24 NeighborSet: ns0 10.0.0.2 MatchOption: ALL Actions: REJECT
2015-05-19cli: add the show command for the neighbor conditionsNaoto Hanaue
% gobgp -u 10.0.255.1 policy neighbor Name Address ns0 10.0.0.2 ns1 2001::192:168:0:2 % gobgp -u 10.0.255.1 policy neighbor ns0 Name Address ns0 10.0.0.2
2015-05-12server: add logging about peer up/downFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-05-11cli: add the commands for the policy of the prefix operationNaoto Hanaue
[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
2015-05-11server: don't path information to the same AS number peerFUJITA Tomonori
fix the above issue with route server use case. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-04-15table: sort peers/routes at client side instead of bgpd sideISHIDA Wataru
peer/route sorting is for pretty priting. do it at the client side. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-15api: add a method to convert internal structs to protobuf structsISHIDA Wataru
- 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>
2015-04-14api: use gRPC instead of RESTISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-04api/server: add apis to add/delete routes to/from global ribISHIDA Wataru
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>
2015-04-04server: use net.SplitHostPortISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-03server: show peers in the sorted orderFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-24policy: apply import/export policyHiroshi Yokoi
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-20api/cli: add show global commandISHIDA Wataru
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-20server: add Global Rib to support normal BGP functionalityISHIDA Wataru
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>
2015-03-06server: remove rf in ServerMsgFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-06table: remove RF from PeerInfoFUJITA Tomonori
Cleanup for supporting multiple route families. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-03update the whole code for the latest openconfig yang filesFUJITA Tomonori
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>
2015-02-27server: implement softresetin and softresetFUJITA Tomonori
soft-reconfiguration inbound Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16peer: support enable/disableHiroshi Yokoi
2015-01-19rest: support adj-rib-in/outHiroshi Yokoi
2015-01-18server: make sure peer always read from acceptedConnChFUJITA Tomonori
When acceptedConnCh is full, the server goroutine will be blocked. It's not good even eventually the goroutine will run. This situation happens only with buggy bgp speaerk peers. But let's avoid this anyway. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-18server: support idlehold time after resetFUJITA Tomonori
After resetting a peer, the peer will remain idle for idlehold time (by default 30 seconds). It can be configured via IdleHoldTImeAfterReset. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-16api: add reset and shutdown supportFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-07server: set ttl to 1FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-03server: properly handle peer configured laterFUJITA Tomonori
- send adj-in in all the existing peers to a peer configured after gobgpd started. - peer sends update message information (path) to another peer directly instead of via gobgpd (this improves the performance) Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-27support IPv6_UC route familyFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-25rest: use []byte instead of interface{} for REST responseFUJITA Tomonori
Some Marshall method is not thread-safe. They can't be called by a goroutine for a REST client. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-25rest: kill RestResponse interfaceFUJITA Tomonori
We can use RestResponse struct for all request types. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-25server: support /neighbors URLFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-25rest: support local-rib URLFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-23packet: define FSMStateFUJITA Tomonori
Then we can use stringer nicely. Now FSMstate shows nicely like: DEBU[0081] Peer (10.0.0.1) state changed from BGP_FSM_ACTIVE to BGP_FSM_OPENSENT Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-22add --log-json command line optionFUJITA Tomonori
During development, it's easy to parse a plain format by human. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-22server: use logger instead of stdoutFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-22Add rest API supportHiroshi Yokoi
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-22table: send withdraw when peer is downFUJITA Tomonori
When a peer becomes down, send withdraw for the best pathes of it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-18server: update adjRibInFUJITA Tomonori
When we get a update message, update adjRibIn, and sends the path infomation to other peers. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-19server: add message delivery between peersFUJITA Tomonori
a peer notifies other peers of its event (join,leave,bgp state change, updates, etc) It would have better performance for a peer to send a message to a channel of another peer directly. However, for the code simplicity, the hub-and-spoke model is used for now. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-16server: merge io packageFUJITA Tomonori
Likely no other users. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-16add initial bgp server codeFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>