linux增加网卡ip地址

linux增加网卡ip地址


example

ip addr add 192.168.5.124/24 dev eth0 label eth0:5
ifconfig eth0:5 up

ip addr del 192.168.1.100/24 dev eth0

example

ip addr add 192.168.10.199/24 dev eth0 label eth0:10
route add default gw 192.168.10.254

reference:
https://blog.csdn.net/qq_43445867/article/details/140925196

posted @ 2025-09-18 12:13  王阳开  阅读(8)  评论(0)    收藏  举报