Virtual ip on linux not working on the network - Networking

This is a discussion on Virtual ip on linux not working on the network - Networking ; I tried to setup one virtual ip on my linux box using: ifconfig eth0:1 192.168.1.200 netmask 255.255.255.0 up route add -host 192.168.1.200 dev eth0:1 my eth0 card has the ip 192.168.1.199 this is the physical card and 192.168.1.200 is the ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Virtual ip on linux not working on the network

  1. Virtual ip on linux not working on the network

    I tried to setup one virtual ip on my linux box using:

    ifconfig eth0:1 192.168.1.200 netmask 255.255.255.0 up
    route add -host 192.168.1.200 dev eth0:1


    my eth0 card has the ip 192.168.1.199 this is the physical card and
    192.168.1.200 is the virtual address i want to add to this interface.

    The default gateway for this machine is 192.168.1.1

    This works fine on the same box, i can ping the 192.168.1.200 address
    but on the network i cant reach the ip 192.168.1.200.

    If i go to another segment of the network, lets say 192.168.100.1 i
    can ping 192.168.1.199 the real interface but i cant ping
    192.168.1.200 the virtual interface.

    If i setup another machine on the same switch with the 192.168.1.199
    ip i can see this ip from anywhere in the network. (so the routing on
    the network is ok)

    What is the real way to make a virtual ip on linux and what i have to
    do for this ip to be visible to the network ?




  2. Re: Virtual ip on linux not working on the network

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    ,--- invasyon writes:
    | I tried to setup one virtual ip on my linux box using:

    | ifconfig eth0:1 192.168.1.200 netmask 255.255.255.0 up
    | route add -host 192.168.1.200 dev eth0:1

    The above 'route' statement is not required, as adding an interface
    implicitly creates a route for that, and hence no need to explicitly
    create the route.

    | my eth0 card has the ip 192.168.1.199 this is the physical card and
    | 192.168.1.200 is the virtual address i want to add to this interface.

    | The default gateway for this machine is 192.168.1.1

    | This works fine on the same box, i can ping the 192.168.1.200 address
    | but on the network i cant reach the ip 192.168.1.200.

    | If i go to another segment of the network, lets say 192.168.100.1 i
    | can ping 192.168.1.199 the real interface but i cant ping
    | 192.168.1.200 the virtual interface.

    | If i setup another machine on the same switch with the 192.168.1.199
    | ip i can see this ip from anywhere in the network. (so the routing on
    | the network is ok)

    | What is the real way to make a virtual ip on linux and what i have to
    | do for this ip to be visible to the network ?

    Looks like ARP announcement for 192.168.1.200 is not reaching the
    network switch or is being filtered. Also check your box's iptables,
    and switch's settings.

    HTH
    - --
    Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
    ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFHRaxkHy+EEHYuXnQRAnxvAJ9u6R0jgmzlv4TsWqt+4m uNLP2sVwCg4vwP
    tonlr/kP9M9iirAfD/eyY6g=
    =7LHP
    -----END PGP SIGNATURE-----

  3. Re: Virtual ip on linux not working on the network


    > | What is the real way to make a virtual ip on linux and what i have to
    > | do for this ip to be visible to the network ?
    >
    > Looks like ARP announcement for 192.168.1.200 is not reaching the
    > network switch or is being filtered. Also check your box's iptables,
    > and switch's settings.



    iptables on this machine is empty (iptables -F)

    i tried pinging the router from this virtual interface (ping -vc1 -w
    3 -I 192.168.1.200 192.168.1.1) and also the broadcast address (ping -
    b -I 192.168.1.200 192.168.1.255) trying to clear the arp table on the
    router and after a few seconds my interface was alive on the net...
    thanks..



+ Reply to Thread