View previous topic :: View next topic |
Author |
Message |
Raide n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/19495454743f985f4ea8a33.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
zerb Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/1459345814075239ebba9e.jpg)
Joined: 07 Aug 2003 Posts: 145 Location: Germany
|
Posted: Fri Aug 22, 2003 7:44 pm Post subject: |
|
|
man dhcp |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Raide n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/19495454743f985f4ea8a33.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
devon l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 23 Jun 2003 Posts: 943
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fergus Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/9420059474278b8227c3a7.png)
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 |
|
![](templates/gentoo/images/spacer.gif) |
bes_podPC n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
cerb Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
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 ![Smile :-)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
b0d0r n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/168138447742ac9fe2149d8.gif)
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... ![Shocked 8O](images/smiles/icon_eek.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|