Skip to content

A Two NIC Question

I have two NIC's in this box (with one active and managed), and I have the following in /etc/systemd/network/ 20-wired.network

[Match]

Name=eno1

[Network]

Address=10X.XXX.91.154/29

Gateway=10X.XXX.91.158

DNS=4.2.2.1

DNS=4.2.2.2

​

Do I need another file for the second NIC? If not, how do the stanza's work exactly since they are not nested in obvious stanzas? So does "[Match]" start a new stanza so to speak?

Also, the second NIC will be DHCP configured.

​

-KQ6UP

8 points3 comments
Open on Reddit
About this post
Posted
Archived
Score
8 · 79% up
Kind
Text
ID
10squp6

Author

10
posts
25
comments
0
media
View profile

3 comments

You can wildcard the Name if you want multiple NICs to have the same config (e.g. DHCP). Otherwise yes, you need separate files.

3 points
kq6upOP1 hidden

So just add it in 30-wired and because it is by NIC udev name, order does not matter (eg what file matches first).

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.