Re: Question about inet addr and ppp0 addr?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue Apr 17 2001 at 15:50, "XingFei" wrote:

> Hi, all
> 
> Once I setup ppp connection,
> when I execute ifconfig
> I found there are two ip addresses under the ppp0
> one is inet : 61.x.x.x

Your local IP address, the address on your ppp0 interface.  When
local traffic comes out of your box, the address on that interface
becomes the source address of your outgoing network traffic, it is
the IP used to return traffic back to you.

> the other one is 211.y.y.y

That is the remote peer at the other end of the ppp0 link.

By default, that is also your default route gateway (if you didn't
already have one set when the ppp0 interface came up).

> I don't know which one is the real one assigned by my ISP
> because it seemed either one can work well by using ping

They are both ping'able, they both exist.

And they are both assigned by your ISP though the initial PPP
LCP/IPCP (link control protocol, IP control protocol) negotiation
process that sets up your network link.

> So, could anybody tell me, is there any difference between them?

Do this:
	/sbin/ifconfig
and this:
	netstat -rn

and see what you get.  Notice the IP addresses?

> BTW : when I setup ppp connection
> there are two options called Local IP and Remote IP
> how they can be used?

The local address is the address you are using when you surf the
internet.

  If you have a local network behind your dialup box, you have to
  masquerade for it, so that ALL traffic out of your ppp interface
  gets the same IP address, eg with ipchains:

  ipchains -I forward -i ppp+ -j MASQ

The remote address is the host at the other end of the ppp link
(only TWO hosts on a Point-to-Point link), and it is in your routing
table as the last entry - the default gateway, the "route of last
resort".

  Actually, you can do this:

  /sbin/route del default
  /sbin/route add default ppp0
 
  You'll get a default route with no gateway IP specified, but it is
  via the _interface_ so it will still work.

> Thanx in advance

You really need to read -- no, study -- the NET HOWTOs.  Your
questions are about very basic networking concepts.  The howtos are
very informative reading, you will learn a lot from them!  There are
others worth reading too, like the PPP howto.

> Sincerely

Enjoy!

Cheers
Tony
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux