Adding secondary route to interface

Adding secondary route to interface

Post by Hal Burgi » Thu, 13 Jul 2000 04:00:00



I'm trying to figure out the magic for adding a route to eth0 below to
allow me access to an address of 192.168.10.15 and still keep the
default route up. This happens to be the LAN side address of a DSL
router connected to eth0. No problems if I set eth0 to a similar netmask
and address as the router, but I'd like my cake and eat it too. eth1 is
the internal LAN here. Any tips would be appreciated.

Kernel IP routing table

Destination   Gateway         Genmask     Flags Metric Ref Use Iface
192.168.10.0  0.0.0.0       255.255.255.0  U     0      0    0 eth1
216.78.196.0  0.0.0.0       255.255.252.0  U     0      0    0 eth0
127.0.0.0     0.0.0.0       255.0.0.0      U     0      0    0 lo
0.0.0.0       216.78.196.1  0.0.0.0        UG    0      0    0 eth0

TIA

--
Hal B



--

 
 
 

Adding secondary route to interface

Post by Arjan Driem » Thu, 13 Jul 2000 04:00:00



>I'm trying to figure out the magic for adding a route to eth0 below to
>allow me access to an address of 192.168.10.15 and still keep the
>default route up.

route add -host 192.168.10.15 dev eth0

Arjan
--
begin   LOVE-LETTER-FOR-YOU.TXT.vbs
        I'm a signature virus.  Please copy me to help me spread!
end

 
 
 

Adding secondary route to interface

Post by Hal Burgi » Thu, 13 Jul 2000 04:00:00


On 12 Jul 2000 22:00:01 GMT, Arjan Drieman




>>I'm trying to figure out the magic for adding a route to eth0 below to
>>allow me access to an address of 192.168.10.15 and still keep the
>>default route up.

>route add -host 192.168.10.15 dev eth0

I've tried that, plus many variations.



tcpdump: listening on all devices
18:01:46.791906 eth0 > arp who-has 192.168.10.15 tell 216.78.197.8 (0:50:4:a8:77:13)
18:01:46.792877 eth0 < arp reply 192.168.10.15 is-at 0:20:ea:5:22:97 (0:50:4:a8:77:13)
18:01:46.792915 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
18:01:47.790305 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
18:01:48.790250 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
18:01:49.790166 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
18:01:50.790189 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
18:01:51.790439 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
18:01:52.790129 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request

Never an answer.

--
Hal B



--

 
 
 

Adding secondary route to interface

Post by Ken Johnso » Thu, 13 Jul 2000 04:00:00



> On 12 Jul 2000 22:00:01 GMT, Arjan Drieman



> >>I'm trying to figure out the magic for adding a route to eth0 below to
> >>allow me access to an address of 192.168.10.15 and still keep the
> >>default route up.

> >route add -host 192.168.10.15 dev eth0

> I've tried that, plus many variations.



> tcpdump: listening on all devices
> 18:01:46.791906 eth0 > arp who-has 192.168.10.15 tell 216.78.197.8 (0:50:4:a8:77:13)
> 18:01:46.792877 eth0 < arp reply 192.168.10.15 is-at 0:20:ea:5:22:97 (0:50:4:a8:77:13)
> 18:01:46.792915 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
> 18:01:47.790305 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
> 18:01:48.790250 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
> 18:01:49.790166 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
> 18:01:50.790189 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
> 18:01:51.790439 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request
> 18:01:52.790129 eth0 > 216.78.197.8 > 192.168.10.15: icmp: echo request

> Never an answer.

I tried this a slightly different way:


PING 192.168.1.5 (192.168.1.5) from 172.25.0.2 : 56(84) bytes of data.
From 24.93.66.173: Destination Host Unreachable
From 24.93.66.173: Destination Host Unreachable
From 24.93.66.173: Destination Host Unreachable

--- 192.168.1.5 ping statistics ---
5 packets transmitted, 0 packets received, +3 errors, 100% packet loss



PING 192.168.1.5 (192.168.1.5) from 192.168.1.10 : 56(84) bytes of data.
64 bytes from 192.168.1.5: icmp_seq=0 ttl=255 time=0.8 ms
64 bytes from 192.168.1.5: icmp_seq=1 ttl=255 time=0.4 ms
64 bytes from 192.168.1.5: icmp_seq=2 ttl=255 time=0.4 ms
64 bytes from 192.168.1.5: icmp_seq=3 ttl=255 time=0.4 ms

--- 192.168.1.5 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.4/0.5/0.8 ms


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
172.25.0.2      *               255.255.255.255 UH    0      0        0
eth0
172.25.0.0      *               255.255.255.0   U     0      0        0
eth0
192.168.0.0     *               255.255.252.0   U     0      0        0
eth0
127.0.0.0       *               255.0.0.0       U     0      0        0
lo
default         rufus.kdjlan    0.0.0.0         UG    0      0        0
eth0

No routing tricks, just IP Alias.    Does this help?

K.

 
 
 

Adding secondary route to interface

Post by Hal Burgi » Thu, 13 Jul 2000 04:00:00



>> Never an answer.

>I tried this a slightly different way:



[...]

Quote:>No routing tricks, just IP Alias.    Does this help?

Wish I had thought of that, but no, still not there. I think it is
getting routed to the wrong interface -- eth1 (192.168.10.1):

tcpdump: listening on all devices

19:01:22.946985 eth1 > arp who-has 192.168.10.15 tell 192.168.10.1
(0:50:4:c2:9:bc)

19:01:23.940079 eth1 > arp who-has 192.168.10.15 tell 192.168.10.1
(0:50:4:c2:9:bc)

19:01:24.940069 eth1 > arp who-has 192.168.10.15 tell 192.168.10.1
(0:50:4:c2:9:bc)

19:01:25.940123   lo > 192.168.10.1 > 192.168.10.1: icmp: host
192.168.10.15 unreachable [tos 0xc0]

19:01:25.940166   lo > 192.168.10.1 > 192.168.10.1: icmp: host
192.168.10.15 unreachable [tos 0xc0]

Tried your suggestion _and_ played with 'route add -net ....', to no
avail. Thanks though. Maybe close.

--
Hal B



--

 
 
 

Adding secondary route to interface

Post by Hal Burgi » Thu, 13 Jul 2000 04:00:00






>>> Never an answer.

>>I tried this a slightly different way:


>[...]

>>No routing tricks, just IP Alias.    Does this help?

>Wish I had thought of that, but no, still not there. I think it is
>getting routed to the wrong interface -- eth1 (192.168.10.1):

>tcpdump: listening on all devices

>19:01:22.946985 eth1 > arp who-has 192.168.10.15 tell 192.168.10.1
>(0:50:4:c2:9:bc)

>19:01:23.940079 eth1 > arp who-has 192.168.10.15 tell 192.168.10.1
>(0:50:4:c2:9:bc)

>19:01:24.940069 eth1 > arp who-has 192.168.10.15 tell 192.168.10.1
>(0:50:4:c2:9:bc)

>19:01:25.940123   lo > 192.168.10.1 > 192.168.10.1: icmp: host
>192.168.10.15 unreachable [tos 0xc0]

>19:01:25.940166   lo > 192.168.10.1 > 192.168.10.1: icmp: host
>192.168.10.15 unreachable [tos 0xc0]

>Tried your suggestion _and_ played with 'route add -net ....', to no
>avail. Thanks though. Maybe close.

Got it, by combining the two suggestions:

 ifconfig eth0:0 192.168.10.10 netmask 255.255.252.0 up
 route add -host 192.168.10.15 dev eth0:0

I was forgetting the eth0:0 with route :(

This works! Thanks guys!

--
Hal B



--

 
 
 

Adding secondary route to interface

Post by dangdandin » Fri, 14 Jul 2000 04:00:00



>I'm trying to figure out the magic for adding a route to eth0 below to
>allow me access to an address of 192.168.10.15 and still keep the
>default route up. This happens to be the LAN side address of a DSL
>router connected to eth0. No problems if I set eth0 to a similar netmask
>and address as the router, but I'd like my cake and eat it too. eth1 is
>the internal LAN here. Any tips would be appreciated.

>Kernel IP routing table

>Destination   Gateway         Genmask     Flags Metric Ref Use Iface
>192.168.10.0  0.0.0.0       255.255.255.0  U     0      0    0 eth1
>216.78.196.0  0.0.0.0       255.255.252.0  U     0      0    0 eth0
>127.0.0.0     0.0.0.0       255.0.0.0      U     0      0    0 lo
>0.0.0.0       216.78.196.1  0.0.0.0        UG    0      0    0 eth0

I am not sure about what u said. It maybe like this:

                    ________              192.168.10.15_______
    --dsl----eth0--|router  |---eth1-------------------| ws  |
                   ----------192.168.10.*              -------

the ws with ip 192.168.10.15 and the eth1 with ip 192.168.10.* is in the
same
physical LAN. So the packets can be routed to ws by eth1.
u can check u cable.

Maybe I am wrong!

 
 
 

Adding secondary route to interface

Post by Hal Burgi » Fri, 14 Jul 2000 04:00:00




Quote:

>I am not sure about what u said. It maybe like this:

>                    ________              192.168.10.15_______
>    --dsl----eth0--|router  |---eth1-------------------| ws  |
>                   ----------192.168.10.*              -------

Dynamic          ________              ______
IP   --dsl------|router  |---eth0-----| GW   |----eth1---- HUB->LAN
                |________|            |______|  192.168.10.1
               192.168.10.15           Linux

The 'router' is a dedicated DSL modem/router (or bridge), ie it can be
set for either.

--
Hal B



--

 
 
 

1. Secondary Gateway for Secondary Network Card using Secondary IP's

Hello,
    Currently I have a Freebsd 4.3-RELEASE using 2 network cards.
I have both network cards installed and working locally.  The main network
card which can be seen by the public works fine using the default router.
However, the secondary network card working on a secondary ip block for
internal use
is not working.  How can I add a secondary router/gateway into the rc.conf
file in such
a way that the IP's on the internal block can see the secondary network
card?

Thank you for your help

2. Novice with a Crashed Hard Disk

3. apache-SSL and ms explorer

4. How do I add default route for PPP interface as non-root user?

5. AOC Monitor going into power-saving mode/standby (?) when starting X

6. route add to ethernet interface produces 0.0.0.0

7. I can install it but I can't boot

8. add route, use particular interface

9. How to add route to a not-up interface?

10. Add a new logical interface on a physical interface with ioctl()

11. Build Route between PPP Interface/Ethernet Interface

12. routing issue and maximum sub interfaces on one physical interface question