Some common commands for setting network parameters in linux-linux operation and maintenance

Here are three commands related to network settings: ifconfig: query, set network card and ip, subnet mask, etc. Parameters (need to install the net-tools tool first) ifup, ifdown: start and close the network interface route: view 、Configure routing information ifconfig First look at the ifconfig command ifconfig [network card name] [options] up, down: enable or disable the network interface mtu: set the mtu value netmask: Set the subnet mask broadcast: Set the broadcast address First look at the first example, to view all network cards on the system, just enter the ifconfig command without adding any parameters # ifconfig eth0: flags=4163 mtu 1500 inet 192.168.2.220 netmask 255.255.255.0 broadcast 192.168.2.255 inet6 fe80::1733:cf21:906d:57af prefixlen 64 scopeid 0x20 ether 00:0c:29:84:5b:d0 txqueuelen 1000 (Ethernet) RX packets 9946 bytes 10315936 (9.8 MiB) RX errors 0 dropped 3 overruns 0 frame 0 TX packets 2208 bytes 186213 (181.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 … From the output information of this command, we can get a lot of information, such as network card name, ip address, subnet mask, broadcast address, etc. Let’s continue to look at a few Example # Modify the ip address # ifconfig…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索