우분투 서버 17.10에서 네트웍 장치 사용 변경

우분투 서버 17.10을 설치하면서 기본 네트웍 장치를 wifi로 했었다.
그 이후 이걸 랜카드로 바꾸려고 하는데 /etc/network/interfaces 의 내용을 바꿔도 적용이 안된다.
애초에 이 파일을 열었을때 안에 내용이

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# Generated by debian-installer.

# The loopback interface
auto lo
iface lo inet loopback


이렇게 밖에 없다. wifi 관련된 내용이 보이질 않아 뭔가 이상하다 생각하면서도 일단 
auto enp3s0
iface enp3s0 inet dhcp
을 넣어 봤다. (랜카드가 enp3s0로 잡혀 있다)

그리고 network 서비스를 재시동 하려고 하는데 network 또는 networking 또는 network-manager 등의 어떠한 서비스도 프로세스에 없다.

뭔가 많이 다르다...

그러다 /etc/netplan이라는 것들 발견하고 그 안에 가보니 (파일명).yaml 이라는 놈이 있다.
열어보니 

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  wifis:
    wlp2s0:
      dhcp4: yes
      access-points:
        ****:
          password: *********

이런게 있다.

이걸 
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: yes
로 수정해 주고 나와서
sudo netplan apply를 실행 해 주니 
  *-network DISABLED        
       description: Wireless interface
       product: QCA9565 / AR9565 Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 01
       serial: 40:b8:9a:33:32:0f
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=4.13.0-16-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:18 memory:91100000-9117ffff memory:91180000-9118ffff
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 15
       serial: 2c:60:0c:b7:87:2a
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.0.7 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:195 ioport:1000(size=256) memory:91004000-91004fff memory:91000000-91003fff

로 된다.

랜카드 추가하면 저 파일에 같은 형식으로 적어주고 netplan apply 해주면 되는거 같다.

댓글

이 블로그의 인기 게시물

영화 릴 화질 기준