Networking Forums

Networking Forums > Computer Networking > Linux Networking > Virtual ip on linux not working on the network

Reply
Thread Tools Display Modes

Virtual ip on linux not working on the network

 
 
invasyon@gmail.com
Guest
Posts: n/a

 
      11-22-2007, 02:30 PM
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 ?



 
Reply With Quote
 
 
 
 
Ashish Shukla आशीष शुक्ल
Guest
Posts: n/a

 
      11-22-2007, 03:20 PM
-----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-----
 
Reply With Quote
 
invasyon@gmail.com
Guest
Posts: n/a

 
      11-22-2007, 03:53 PM

> | 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 With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Box, Linux , networking jtt89 Windows Networking 2 11-21-2011 10:20 PM
Linux Virtual WiFi digitalr Wireless Internet 2 02-13-2006 08:08 PM
Virtual Private Network in Linux BG Linux Networking 1 08-20-2004 12:32 PM
Virtual (but MASQueraded) Linux host? Robert Berry Linux Networking 0 10-16-2003 09:26 PM
Virtual (but MASQueraded) Linux host? Robert Berry Linux Networking 0 10-16-2003 09:26 PM



1 2 3 4 5 6 7 8 9 10 11