2 # script to set up a frame relay link on the sr card.
3 # The dlci used is selected below. The default is 16
9 # create a frame_relay type node and attach it to the sync port.
10 ngctl mkpeer
${CARD}: frame_relay rawdata downstream
12 # Attach the dlci output of the (de)multiplexor to a new
13 # Link management protocol node.
14 ngctl mkpeer
${CARD}:rawdata lmi dlci0 auto0
16 # Also attach dlci 1023, as it needs both to try autoconfiguring.
17 # The Link management protocol is now alive and probing..
18 ngctl connect
${CARD}:rawdata
${CARD}:rawdata.dlci0 dlci1023 auto1023
20 # Attach the DLCI(channel) the Telco has assigned you to
21 # a node to hadle whatever protocol encapsulation your peer
22 # is using. In this case rfc1490 encapsulation.
23 ngctl 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.
29 ngctl 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
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