Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Setting up a colo Gentoo router/gateway
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
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 117
Location: NL

PostPosted: Tue Jul 11, 2006 9:47 am    Post subject: [Solved] Setting up a colo Gentoo router/gateway Reply with quote

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
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Jul 11, 2006 3:24 pm    Post subject: Re: Setting up a colo Gentoo router/gateway Reply with quote

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
View user's profile Send private message
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 117
Location: NL

PostPosted: Tue Jul 11, 2006 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 117
Location: NL

PostPosted: Sun Jul 16, 2006 9:25 pm    Post subject: Reply with quote

Answer is here: https://forums.gentoo.org/viewtopic-t-479475-highlight-.html
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