Ubuntu網絡network eth0配置 | ubuntu network configuration

本文首發於我的博客kezunlin.me/post/5076bc…,歡迎閱讀!ios

ubuntu network configurationchrome

Guide

network proxy

  • System wide: Network--->None/Manual
  • chrome: can not set
  • firefox: about:preferences---> Network Proxy

eth0 config

rename xxx to eth0

errors may occur:ubuntu

Ubuntu networking restart | cannot find device 'eth0'複製代碼

check eth0vim

$ dmesg | grep eth 複製代碼
[5.715564] e1000 0000:02:01.0 eth0: (PCI:66MHz:32-bit) 00:0c:29:7d:bf:43
    [5.715573] e1000 0000:02:01.0 eth0: Intel(R) PRO/1000 Network Connection
    [5.719709] e1000 0000:02:01.0 ens33: renamed from eth0複製代碼

and we get ens33 renamed from eth0, we need to change it back to eth0.less

solution

(1). edit grub and updateide

$ sudo vim /etc/default/grub複製代碼
#GRUB_CMDLINE_LINUX=""
    GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"複製代碼
$ sudo update-grub複製代碼

(2) edit network interfacesoop

auto lo
    iface lo inet loopback複製代碼
auto eth0
    iface eth0 inet static
    address 192.168.1.77 
    netmask 255.255.255.0
    gateway 192.168.1.1 複製代碼

(3) rebootpost

sudo reboot now複製代碼

(4) check eth0ui

$ sudo ifconfig複製代碼
eth0      Link encap:Ethernet  HWaddr 80:fa:5b:47:92:8a  
              inet addr:192.168.1.77  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)複製代碼
lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:4640 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4640 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:865530 (865.5 KB)  TX bytes:865530 (865.5 KB)複製代碼
wlan0     Link encap:Ethernet  HWaddr b0:35:9f:53:68:c6  
              inet addr:192.168.0.130  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::a3d7:e190:6fb3:133/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:6536 errors:0 dropped:0 overruns:0 frame:0
              TX packets:380 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:581427 (581.4 KB)  TX bytes:46439 (46.4 KB)複製代碼

OK. Now we get eth0,wlan0 properly set.this

Reference

History

  • 20180108: created
  • 20180222: add eth0 part.

Copyright

相關文章
相關標籤/搜索