LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-12-2005, 01:34 PM   #1
Killbot_5000
LQ Newbie
 
Registered: Aug 2004
Location: Southern IL
Distribution: OpenSuSE 10.1
Posts: 24

Rep: Reputation: 15
Routing issues with multiple nics on ClarkConnect 2.2 (RedHat 9)


*** The following IPs are only examples, for security purposes. ***

I am new to route. Here is the set up, though:

Our local subnet is 10.20.0.0.

There are three VPN's-

VPN1 - Connects us with our other office, 10.20.0.0 is their subnet. This address is 10.20.3.50.

VPN2 - Connects us with another company, and all traffic heading to their network. They have 4 different subnets that they use. 192.168.1.0, 192.168.2.0, 192.168.3.0, and 192.168.4.0. The VPN is 10.20.3.51.

VPN3 - Connects us with yet another company on only one subnet. Their subnet is 10.5.15.0 and the VPN is 10.20.3.52.

The default gateway is 10.20.1.1.

The ClarkConnect box has two nics and is running in gateway mode.

Quote:
Public /------VPN1---------\
|------VPN2---------|
|------VPN3---------|
|_____Clark________/__________________Internal
Gateway------/ Connect
Now, the routing setup I currently have going is dragging the internet. I have determined it is the clark connect machine. Now, my current route script is VERY short, but I found another script online, and I have edited it for my own use.

Here is my routing table, and the commands I entered (I did nothing else besides this, and I'm sure now that this was wrong):

Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
65.XXX.XXX.45 * 255.255.255.224 U 0 0 0 eth0
10.5.15.0 10.20.3.52 255.255.255.0 UG 0 0 0 eth1
192.168.1.0 10.20.3.51 255.255.255.0 UG 0 0 0 eth1
192.168.2.0 10.20.3.51 255.255.255.0 UG 0 0 0 eth1
192.168.3.0 10.20.3.51 255.255.255.0 UG 0 0 0 eth1
192.168.4.0 10.20.3.51 255.255.255.0 UG 0 0 0 eth1
10.20.0.0 * 255.255.0.0 U 0 0 0 eth1
10.10.0.0 10.20.3.50 255.255.0.0 UG 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
65.0.0.0 * 255.0.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 65.XXX.XXX.44 0.0.0.0 UG 0 0 0 eth0

route add -net 10.10.0.0 netmask 255.255.0.0 gw 10.20.3.50 eth1
route add -net 10.5.15.0 netmask 255.255.255.0 gw 10.20.3.52 eth1
route add -net 65.0.0.0 netmask 255.0.0.0 eth0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 10.20.3.51 eth1
route add -net 192.168.2.0 netmask 255.255.255.0 gw 10.20.3.51 eth1
route add -net 192.168.3.0 netmask 255.255.255.0 gw 10.20.3.51 eth1
route add -net 192.168.4.0 netmask 255.255.255.0 gw 10.20.3.51 eth1
Here is the script I found online, that I have edited for my own use:

Quote:
#!/bin/bash

echo "Start Network Configuration..."

echo "Setting LAN variables..."

LANIP="10.20.3.99"
LANNET="10.20.0.0/32"
LANIF="eth1"

ATL_SUBNET="10.10.0.0"
ATL_MASK="255.255.0.0"
ATL_GW="10.20.3.50"

PRIME_SUBNET="10.5.15.0"
PRIME_MASK="255.255.255.0"
PRIME_GW="10.20.3.52"

PEGS_SUBNET1="192.168.1.0"
PEGS_SUBNET2="192.168.1.0"
PEGS_SUBNET3="192.168.1.0"
PEGS_SUBNET4="192.168.1.0"
PEGS_MASK="255.255.255.0"
PEGS_GW="10.20.1.5"

echo "Setting WAN variables..."

WANIP1="65.XXX.XXX.50"
WANNET1="65.XXX.XXX.43/30"
WANGW1="65.XXX.XXX.44"
WANIF1="eth0"

#No modifications after this line.

echo "Flushing tables..."
ip route flush cache
ip route flush all
ip route flush table 10
ip route flush table 11
ip route flush table 12

echo "Adding routes to default table..."
ip route add $WANNET1 dev $WANIF1 src $WANIP1
ip route add LANNET dev $LANIF src $LANIP
ip route add 127.0.0.0/8 dev lo src 127.0.0.1

echo "Adding 1st WAN ip rules..."
ip rule add from $WANNET1 lookup 11

echo "Adding routes to 1st WAN table..."
ip route add $LANNET dev $LANIF table 11
ip route add 0/0 via $WANGW1 table 11
ip route add -net $ATL_SUBNET netmask $ATL_MASK gw $ATL_GW $LANIF
ip route add -net $PRIME_SUBNET netmask $PRIME_MASK gw $PRIME_GW $LANIF
ip route add -net $PEGS_SUBNET1 netmask $PEGS_MASK gw 10.20.1.5 $LANIF
ip route add -net $PEGS_SUBNET2 netmask $PEGS_MASK gw 10.20.1.5 $LANIF
ip route add -net $PEGS_SUBNET3 netmask $PEGS_MASK gw 10.20.1.5 $LANIF
ip route add -net $PEGS_SUBNET4 netmask $PEGS_MASK gw 10.20.1.5 $LANIF


echo "Adding balanced default route..."
ip route add default equalize nexthop via $WANGW1 dev $WANIF1 weight 1
echo "Network Configuration: Done!"
I haven't tried the script yet. I didn't want to make matters worse.

And lastly, I want to specify virtual IPs, so a webserver behind the firewall would be on 65.XXX.XXX.48 and the ClarkConnect machine would forward any requests for that IP to another server.

I know that there are a lot of questions, but any help would be greatly appreciated.
 
Old 01-13-2005, 10:58 AM   #2
Killbot_5000
LQ Newbie
 
Registered: Aug 2004
Location: Southern IL
Distribution: OpenSuSE 10.1
Posts: 24

Original Poster
Rep: Reputation: 15
My routing issues are still ongoing, however I found how to do 1 to 1 NAT translation. You have to download the module, it doesn't come with CC.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel D845GLLY + Multiple Intel Pro 100 NICs + kernel 2.6.x = NICs don't work egable Linux - Hardware 0 02-04-2005 02:30 PM
Routing between 2 NICs Tinochelli Linux - Networking 4 12-09-2004 11:33 AM
routing/forwarding between multiple (3+) nics sublime Linux - Networking 2 07-26-2004 02:22 AM
Linux routing Issues with Redhat 9 louisb Linux - Networking 4 08-22-2003 07:57 PM
Routing with 3 nics _TK_ Linux - Networking 2 09-25-2001 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration