ifconfig question

ifconfig question

Post by Michael Starki » Sun, 12 Sep 1999 04:00:00



    My default route is through my ehternet device ( eth0 ). When I want
to connect to a private network using ppp, I must bring down my ehternet
device so that my ppp device ( ppp0 ) is used as a default device.  Must
I do this?  I can't ping any IP address inside the private network until
I issue: "/sbin/ifconfig eth0 down".  After this I can ping any host
inside the private network.  The ehternet device is configured with a
dynamic IP address by DHCP as is the ppp device.  After I finish using
the private network by exiting ppp, I can't use the ethernet device by
simply issuing" "/sbin/ifconfig eth0 up" because this command does not
bind the original IP address that was once assigned to this device. How
to I reconfigure the eth0 device with the original IP address?
 
 
 

ifconfig question

Post by Clifford Ki » Sun, 12 Sep 1999 04:00:00



>     My default route is through my ehternet device ( eth0 ). When I want
> to connect to a private network using ppp, I must bring down my ehternet
> device so that my ppp device ( ppp0 ) is used as a default device.  Must
> I do this?  I can't ping any IP address inside the private network until

No, I think what you need to do is to remove the pppd defaultroute
option and use /etc/ppp/ip-up to create a network route for the private
network through the PPP interface.  For example if the private network
is 192.168.0.0/24 and the PPP interface is ppp0 then

/sbin/route add -net 192.168.0.0 netmask 255.255.255.0 ppp0

in /etc/ppp/ip-up configures a specific network route for the private
network through the ppp0 interface.  When the PPP interface is taken
down at the end of the connection then poof, the route disappears. You
get to keep the default route to the Internet at all times.

--

/* On occasion you'll run into an attidude on usenet.  They contribute
   nothing, but vitriolicly criticize those that do.  Instead of reasoned
   argument and facts they belittle, demean, and ridicule, relishing the
   replies that this generates.  Please do not feed the attidudes. */

 
 
 

ifconfig question

Post by grate » Sun, 12 Sep 1999 04:00:00


Don't bring your eth0 device down.  All you need to do is delete the default
route for eth0 and add the default route for ppp0 when you make your ppp
connection ( ppp ip-up scripts would be a good place ).  Then do the
opposite when you bring your ppp connection down ( ppp ip-down scripts ).
For example (add to /etc/ppp/ip-up.local if using RedHat distribution ):
    /sbin/route del default eth0
    /sbin/route add default ppp0
Then add the eth0 default route back:
    /sbin/route add default gw "ip address of your gateway"
You might try just adding the ppp0 route, but if I remember correctly, I had
to remove the eth0 default route.


Quote:>     My default route is through my ehternet device ( eth0 ). When I want
> to connect to a private network using ppp, I must bring down my ehternet
> device so that my ppp device ( ppp0 ) is used as a default device.  Must
> I do this?  I can't ping any IP address inside the private network until
> I issue: "/sbin/ifconfig eth0 down".  After this I can ping any host
> inside the private network.  The ehternet device is configured with a
> dynamic IP address by DHCP as is the ppp device.  After I finish using
> the private network by exiting ppp, I can't use the ethernet device by
> simply issuing" "/sbin/ifconfig eth0 up" because this command does not
> bind the original IP address that was once assigned to this device. How
> to I reconfigure the eth0 device with the original IP address?

 
 
 

ifconfig question

Post by Michael Starki » Sun, 12 Sep 1999 04:00:00




> >     My default route is through my ehternet device ( eth0 ). When I want
> > to connect to a private network using ppp, I must bring down my ehternet
> > device so that my ppp device ( ppp0 ) is used as a default device.  Must
> > I do this?  I can't ping any IP address inside the private network until

> No, I think what you need to do is to remove the pppd defaultroute
> option and use /etc/ppp/ip-up to create a network route for the private
> network through the PPP interface.  For example if the private network
> is 192.168.0.0/24 and the PPP interface is ppp0 then

> /sbin/route add -net 192.168.0.0 netmask 255.255.255.0 ppp0

What about domain name services? Right now I have two /etc/resolv.conf
files one for the internet and the other for the private network (
/etc/resolv.conf.default && /etc/resolv.conf.private ).  I manually copy the
appropriate file to /etc/resolv.conf before connection establishment. How can

I configure my DNS list to include all domain name servers in both networks
if I am to use both networks simultaneously?

 
 
 

ifconfig question

Post by David Crook » Mon, 13 Sep 1999 04:00:00



>     My default route is through my ehternet device ( eth0 ). When I want
> to connect to a private network using ppp, I must bring down my ehternet
> device so that my ppp device ( ppp0 ) is used as a default device.  Must
> I do this?  I can't ping any IP address inside the private network until
> I issue: "/sbin/ifconfig eth0 down".  After this I can ping any host
> inside the private network.  The ehternet device is configured with a
> dynamic IP address by DHCP as is the ppp device.  After I finish using
> the private network by exiting ppp, I can't use the ethernet device by
> simply issuing" "/sbin/ifconfig eth0 up" because this command does not
> bind the original IP address that was once assigned to this device. How
> to I reconfigure the eth0 device with the original IP address?

It shouldn't be necessary to take down the ethernet card - just make
sure there is an appropriate netmask and routing for the private network
set to use ppp0 and all will be well, and you can use both
simultaneously.

Dave
--
David Crooke, Austin TX, USA. +1 (512) 656 6102
"Open source software - with no walls and fences, who needs Windows
and Gates?"

 
 
 

ifconfig question

Post by Bernd Eckenfel » Mon, 13 Sep 1999 04:00:00



Quote:> What about domain name services? Right now I have two /etc/resolv.conf
> files one for the internet and the other for the private network (
> /etc/resolv.conf.default && /etc/resolv.conf.private ).  I manually copy the
> appropriate file to /etc/resolv.conf before connection establishment. How can
> I configure my DNS list to include all domain name servers in both networks
> if I am to use both networks simultaneously?

You can use a list in which u place both. But that wont work very well,
since it is random which nameserver is asked for which domain. You could do
3 things:

a) use a configurable resolver... there is one around, but dont ask me
where, search for something like "selective resolver".
b) use your own forwarding name server and configure it as a secondary to
your internal zone.
c) if you are onlien only use the internal nameserver as long as this one
is forwarding requests to the internet.

Greetings
Bernd

 
 
 

1. ifconfig question and DNS/DIG question

Hello,

Thanks for reading this posting!

I have two questions.

In slackware linux (not sure about other releases), typing ifconfig
without any switches displays your Network interfaces.  Among the output
of the command for each interface is; packets TX and packets RX.  I need
either one of two things.  I need to know how big a packet is?  How many
bytes, et cetera.  I don't think there is a way to do this however, I
have a feeling after some digging around that data packets can be of
varying size.  If this is the case, I need to know if there is a utility
that shows total transmitted bytes and received bytes since the
interface's been initialized/brought up.  We're having some problems
with our ISP regarding billing and our metered T1!  In AIX there's the
entstat command.  A command like this for Linux would be perfect!
Thanks.

Second, is anyone else running DNS/BIND having trouble getting an
updated list/keeping thier db.cache file current??  The HOWTO files on
DNS recommend running the following command:


I'm getting the following output:

res_nsend to server rs.internic.net  198.41.0.6: Connection timed out

I've ftp'd to thier site but am confused about which file to get!  A
friend of mine has a shell account at her school, I've tried this from
thier machine with the same results, so I don't think it's just me.
I've been using the above dig command in a script for more than a year
now.  Anyone know what's going on/an alternative?

Thanks!

--
John Emery
System Administrator

Sue Mills, Inc.
1840 Market Street
San Francisco, CA 94102

http://www.suemills.com

2. Reconna?tre une Carte X25 OST

3. ifconfig question!!! pls help

4. Using scp without password

5. ifconfig question

6. Z-shell (zsh) Frequently-Asked Questions

7. ifconfig question.

8. sony cdu31a cdrom

9. PLIP/ifconfig question

10. ifconfig question