OsmoBSC> ### CBSP link config

OsmoBSC> list
...
  show cbc
...

OsmoBSC> enable
OsmoBSC# list
...
  show cbc
...

OsmoBSC# show running-config
... !cbc

OsmoBSC# show cbc
CBSP link is disabled

OsmoBSC# configure terminal
OsmoBSC(config)# cbc

OsmoBSC(config-cbc)# list
...
  mode (server|client|disabled)
  server
  client

OsmoBSC(config-cbc)# ?
...
  mode    Set OsmoBSC as CBSP server or client
  server  Configure OsmoBSC's CBSP server role
  client  Configure OsmoBSC's CBSP client role

OsmoBSC(config-cbc)# mode ?
  server    CBSP Server: listen for inbound TCP connections from a remote Cell Broadcast Centre
  client    CBSP Client: establish outbound TCP connection to a remote Cell Broadcast Centre
  disabled  Disable CBSP link

OsmoBSC(config-cbc)# server
OsmoBSC(config-cbc-server)# list
...
  local-ip (A.B.C.D|X:X::X:X)
  local-port <1-65535>

OsmoBSC(config-cbc-server)# ?
...
  local-ip    Set IP Address to listen on for inbound CBSP from a Cell Broadcast Centre
  local-port  Set TCP port to listen on for inbound CBSP from a Cell Broadcast Centre

OsmoBSC(config-cbc-server)# local-ip ?
  A.B.C.D   IPv4 address
  X:X::X:X  IPv6 address
OsmoBSC(config-cbc-server)# local-port ?
  <1-65535>  CBSP port number (Default: 48049)

OsmoBSC(config-cbc-server)# local-ip 1.2.3.4
OsmoBSC(config-cbc-server)# local-port 12345
OsmoBSC(config-cbc-server)# show running-config
...
cbc
 mode disabled
 server
  local-ip 1.2.3.4
  local-port 12345
...

OsmoBSC(config-cbc-server)# local-port 48049

OsmoBSC(config-cbc-server)# show running-config
...
cbc
 mode disabled
 server
  local-ip 1.2.3.4
... !local-port

OsmoBSC(config-cbc-server)# local-ip ::1
OsmoBSC(config-cbc-server)# show running-config
...
cbc
 mode disabled
 server
  local-ip ::1
...

OsmoBSC(config-cbc-server)# do show cbc
CBSP link is disabled

OsmoBSC(config-cbc-server)# exit

OsmoBSC(config-cbc)# client
OsmoBSC(config-cbc-client)# list
...
  remote-ip (A.B.C.D|X:X::X:X)
  remote-port <1-65535>
  local-ip (A.B.C.D|X:X::X:X)
  local-port <1-65535>
  no local-ip
  no local-port

OsmoBSC(config-cbc-client)# ?
...
  remote-ip    Set IP Address of the Cell Broadcast Centre, to establish CBSP link to
  remote-port  Set TCP port of the Cell Broadcast Centre, to establish CBSP link to
  local-ip     Set local bind address for the outbound CBSP link to the Cell Broadcast Centre
  local-port   Set local bind port for the outbound CBSP link to the Cell Broadcast Centre
  no           Negate a command or set its defaults

OsmoBSC(config-cbc-client)# remote-ip ?
  A.B.C.D   IPv4 address
  X:X::X:X  IPv6 address
OsmoBSC(config-cbc-client)# remote-port ?
  <1-65535>  CBSP port number (Default: 48049)

OsmoBSC(config-cbc-client)# no ?
  local-ip    Remove local IP address bind config for the CBSP client mode
  local-port  Remove local TCP port bind config for the CBSP client mode

OsmoBSC(config-cbc-client)# remote-ip 1.2.3.4
OsmoBSC(config-cbc-client)# remote-port 12345
OsmoBSC(config-cbc-client)# show running-config
...
cbc
...
 client
  remote-ip 1.2.3.4
  remote-port 12345
...

OsmoBSC(config-cbc-client)# remote-port 48049

OsmoBSC(config-cbc-client)# show running-config
...
cbc
...
 client
  remote-ip 1.2.3.4
... !remote-port

OsmoBSC(config-cbc-client)# remote-ip 1:2:3:4::5
OsmoBSC(config-cbc-client)# show running-config
...
cbc
...
 client
  remote-ip 1:2:3:4::5
...

OsmoBSC(config-cbc-client)# local-ip 1.2.3.4

OsmoBSC(config-cbc-client)# show running-config
...
cbc
...
 client
  remote-ip 1:2:3:4::5
  local-ip 1.2.3.4
... !local-port

OsmoBSC(config-cbc-client)# local-port 12345

OsmoBSC(config-cbc-client)# show running-config
...
cbc
...
 client
  remote-ip 1:2:3:4::5
  local-ip 1.2.3.4
  local-port 12345
...

OsmoBSC(config-cbc-client)# no local-ip

OsmoBSC(config-cbc-client)# show running-config
...
cbc
...
 client
  remote-ip 1:2:3:4::5
  local-port 12345
... !local

OsmoBSC(config-cbc-client)# no local-port

OsmoBSC(config-cbc-client)# show running-config
...
cbc
...
 client
  remote-ip 1:2:3:4::5
... !local

OsmoBSC(config-cbc-client)# do show cbc
CBSP link is disabled

OsmoBSC(config-cbc-client)# exit

OsmoBSC(config-cbc)# mode server
OsmoBSC(config-cbc)# do show cbc
OsmoBSC is configured as CBSP Server on [::1]:48049
CBSP Server Connection: Disconnected

OsmoBSC(config-cbc)# mode client
OsmoBSC(config-cbc)# do show cbc
OsmoBSC is configured as CBSP Client to remote CBC at [1:2:3:4::5]:48049
CBSP Client Connection: Disconnected

OsmoBSC(config-cbc)# mode disabled
OsmoBSC(config-cbc)# do show cbc
CBSP link is disabled


OsmoBSC(config-cbc)# # TEST DEPRECATED COMMANDS

OsmoBSC(config-cbc)# remote-ip 1.2.3.4
% cbc/remote-ip config is deprecated, instead use cbc/client/remote-ip and cbc/ mode
OsmoBSC(config-cbc)# remote-port 1234
% cbc/remote-port config is deprecated, instead use cbc/client/remote-port
OsmoBSC(config-cbc)# do show cbc
OsmoBSC is configured as CBSP Client to remote CBC at 1.2.3.4:1234
CBSP Client Connection: Disconnected
OsmoBSC(config-cbc)# show running-config
...
cbc
 mode client
...
 client
  remote-ip 1.2.3.4
  remote-port 1234
...

OsmoBSC(config-cbc)# no remote-ip
% cbc/remote-ip config is deprecated, instead use cbc/client/remote-ip and cbc/mode
OsmoBSC(config-cbc)# do show cbc
CBSP link is disabled
OsmoBSC(config-cbc)# show running-config
...
cbc
 mode disabled
...
 client
  remote-ip 1.2.3.4
  remote-port 1234
...

OsmoBSC(config-cbc)# listen-ip 127.0.0.2
% cbc/listen-ip config is deprecated, instead use cbc/server/local-ip
OsmoBSC(config-cbc)# do show cbc
CBSP link is disabled
OsmoBSC(config-cbc)# listen-port 48049
% cbc/listen-port config is deprecated, instead use cbc/server/local-port and cbc/mode
OsmoBSC(config-cbc)# do show cbc
OsmoBSC is configured as CBSP Server on 127.0.0.2:48049
CBSP Server Connection: Disconnected
OsmoBSC(config-cbc)# show running-config
...
cbc
 mode server
 server
  local-ip 127.0.0.2
 client
  remote-ip 1.2.3.4
  remote-port 1234
...

OsmoBSC(config-cbc)# no listen-port
% cbc/listen-port config is deprecated, instead use cbc/server/local-port and cbc/mode
OsmoBSC(config-cbc)# do show cbc
CBSP link is disabled
OsmoBSC(config-cbc)# show running-config
...
cbc
 mode disabled
...