LinuxQuestions.org
Visit Jeremy's Blog.
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 09-27-2013, 07:15 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,327

Rep: Reputation: 54
Vlan issue - main interface keeps getting an IP address


I just setup vlans on my main server as I want to be able to bridge VMs to various vlans.

For some reason the main interface keeps getting the same IP as the main vlan (the one that is used to access the host). See here:

Quote:
[root@borg ~]#
[root@borg ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1C:C0:41:8F:97
inet addr:10.1.1.10 Bcast:10.1.255.255 Mask:255.255.0.0
inet6 addr: fe80::21c:c0ff:fe41:8f97/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:120660574 errors:0 dropped:236 overruns:0 frame:0
TX packets:424384218 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17608813742 (16.3 GiB) TX bytes:485458771832 (452.1 GiB)
Memory:e0600000-e0620000

eth0.2 Link encap:Ethernet HWaddr 00:1C:C0:41:8F:97
inet addr:10.1.1.10 Bcast:10.1.255.255 Mask:255.255.0.0
inet6 addr: fe80::21c:c0ff:fe41:8f97/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:405 errors:0 dropped:0 overruns:0 frame:0
TX packets:421 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37730 (36.8 KiB) TX bytes:45851 (44.7 KiB)

eth0.3 Link encap:Ethernet HWaddr 00:1C:C0:41:8F:97
inet6 addr: fe80::21c:c0ff:fe41:8f97/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3540 (3.4 KiB) TX bytes:468 (468.0 b)

eth0.4 Link encap:Ethernet HWaddr 00:1C:C0:41:8F:97
inet6 addr: fe80::21c:c0ff:fe41:8f97/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:468 (468.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:343771 errors:0 dropped:0 overruns:0 frame:0
TX packets:343771 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:59498509 (56.7 MiB) TX bytes:59498509 (56.7 MiB)

virbr0 Link encap:Ethernet HWaddr 4A:AA:3A:B51:3F
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::48aa:3aff:feb5:d13f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:5189 (5.0 KiB)

[root@borg ~]#
On a side note how do I disable the other interfaces from getting an ipv6 IP? I don't want them to be routable in any way shape or form, they are strictly there so I can bridge VMs to them (have not tested this yet but going to home/assume this works the way I think).

Here is the config for eth0:

ifcfg-eth0
Quote:
# Intel Corporation 82566DC-2 Gigabit Network Connection
DEVICE=eth0
BOOTPROTO=none
#BROADCAST=10.1.1.255
HWADDR=00:1c:c0:41:8f:97
#IPADDR=10.1.1.10
#NETMASK=255.255.0.0
#NETWORK=10.1.0.0
#GATEWAY=10.1.1.1
ONBOOT=yes
#NM_CONTROLLED=no
TYPE=Ethernet
Here is the config for eth0.2 (main vlan where server "resides" and is managed/accessed from)

ifcfg-eth0.2
Quote:
VLAN=yes
DEVICE=eth0.2
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.1.1.10
NETMASK=255.255.0.0
GATEWAY=10.1.1.1
If I change the IP of eth0.2 eth0 gets that IP. If I turn off eth0 it turns off all the vlans.. guessing this is normal behavior though.
 
Old 09-27-2013, 11:19 PM   #2
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,327

Original Poster
Rep: Reputation: 54
Come to think of it, as far as functionality, everything seems to work fine. Playing around with VMs and such. Is this normal behavior?
 
Old 09-28-2013, 07:08 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,678
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Is the DHCP server connected to the LAN and VLAN involved? Or does some other device bridge them together? With the same MAC in both, a "same DHCP server" would be giving it the same IP it had before or on the other [V]LAN.
 
Old 09-28-2013, 07:19 PM   #4
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,327

Original Poster
Rep: Reputation: 54
The firewall (pfsense) is what bridges them together, and does DHCP. The "eth0" equivalant interface on the firewall does not exist though, it's strictly vlan interfaces. I also have it set to bootproto=none, doesn't that mean, it should not be getting any IP or anything?
 
  


Reply


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
[SOLVED] Creating a VLAN interface on top of another VLAN interface jbbroccard2 Linux - Networking 1 05-22-2013 01:25 AM
Cannot start radvd; no link local address on vlan interface. systemlordanubis Linux - Networking 2 02-23-2012 03:31 AM
VLAN--Can I still have main NIC interface ip'd pgb205 Linux - Networking 1 05-14-2011 09:28 AM
Route non-vlan packet to a vlan interface mic.sed Linux - Networking 2 04-23-2010 02:39 AM
Mesh network issue(Batman): Cant bind interface address already in use melato Linux - Networking 2 09-09-2009 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration