LinuxQuestions.org
Visit Jeremy's Blog.
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 08-07-2015, 06:54 AM   #1
nskalis
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled
Centos 7: failed to bring up/down networking: configure interface for a trunk interfa


hi guys,

The switch configured on the server (Centos 7) is configured as trunk for VLAN#115,2014. I have loaded

Code:
# lsmod | grep 8021q
# modprobe 8021q
I would like to configure an IP address on the server using the VLAN#115 Performing the following configuration:

ifcfg-em1
Code:
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=em1
UUID=c0c4d851-d762-4301-8c20-d6128aee5261
DEVICE=em1
ONBOOT=yes
ifcfg-em1.115
Code:
TYPE=Ethernet
BOOTPROTO=none
IPADDR=172.31.141.242
PREFIX=24
GATEWAY=172.31.141.1
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=em1.115
UUID=c0c4d851-d762-4301-8c20-d6128aee5261
DEVICE=em1.115
VLAN=yes
ONBOOT=yes
I ended up being not able to restart the network service. The error message appearing is :

Code:
Failed to start LSB: Bring up/down networking.
Could you please advise ? What am doing wrong ?

Last edited by nskalis; 08-07-2015 at 06:56 AM.
 
Old 08-08-2015, 08:17 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,714

Rep: Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280
I think you need "BOOTPROTO=none" to be changed to "BOOTPROTO=static" for ifcfg-em1.115

I know "none" used to work for static IP numbers, but that use was being changed to "static" in CenOS 6 though both worked. I believe there is a plan to be able to add other methods in the future, and using static makes it clear what is being done.

I'm not sure about whether the base interface can remain uninitialized (never tried that). If it doesn't start (and since there is no IP numbers there, it can't be initialized), you might try "onboot=no" for ifcfg-em1.

Last edited by jpollard; 08-08-2015 at 08:24 AM.
 
Old 08-08-2015, 08:56 AM   #3
nskalis
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
thanks jpollard. your comment made sense. i just tried. but with no luck.
with ONBOOT=yes "journalctl -xn" says "Unit network.service has failed."
with ONBOOT=no "journalctl -xn" says "(warn) Activation failed for connection em1"
 
Old 08-08-2015, 09:02 AM   #4
nskalis
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
the following did the trick:

Code:
systemctl stop NetworkManager
systemctl disable NetworkManager
 
Old 08-08-2015, 09:22 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,714

Rep: Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280
Quote:
Originally Posted by nskalis View Post
the following did the trick:

Code:
systemctl stop NetworkManager
systemctl disable NetworkManager
That by itself would not work... without NetworkManager (or networks) you don't have a network being initialized.

enabling networks in addition would allow it to work.
 
Old 09-24-2017, 10:49 AM   #6
moleski
LQ Newbie
 
Registered: Sep 2017
Location: Buffalo, NY
Distribution: Centos
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
That by itself would not work... without NetworkManager (or networks) you don't have a network being initialized.

enabling networks in addition would allow it to work.
This thread and this final post, although old, were helpful to me this week.

After a yum update all, I had centos-release-7-4.1708.el7.centos.x86_64 and kernel-3.10.0-693.2.2.el7.x86_64.

Network.services failed to load during boot: "Failed to start LSB: Bring up/down networking."

The reason for that failure was that "Determining IP information for eth0... failed."

And the reason that IP information for eth0 failed was that something mangled the addresses for my server, gateway, and DNS servers in /etc/sysconfig/network-scripts/ifcfg-eth0. The definition of BOOTPROTO was changed from "static" to "dhcp", and all of the IP addresses were stripped out of ifcfg-eth0.

In my case, I chose to work with NetworkManager rather than network.services (or a combination of both).

I disabled cloud-init, which kept rewriting /etc/sysconfig/network-scripts/ifcfg-eth0 on each boot by creating /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with this single line in it:

network: {config: disabled}

Because I turned off network.services, I set "NM_CONTROLLED=yes" for both ifcfg-eth0 and ifcfg-eth1.

The Apache daemon still failed to start. It seemed to be a timing issue during the boot process. I created /etc/NetworkManager/dispatcher.d/22-httpd as shown below. The system calls it when NetworkManager thinks it is open for business.

Code:
#!/bin/sh
# This is a NetworkManager dispatcher script to turn http on
# when the network is ready.  MXM
# /etc/NetworkManager/dispatcher.d/22-httpd
# https://wiki.archlinux.org/index.php/NetworkManager#Network_services_with_NetworkManager_dispatcher

if [ "$2" = "up" ]; then
	systemctl start httpd
fi

if [ "$2" = "down" ]; then
	systemctl stop httpd
fi

exit 0
 
  


Reply

Tags
centos, network, 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
Could not bring up more than one PPP interface on CentOS-5.9 at a time sekarlinux Linux - Server 2 11-16-2013 10:24 PM
Failed to bring up <Interface> jose_tk Linux - Networking 1 11-04-2009 08:48 AM
How to Bring up and configure the Wireless interface during boot up? gehariprasath Linux - Networking 1 03-13-2008 09:09 PM
Failed to bring up ethernet interface sparks_lu Linux - Networking 5 03-27-2005 11:57 AM

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

All times are GMT -5. The time now is 03:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration