LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-22-2011, 03:11 PM   #1
pgb205
Member
 
Registered: Nov 2007
Posts: 109

Rep: Reputation: 15
Single physical nic with two ip's on the same vlan


as the headline states, I have one physical nic
I want to it to have to ip addresses both in vlan 200.

So far I tried creating two ifcfg-eth0:1.200
and ifcfg-eth0:2.200 and I've edited both
to have vlan="Yes" directive as well as separate ip addresses
as well as device="eth0:2.200" and device="eth0:1.200" directives. However, when I do service network restart I get "invalid alias number".


Is this possible to do what I want above? If so how?
 
Old 08-22-2011, 09:07 PM   #2
jefro
Guru
 
Registered: Mar 2008
Posts: 11,111

Rep: Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362
Not sure you can do that at the same time.

Try creating the secondary ip and then create the vlan.


http://www.g-loaded.eu/2005/11/05/as...s-to-your-nic/

http://nixcraft.com/networking-firew...iguration.html
 
Old 08-23-2011, 07:50 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
But how does the vlan come into play? You want to have vlan tagged traffic on that wire? Say, if the switch it's connected to has the port in "access" mode, the vlan doesn't come into play at all and then all you have to do is just add another IP to the interface.

---------- Post added 08-23-11 at 09:50 PM ----------

Which can be done with a simple ip addr add command.
 
Old 08-23-2011, 07:57 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
And as a cheap shot (don't have a rh based distro at hand to try), did you try with the files named as:

Code:
ifcfg-eth0.200:1
ifcfg-eth0.200:2
 
  


Reply

Tags
vlan


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLAN--Can I still have main NIC interface ip'd pgb205 Linux - Networking 1 05-14-2011 09:28 AM
disabling vlan tag stripping on NetXtreme BCM5721 NIC Shaggy1 Linux - Networking 1 11-02-2010 07:34 AM
vlan - multiple ip -same nic lord-fu Linux - Networking 1 12-06-2007 03:20 PM
dhcpd.conf multiple subnet / single physical network configuration kovert Linux - Server 0 09-02-2006 01:14 AM
single logical partion on multiple physical drives frieza Linux - Software 0 12-23-2003 04:48 PM


All times are GMT -5. The time now is 04:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration