View previous topic :: View next topic |
Author |
Message |
Raide n00b
Joined: 13 Aug 2003 Posts: 27 Location: State College, PA
|
Posted: Fri Aug 22, 2003 7:00 pm Post subject: easy question... multiple network connections |
|
|
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 |
|
|
zerb Tux's lil' helper
Joined: 07 Aug 2003 Posts: 145 Location: Germany
|
Posted: Fri Aug 22, 2003 7:44 pm Post subject: |
|
|
man dhcp |
|
Back to top |
|
|
Raide n00b
Joined: 13 Aug 2003 Posts: 27 Location: State College, PA
|
Posted: Fri Aug 22, 2003 9:57 pm Post subject: |
|
|
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 |
|
|
devon l33t
Joined: 23 Jun 2003 Posts: 943
|
|
Back to top |
|
|
fergus Tux's lil' helper
Joined: 12 Feb 2003 Posts: 99
|
Posted: Sat Aug 23, 2003 12:36 pm Post subject: |
|
|
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 |
|
|
bes_podPC n00b
Joined: 30 Dec 2002 Posts: 2
|
Posted: Sat Aug 23, 2003 1:14 pm Post subject: |
|
|
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 |
|
|
cerb Tux's lil' helper
Joined: 28 Jun 2002 Posts: 89
|
Posted: Sat Aug 23, 2003 2:46 pm Post subject: |
|
|
check out iproute2 and pbr _________________ Linux is a wigwam - no Windows, no Gates, Apache inside |
|
Back to top |
|
|
b0d0r n00b
Joined: 04 Jan 2003 Posts: 30
|
Posted: Sat Aug 23, 2003 8:17 pm Post subject: |
|
|
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... |
|
Back to top |
|
|
|