Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
easy question... multiple network connections
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Raide
n00b
n00b


Joined: 13 Aug 2003
Posts: 27
Location: State College, PA

PostPosted: Fri Aug 22, 2003 7:00 pm    Post subject: easy question... multiple network connections Reply with quote

i'd like to be able to configure my laptop to use 2 different networks... cable modem at the house and the campus network if i manage to find an ethernet port at school. what's the easiest way to switch between the 2? i was thinking i could make a bash script to edit /etc/resolv.conf and run ifconfig and route... i havn't done much scripting before, but if i did this would it have to run as root?

is there an easier way to do this, or should I just go with the script?
Back to top
View user's profile Send private message
zerb
Tux's lil' helper
Tux's lil' helper


Joined: 07 Aug 2003
Posts: 145
Location: Germany

PostPosted: Fri Aug 22, 2003 7:44 pm    Post subject: Reply with quote

man dhcp
Back to top
View user's profile Send private message
Raide
n00b
n00b


Joined: 13 Aug 2003
Posts: 27
Location: State College, PA

PostPosted: Fri Aug 22, 2003 9:57 pm    Post subject: Reply with quote

hmm... i don't use dhcp, and don't have a manual entry for it. now that I think of it, though, I will probably need to use dhcp on the school network, although I plan to continue using a static ip on the house network because of port forwarding.
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Sat Aug 23, 2003 1:33 am    Post subject: Reply with quote

Check out
https://forums.gentoo.org/viewtopic.php?t=70373
https://forums.gentoo.org/viewtopic.php?t=68528
Back to top
View user's profile Send private message
fergus
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2003
Posts: 99

PostPosted: Sat Aug 23, 2003 12:36 pm    Post subject: Reply with quote

does anybody know if it is possible to alias an ethernet intface?

i.e.
Code:
# /etc/modules.conf
alias eth1 eth0


if that would work you could just use a new campus runlevel and switch over that eth1 network when you on campus...

i have no idea if aliasing ethernet interfaces is possible but if that works i don't think it would be to hard from there on out...

--
fergus
Back to top
View user's profile Send private message
bes_podPC
n00b
n00b


Joined: 30 Dec 2002
Posts: 2

PostPosted: Sat Aug 23, 2003 1:14 pm    Post subject: Reply with quote

Yes you can do some IP's on same interface
Code:

XXX root # ifconfig eth0     AAA.AAA.AAA.AAA netmask 255.255.255.0
XXX root # ifconfig eth0:1  BBB.BBB.BBB.BBB netmask 255.255.255.0
Back to top
View user's profile Send private message
cerb
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2002
Posts: 89

PostPosted: Sat Aug 23, 2003 2:46 pm    Post subject: Reply with quote

check out iproute2 and pbr
_________________
Linux is a wigwam - no Windows, no Gates, Apache inside :-)
Back to top
View user's profile Send private message
b0d0r
n00b
n00b


Joined: 04 Jan 2003
Posts: 30

PostPosted: Sat Aug 23, 2003 8:17 pm    Post subject: Reply with quote

Raide wrote:
hmm... i don't use dhcp, and don't have a manual entry for it. now that I think of it, though, I will probably need to use dhcp on the school network, although I plan to continue using a static ip on the house network because of port forwarding.


You can get a dhcp server to give you th same ip address time and time again if you specify it in dhcpd.conf

Code:

host foobar {
ethernet xx:xx:xx:xx:xx:xx
address yyy.yyy.yyy.yyy
}


or something along those lines. can't really check at the mo cos my gentoo server is in pieces... 8O
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum