LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-20-2019, 05:11 AM   #1
greta_g
LQ Newbie
 
Registered: Oct 2019
Distribution: CentOS
Posts: 5

Rep: Reputation: Disabled
Bond/Vlan/Bridge


Hello friends,

i'm new here and have one question. i have virtual machine (CentOS 7), that have 3 nic:

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.137 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::7c2f:a798:df68:40bd prefixlen 64 scopeid 0x20<link>
ether 08:00:27:39:c4:8c txqueuelen 1000 (Ethernet)
RX packets 7886 bytes 9089665 (8.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2834 bytes 416670 (406.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp0s8: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether 08:00:27:c0:26:20 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28 bytes 2032 (1.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp0s9: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether 08:00:27:c0:26:20 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

1. i need to make bond with enp0s8/enp0s9
this is done with configuration files in /etc/sysconfig/network-scripts/bond0

2. then i need to make vlan over bond0
ifcfg-bond0.100

3. then i need to give two ip address on this vlan. do i need additional file for this or is it possible to write both addresses in ifcfg-bond0.100 file?

thanks in advance.
 
Old 10-20-2019, 07:14 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
In the same file. Call them IPADDR1 and IPADDR2. You may then also have to create two prefix PREFIX1, PREFIX2 or netmask settings.
 
Old 10-20-2019, 08:04 AM   #3
greta_g
LQ Newbie
 
Registered: Oct 2019
Distribution: CentOS
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank youo for your reply I tried:

DEVICE=bond0.100
NAME=bond0.100
BOOTPROTO=none
ONPARENT=yes
IPADDR1=192.168.1.141
IPADDR2=192.168.1.142
NETMASK=255.255.255.0
VLAN=yes
NM_CONTROLLED=no

but it does not works:

bond0.100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.141 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fec0:2620 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:c0:26:20 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 1160 (1.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
 
Old 10-20-2019, 08:48 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Well, as I said, I think you need two netmasks.
 
  


Reply



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
My name is Bond. James Bond. HLFH LinuxQuestions.org Member Intro 4 01-10-2016 07:03 PM
Error bond interface and vlan techux Linux - Networking 1 07-15-2013 05:25 AM
Can I use ifcfg-bond to bond VPN tuns? rladams65 Linux - Networking 0 03-13-2012 09:02 PM
network bridge / bond - slackware network init scripts Slax-Dude Slackware 1 07-17-2009 06:56 AM
bonding and vlans. Bonding a vlan interface vs applying vlans to a bond interface JasonCzerak Linux - Networking 0 09-11-2008 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:21 PM.

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