linda hanigan wrote:
> Linux Firewalls said to do the follwing so you
> can obtain the ip address. It should be in
> /etc/dhcpc/dhpcd-ppp0.info.
> if [ -n "$PUMP" ]; then
> echo -n "Determining IP information for $DEVICE..."
> if /sbin/dhcpcd; then
> echo " done."
> else
> echo " failed."
> exit 1
> fi
> However after I log on to the internet these do not exist.
> I know that my Ip dynamically assigns addresses. How
> does my machine know its address after conection.
> Help
> Linda Hanigan
>
Linda I gather from your earlier posts that you are using pppd to
connect to your isp (wasn't that you with the demand questions?)
Anyway, if this is the case I think you are getting confusedbetween the
dynamic allocation of an IP address during a ppp connection negotiation,
and dhcp which is used to setup a "real" (read non-point to point)
network interface like an ethernet card.
What I have done is add a script in /etc/ppp called ip-up
from the pppd man page:
ROUTING
When IPCP negotiation is completed successfully, pppd will
inform the kernel of the local and remote IP addresses for
the ppp interface. This is sufficient to create a host
route to the remote end of the link, which will enable the
peers to exchange IP packets. Communication with other
machines generally requires further modification to rout
ing tables and/or ARP (Address Resolution Protocol)
tables. In most cases the defaultroute and/or proxyarp
options are sufficient for this, but in some cases further
intervention is required. The /etc/ppp/ip-up script can
be used for this.
>From later on in the manpage under SCRIPTS
/etc/ppp/ip-up
A program or script which is executed when the link
is available for sending and receiving IP packets
(that is, IPCP has come up). It is executed with
the parameters
interface-name tty-device speed local-IP-address
remote-IP-address ipparam
You don't say what it is that you are wanting to do with the address but
you can write it out for later perusal set routes and firewall rules or
just call your firewall script since it probably has reference to a
specific device like ppp0.
You can also to the ifconfig ppp0|grep addr: |awk something deal to get
the ipaddress later if you don't want to do the /etc/ppp/ip-up deal. I
happen to think that using up-up is a much cleaner approach since it is
event driven and you can also clean up after the link goies down using
ip-down.
Now that you have gotten this far in the setup you might want to post a
specific question with your setup and I am sure someone here can help
you do what it is you want to do.
HTH
Bret
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list