Linux上配置网卡IP,添加路由

https://www.cnblogs.com/z-joshua/p/6378032.html

首先让我们查看当前机器的路由表,执行如下命令:

route -n

给网卡eth1设置IP地址192.168.168.168

ifconfig eth1 192.168.168.168/24

添加路由表项

route add -net 192.168.168.0 netmask 255.255.255.0 gw 192.168.168.1

猜你喜欢

转载自blog.csdn.net/salmonwilliam/article/details/82658909