# File: uplink
# SDL Communications, Inc. Linux driver startups
# The following file can be used as an guide for setting up your N2x card.
# You will have to tailor it to your needs depending on your card settings,
# protocol used (i.e. PPP or CISCO_HDLC), whether you have an N2 or N2csu,
# etc. 

echo Running uplink
# The following line is for four boards in one system PPP.
#insmod pppn2 io=0x220,0x250,0x240,0x2b0 bar=0xd0,0xc0,0xa0,0xe0 irq=5,11,10,15 clkmode=0,0,0,0,0,0,0,0 N2=31
# The following line activates 1 card in PPP mode.
insmod pppn2 io=0x300 bar=0xd0 irq=5 clkmode=0,0 N2=31
# The following line activates 1 card in CISCO_HDLC mode
#insmod ciscon2 io=0x300 bar=0xd0 irq=5 clkmode=0,0 N2=31
echo insmods done

# The following line configures the N2csu CSU port. You do not need this line
# if you do not have an N2csu (i.e. you have an N2 with no CSU port on-board)
#./n2csucfg ntwo1
#./n2csucfg ntwo3
#./n2csucfg ntwo5
#./n2csucfg ntwo7
echo n2csucfgs done

# Setup the routing for each port for PPP
# The following line sets up routing for the bottom V.35 port of the N2 or 
# N2csu card.
#pppd ntwo0 -am -vj -ac -pc  
#echo ntwo0 route added
# The following line sets up routing for the top port of the N2 or N2csu card.
pppd ntwo1 -am -vj -ac -pc  
echo ntwo1 route added
#pppd ntwo3 -am -vj -ac -pc  
#echo ntwo3 route added
#pppd ntwo5 -am -vj -ac -pc   
#echo ntwo5 route added
#pppd ntwo7 -am -vj -ac -pc
#echo ntwo7 route added

# Setup the routing for CISCO only
#ifconfig cisco0 192.1.1.3 pointopoint 1.1.1.2
#ifconfig cisco1 192.1.1.3 pointopoint 1.1.1.2
#ifconfig cisco2 192.1.1.3 pointopoint 1.1.1.2
#ifconfig cisco3 192.1.1.3 pointopoint 1.1.1.2
#ifconfig cisco4 192.1.1.3 pointopoint 1.1.1.2
#ifconfig cisco5 192.1.1.3 pointopoint 1.1.1.2
#ifconfig cisco6 192.1.1.3 pointopoint 1.1.1.2
#ifconfig cisco7 192.1.1.3 pointopoint 1.1.1.2

# If you are using CISCO, you must add the route as below before you can ping,
# unlike pppn2 (PPP) which automatically does this for you
#route add 1.1.1.2

echo Done

