Re: IP Routing Question

2006-02-15 Thread Steve Douville
Well, the solution ended up just setting up the rule for the subnet, not the 
host...
route add aaa.bbb.ccc.200/29 aaa.bbb.ccc.200 -interface

Had to move some IP addresses, but at least the traffic is going to the 
right ethernet controller now.

Thanks for the help!
- Original Message - 
From: Drew Tomlinson [EMAIL PROTECTED]
To: Steve Douville [EMAIL PROTECTED]
Cc: FreeBSD Questions freebsd-questions@freebsd.org
Sent: Tuesday, February 14, 2006 2:57 PM
Subject: Re: IP Routing Question


On 2/14/2006 11:43 AM Steve Douville wrote:
 By default, it sets the netif to em0


OK, then what about 'route add -host aaa.bbb.ccc.209 aaa.bbb.ccc.200'?
And if that doesn't work, can I please see 'netstat -rn'?  You can
obfuscate the IPs if you wish.

Cheers,

Drew

 - Original Message - 
 From: Drew Tomlinson [EMAIL PROTECTED]
 To: Steve Douville [EMAIL PROTECTED]
 Cc: FreeBSD Questions freebsd-questions@freebsd.org
 Sent: Tuesday, February 14, 2006 2:40 PM
 Subject: Re: IP Routing Question


 On 2/14/2006 11:17 AM Steve Douville wrote:

 Weird stuff...
 route add -host aaa.bbb.ccc.209 aaa.bbb.ccc.196 -ifp em1



 What happens if you leave off the -ifp em1?

 Cheers,

 Drew


 doesn't work even if i've already set
 aaa.bbb.ccc.196   link#2  em1

 The only way things work well is if the gateway is set to link#2. The 
 only
 way I can set it to link#2 is if the address was accessed, 
 unsuccessfully,
 creating a record with link#1 as the gateway and then issuing a route
 change
 command to move it to link#2.

 it'd be much easier if i could just type
 route add -host aaa.bbb.ccc.xxx link#2 -ifp em1
 but it doesn't recognize link#2 as a valid address, even though it uses 
 it
 in the table by default!!

 Haven't tried the ipfilter yet. Maybe i'll give that a whirl, too.
 - Original Message - 
 From: Drew Tomlinson [EMAIL PROTECTED]
 To: Steve Douville [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Sent: Tuesday, February 14, 2006 1:45 PM
 Subject: Re: IP Routing Question



 What happens with a simple 'route add certain ip address
 aaa.bbb.ccc.196?  Or am I misinterpreting what you wish to achieve?

 HTH,

 Drew

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


IP Routing Question

2006-02-14 Thread Steve Douville
I'm trying to set up the routing table to force requests to certain IP 
addresses to use a particular ethernet card. I've used the route command in a 
number of ways, but still can't come up with how to force to use em1 instead of 
em0, with the right gateway.

em0 is aaa.bbb.ccc.207
em1 is aaa.bbb.ccc.200
Both have netmask of 255.255.255.0
em0 goes to the main port, gateway aaa.bbb.ccc.195. em1 goes to a switch, which 
is aaa.bbb.ccc.196, the gateway to other ip's on the switch.

What I want to end up with is:
aaa.bbb.ccc.196link#2em1
aaa.bbb.ccc.209link#2em1

I've tried lots of combinations, using the -ifp flag to force em1, but the only 
way I can get the gateway to say link#2 is to ping the ip first, whereas it 
gets put in the table even though it's not found, and then doing a route 
change. I need some way to put this in rc.local so that it's set up when booted.

Any ideas? Let me know if more info is needed.

TIA,
Steve

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IP Routing Question

2006-02-14 Thread Goran Gajic



Hi,


You can try using ipf filter to impose source-policy routing:

cat  ipf.example
pass in quick on em1 to em1:192.168.1.2 from 10.1.0.0/16 to  a.b.c.d/32
^d
ipf -f ipf.example

This way you will re-route all packets coming from source 10.1/16 to 
destination a.b.c.d to go to address 192.168.1.2 not to a.b.c.d
Note that you have to rebuild your kernel in order to have options 
IPFILTER enabled.


Regards,
gg.



I'm trying to set up the routing table to force requests to certain IP 
addresses to use a particular ethernet card. I've used the route command 
in a number of
ways, but still can't come up with how to force to use em1 instead of 
em0, 
with the right gateway.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: IP Routing Question

2006-02-14 Thread fbsd_user
You are not correct in that last statement.

ipfilter does not have to be compiled into kernel to work.
You should read the handbook ipfilter firewall section where
it clearly states that is not necessary and tells you how to do it.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Goran Gajic
Sent: Tuesday, February 14, 2006 9:44 AM
To: [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Subject: Re: IP Routing Question




Hi,


You can try using ipf filter to impose source-policy routing:

cat  ipf.example
pass in quick on em1 to em1:192.168.1.2 from 10.1.0.0/16 to
a.b.c.d/32
^d
ipf -f ipf.example

This way you will re-route all packets coming from source 10.1/16 to
destination a.b.c.d to go to address 192.168.1.2 not to a.b.c.d
Note that you have to rebuild your kernel in order to have options
IPFILTER enabled.

Regards,
gg.



I'm trying to set up the routing table to force requests to certain
IP
addresses to use a particular ethernet card. I've used the route
command
in a number of
ways, but still can't come up with how to force to use em1 instead
of
em0,
with the right gateway.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
[EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IP Routing Question

2006-02-14 Thread Drew Tomlinson

On 2/14/2006 5:44 AM Steve Douville wrote:

I'm trying to set up the routing table to force requests to certain IP 
addresses to use a particular ethernet card. I've used the route command in a 
number of ways, but still can't come up with how to force to use em1 instead of 
em0, with the right gateway.

em0 is aaa.bbb.ccc.207
em1 is aaa.bbb.ccc.200
Both have netmask of 255.255.255.0
em0 goes to the main port, gateway aaa.bbb.ccc.195. em1 goes to a switch, which 
is aaa.bbb.ccc.196, the gateway to other ip's on the switch.

What I want to end up with is:
aaa.bbb.ccc.196link#2em1
aaa.bbb.ccc.209link#2em1

I've tried lots of combinations, using the -ifp flag to force em1, but the only 
way I can get the gateway to say link#2 is to ping the ip first, whereas it 
gets put in the table even though it's not found, and then doing a route 
change. I need some way to put this in rc.local so that it's set up when booted.
  


What happens with a simple 'route add certain ip address 
aaa.bbb.ccc.196?  Or am I misinterpreting what you wish to achieve?


HTH,

Drew

--
Visit The Alchemist's Warehouse
Magic Tricks, DVDs, Videos, Books,  More!

http://www.alchemistswarehouse.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IP Routing Question

2006-02-14 Thread Drew Tomlinson

On 2/14/2006 11:17 AM Steve Douville wrote:

Weird stuff...
route add -host aaa.bbb.ccc.209 aaa.bbb.ccc.196 -ifp em1
  


What happens if you leave off the -ifp em1?

Cheers,

Drew


doesn't work even if i've already set
aaa.bbb.ccc.196   link#2  em1

The only way things work well is if the gateway is set to link#2. The only 
way I can set it to link#2 is if the address was accessed, unsuccessfully, 
creating a record with link#1 as the gateway and then issuing a route change 
command to move it to link#2.


it'd be much easier if i could just type
route add -host aaa.bbb.ccc.xxx link#2 -ifp em1
but it doesn't recognize link#2 as a valid address, even though it uses it 
in the table by default!!


Haven't tried the ipfilter yet. Maybe i'll give that a whirl, too.
- Original Message - 
From: Drew Tomlinson [EMAIL PROTECTED]

To: Steve Douville [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Sent: Tuesday, February 14, 2006 1:45 PM
Subject: Re: IP Routing Question



What happens with a simple 'route add certain ip address
aaa.bbb.ccc.196?  Or am I misinterpreting what you wish to achieve?

HTH,

Drew

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IP Routing Question

2006-02-14 Thread Steve Douville
By default, it sets the netif to em0
- Original Message - 
From: Drew Tomlinson [EMAIL PROTECTED]
To: Steve Douville [EMAIL PROTECTED]
Cc: FreeBSD Questions freebsd-questions@freebsd.org
Sent: Tuesday, February 14, 2006 2:40 PM
Subject: Re: IP Routing Question


On 2/14/2006 11:17 AM Steve Douville wrote:
 Weird stuff...
 route add -host aaa.bbb.ccc.209 aaa.bbb.ccc.196 -ifp em1


What happens if you leave off the -ifp em1?

Cheers,

Drew

 doesn't work even if i've already set
 aaa.bbb.ccc.196   link#2  em1

 The only way things work well is if the gateway is set to link#2. The only
 way I can set it to link#2 is if the address was accessed, unsuccessfully,
 creating a record with link#1 as the gateway and then issuing a route 
 change
 command to move it to link#2.

 it'd be much easier if i could just type
 route add -host aaa.bbb.ccc.xxx link#2 -ifp em1
 but it doesn't recognize link#2 as a valid address, even though it uses it
 in the table by default!!

 Haven't tried the ipfilter yet. Maybe i'll give that a whirl, too.
 - Original Message - 
 From: Drew Tomlinson [EMAIL PROTECTED]
 To: Steve Douville [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Sent: Tuesday, February 14, 2006 1:45 PM
 Subject: Re: IP Routing Question



 What happens with a simple 'route add certain ip address
 aaa.bbb.ccc.196?  Or am I misinterpreting what you wish to achieve?

 HTH,

 Drew



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IP Routing Question

2006-02-14 Thread Drew Tomlinson

On 2/14/2006 11:43 AM Steve Douville wrote:

By default, it sets the netif to em0
  


OK, then what about 'route add -host aaa.bbb.ccc.209 aaa.bbb.ccc.200'?  
And if that doesn't work, can I please see 'netstat -rn'?  You can 
obfuscate the IPs if you wish.


Cheers,

Drew

- Original Message - 
From: Drew Tomlinson [EMAIL PROTECTED]

To: Steve Douville [EMAIL PROTECTED]
Cc: FreeBSD Questions freebsd-questions@freebsd.org
Sent: Tuesday, February 14, 2006 2:40 PM
Subject: Re: IP Routing Question


On 2/14/2006 11:17 AM Steve Douville wrote:
  

Weird stuff...
route add -host aaa.bbb.ccc.209 aaa.bbb.ccc.196 -ifp em1




What happens if you leave off the -ifp em1?

Cheers,

Drew

  

doesn't work even if i've already set
aaa.bbb.ccc.196   link#2  em1

The only way things work well is if the gateway is set to link#2. The only
way I can set it to link#2 is if the address was accessed, unsuccessfully,
creating a record with link#1 as the gateway and then issuing a route 
change

command to move it to link#2.

it'd be much easier if i could just type
route add -host aaa.bbb.ccc.xxx link#2 -ifp em1
but it doesn't recognize link#2 as a valid address, even though it uses it
in the table by default!!

Haven't tried the ipfilter yet. Maybe i'll give that a whirl, too.
- Original Message - 
From: Drew Tomlinson [EMAIL PROTECTED]

To: Steve Douville [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Sent: Tuesday, February 14, 2006 1:45 PM
Subject: Re: IP Routing Question



What happens with a simple 'route add certain ip address
aaa.bbb.ccc.196?  Or am I misinterpreting what you wish to achieve?

HTH,

Drew


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IP Routing Question

2006-02-14 Thread John Webster


--On Tuesday, February 14, 2006 11:40:45 -0800 Drew Tomlinson [EMAIL 
PROTECTED] wrote:

 On 2/14/2006 11:17 AM Steve Douville wrote:
 Weird stuff...
 route add -host aaa.bbb.ccc.209 aaa.bbb.ccc.196 -ifp em1
   

Shouldn't this be:
route add -host aaa.bbb.ccc.ddd aaa.bbb.ccc.209

Where aaa.bbb.ccc.ddd is not the other gateway (aaa.bbb.ccc.196)
I.e, aaa.bbb.ccc.ddd should be an address on the switch aaa.bbb.ccc.209

Maybe even adding ' -interface ' at the end of the command.
[man route]

jw

 
 What happens if you leave off the -ifp em1?
 
 Cheers,
 
 Drew


pgpQYBrxCeXFx.pgp
Description: PGP signature


Re: IP Routing Question

2006-02-14 Thread Steve Douville
196 is the switch... 209 is a port on the switch
- Original Message - 
From: John Webster [EMAIL PROTECTED]
To: Drew Tomlinson [EMAIL PROTECTED]
Cc: Steve Douville [EMAIL PROTECTED]; FreeBSD Questions 
freebsd-questions@freebsd.org
Sent: Tuesday, February 14, 2006 4:08 PM
Subject: Re: IP Routing Question



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]