LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-12-2007, 02:06 AM   #1
culin
Member
 
Registered: Sep 2006
Distribution: Fedora Core 10
Posts: 254

Rep: Reputation: 32
PPP server IP ???


Hi all ,
can anyone tell me how to determine the client IP and the server IP when i run PPP client on my PC..... does the ifconfig output gives both the client and server IP ?? if yes then how to extract the server IP and client IP from that output (say while coding) ???
thanks

Last edited by culin; 04-12-2007 at 02:08 AM.
 
Old 04-12-2007, 09:27 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
A clumsy but simple way is to do this:

Code:
if(system("/sbin/ifconfig ppp0 > somescratchfile"))
{
  ... put error handling code here ...
}
... and then look at that scratch file. The data you're looking for will be obvious in the output. It takes no sophisticated code to read it.

A tighter alternative is to use ioctl() instead of system().

Has that W. Richard Stevens book arrived at your bookseller yet? It will explain all this in detail.
 
Old 04-13-2007, 02:20 AM   #3
culin
Member
 
Registered: Sep 2006
Distribution: Fedora Core 10
Posts: 254

Original Poster
Rep: Reputation: 32
thanks for reply,
what i am doing is ifconfig -a which shows the all the interfaces that are up,
but the weired thing happening here is ... ifconfig -a shows the ppp0 link is up and packets goes on increasing with time....but it is not showing any IP address or anything even though the link is up !!!!! and i checked by coming out from the LAN and brought down all the interfaces.. even then it is not showing the ip address. .. i tried using ioctl() but it is showing IP address for the interface eth0 but not for ppp0 even though the link is up and it is showing one more interface sit0 what is that ???

Last edited by culin; 04-13-2007 at 02:24 AM.
 
Old 04-13-2007, 03:19 PM   #4
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
It would be a great idea to do five things.

Thing one: bring ppp up.

Thing two: do this ...

Code:
/sbin/ifconfig -a > file1.txt
Thing three: bring ppp down.

Thing four: do this ...

Code:
/sbin/ifconfig -a > file2.txt
Thing five: post in this thread the entire content of file1.txt and file2.txt.
 
Old 04-13-2007, 03:59 PM   #5
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi,

sit stands for "simple internet transition" and is basically a device
capable of encapsulating ipv6 in ipv4 datagrams.

regards,
Nirmal Tom.
 
Old 04-14-2007, 07:26 AM   #6
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
Thanks, Nirmal. I had no idea. I learn something new just about every day around here.

Now we get to sit back and wait for culin's response. (grin)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link linux ppp client to windows ppp server? cyz Linux - Networking 2 12-11-2008 05:01 AM
ppp client cannot browes internet while connecting in the ppp dialin server joel17 Linux - Networking 0 09-04-2006 01:38 AM
PPP Server Eal Debian 8 05-19-2005 01:22 AM
PPP Server d00msweek Linux - Newbie 1 06-27-2004 03:46 AM
PPP Server d00msweek Slackware 1 06-27-2004 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration