[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 471
  • Last Modified:

Redhat 6.0 and ISDN

I need step by step instructions for setting up ISDN on RH 6.0 linux. I need the linux box to act as a gateway that will automatically dial up to the internet if it receives a packet for a target that is not located on the LAN and if there is no activity on the line for about 10 minutes or so, it will automatically hang up.

I have tried to get it to dial up to my isp with the ifup ppp0 cmd... but I don't receive the login? etc that is in the script provided by redhat. Instead I receive some pretty strange data which I strongly believe is because the modem has been set up wrong. The modem I have is the ZyXEL 2864I ISDN TA with a builtin 28.8kb/s and fax modem. I can connect by 28.8 but some of the fun is lost, when I have to wait approx 20-30 seconds to get online, instead of the 2 seconds max with ISDN.

I am pretty new to Linux, so I need basic instructions and commands laid out the exact way and in the exact order, that I will have to enter them in Linux. I have not installed the X11 system as the computer is too slow to handle it.

PS. This question is worth 1000 points and for that amount I expect a little more than just a reference to a homepage somewhere on the web. So if that is all you can provide, don't bother answering the question. (Unless of course, that you will provide an email or icq number where I can get in touch with you)

Thanks in advance
0
tflarsen
Asked:
tflarsen
  • 14
  • 12
  • 2
  • +3
1 Solution
 
tflarsenAuthor Commented:
Adjusted points to 1250
0
 
tflarsenAuthor Commented:
Here is a print of the var/logs/messages file (might be handy):

Nov 12 22:23:45 TFL_GATEWAY ifup-ppp: pppd started for ppp0 on /dev/ttyS0 at 115200
Nov 12 22:23:45 TFL_GATEWAY pppd[2189]: pppd 2.3.7 started by root, uid 0
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: abort on (BUSY)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: abort on (ERROR)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: abort on (NO CARRIER)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: abort on (NO DIALTONE)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: abort on (Invalid Login)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: abort on (Login incorrect)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: send (ATZATB40^M)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: expect (OK)
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: ATZATB40^M^M
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: OK
Nov 12 22:23:46 TFL_GATEWAY chat[2191]:  -- got it
Nov 12 22:23:46 TFL_GATEWAY chat[2191]: send (ATDTI16110^M)
Nov 12 22:23:47 TFL_GATEWAY chat[2191]: expect (CONNECT)
Nov 12 22:23:47 TFL_GATEWAY chat[2191]: ^M
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: ATDTI16110^M^M
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: CONNECT
Nov 12 22:23:48 TFL_GATEWAY chat[2191]:  -- got it
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: send (^M)
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: expect (ogin:)
Nov 12 22:23:48 TFL_GATEWAY chat[2191]:  460800/PPP  64000/NONE^M
Nov 12 22:23:58 TFL_GATEWAY chat[2191]: ~^EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Nov 12 22:23:58 TFL_GATEWAY chat[2191]: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Nov 12 22:23:58 TFL_GATEWAY chat[2191]: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Nov 12 22:23:58 TFL_GATEWAY chat[2191]: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEk,~^M
Nov 12 22:23:58 TFL_GATEWAY chat[2191]: NO CARRIER
Nov 12 22:23:58 TFL_GATEWAY chat[2191]:  -- failed
Nov 12 22:23:58 TFL_GATEWAY chat[2191]: Failed (NO CARRIER)
Nov 12 22:23:58 TFL_GATEWAY pppd[2189]: Connect script failed
Nov 12 22:23:59 TFL_GATEWAY pppd[2189]: Exit.
Nov 12 22:40:00 TFL_GATEWAY kernel: PPP: ppp line discipline successfully unregistered

There is one thing that puzzles me in this log, and that is the connection speed from the TA<->PC at 115200. I've asked it to connect at 460800 (115.2*4, as I have a Highspeed serial port) and that is the speed the TA reports correctly when it dials. Anyway, I hope this log file can be of some help.
0
 
rayc111299Commented:
tflarsen:  I am looking for the same awnser!  When you get it please let me know.  I have an external 3com ISDN and am having a horrible time getting it setup.  thanks, rayc@ind.cioe.com
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mwnCommented:
Well, I can help you with some of your question !

It seems that you have correctly setup your ISDN modem, but you can't logon to your ISP.

Try the PAP authentication instead of the normal "login" method.
0
 
tiwariCommented:
u may feel that i am one of the fools writing just a few lines for soooooo much points but to be very frank i dont have any idea of setting up ISDN modem and ISDN connection. BUT thru the messages u r getting i  understand that u please check that the connectins on the com2 port and between the modems and the ISDN line that r comming from the phone company are properly connected.
i have a feelling that they r not since u r getting message that of no dialtone and no carrier.
i have done some thing similar that is setting up lease line between two linux machines on a two wire lease line modem. the modem has a jumper"MULTITECH 2wire leased line modem" that converts it from dialup modem to lease line modem.
it just involves starting pppd on that port and proper configuration on the client's side ( i.e recieving side)
hope for the best
0
 
tflarsenAuthor Commented:
I have another machine running win2k and it connects with 64kb/s without any problems.

I've now done a few things to see if it would help any. I've downloaded the dial up program wvdial and used the same init strings in the conf file that win2k sends to the TA. The TA accepts all init strings and connects to the ISP. However, the data I'm getting is still the same garbage as before.

I'll try turning on PAP but I have a feeling that it won't solve my problems.

Anyway, it's not just connecting to the internet, it is also configuring linux so I can use it as a gateway, ie installing ip masqerade (which I have no idea of how to do).
0
 
tflarsenAuthor Commented:
Btw, I never intended to call anyone  a fool, but I'm kind of desperate to get it working.
0
 
tflarsenAuthor Commented:
Btw, I never intended to call anyone  a fool, but I'm kind of desperate to get it working.
0
 
tflarsenAuthor Commented:
Adjusted points to 1500
0
 
rwenzlaCommented:
The firewall and masquerade I can help you with.

You need to have a kernel with IP forwarding and IP Masquerading set on.  You can tell if you have one by looking for /proc/sys/net/ipv4/ip_masq_debug and ip_forward.  If they exeist, your kernels ready.  I think a lot of the newer distribs come with it on, so I'll skip that part (though if you need it, I'll talk you through it later).

You need the ipchains package.  If you don't have it get it from http://rufus.w3.org/linux/.

add the following to /etc/rc.d/rc.local (at the end is fine):

/sbin/ipchains -F
/sbin/ipchaind -P forward DENY
/sbin/ipchains -A forward -i ppp0 -J MASQ
echo 1 > /proc/sys/net/ipv4/ip_forvard

There are some special modules in /lib/modules/2.2.x/ipv4
they have names like ip_masq_ftp.  If you need any of the protocols listed by those files, add the following after the above (adding add'l lines for each protocol):

/sbin/depmod -a
/sbin/modprob ip_masq_ftp (or whatever)

Configure all your other machines with a local net IP adderss (192.168.1.XX is typical), athe appropriate netmask for that net (in this case 255.255.255.0), your ISP's DNS IP's, and list this machines ethernet IP adderss as the default gateway on your other machines.  List your ISP default GW as the Default GW on this machine (you need to do that anyway or your local Internet (on the linux box) access wouldn't work. If they are windows boxes, use the properties page od "network Neighborhood" to set these, if Linux, use "netcfg".

Now packets sent to the internet from your other machines, should be masqueraded.  To the Internet, the requests will look like they came from your masquerading server, but internally they will get routed correctly on the local net.
0
 
rwenzlaCommented:
the second "ipchaind" command is a typo.  You'd probably catch that.  Should be "ipchains" like the others.
0
 
rwenzlaCommented:
and there should be a "/RPM" on the end of the URL.

I need a professional editor tonignt.
0
 
rwenzlaCommented:
I agree with mwn on the PAP.

You are dialing and connecting, but waiting for a
"ogin:" that never comes.
0
 
tflarsenAuthor Commented:
I think I've figured out what my dial up problem is. The dialer waits for a carrier signal which it never receives, as my TA doesn't use it. However, I can't figure out where to disable the carrier detection. Wvdial (worldvisions dialer) has a Carrier Check option that I can turn off, but the program is pretty much ignorant to that setting. It still waits for the carrier signal.

I edited the /etc/ppp/pap-secrets and put the same info in linuxconf under the ppp0 device. But little does it work, when the carrier problem keeps getting in the way.
0
 
rwenzlaCommented:
I don't know about that one.  Looking at the logs,

Nov 12 22:23:48 TFL_GATEWAY chat[2191]: ATDTI16110^M^M
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: CONNECT
Nov 12 22:23:48 TFL_GATEWAY chat[2191]:  -- got it
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: send (^M)
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: expect (ogin:)
Nov 12 22:23:48 TFL_GATEWAY chat[2191]:  460800/PPP64000/NONE^M
Nov 12 22:23:58 TFL_GATEWAY chat[2191]:
~^EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

You were expecting the TA to say "CONNECT" and it did.
You then expected the [ISP thru the] TA to say "ogin:"
it never did.  The dialer got tired of waiting and quit.

Did you try PAP?  If so, post those logs.
0
 
tflarsenAuthor Commented:
Where do I find the log of PAP? I don't think I've ever seen that, not that I've been a user of linux for so long.

Sorry for being such a bonehead but linux is definately a bit tougher to learn than NT.
0
 
rwenzlaCommented:
I don't know about that one.  Looking at the logs,

Nov 12 22:23:48 TFL_GATEWAY chat[2191]: ATDTI16110^M^M
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: CONNECT
Nov 12 22:23:48 TFL_GATEWAY chat[2191]:  -- got it
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: send (^M)
Nov 12 22:23:48 TFL_GATEWAY chat[2191]: expect (ogin:)
Nov 12 22:23:48 TFL_GATEWAY chat[2191]:  460800/PPP64000/NONE^M
Nov 12 22:23:58 TFL_GATEWAY chat[2191]:
~^EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

You were expecting the TA to say "CONNECT" and it did.
You then expected the [ISP thru the] TA to say "ogin:"
it never did.  The dialer got tired of waiting and quit.

Did you try PAP?  If so, post those logs.
0
 
tflarsenAuthor Commented:
I guess what I'm trying to say is:

1. How do I enable PAP. I've edited the pap-secrets file to have an entry like this:
my-username * my-passwd
and then I have setup ppp0 to use my-username and my password in the linuxconf. Is that enough or do I have to do more? The other dial program I've tried (explained in a previous comment), waits for a carrier (which it never gets) so that doesn't work either.

2. Is there a log of the PAP exchange or is that also in the /var/log/messages file?
0
 
rwenzlaCommented:
Post the same logs not that PAP is used instead of standard login.

I think pppd can detect PAP automatically.  But in your case it doesn't get the chance cause it's waiting for "ogin:".

Edit the dialing script, its in /etc/ppp. I don't know what yours is called, but it probably has "chat" in it somewhere. Change the EXPECT "ogin:" line to EXPECT "NONE"  They arent labled in most chat scripts.  The first entry on a line is the EXPECT string the second id the SEND string.

My chat script looks like (Without the comments):

ABORT "NO CARIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "BUSY"
ABORT "NO ANSWER"              
"" "atz"                 #Expect nothing, send atz
"" "atz"                 #My modem's funky, so I do it 2x
"OK" "atdt5551234"       # Expect "OK" send the dial string
"CONNECT" ""             # Expect "CONNECT" send nothing.

pppd takes it from here.  Note that the "CONNECT" comes from the modem (your case TA) not the ISP.  But you know your ISP sends a string with "NONE" at the end.

It looks like your script ends with

"ogin:" $USERNAME
"assword: $USERPASS
">" "ppp^M"  

Which is how some ISP start their PPP connections.
But PAP doesn't require this.  It gets the User/Paswd
from the pap-secrets file, and follows a standard protocol to do the ID.  After the ID is OK, the PPP conection should be up.  You may have different commands for your TA, but I think you should be able to see how to set it up from this.
0
 
rwenzlaCommented:
(Our posts crossed)If you're using linuxconf, You need to put your username/password in the PPP screen, but take the EXPECT: "ogin" out of the communications screen. (and everything after that).  It won't start the PAP protocol until after communications is set up, which waits forever for a string that isn't comming.

This is exactly what I told you to do before, just with a GUI.
0
 
tflarsenAuthor Commented:
Well, well, now something else happened. I actually got connected but unfortunately only for about 30 seconds. Here is the new log (at least the part of it concerning PPP):

Nov 15 22:18:52 TFL_GATEWAY ifup-ppp: pppd started for ppp0 on /dev/ttyS0 at 115
200
Nov 15 22:18:53 TFL_GATEWAY pppd[1213]: pppd 2.3.7 started by root, uid 0
Nov 15 22:18:54 TFL_GATEWAY chat[1215]: abort on (BUSY)
Nov 15 22:18:54 TFL_GATEWAY chat[1215]: abort on (ERROR)
Nov 15 22:18:54 TFL_GATEWAY chat[1215]: abort on (NO CARRIER)
Nov 15 22:18:54 TFL_GATEWAY chat[1215]: abort on (NO DIALTONE)
Nov 15 22:18:54 TFL_GATEWAY chat[1215]: abort on (Invalid Login)
Nov 15 22:18:54 TFL_GATEWAY chat[1215]: abort on (Login incorrect)
Nov 15 22:18:54 TFL_GATEWAY chat[1215]: send (ATZAT&FZE0X7V1&D2&C1S0=0S38.3=1&L1
S48.2=1S84.4=1S7=60S50=0L1M1&K0&K4&K44&H3B0B40&O2&J0&E0^M)
Nov 15 22:18:55 TFL_GATEWAY chat[1215]: expect (OK)
Nov 15 22:18:55 TFL_GATEWAY chat[1215]: ^M
Nov 15 22:18:55 TFL_GATEWAY chat[1215]: OK
Nov 15 22:18:56 TFL_GATEWAY chat[1215]:  -- got it
Nov 15 22:18:56 TFL_GATEWAY chat[1215]: send (ATDT16110^M)
Nov 15 22:18:56 TFL_GATEWAY chat[1215]: expect (CONNECT)
Nov 15 22:18:56 TFL_GATEWAY chat[1215]: ^M
Nov 15 22:18:57 TFL_GATEWAY chat[1215]: ^M
Nov 15 22:18:57 TFL_GATEWAY chat[1215]: CONNECT
Nov 15 22:18:57 TFL_GATEWAY chat[1215]:  -- got it
Nov 15 22:18:57 TFL_GATEWAY chat[1215]: send (^M)
Nov 15 22:18:57 TFL_GATEWAY chat[1215]: expect (NONE)
Nov 15 22:18:57 TFL_GATEWAY chat[1215]:  64000/NONE
Nov 15 22:18:57 TFL_GATEWAY chat[1215]:  -- got it
Nov 15 22:18:57 TFL_GATEWAY chat[1215]: send (^M)
Nov 15 22:18:57 TFL_GATEWAY pppd[1213]: Serial connection established.
Nov 15 22:18:57 TFL_GATEWAY pppd[1213]: Using interface ppp0
Nov 15 22:18:57 TFL_GATEWAY pppd[1213]: Connect: ppp0 <--> /dev/ttyS0
Nov 15 22:18:58 TFL_GATEWAY pppd[1213]: Received bad configure-ack:  01 04 05 dc
 02 06 00 00 00 00 05 06 7a 52 f7 73
Nov 15 22:19:25 TFL_GATEWAY last message repeated 9 times
Nov 15 22:19:28 TFL_GATEWAY pppd[1213]: LCP: timeout sending Config-Requests
Nov 15 22:19:28 TFL_GATEWAY pppd[1213]: Connection terminated.
Nov 15 22:19:28 TFL_GATEWAY pppd[1213]: Connect time 0.6 minutes.
Nov 15 22:19:29 TFL_GATEWAY pppd[1213]: Exit.


I know the initialization string seems a little harsh and I probably could cut it down a little, but it's the exact same as Windblows 2k uses, and the TA accepts it without errors. I don't know if I'm missing something in the init string since my TA and the one at the ISP can't negotiate a protocol to use (At least that's what I think is wrong with it)

I've asked my isp if they could help me with this, but the only answer I got from them was: "Sorry, but we don't support Linux."
0
 
rwenzlaCommented:
Well, now you're to the ppp config.  From the PPP screen of linuxconf, you need to add the correct options.  Probable ones to try are

noauth
passive
nocomp
novj
novjcomp

Add them one at a time (separated by whitespace), I've sorted them in the most probable way I could think.

Since your ISP won't support linux, you could ask them specific questions about which ppp options they support.
0
 
rwenzlaCommented:
look at "man pppd" for other options to try.
0
 
tflarsenAuthor Commented:
Hmm, it seems like my primary isp asks it's users to accept any password authorization (clear text as well). I never got it to work even when I put in the ppp options. Anyway, a clever fox always has 2 or more entrances to it's den, so I have 3 ISPs for my entrance to the internet. I tried one of the other ISPs and first time it connected without any problems apart from some modules linux couldn't find (data compression modules). Not too important at this time, but of course I want to get those modules at some point in time.

Anyway, I got it connected to the internet, but of course my problems aren't over yet.

I've tried to ping most any address I could think of on the internet, both Danish and American hosts, but to no evail. I checked the routing table and it seems pretty f*cked up. Here it is:

Kernel IP routing table
Destination    Gateway      Genmask    Flags   Metric Ref   Use Iface
212.54.64.106    *           255.255.255.255 UH    0    0    0 ppp0
192.168.52.0     *          255.255.255.0   U     0    0    0 eth0
127.0.0.0        *          255.0.0.0       U     0    0    0 lo
default         212.54.64.106   0.0.0.0         UG    0    0    0 ppp0

I "accidently" deleted the route for my normal LAN traffic as I thought maybe if I deleted that, it would instead be routed through the default route. So I would be extremely happy, if you could tell me how to get my 192.168.52.2 255.255.255.0(/255??) back in the table and correctly setup the default route.

(I did figure out where to put the DNS server configuration, but when I try to ping, it just sits there, probably because of the routing table)

Thanks for all your help so far, you have already done more than enough to earn the points this question is worth :o)
0
 
rwenzlaCommented:
The routing table looks OK to me.  The route 192.168.52.0
should catch all your local traffic and route it to eth0.
The only reason you should need a route for 192.168.52.2 netmask 255.255.255.255 is if it went somewhere other than eth0 (a single interface should have a netmask of 255.255.255.255.  Where ever there are binary 1's in the NM, the IP must match.  For a Single IP, all digits must match.  For an entire class C network, the first three octets must match, thus it gets 255.255.255.0.)

Are you pinging by hostname or IP number.  Find a known good IP number and ping that.  It will resolve whether it's a routing or DNS problem.

if "ping That.Host.Net" fails,
but "ping xxx.xxx.rrr.fff" suceeds, where
xxx.xxx.rrr.fff is the IP address for That.Host.Net, its a DNS problem.

The "noauth" should take care of the ISP authorization problem.  Most ISP's don't bother to give authorization to
the user, since they called them, it's pretty sure the ISP
is who the user thinks it is.  Check the /etc/ppp/options file.  If the "auth" optin is in there, a command line "noauth" may not work.  Also try the option "login".

0
 
rwenzlaCommented:
If you need it, you can add the route to he localhost
from "netcfg".  Click the routiing button and "Add".

device = eth0
network= 192.168.52.1
netmask= 255.255.255.255
gateway= [blank]

Or from the command line -

route add -host 192.168.52.1 netmask 255.255.255.255 eth0
0
 
stardrakeCommented:
Call your ISP and ask them what type of authentication they use for PPP over ISDN. They should use either PAP/CHAP/MS-CHAP  this part has nothing to do with Linux specifically, so they should at least be able to answer this.  After you know this answer you will know which road to follow in solving.  I know from my past experiences that you will not see a ogin: from an ISDN connection, while analog calls to the same number would produce one.  I assume it is how their authentication is configured and since analog supports authentication differently, you have different "prompts".  I think after you get this worked out, you will be good to go.  Good luck.

   --- Joel
0
 
tflarsenAuthor Commented:
The DNS works (extremely SLOW!!!) but I can't ping anything on the internet. If I do a traceroute it will reply with just one jump which is my default gateway on the LAN (a novell server running as an IP bridge). So I would still say that something is rotten in my routing table.

The ISP issue is more or less worked out, I've been thinking about ditching my primary ISP as they have next to no service at all, and they are pretty expensive on top of that (paying per minute in this country). So I'll just the one that now works.
0
 
stardrakeCommented:
Are all boxes using the Novell box as the gateway? Can the Novell box ping IPs on the internet? What box is supplying DNS?
Also, when you setup your eth0, make sure it does not have a default gateway.  This could be causing the conflict and not show up in your routing tables.  Try that and see.  I'm assuming that on the inside you will never need to get anywhere but the 192.168.52.0/24 subnet anyway in which case you would never need a default gateway on eth0.

   --- Joel
0
 
tflarsenAuthor Commented:
The two segments are: 192.168.51.xx and 192.168.52.xx with netmasks: 255.255.255.000.
The windoze box sits on the 192.168.51.xx segment and points to the novell server (192.168.51.100) as the default gateway. linux box points to 192.168.52.100 in the def gw. The novell server has two nics each pointing to the other in the gw section.

But I think I'll change it so the windoze machine will become an IPX bridge. (I have a laptop that only has a 10 mbit/s nic, that NEEDS to have access to both the internet and the nw server, but IPX will do for the nw link)

That ought to work. I know my network seems a bit complicated, but it really isn't so bad. There are actually only 4 computers.
0
 
tflarsenAuthor Commented:
I will try changing the setups tomorrow, right now it's 10:30pm here and I had a very busy day at work, where everything that could go wrong, did just that.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 14
  • 12
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now