View previous topic :: View next topic |
Author |
Message |
yarug Tux's lil' helper
Joined: 01 Dec 2004 Posts: 117 Location: NL
|
Posted: Tue Jul 11, 2006 9:47 am Post subject: [Solved] Setting up a colo Gentoo router/gateway |
|
|
Hi,
I want to setup a colocated Gentoo box as a router/gateway. The picture I have in mind is as follows:
Internet -> ROUTER/GW -> Switch -> Box(n)
That raises a few questions that I was hoping to get some feedback on:
1) The ISP requires the Internet network interface to be set to 100 Megabit full-duplex (NOT auto-negotiation). How would I do that?
2) How do I configure the network (eth0, eth1). If eth0 is the LAN side and eth1 is the Internet side? Right now I have in /etc/conf.d/net:
config_eth0=( "192.168.0.1 netmask 255.255.255.0 brd 192.168.0.255" )
config_eth1=( "<x.x.x>.129 netmask 255.255.255.240 brd <x.x.x>.143" )
Do I need to configure routes_eth0 and routes_eth1 as well?
3) Final question is how can I determine what eth0 and eth1 are physically? I mean I have one onboard ethernet connection and 2 more provided by an PCI card. Is the onboard interface always eth0?
Many thanks in advance,
Nes
Last edited by yarug on Sun Jul 16, 2006 9:25 pm; edited 1 time in total |
|
Back to top |
|
|
think4urs11 Bodhisattva
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Tue Jul 11, 2006 3:24 pm Post subject: Re: Setting up a colo Gentoo router/gateway |
|
|
yarug wrote: | 1) The ISP requires the Internet network interface to be set to 100 Megabit full-duplex (NOT auto-negotiation). How would I do that? |
mii-diag, mii-tool or ethtool can do that depending on your exact NIC (not all NICs are supported by all of them)
yarug wrote: | 2) How do I configure the network (eth0, eth1). If eth0 is the LAN side and eth1 is the Internet side? Right now I have in /etc/conf.d/net:
config_eth0=( "192.168.0.1 netmask 255.255.255.0 brd 192.168.0.255" )
config_eth1=( "<x.x.x>.129 netmask 255.255.255.240 brd <x.x.x>.143" )
Do I need to configure routes_eth0 and routes_eth1 as well? |
your default gateway should be set to the one delivered to you by your ISP.
If 'behind' eth0 only the network 192.168.0.0/24 is located you don't need to set a special route for that.
If there are other networks too you should add explicit routes for them.
yarug wrote: | 3) Final question is how can I determine what eth0 and eth1 are physically? I mean I have one onboard ethernet connection and 2 more provided by an PCI card. Is the onboard interface always eth0? |
You can influence this with udev rules (search the forums). It once was also possible by changing the order in which your kernel modules for the NICs are loaded; e.g. https://forums.gentoo.org/viewtopic-p-3420986.html#3420986 _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
|
yarug Tux's lil' helper
Joined: 01 Dec 2004 Posts: 117 Location: NL
|
Posted: Tue Jul 11, 2006 4:45 pm Post subject: |
|
|
Thank you for your answer. I have been digging around and it seems I can also set parameters when the NIC module gets loaded (with ethtool I would need to run it every time the machine boots?). I have an e1000 based network adapter (more specific Intel 82571EB Gigabit Ethernet Controller) that I autoload through /etc/modules.autoload.d/kernel-2.6. Does anyone know what parameters I need to set in order to set the card to 100 Megabit full-duplex and turn off auto negotiation. If I run modinfo -p e1000 it shows:
debug:Debug level (0=none,...,16=all)
InterruptThrottleRate:Interrupt Throttling Rate
RxAbsIntDelay:Receive Absolute Interrupt Delay
RxIntDelay:Receive Interrupt Delay
TxAbsIntDelay:Transmit Absolute Interrupt Delay
TxIntDelay:Transmit Interrupt Delay
XsumRX:Disable or enable Receive Checksum offload
FlowControl:Flow Control setting
AutoNeg:Advertised auto-negotiation setting
Duplex:Duplex setting
Speed:Speed setting
RxDescriptors:Number of receive descriptors
TxDescriptors:Number of transmit descriptors
What would be the syntax to set these parameters in /etc/modules.autoload.d/kernel-2.6?
EDIT: I have found the syntax, I think I need to do this:
alias eth1 e1000
options e1000 Speed=100 Duplex=2
But where should I set this?
Many thanks,
Nes |
|
Back to top |
|
|
yarug Tux's lil' helper
Joined: 01 Dec 2004 Posts: 117 Location: NL
|
|
Back to top |
|
|
|