Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Two IP addresses on the same VLAN but different virtual interface

Posted on 2006-07-07
6
Medium Priority
?
810 Views
Last Modified: 2013-12-06
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
Comment
Question by:umoorjani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 17061018
>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
 

Author Comment

by:umoorjani
ID: 17062324
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
 
LVL 22

Expert Comment

by:pjedmond
ID: 17062520
>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
Independent Software Vendors: 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!

 
LVL 22

Expert Comment

by:pjedmond
ID: 17062541
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
 

Author Comment

by:umoorjani
ID: 17062560
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
 
LVL 22

Accepted Solution

by:
pjedmond earned 1000 total points
ID: 17062677
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

Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft will be releasing the Windows 10 Creators Update in just a matter of weeks. Are you prepared? Follow these steps to ensure everything goes smoothly and you don't lose valuable data on your PC.
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question