- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
4 e; }) w) `9 L9 `8 S配置方式如下:
0 ?( J6 N1 f M5 L0 L- I: \修改文件:
& `" H T: C2 V9 j" Y. j
) `5 V' N p3 E1 ^# ] cat /etc/netplan/00-installer-config.yaml
* V% _9 T/ \9 Z5 t& \, ~# This is the network config written by 'subiquity'
, D$ k$ |( I% Q: Wnetwork:
( `" H% t1 |7 n3 |; @ ethernets:
0 J! Y# n! Q& w& k. r( _+ I, X) V$ e enp2s0f0:2 h. |) K9 \! F* r5 E7 d1 h M4 E$ k
dhcp4: false
0 q6 ^ e5 t" w8 i% U, y: y addresses: [192.168.8.67/24]
; q# e7 \$ {; s* u% I+ c7 e8 [ gateway4: 192.168.8.1
2 L* ?1 t/ C5 r4 i6 w, p# x; J nameservers:% T$ u1 B( G8 a: @* G
addresses: [202.106.0.20,114.114.114.114]
7 A0 U% Y3 W# A enp2s0f1:+ E8 ? y) e1 a( ~+ {: E7 ^/ V
dhcp4: true
" X0 @9 Q+ X# }' ? enp8s0:: s: [8 |* c' H6 d) U f6 ^! y
dhcp4: true
( R c2 r1 l* T5 f! |3 N4 c% | enp9s0:3 y8 g6 r* |" ]4 Z7 }
dhcp4: true
0 ?1 B; Q H" D5 k$ o% K
r. f8 k, G+ u& R bonds:
2 m$ T5 N7 Z( C5 T+ A: @( j bond0:
! m% X# T ]' N8 M2 z/ L9 a addresses:. h# x" b/ @& K' b' B
- 192.178.196.65/24
) |+ D5 f0 y7 S3 Q0 I/ `# n/ V! | interfaces:! ]7 D1 P* p8 G: m1 X
- enp9s0' O0 _: h' v _0 A" D- w
parameters:
: t9 p5 r7 \, R& `9 I! S2 Y mode: active-backup
; Q4 w4 [' d& x' _ m; ~5 M; w" d mii-monitor-interval: 100
4 M4 K( F! j( B8 v8 P3 {" W
0 S! n8 L" a7 _) i) R, X( f
$ M- e: M2 r/ g, o9 } version: 2
" {/ j( {' L9 C* `. ?+ m3 z
% x6 F$ `& y M2 t: L) A1 i, Z( a
) @7 C2 s, i6 E" {; @) w- R+ @. c. T9 Q0 w! w
重启网络服务:1 k& o: Y- N5 N1 ]
# netplan apply2 w1 [6 H5 C& P) p* j
4 ^' M" T" W, O' J. g** (generate:2410): WARNING **: 12:08:47.122: `gateway4` has been deprecated, use default routes instead.
' r4 U, w3 Q. w0 m7 eSee the 'Default routes' section of the documentation for more details., Y& A7 E& q5 j! S! ^% b4 {9 L
: i7 `) f6 v, v" a' ?9 \1 c/ S
** (process:2408): WARNING **: 12:08:47.752: `gateway4` has been deprecated, use default routes instead.9 f- B+ a" O: l. V5 ~+ C
See the 'Default routes' section of the documentation for more details.; b- z' C/ L, s* ? D
$ {; a6 M6 n+ Q: P) h! \
** (process:2408): WARNING **: 12:08:47.764: `gateway4` has been deprecated, use default routes instead.8 k. I; C2 t6 H9 g; J
See the 'Default routes' section of the documentation for more details.
* D( h5 Y8 v. ^3 ?. y
) a7 J' t" b6 e% k** (process:2408): WARNING **: 12:08:48.190: `gateway4` has been deprecated, use default routes instead.
% c* A, ]6 A' q7 k, `) ~+ uSee the 'Default routes' section of the documentation for more details.
, a$ D* v) m1 @0 y' E1 U# ?/ R6 u/ p* B8 x# j0 u
** (process:2408): WARNING **: 12:08:48.190: `gateway4` has been deprecated, use default routes instead.. X4 [9 z: @" F9 P2 Q! x4 l( q
See the 'Default routes' section of the documentation for more details.
5 h; r/ E* K4 e6 s
/ f O1 B8 \: y
+ G0 m$ o, e0 e* @6 \- S查看网卡配置情况:3 o$ c3 I" C, Y6 s+ u; {
# ip addr4 R, }* ~3 l% j
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 10007 d! k! E n% s3 _8 w. i# `
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00" D- Z( \5 m! [3 T
inet 127.0.0.1/8 scope host lo* ], q# F4 O. M! o. I$ K
valid_lft forever preferred_lft forever C0 L% v7 Q7 F/ K
inet6 ::1/128 scope host
; z& b% k% v# G/ o u valid_lft forever preferred_lft forever
6 L9 c x" P9 J! F2: enp8s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000" A4 j/ ^, z) L* N C& U4 c: n
link/ether 00:e0:4c:68:40:1e brd ff:ff:ff:ff:ff:ff
[" Q6 n e3 i7 z9 r4 W' r3: enp9s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc fq_codel master bond0 state UP group default qlen 1000
: A( t$ b. Y7 i1 s1 y( ^ link/ether 86:18:9b:0e:95:1f brd ff:ff:ff:ff:ff:ff permaddr 00:e0:4c:68:40:1f4 t/ h: |) u! J) m, w' V5 D9 d! q
4: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000# t. P `* y3 b8 a# W. @" y
link/ether 80:d4:a5:b7:4b:31 brd ff:ff:ff:ff:ff:ff
0 Y+ T( S; S i9 R inet 192.168.8.67/24 brd 192.168.8.255 scope global enp2s0f0
& Z: n/ R! D, r5 J3 _( [ valid_lft forever preferred_lft forever
' m8 L6 i6 Q# D0 E9 M* V, { inet6 fe80::82d4:a5ff:feb7:4b31/64 scope link
; q" [1 Y1 I; l$ e valid_lft forever preferred_lft forever3 ^" o5 N7 W: w8 i" n
5: enp2s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
( u6 w; k1 X, Q! P* I link/ether 80:d4:a5:b7:4b:32 brd ff:ff:ff:ff:ff:ff
' |& z- X0 l6 d( [$ c inet6 fe80::82d4:a5ff:feb7:4b32/64 scope link
- V- \, v" a; a% y- @ valid_lft forever preferred_lft forever
; v5 Z( Q; T) X: ^- b3 a6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
- a% o- p! x- _7 [9 D link/ether 86:18:9b:0e:95:1f brd ff:ff:ff:ff:ff:ff/ `; D3 [$ W0 \" S# v
inet 192.178.196.65/24 brd 192.178.196.255 scope global bond0
" j- Q. @; w$ g/ r# i' n1 v2 f1 F! U8 w valid_lft forever preferred_lft forever
" ]1 P2 Y9 Q/ b9 _# ^ inet6 fe80::8418:9bff:fe0e:951f/64 scope link: W6 Q- n- i& G) x; h. p
valid_lft forever preferred_lft forever3 R7 \$ m4 p3 l, X) X
9 `# @7 a G7 B, w4 W _( R. D5 D
9 S7 L g0 d' ~# m
9 P# L, d1 f/ {6 i% ?2 W2 g4 s5 v- I9 U/ P5 z" X# b1 ~
+ ?' A7 N6 ~6 L$ L- _* Z- N
9 s6 A3 R( Z: j- D- u9 K8 A) a5 b# {. \# Z
. ~! \8 d7 E. M: w2 l& Z
: [) P' c8 D5 d- U. k! N
: p' z f) H* n
, Q. y* N% k- \+ U2 h/ S' R* I7 b4 G4 l3 V" K( Y/ f5 F! W# @
) l* T% E5 \2 L; W
3 `4 o$ |0 ]' b9 h
( k8 k4 j$ q$ E! f" W) s
# g d) V5 j5 O+ _ w" k6 A, n& x2 [ k; E. }9 [* \3 Y
( Z# d- R- }5 u' S
7 y/ p. H( C1 ?- P! v- v( x& n" _# ^8 g
/ d5 L. |: @9 L: y' M! k* J7 Q
& d2 ^" }6 V- q8 L9 f: s$ ]5 N
* s+ Z9 @, o; z$ S) g
$ d1 x5 J( I" d M
/ K! g& e' _4 I6 U
J# k; R( |& h, H8 d3 _+ K4 [4 B4 _) N% S9 V4 O9 P& `0 Z
. z* {0 a% x" H' {& i% G& i! {3 U8 Y
8 E1 v \/ B$ F. g: M
( p) D. N* s4 V g! d+ ]3 n6 U
% y; p$ e5 ]6 a
5 [# z; X2 r" ?6 q) c: H# Y& f
; R; D# B0 I C3 \. h) ]5 n; J* y$ j4 W$ k
& o3 U0 D. d) P" R
Z. O6 h; Y. u6 R$ d, @) A$ Q- S4 w0 w5 O# d
! _. ^: a- \0 ^# X6 N$ G! R
; f" w! z% Y6 X' T, {6 E
" j5 E2 b1 y7 w! S6 ?2 a* a( L
|
|