PageRenderTime 26ms CodeModel.GetById 16ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

Shell | 46 lines | 7 code | 10 blank | 29 comment | 0 complexity | a869c9c930eab6c8b93125668aedf75f MD5 | raw file
 2# script to set up a frame relay link on the sr card.
 3# The dlci used is selected below. The default is 16
 4# $FreeBSD$
 9# create a frame_relay type node and attach it to the sync port.
10ngctl mkpeer ${CARD}: frame_relay rawdata downstream
12# Attach the dlci output of the (de)multiplexor to a new 
13# Link management protocol node.
14ngctl mkpeer ${CARD}:rawdata lmi dlci0 auto0
16# Also attach dlci 1023, as it needs both to try auto-configuring.
17# The Link management protocol is now alive and probing..
18ngctl connect ${CARD}:rawdata ${CARD}:rawdata.dlci0 dlci1023 auto1023
20# Attach the DLCI(channel) the Telco has assigned you to
21# a node to handle whatever protocol encapsulation your peer
22# is using. In this case RFC1490 encapsulation.
23ngctl mkpeer ${CARD}:rawdata rfc1490 dlci${DLCI} downstream
26# Attach the ip (inet) protocol output of the protocol mux to the ip (inet)
27# input of a netgraph "interface" node (ifconfig should show it as "ng0").
28#if interface ng0 needs to be created use a mkpeer command.. e.g.
29ngctl mkpeer ${CARD}:rawdata.dlci${DLCI} iface inet inet
31# if ng0 already exists, use a CONNECT command instead of a mkpeer. e.g.
32# ngctl connect ${CARD}:rawdata.dlci${DLCI} ng0: inet inet
34# Then use ifconfig on interface ng0 as usual
36# A variant on this whole set might use the 'name' command to make it more
37# readable. But it doesn't work if you have multiple lines or dlcis
38# e.g.
39# ngctl mkpeer ${CARD}: frame_relay rawdata downstream
40# ngctl name ${CARD}:rawdata mux
41# ngctl mkpeer mux: lmi dlci0 auto0
42# ngctl name mux:dlci0 lmi
43# ngctl connect mux: lmi: dlci1023 auto1023
44# ngctl mkpeer mux: rfc1490 dlci${DLCI} downstream
45# ngctl mux:dlci${DLCI} protomux
46# ngctl mkpeer protomux: iface inet inet