Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 811
  • Last Modified:

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



0
umoorjani
Asked:
umoorjani
  • 4
  • 2
1 Solution
 
pjedmondCommented:
>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!

(   (()
(`-' _\
 ''  ''
0
 
umoorjaniAuthor Commented:
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.
0
 
pjedmondCommented:
>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.

(   (()
(`-' _\
 ''  ''
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
pjedmondCommented:
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

(   (()
(`-' _\
 ''  ''
0
 
umoorjaniAuthor Commented:
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.
0
 
pjedmondCommented:
OK - I understand - You are getting confused between a Cisco VLAN, and a Linux virtual ethernet interface.

http://www.cisco.com/univercd/cc/td/doc/product/lan/28201900/1928v8x/eescg8x/02vlans.htm

should help you understand the difference (in conjuction with the previous docs)

(   (()
(`-' _\
 ''  ''

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now