LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-14-2019, 03:32 PM   #1
DimTheo
LQ Newbie
 
Registered: Nov 2016
Posts: 20

Rep: Reputation: Disabled
how to set an ip addr add in rc.local ?


hello

On ubuntu bionic cloud image i want to have this line

/sbin/ip addr add ip/subnet dev br-vlan

set in rc.local so it works after a reboot

do i enter it as is in rc.local or is there a different syntax ? I tried to enter this line in rc.local and after a reboot it did not work

thanks
 
Old 03-14-2019, 03:36 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,837

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Is there some particular reason to set this in a startup script instead of in the networking?
 
Old 03-14-2019, 03:41 PM   #3
DimTheo
LQ Newbie
 
Registered: Nov 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
Is there some particular reason to set this in a startup script instead of in the networking?


this server runs openstack and all instances created in openstack should get an IP from the device br-vlan

how do i enter this in the networking ? can you give me an example ?
 
Old 03-15-2019, 07:58 AM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,837

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
I do not use UBUNTU any longer myself, but I seem to remember that it makes heavy use of Network Manager. Setting it up in Network Manager would make sense.

If you are not using Network Manager (I often did not) you might run
Code:
man interfaces
for some ideas.

The rc.local starts after everything else on startup. If you want services that depend upon network to only start when the network is ready, it makes better sense to define the interface connection in networking. Generally, there are some pretty good how-to documents on the web for such tasks under Ubuntu.
 
Old 03-15-2019, 10:20 AM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,713

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Quote:
Originally Posted by DimTheo View Post

how do i enter this in the networking ? can you give me an example ?
Here is an example: https://github.com/openstack/opensta...g.test.example.
 
1 members found this post helpful.
  


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
sendmail : changing from addr and reply addr unix1adm AIX 4 09-22-2014 12:17 PM
unable to add reverse map from 10.1.168.192.in-addr.arpa. to tftpadmin-desktop.bbnl.i arunrao_erp Linux - Networking 1 11-10-2010 06:02 PM
Unique ID of machine, other than IP-Addr/MAC-Addr to prevent spoofing anupamsaxena Linux - Security 9 12-20-2009 10:58 PM
Obtain IP addr. from MAC addr? Ryand833 Linux - Wireless Networking 3 06-30-2005 01:59 PM
set ip to fixed addr compzoo Linux - Newbie 16 01-29-2005 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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