Beaglebone Black에서 eth1에 대한 고정 IP 설정

Beaglebone Black에서 eth1에 대한 고정 IP 설정

시작 후 eth1 인터페이스에 고정 IP 주소를 설정해야 합니다. 그러나 부팅 시 장치는 항상 /etc/network/interfaces에 구성된 IP 주소와 다른 IP 주소를 갖습니다. 이것은 Beagle Bone의 Linux 운영 체제입니다.

내 비글본에서 다음 Linux 버전을 사용하고 있습니다.

root@beaglebone:/etc/network# cat /proc/version
Linux version 4.4.54-ti-r93 (root@a4-imx6q-wandboard-2gb) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Fri Mar 17 13:08:22 UTC 2017

파일은 /etc/network/interfaces아래와 같습니다.

##connman: WiFi
#
#connmanctl
#connmanctl> tether wifi off
#connmanctl> enable wifi
#connmanctl> scan wifi
#connmanctl> services
#connmanctl> agent on
#connmanctl> connect wifi_*_managed_psk
#connmanctl> quit

auto eth1
iface eth1 inet static
    address 192.168.3.10
    netmask 255.255.255.0
    network 192.168.3.0
    gateway 192.168.3.1
    dns-nameservers 8.8.8.8

# Ethernet/RNDIS gadget (g_ether)
# Used by: /opt/scripts/boot/autoconfigure_usb0.sh
iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.0.0
    network 192.168.7.0
    gateway 192.168.7.1

ifconfig 출력은 다음과 같습니다

root@beaglebone:/etc/network# ifconfig
eth0      Link encap:Ethernet  HWaddr 04:a3:16:e1:5d:39
          UP BROADCAST MULTICAST DYNAMIC  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)
          Interrupt:173

eth1      Link encap:Ethernet  HWaddr 20:c9:d0:29:e0:88
          inet addr:169.254.191.196  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::22c9:d0ff:fe29:e088/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:121 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7438 (7.2 KiB)  TX bytes:42686 (41.6 KiB)

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:250 errors:0 dropped:0 overruns:0 frame:0
          TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:19556 (19.0 KiB)  TX bytes:19556 (19.0 KiB)

usb0      Link encap:Ethernet  HWaddr 04:a3:16:e1:5d:3b
          inet addr:192.168.7.2  Bcast:192.168.255.255  Mask:255.255.0.0
          inet6 addr: fe80::6a3:16ff:fee1:5d3b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:774 errors:0 dropped:0 overruns:0 frame:0
          TX packets:519 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:101935 (99.5 KiB)  TX bytes:93548 (91.3 KiB)

usb1      Link encap:Ethernet  HWaddr 04:a3:16:e1:5d:3e
          inet addr:192.168.6.2  Bcast:192.168.6.3  Mask:255.255.255.252
          inet6 addr: fe80::6a3:16ff:fee1:5d3e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:58485 (57.1 KiB)  TX bytes:16017 (15.6 KiB)

관련 정보