Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
two ip adresses for one interface?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Sat Jun 16, 2018 6:17 am    Post subject: two ip adresses for one interface? Reply with quote

Hi,

how can I add a second IP to my br0??

current setup: config_br0="192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255"
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6740
Location: almost Mile High in the USA

PostPosted: Sat Jun 16, 2018 6:35 am    Post subject: Reply with quote

Something like this now...?
config_eth0="x.y.z.a netmask 255.255.f.g
b.c.d.e netmask 255.255.h.i
j.k.l.m/n
::4/64
"
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6070
Location: Room 101

PostPosted: Sat Jun 16, 2018 8:39 am    Post subject: Re: two ip adresses for one interface? Reply with quote

bastibasti wrote:
current setup: config_br0="192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255"

bastibasti ... you might use CIDR notation:

Code:
config_br0="192.168.1.2/24 192.168.1.3/24"

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 41318
Location: 56N 3W

PostPosted: Sat Jun 16, 2018 10:29 am    Post subject: Reply with quote

bastibasti,

Mix and match works too.

Code:
# make sure to use iproute2
# Our own IPv4 and IPv6 setup
modules="iproute2"

config_eth0="5.9.82.14 netmask 255.255.255.224 brd 5.9.82.31
        2a01:4f8:162:c::2/64"

routes_eth0="default via 5.9.82.1
             default via fe80::1"

That's IPv4 and IPv6. The one entry per line is for ease of reading.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum