请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

interface ens33是固定写法吗?

老师您好:我的服务器现在启了两个keepalived节点 但是我其中一个用interface ens33配置信息 keepalived启动不起来 我就都改成了interface eth0 其中的不同的地方是:
virtual_ipaddress {
172.19.0.100
}
virtual_ipaddress {
172.19.0.101
}
我的服务器我执行 ip address命令如下

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:cb:24:85 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.8/20 brd 172.17.15.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fecb:2485/64 scope link
valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:e9:47:99:a3 brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:e9ff:fe47:99a3/64 scope link
valid_lft forever preferred_lft forever
11: br-601a26825f36: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:d0:f7:45:c9 brd ff:ff:ff:ff:ff:ff
inet 172.19.0.1/16 scope global br-601a26825f36
valid_lft forever preferred_lft forever
inet6 fe80::42:d0ff:fef7:45c9/64 scope link
valid_lft forever preferred_lft forever
17: veth62f1b47@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-601a26825f36 state UP group default
link/ether 6e:7d:58:6d:c0:4e brd ff:ff:ff:ff:ff:ff link-netnsid 1
inet6 fe80::6c7d:58ff:fe6d:c04e/64 scope link
valid_lft forever preferred_lft forever
19: veth6d8ab97@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-601a26825f36 state UP group default
link/ether ea:cc:73:a3:01:2b brd ff:ff:ff:ff:ff:ff link-netnsid 2
inet6 fe80::e8cc:73ff:fea3:12b/64 scope link
valid_lft forever preferred_lft forever
21: veth3011869@if20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-601a26825f36 state UP group default
link/ether 36:17:40:0a:10:3d brd ff:ff:ff:ff:ff:ff link-netnsid 3
inet6 fe80::3417:40ff:fe0a:103d/64 scope link
valid_lft forever preferred_lft forever
23: veth415890f@if22: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-601a26825f36 state UP group default
link/ether 82:2d:97:d6:68:2e brd ff:ff:ff:ff:ff:ff link-netnsid 4
inet6 fe80::802d:97ff:fed6:682e/64 scope link
valid_lft forever preferred_lft forever
27: veth8708d24@if26: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-601a26825f36 state UP group default
link/ether 22:bb:84:f1:4c:90 brd ff:ff:ff:ff:ff:ff link-netnsid 5
inet6 fe80::20bb:84ff:fef1:4c90/64 scope link
valid_lft forever preferred_lft forever
35: veth57ed14d@if34: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-601a26825f36 state UP group default
link/ether da:42:7b:5e:69:e6 brd ff:ff:ff:ff:ff:ff link-netnsid 7
inet6 fe80::d842:7bff:fe5e:69e6/64 scope link
valid_lft forever preferred_lft forever
39: veth9f9990b@if38: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-601a26825f36 state UP group default
link/ether 96:b6:f5:92:5b:bd brd ff:ff:ff:ff:ff:ff link-netnsid 8
inet6 fe80::94b6:f5ff:fe92:5bbd/64 scope link
valid_lft forever preferred_lft forever

正在回答 回答被采纳积分+3

2回答

神思者 2020-03-13 22:03:57


https://img1.sycdn.imooc.com//szimg/5e6b92b009fe1b9808000766.jpg

h2容器里面的网卡也叫做eth0,没有不一样

0 回复 有任何疑惑可以回复我~
神思者 2020-03-13 20:37:22

eth0是docker容器的网卡,只有在docker容器里面才能看到这个网卡。ens33是虚拟机的网卡

0 回复 有任何疑惑可以回复我~
  • 提问者 周鸣 #1
    那是所有的docker容器都公用这个网卡是吗?还是不同的容器都会有一个网卡。还有我看你您给我的资料里 h1的配置中 interface  ens33是这个配置项目。h1为什么跟h2的配置不一样呢
    回复 有任何疑惑可以回复我~ 2020-03-13 20:55:37
  • 神思者 回复 提问者 周鸣 #2
    所有的docker容器网卡都叫做eth0
    回复 有任何疑惑可以回复我~ 2020-03-13 22:03:14
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信