debian9怎么配置IP地址
答案:2 悬赏:10
解决时间 2021-01-16 06:42
- 提问者网友:孤山下
- 2021-01-16 00:48
debian9怎么配置IP地址
最佳答案
- 二级知识专家网友:空山清雨
- 2021-01-16 01:56
1、设置IP地址、网关
nano /etc/network/interfaces /etc/network/interfacesbak #备份原有配置文件
nano /etc/network/interfaces #编辑网网卡配置文件
auto lo
auto eth0 #开机自动连接网络
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ip
address 192.168.21.166 #设置ip地址
netmask 255.255.255.0 #设置子网掩码
gateway 192.168.21.2 #设置网关
ctrl+o #保存配置
ctrl+x #退出
nano /etc/network/interfaces /etc/network/interfacesbak #备份原有配置文件
nano /etc/network/interfaces #编辑网网卡配置文件
auto lo
auto eth0 #开机自动连接网络
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ip
address 192.168.21.166 #设置ip地址
netmask 255.255.255.0 #设置子网掩码
gateway 192.168.21.2 #设置网关
ctrl+o #保存配置
ctrl+x #退出
全部回答
- 1楼网友:神也偏爱
- 2021-01-16 03:27
1、设置IP地址、网关
nano /etc/network/interfaces /etc/network/interfacesbak #备份原有配置文件
nano /etc/network/interfaces #编辑网网卡配置文件
auto lo
auto eth0 #开机自动连接网络
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ip
address 192.168.21.166 #设置ip地址
netmask 255.255.255.0 #设置子网掩码
gateway 192.168.21.2 #设置网关
ctrl+o #保存配置
ctrl+x #退出
nano /etc/network/interfaces /etc/network/interfacesbak #备份原有配置文件
nano /etc/network/interfaces #编辑网网卡配置文件
auto lo
auto eth0 #开机自动连接网络
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ip
address 192.168.21.166 #设置ip地址
netmask 255.255.255.0 #设置子网掩码
gateway 192.168.21.2 #设置网关
ctrl+o #保存配置
ctrl+x #退出
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯
• 手机登qq时,显示手机磁盘不足,清理后重新登 |
• 刺客的套装怎么选啊? |