Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GNAP routes [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lpahdoco
n00b
n00b


Joined: 14 Oct 2005
Posts: 7

PostPosted: Fri Oct 14, 2005 5:13 pm    Post subject: GNAP routes [SOLVED] Reply with quote

I have a GNAP device w/5 NICs. It's a firewall-to-be. I'm having problems adding multiple route statements for the nics.

What I need to arrive at is this (subnets changed to protect the guilty and simplified to type less):

10.10.1.0/24 gw 10.10.1.5 eth1
10.10.2.0/24 gw 10.10.1.5 eth1
10.10.3.0/24 gw 10.10.3.2 eth2
10.10.4.0/24 gw 10.10.1.5 eth1
10.10.5.0/24 gw 10.10.3.2 eth2
and a few more.

What I can't seem to do is add multiple subnets to the same NIC. I'm using /etc/conf.d/net, with the entries formatted

iproute_eth1=("default via 10.10.1.5")
iproute_eth1=("10.10.2.0/24")
iproute_eth2=("10.10.4.0/24")

The result is the default route is correct, and the BOTTOM additional route statement is there. It just seems to skip the middle entry. I come from a RedHat/Fedora background, and there I would just use entries in the static-routes file. If there's an equivalent in iproute2 I'll be happy to use it. I don't mind reading documentation, but I can't seem to locate the right thing to read.

Any help appreciated.
LP
Back to top
View user's profile Send private message
lpahdoco
n00b
n00b


Joined: 14 Oct 2005
Posts: 7

PostPosted: Mon Oct 17, 2005 8:33 pm    Post subject: Reply with quote

It had to be formatted correctly in the /etc/conf.d/net file. Enough "try this restart" and I finally stumbled on it.

Code:

modules=( "iproute2" )
ipaddr_eth0=("192.168.100.2/24")
ipaddr_eth1=("aa.aa.aa.5/24")
iproute_eth1=("default via aa.aa.aa..1"
                "aa.aa.bb.0/24 via 0.0.0.0"
                "aa.aa.cc.0/24 via 0.0.0.0")
ipaddr_eth2=("192.168.1.254/24")
ipaddr_eth3=("aa.aa.dd.2/24")
ipaddr_eth4=("aa.aa.ee.210/24")
iproute_eth4=("default via aa.aa.ee.2")
iproute_eth4=("aa.aa.ff.0/24 via 0.0.0.0"
                "aa.aa.gg.0/24 via 0.0.0.0")


This put the correct subnets going out on the correct NICs, with our local subnets just hitting the wire instead of trying to route out through the gateways.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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