DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 1st July 2008
ebzzry ebzzry is offline
Port Guard
 
Join Date: Jul 2008
Posts: 37
Default Problems with multiple ISP connections

My gateway has three connections with the following
information summary:

ISP #1:
Connects to: DSL modem
Interface: vr0

/etc/rc.conf.isp1
Code:
...
defaultrouter="122.53.x.x"
ifconfig_vr0="DHCP"
ifconfig_vr1="inet 203.160.x.x/24"
ifconfig_fxp0="inet 192.168.0.1/24"
...
/etc/namedb/named.conf.isp1
Code:
...
forwarders {
    59.x.x.1;
    59.x.x.2;
};
...

ISP #2:
Connects to: DSL modem
Modem IP address: 192.168.1.1;
Interface: vr1

/etc/rc.conf.isp2
Code:
...
defaultrouter="203.160.x.x"
ifconfig_vr0="DHCP"
ifconfig_vr1="DHCP"
ifconfig_fxp0="inet 192.168.0.1/24"...
/etc/namedb/named.conf.isp2
Code:
...
forwarders {
    202.138.x.50;
    202.138.x.51;
};
...

/etc/resolv.conf contains
Code:
domain some.domain
nameserver 127.0.0.1
Where "N" in "ispN" is the number that denotes the connection
from above. Whenever I want to switch connections, I run a
script that basically does the following:

Code:
route delete default

ln -sf /etc/rc.conf.ispN /etc/rc.conf
ln -sf /etc/named/named.conf.ispN /etc/named/named.conf
ln -sf /etc/ipfw.rules.ispN /etc/ipfw.rules
cp -p /etc/resolv.conf.base /etc/resolv.conf

/etc/rc.d/natd restart
/etc/rc.d/routed restart
/etc/rc.d/named restart
/etc/rc.d/routing restart
/etc/rc.d/named restart

/etc/rc.d/dhclient stop

/etc/netstart

sh /etc/ipfw.rules

cp -p /etc/resolv.conf.base /etc/resolv.conf
Using ISP1 is fine, but when I switch to ISP2, I can't
get my internet connection to work? Where have I
erred?

ISP connection #2 gives IP addresses from 192.168.1.2
and onwards.

vr1 doesn't have an IP address associated with it
as shown by the `ifconfig' output after switching to ISP2.
I tried giving it an IP address by force, via

Code:
ifconfig vr1 inet 192.168.1.2/24
but this was the message that I got:

Code:
ifconfig: ioctl (SIOCAIFADDR): File exists
I tried removing the cable connection of connection #2 and plugged it
on a standalone FreeBSD installation with one NIC, and the connection
works.

I'm really stucked and I don't have a clue how to troubleshoot this.
Reply With Quote
 

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pf: Does pf have the ability to src-track created/established connections? gen2ly OpenBSD Security 3 27th February 2009 03:10 PM
Serial connections JMJ_coder General software and network 9 25th July 2008 03:28 PM
Multiple VPN rondynames OpenBSD General 5 24th July 2008 11:51 AM
More tcp connections tad1214 FreeBSD General 8 5th June 2008 03:05 PM
OpenVPN - Problem with connections MME General software and network 2 26th May 2008 06:42 PM


All times are GMT. The time now is 04:58 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick