This is a discussion on Static route for a specific IP adress within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> Hi, all I'm having an issue creating a route for a specific IP address. I need all info coming ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, all I'm having an issue creating a route for a specific IP address. I need all info coming from a specific IP (172.30.10.85/26) to use 172.30.10.100 as it's gateway, but everything else on that segment (172.30.10.64/26) to use the standard gateway at 172.30.10.65. To make it all the more interesting 172.30.10.85 is a virtual IP addressed assigned to ce2:1. I have tried just adding a route with destination 172.30.10.100 and gateway 172.30.10.85, but it was attempting to send packets out of ce0 and not ce2. Is there a way to manually configure the interface to be used also? I'm pretty confused here. The network configuration stats are below. Thanks, Ben.. utsocs1 root#netstat -rn Routing Table: Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 10.10.10.40 10.10.10.40 UGH 1 0 10.10.11.40 10.10.11.40 UGH 1 0 10.10.11.3 10.10.11.3 UGH 1 9587 10.10.10.3 10.10.10.3 UGH 1 11119 172.16.193.2 172.16.194.5 UGH 1 4985 0.0.0.0 172.30.10.85 UG 1 0 172.16.194.4 172.16.194.6 U 1 3242 ce8:2 10.10.10.0 10.10.10.2 U 1 11933 ce1 10.10.10.0 10.10.10.40 U 1 0 ce1:1 10.10.11.0 10.10.11.2 U 1 9589 ce5 10.10.11.0 10.10.11.40 U 1 0 ce5:1 172.30.10.0 172.30.10.17 U 1 7110 ce0 172.30.10.64 172.30.10.80 U 1 6662 ce2 172.30.10.64 172.30.10.85 U 1 0 ce2:1 172.16.0.128 172.16.0.129 U 1 10612 ce4 172.16.1.0 172.16.1.1 U 1 10600 ce8 172.16.193.0 127.0.0.1 U 1 0 lo0 default 172.30.10.65 UG 1 12370 default 172.30.10.1 UG 1 12341 127.0.0.1 127.0.0.1 UH 244206164 lo0 utsocs1 root#ifconfig -a lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000 lo0:1: flags=8849<UP,LOOPBACK,RUNNING,MULTICAST,PRIVATE> mtu 8232 inet 172.16.193.1 netmask ffffffff ce0: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.30.10.17 netmask ffffffc0 broadcast 172.30.10.63 ether 0:3:ba:dc:ec:47 ce1: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.10.2 netmask ffffffc0 broadcast 10.10.10.63 ether 0:3:ba:dc:ec:47 ce1:1: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.10.40 netmask ffffffc0 broadcast 10.10.10.63 ce2: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.30.10.80 netmask ffffffc0 broadcast 172.30.10.127 ether 0:3:ba:dc:ec:47 ce2:1: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.30.10.85 netmask ffffffc0 broadcast 172.30.10.127 ce5: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.11.2 netmask ffffffc0 broadcast 10.10.11.63 ether 0:3:ba:dc:ec:47 ce5:1: flags=843<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.11.40 netmask ffffffc0 broadcast 10.10.11.63 ce9: flags=842<BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.30.10.18 netmask ffff0000 broadcast 172.30.255.255 ether 0:3:ba:dc:ec:47 ce8: flags=8843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE> mtu 1500 inet 172.16.1.1 netmask ffffff80 broadcast 172.16.1.127 ether 0:3:ba:dc:ec:47 ce8:2: flags=8843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE> mtu 1500 inet 172.16.194.6 netmask fffffffc broadcast 172.16.194.7 ce4: flags=8843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE> mtu 1500 inet 172.16.0.129 netmask ffffff80 broadcast 172.16.0.255 ether 0:3:ba:dc:ec:47 |
| |||
| On Feb 28, 8:18 pm, "bozothedeathmachine" <bozothedeathmach...@gmail.com> wrote: > Hi, all I'm having an issue creating a route for a specific IP > address. I need all info coming from a specific IP (172.30.10.85/26) > to use 172.30.10.100 as it's gateway, but everything else on that > segment (172.30.10.64/26) to use the standard gateway at > 172.30.10.65. Aren't those the same subnet? I'd have thought you'd need to go to at least /28 to distinguish them. |
| |||
| bozothedeathmachine skrev: > Hi, all I'm having an issue creating a route for a specific IP > address. I need all info coming from a specific IP (172.30.10.85/26) > to use 172.30.10.100 as it's gateway, but everything else on that > segment (172.30.10.64/26) to use the standard gateway at > 172.30.10.65. To make it all the more interesting 172.30.10.85 is a > virtual IP addressed assigned to ce2:1. I have tried just adding a > route with destination 172.30.10.100 and gateway 172.30.10.85, but it > was attempting to send packets out of ce0 and not ce2. Is there a way > to manually configure the interface to be used also? I'm pretty > confused here. The network configuration stats are below. > Im confused... I'm no network guru but I though a 26 bit netmask would give you four networks... Network Host-Range Broadcast ..00 172.30.10.0 001-062 063 ..01 172.30.10.64 065-126 127 ..10 172.30.10.128 129-190 191 ..11 172.30.10.192 193-254 255 and that would put both the .85 and the .100 address inside the .64 network which would mean using that nets gateway out. Your .64 net has two default gateways defined in the list... 172.30.10.64 172.30.10.80 U 1 6662 ce2 172.30.10.64 172.30.10.85 U 1 0 ce2:1 both going out on the same physical interface, ce2 you were seing it sending packets on ce0? you also got two default routes in your list... so which is it to use on unknown ip's?, since you see packages coming on ce0 I assume the ce0 default is used... Very strange setup to me, what are you trying to accomplish? /Johan A |
| ||||
| "bozothedeathmachine" <bozothedeathmachine@gmail.com> writes: > Hi, all I'm having an issue creating a route for a specific IP > address. I need all info coming from a specific IP (172.30.10.85/26) > to use 172.30.10.100 as it's gateway, but everything else on that Routing doesn't have a "come from" option. Packets are forwarded based on the IP destination address alone. If you need to do something more complex than that, then you probably need to look into IP Filter's 'to' mechanism. See ipfilter(5) and ipf(4). > segment (172.30.10.64/26) to use the standard gateway at > 172.30.10.65. To make it all the more interesting 172.30.10.85 is a > virtual IP addressed assigned to ce2:1. I have tried just adding a > route with destination 172.30.10.100 and gateway 172.30.10.85, but it > was attempting to send packets out of ce0 and not ce2. Is there a way > to manually configure the interface to be used also? I'm pretty > confused here. The network configuration stats are below. [...] > 0.0.0.0 172.30.10.85 UG 1 0 That's a suspicious entry. It looks like someone did a "route add 0.0.0.0/32 172.30.10.85" on this system. That's unlikely to be helpful. Perhaps it would help to explain what higher-level problem you're trying to solve. -- James Carlson, Solaris Networking <james.d.carlson@sun.com> Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 |