Re: Configuring two networks with the same interface card
On Wed, Jul 07, 1999 at 12:37:21PM +0400, Vadim Solonovich wrote:
> Hi !
>
> I want to set up my Debian to work with two ip addresses on different
> networks with one ethernet card.
> Asuming two different physical networks 192.168.0.0 and 192.168.1.0 :
>
> # insmod ip_alias.o
>
> # ifconfig eth0 192.168.0.1 netmask 255.255.255.0
> # ifconfig eth0:0 192.168.1.1 netmask 255.255.255.0
>
> # route add -net 192.168.0.0 dev eth0
> # route add -net 192.168.1.0 dev eth0:0
> # route add -host 192.168.0.1 dev eth0
> # route add -host 192.168.1.1 dev eth0:0
>
> Ping 192.168.0.10 is OK.
>
> # ping 192.168.1.10
> ping : sendto: Operation not permitted
> ping : wrote: 192.168.1.10 64 chars, ret = -1
>
> What's wrong ?
Try
route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0
route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0:0
^^^^^^^^^^^^^^^^^^^^^
I have similiar setup. When you still have troubles send output of ifconfig
and route commands.
Mirek
Reply to: