本篇文章重点为大家讲解一下RHEL7中添加自定义网卡并更改网卡接口具体方法,有需要的小伙伴可以参考一下。
创新互联建站主营安义网站建设的网络公司,主营网站建设方案,重庆App定制开发,安义h5重庆小程序开发搭建,安义网站营销推广欢迎安义等地区企业咨询
VMware Workstation Pro Red Hat Enterprise Linux Server release 7.3
[root@Jaking ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
[root@Jaking ~]# ifconfig
ens33: flags=4163
mtu 1500 inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::250:56ff:fe2b:88bf prefixlen 64 scopeid 0x20 ether 00:50:56:2b:88:bf txqueuelen 1000 (Ethernet) RX packets 454 bytes 44638 (43.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 339 bytes 33150 (32.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73
mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback) RX packets 112 bytes 9492 (9.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 112 bytes 9492 (9.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@Jaking ~]# ifconfig
ens33: flags=4163
mtu 1500 inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::250:56ff:fe2b:88bf prefixlen 64 scopeid 0x20 ether 00:50:56:2b:88:bf txqueuelen 1000 (Ethernet) RX packets 488 bytes 47935 (46.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 356 bytes 35698 (34.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens38: flags=4163
mtu 1500 ether 00:0c:29:46:f9:b8 txqueuelen 1000 (Ethernet) RX packets 5 bytes 594 (594.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73
mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback) RX packets 112 bytes 9492 (9.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 112 bytes 9492 (9.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@Jaking ~]# cd /etc/sysconfig/network-scripts/
[root@Jaking network-scripts]# ls
ifcfg-ens33 ifdown-ipv6 ifdown-TeamPort ifup-ippp ifup-routes network-functions
ifcfg-lo ifdown-isdn ifdown-tunnel ifup-ipv6 ifup-sit network-functions-ipv6
ifdown ifdown-post ifup ifup-isdn ifup-Team
ifdown-bnep ifdown-ppp ifup-aliases ifup-plip ifup-TeamPort
ifdown-eth ifdown-routes ifup-bnep ifup-plusb ifup-tunnel
ifdown-ib ifdown-sit ifup-eth ifup-post ifup-wireless
ifdown-ippp ifdown-Team ifup-ib ifup-ppp init.ipv6-global
[root@Jaking network-scripts]# cp ifcfg-ens33 ifcfg-ens34
[root@Jaking network-scripts]# vim ifcfg-ens34
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
NAME=ens34
DEVICE=ens34
ONBOOT=yes
IPADDR=172.16.100.100
NETMASK=255.255.255.0
[root@Jaking network-scripts]# ip link set ens38 down
[root@Jaking network-scripts]# ifconfig
ens33: flags=4163
mtu 1500 inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::250:56ff:fe2b:88bf prefixlen 64 scopeid 0x20 ether 00:50:56:2b:88:bf txqueuelen 1000 (Ethernet) RX packets 812 bytes 74791 (73.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 537 bytes 61780 (60.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73
mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback) RX packets 112 bytes 9492 (9.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 112 bytes 9492 (9.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@Jaking network-scripts]# ip link set ens38 name ens34
[root@Jaking network-scripts]# ip link set ens34 up
[root@Jaking network-scripts]# systemctl restart network
[root@Jaking network-scripts]# ifconfig
ens33: flags=4163
mtu 1500 inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::250:56ff:fe2b:88bf prefixlen 64 scopeid 0x20 ether 00:50:56:2b:88:bf txqueuelen 1000 (Ethernet) RX packets 1389 bytes 123239 (120.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 913 bytes 117924 (115.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens34: flags=4163
mtu 1500 inet 172.16.100.100 netmask 255.255.255.0 broadcast 192.168.100.255 ether 00:0c:29:46:f9:b8 txqueuelen 1000 (Ethernet) RX packets 5 bytes 594 (594.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2 bytes 120 (120.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73
mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback) RX packets 148 bytes 12552 (12.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 148 bytes 12552 (12.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
网页名称:RHEL7中添加自定义网卡并更改网卡接口具体方法
文章转载:http://www.shufengxianlan.com/qtweb/news2/38202.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联