# how to make virtual ip? nwbie here



## csayantan (Sep 3, 2009)

hi

how to make virtual ip in OEL5.4?


```
[[email protected] ~]# ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:26:18:59:ee:49 brd ff:ff:ff:ff:ff:ff
    inet 192.168.181.10/24 brd 192.168.181.255 scope global eth1
    inet6 fe80::226:18ff:fe59:ee49/64 scope link 
       valid_lft forever preferred_lft forever
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:00:e8:f7:02:b0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global eth0
    inet6 fe80::200:e8ff:fef7:2b0/64 scope link 
       valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noop 
    link/sit 0.0.0.0 brd 0.0.0.0
5: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue 
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
    inet6 fe80::200:ff:fe00:0/64 scope link 
       valid_lft forever preferred_lft forever
[[email protected] ~]#
```


```
[[email protected] ~]# /sbin/ip addr add 192.168.1.25/24 eth0
Error: either "local" is duplicate, or "eth0" is a garbage.
[[email protected] ~]#
```
help

regards


----------



## vralex (Feb 8, 2010)

Hi,

Here is your solution:

ip addr add 192.168.1.25/24 broadcast 192.168.1.255 dev eth0 label eth0:0

Let us know if this is working.

Good luck,
Alex


----------



## csayantan (Sep 3, 2009)

vralex said:


> Hi,
> 
> Here is your solution:
> 
> ...


it will make active (up) the eth0 all the time.same thing is achivet by vconfig command

http://www.cyberciti.biz/tips/howto-configure-linux-virtual-local-area-network-vlan.html

originally what exactly i needed i got it from

http://www.cyberciti.biz/tips/howto-configure-linux-virtual-local-area-network-vlan.html

regards


----------

