Link to home
Start Free TrialLog in
Avatar of umoorjani
umoorjani

asked on

Two IP addresses on the same VLAN but different virtual interface

Dear Sir,

I have a Red Hat Linux Enterprise 3 ES OS, I have a virtual interface that is vlan tagged, but I need to add another vlan tagged interface on the same vlan,
but I get a conflict when I add for example another ifcfg-eth0.43 with different ip addresses.

For now I have one eth1 :

DEVICE=eth1
BOOTPROTO=static
BROADCAST=10.0.0.3
IPADDR=10.0.0.1
NETMASK=255.255.255.252
NETWORK=10.0.0.0
ONBOOT=yes
TYPE=Ethernet

eth0 and eth0.43

DEVICE=eth0
BOOTPROTO=static
BROADCAST=0.0.0.0
IPADDR=0.0.0.0
NETMASK=0.0.0.0
NETWORK=0.0.0.0
ONBOOT=yes
TYPE=Ethernet

DEVICE=eth0.43
BOOTPROTO=static
BROADCAST=213.xxx.xxx.63
IPADDR=213.xxx.xxx.60
NETMASK=255.255.255.192
NETWORK=213.xxx.xxx.0
VLAN=yes
ONBOOT=yes
TYPE=Ethernet

And I need an extra eth0.43 with a different ip address.

Sincerely

Uday MOOORAJNI



Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

>I need to add another vlan tagged interface on the same vlan,

Why??????

>but I get a conflict when I add for example another ifcfg-eth0.43 with different ip addresses.

That's exactly what should happen! You cannot have 2 eth0.43s (on the same system)! Each interface has to be unique. What's wrong with eth0.44 or indeed any other number combination!

(   (()
(`-' _\
 ''  ''
Avatar of umoorjani
umoorjani

ASKER

Well won't it tag ifcfg-eth44 into a vlan ID=44 ?? AHHHHHHHHHHHHHH!

vconfig add eth1.44 43 ??

I need to to have two IP addresse on the same VLAN, mainly for the clusering reasons. I'm just small technician
I follow orders. I just want to know a workaround for this knowing that our network is vlan tagged and i have only
two interfaces, wherer one interface on each server is crossed with each other. so I have to deal with one interface.
>Well won't it tag ifcfg-eth44 into a vlan ID=44 ?? AHHHHHHHHHHHHHH!

I suppose it would - but why is that a problem? What decides whether the 2 ips can 'communicate' is the ip address, the net mask and the routing/bridging. Their vlan 'ID' is not important other than as identification for relating the various properties and routing rules to.

eth1.43   - 10.0.0.1 netmask 255.255.255.0
eth1.44   - 10.0.0.2 netmask 255.255.255.0

can quite happily communicate with each other. Worthwhile making sure that you change the hw MAC address for each of your virtual ethernet connections ifconfig eth1.43 hw ether 00:11:22:33:44:55 etc to ensure that if they are on the same network, they do not get confused.

vconfig add eth1.44 43 ??

I guess this 'might work', but why have a virtual ethernet interface on a virtual interface. This gives 2 levels of interface to pass traffic through (even if it does work!) rather than one. Gonsidering that a 1 GHz interface requires approx 1GHz of processing power to work flat out, then this concept has severe performance penalty issues (even if you do get it to work!) Don't do it - you don't need to.

I think that you are misunderstanding what a virtual interface/vlan is, and think that it may be worth reading the following:

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

Effectively, you are just making a single ethernet behave like multiple ethernet connections.

(   (()
(`-' _\
 ''  ''
Incidentally, eth1 (which is 'hosting' the virtual ethernet adaptors) is effectively in promiscuous mode - i.e. it receives all traffic that is transmitted to it, and then translates anything as necessary for it's virtual adaptors. Hence all the 0.0.0.0s

(   (()
(`-' _\
 ''  ''
I have a catalyst switch that is switch port access vlan 43 and other vlans trunked as well on the switch.
It's not like I have a /24, I have a /26, the vlan in particular is on a "Looking Glass" Carrier-Grade Voice Backbone.

anyway, I'll look through the papers you've given me.
ASKER CERTIFIED SOLUTION
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial