工作中经常用到Ubuntu网络设定,以eth0为例,记录网络配置:
首先 ifconfig -a 列出所有网口:
然后进行网络配置,输入内容如下:
auto eth0
iface eth0 inet static
address 172.16.21.123
netmask 255.255.255.0
gateway 172.16.21.254
broadcast 172.16.21.255
最后重启网络
ifconfig 检查是否已经配置好
工作中经常用到Ubuntu网络设定,以eth0为例,记录网络配置:
首先 ifconfig -a 列出所有网口:
然后进行网络配置,输入内容如下:
auto eth0
iface eth0 inet static
address 172.16.21.123
netmask 255.255.255.0
gateway 172.16.21.254
broadcast 172.16.21.255
最后重启网络
ifconfig 检查是否已经配置好