2016年12月6日 星期二

Linux 的網路連線設定

source:
http://askubuntu.com/questions/760871/network-settings-fail-for-ubuntu-xenial64-vagrant-box

Actually, additionally to Maximes answer, you could change the GRUB commandline in your box until the new version is propagated.
Just go to /etc/default/grub and set the appropriate line to GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" You have to change the /etc/network/interfacesto reflect the correct names (eth0...)
source:

$ edit /etc/network/interfaces

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
# automatically added when upgrading
auto eth0
iface eth0 inet static
        address 211.21.247.10
        netmask 255.255.255.248
        network 211.23.247.8
        broadcast 211.23.247.15
        gateway 211.23.247.9

$ /etc/init.d/networking stop         # 停掉網路裝置
$ ifconfig                            # 你會發現空空如也
$ /etc/init.d/networking start        # 啟動網路裝置
$ ifconfig                            # 網路裝置回覆 
$ route -n                            # 網路裝置回覆 

沒有留言:

張貼留言