{"id":718,"date":"2019-04-27T22:07:03","date_gmt":"2019-04-27T14:07:03","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=718"},"modified":"2022-05-06T17:26:55","modified_gmt":"2022-05-06T09:26:55","slug":"ifconfig","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/ifconfig","title":{"rendered":"ifconfig\u547d\u4ee4 – \u663e\u793a\u6216\u8bbe\u7f6e\u7f51\u7edc\u8bbe\u5907\u53c2\u6570\u4fe1\u606f"},"content":{"rendered":"\n
ifconfig\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dnetwork interfaces configuring\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u663e\u793a\u6216\u8bbe\u7f6e\u7f51\u7edc\u8bbe\u5907\u53c2\u6570\u4fe1\u606f\u3002\u5728Windows\u7cfb\u7edf\u4e2d\u4e0e\u4e4b\u7c7b\u4f3c\u7684\u547d\u4ee4\u53eb\u505aipconfig\uff0c\u540c\u6837\u7684\u529f\u80fd\u53ef\u4ee5\u4f7f\u7528ifconfig\u53bb\u5b8c\u6210\u3002<\/p>\n\n\n\n
\u901a\u5e38\u4e0d\u5efa\u8bae\u4f7f\u7528ifconfig\u547d\u4ee4\u914d\u7f6e\u7f51\u7edc\u8bbe\u5907\u7684\u53c2\u6570\u4fe1\u606f\uff0c\u56e0\u4e3a\u4e00\u65e6\u670d\u52a1\u5668\u91cd\u542f\uff0c\u914d\u7f6e\u8fc7\u7684\u53c2\u6570\u4f1a\u81ea\u52a8\u5931\u6548\uff0c\u8fd8\u662f\u7f16\u5199\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\u66f4\u7a33\u59a5\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>ifconfig [\u53c2\u6570] [\u7f51\u5361\u8bbe\u5907]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u663e\u793a\u7cfb\u7edf\u7684\u7f51\u7edc\u8bbe\u5907\u4fe1\u606f\uff1a <\/p>\n\n\n\n \u5bf9\u6307\u5b9a\u7684\u7f51\u5361\u8bbe\u5907\u4f9d\u6b21\u8fdb\u884c\u5173\u95ed\u548c\u542f\u52a8\u64cd\u4f5c\uff1a<\/p>\n\n\n\n \u5bf9\u6307\u5b9a\u7684\u7f51\u5361\u8bbe\u5907\u6267\u884c\u4fee\u6539IP\u5730\u5740\u64cd\u4f5c\uff1a<\/p>\n\n\n\n \u5bf9\u6307\u5b9a\u7684\u7f51\u5361\u8bbe\u5907\u6267\u884c\u4fee\u6539MAC\u5730\u5740\u64cd\u4f5c\uff1a<\/p>\n\n\n\n \u6ce8\u610fLinux\u7cfb\u7edf\u4e2d\u7684MAC\u5730\u5740\u95f4\u9694\u7b26\u4e3a\u5192\u53f7\uff08\uff1a\uff09\uff0c\u800c\u5728Windows\u7cfb\u7edf\u4e2d\u95f4\u9694\u7b26\u4e3a\u51cf\u53f7\uff08-\uff09\u3002<\/p>\n\n\n\n \u5bf9\u6307\u5b9a\u7684\u7f51\u5361\u8bbe\u5907\u4f9d\u6b21\u8fdb\u884cARP\u534f\u8bae\u5173\u95ed\u548c\u5f00\u542f\u64cd\u4f5c\uff1a<\/p>\n\n\n\n ifconfig\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dnetwork interfaces configuring\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/718"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=718"}],"version-history":[{"count":15,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/718\/revisions"}],"predecessor-version":[{"id":9312,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/718\/revisions\/9312"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}add<\u5730\u5740> <\/td> \u8bbe\u7f6e\u7f51\u7edc\u8bbe\u5907IPv6\u7684IP\u5730\u5740 <\/td><\/tr> del<\u5730\u5740> <\/td> \u5220\u9664\u7f51\u7edc\u8bbe\u5907IPv6\u7684IP\u5730\u5740 <\/td><\/tr> down<\/td> \u5173\u95ed\u6307\u5b9a\u7684\u7f51\u7edc\u8bbe\u5907 <\/td><\/tr> up<\/td> \u542f\u52a8\u6307\u5b9a\u7684\u7f51\u7edc\u8bbe\u5907 <\/td><\/tr> IP\u5730\u5740<\/td> \u6307\u5b9a\u7f51\u7edc\u8bbe\u5907\u7684IP\u5730\u5740 <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# ifconfig<\/strong>\nens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500\n inet 192.168.10.30 netmask 255.255.255.0 broadcast 192.168.10.255\n inet6 fe80::4d16:980c:e0fe:51c2 prefixlen 64 scopeid 0x20<link>\n ether 00:0c:29:60:cd:ee txqueuelen 1000 (Ethernet)\n RX packets 407 bytes 34581 (33.7 KiB)\n RX errors 0 dropped 0 overruns 0 frame 0\n TX packets 59 bytes 6324 (6.1 KiB)\n TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\n\n\n
[root@linuxcool ~]# ifconfig ens160 down<\/strong>\n[root@linuxcool ~]# ifconfig ens160 up<\/strong><\/pre>\n\n\n\n
[root@linuxcool ~]# ifconfig ens160 192.168.10.20 netmask 255.255.255.0<\/strong>\n<\/pre>\n\n\n\n
[root@linuxcool ~]# ifconfig ens160 hw ether 00:aa:bb:cc:dd:ee<\/strong><\/pre>\n\n\n\n
[root@linuxcool ~]# ifconfig ens160 -arp<\/strong>\n[root@linuxcool ~]# ifconfig ens160 arp<\/strong>\n<\/pre>\n","protected":false},"excerpt":{"rendered":"