설치하려고 하는데비시박스, Asterisk를 포함하는 OpenSUSE 배포판입니다. 이것아름다운 매뉴얼고정 IP 주소를 설정한다고 합니다 yast lan
.
차이점이 뭐야:
││[ ] Change Hostname via DHCP ││
││[x] Assign Hostname to Loopback IP
호스트 이름을 설정했습니다.
YaST2 - lan @ arrakis
Network Settings
┌Global Options──Overview──Hostname/DNS──Routing──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│┌Hostname and Domain Name───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
││Hostname Domain Name ││
││arrakis▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ bounceme.net▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ││
││[ ] Change Hostname via DHCP ││
││[x] Assign Hostname to Loopback IP ││
│└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘│
│Modify DNS configuration Custom Policy Rule │
│Use Default Policy▒▒▒▒▒↓ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒↓ │
│┌Name Servers and Domain Search List────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
││Name Server 1 ┌Domain Search──────────────────────────────────────────────────────────────────────┐││
││8.8.8.8▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ │google.com │││
││Name Server 2 │ │││
││8.8.4.4▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ │ │││
││Name Server 3 │ │││
││▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ └───────────────────────────────────────────────────────────────────────────────────┘││
│└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘│
│ │
│ │
│
연결성이 양호함:
arrakis:~ #
arrakis:~ # uname -a
Linux arrakis 3.11.10-21-default #1 SMP Mon Jul 21 15:28:46 UTC 2014 (9a9565d) x86_64 x86_64 x86_64 GNU/Linux
arrakis:~ #
arrakis:~ # cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 arrakis.bounceme.net arrakis
arrakis:~ #
arrakis:~ # hostname
arrakis
arrakis:~ #
arrakis:~ # ping arrakis.bounceme.net
PING arrakis.bounceme.net (127.0.0.2) 56(84) bytes of data.
64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=2 ttl=64 time=0.050 ms
64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=3 ttl=64 time=0.049 ms
^C
--- arrakis.bounceme.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.040/0.046/0.050/0.007 ms
arrakis:~ #
arrakis:~ #
arrakis:~ # ping arrakis
PING arrakis.bounceme.net (127.0.0.2) 56(84) bytes of data.
64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=1 ttl=64 time=0.036 ms
64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=2 ttl=64 time=0.041 ms
64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=3 ttl=64 time=0.041 ms
c64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=4 ttl=64 time=0.040 ms
64 bytes from arrakis.bounceme.net (127.0.0.2): icmp_seq=5 ttl=64 time=0.043 ms
^C
--- arrakis.bounceme.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3996ms
rtt min/avg/max/mdev = 0.036/0.040/0.043/0.004 ms
arrakis:~ #
arrakis:~ #
arrakis:~ # ifconfig
enp5s0 Link encap:Ethernet HWaddr 50:E5:49:C2:C8:05
inet addr:192.168.0.21 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::52e5:49ff:fec2:c805/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2632 errors:0 dropped:0 overruns:0 frame:0
TX packets:278 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:173852 (169.7 Kb) TX bytes:38509 (37.6 Kb)
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:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3248 (3.1 Kb) TX bytes:3248 (3.1 Kb)
arrakis:~ #
하지만 IP 주소를 정적으로 설정하고 싶습니다.
YaST2 - lan @ arrakis
Network Card Setup
┌General──Address──Hardware───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Device Type Configuration Name │
│ Ethernet▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒↓ enp5s0▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ │
│( ) No Link and IP Setup (Bonding Slaves) [ ] Use iBFT values │
│( ) Dynamic Address DHCP▒▒▒▒▒▒▒▒▒▒↓ DHCP both version 4 and 6▒↓ │
│(x) Statically assigned IP Address │
│IP Address Subnet Mask Hostname │
│192.168.0.21▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 255.255.255.0▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ arrakis.bounceme.net▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ │
│┌Additional Addresses───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
││ ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ ││
││ │Alias Name│IP Address│Netmask │ ││
││ │ │ ││
││ │ │ ││
││ │
그러나 이렇게 하면 연결이 끊어집니다.
arrakis:~ # yast lan
arrakis:~ #
arrakis:~ #
arrakis:~ # ifconfig
enp5s0 Link encap:Ethernet HWaddr 50:E5:49:C2:C8:05
inet addr:192.168.0.21 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::52e5:49ff:fec2:c805/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4027 errors:0 dropped:0 overruns:0 frame:0
TX packets:858 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:271734 (265.3 Kb) TX bytes:265009 (258.7 Kb)
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:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3248 (3.1 Kb) TX bytes:3248 (3.1 Kb)
arrakis:~ #
arrakis:~ #
arrakis:~ # ping google.com
ping: unknown host google.com
arrakis:~ #
왜 Google에 핑을 보낼 수 없나요?
또한보십시오:
http://www.vicidial.org/VICIDIALforum/viewtopic.php?f=4&t=34261
------------------------------------- - - - - - - - 갱신
고정 IP 주소로 변경한 후. 동적일 경우 IP 주소와 동일합니다.
고정 IP 사용:
arrakis:~ #
arrakis:~ # ifconfig
enp5s0 Link encap:Ethernet HWaddr 50:E5:49:C2:C8:05
inet addr:192.168.0.21 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::52e5:49ff:fec2:c805/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10438 errors:0 dropped:0 overruns:0 frame:0
TX packets:1133 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:671095 (655.3 Kb) TX bytes:300227 (293.1 Kb)
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:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3248 (3.1 Kb) TX bytes:3248 (3.1 Kb)
arrakis:~ #
arrakis:~ # ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 50:e5:49:c2:c8:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.21/24 brd 192.168.0.255 scope global enp5s0
valid_lft forever preferred_lft forever
inet6 fe80::52e5:49ff:fec2:c805/64 scope link
valid_lft forever preferred_lft forever
arrakis:~ #
arrakis:~ # ip route
127.0.0.0/8 dev lo scope link
192.168.0.0/24 dev enp5s0 proto kernel scope link src 192.168.0.21
arrakis:~ #
arrakis:~ # ping www.google.com
ping: unknown host www.google.com
arrakis:~ #
arrakis:~ # yast lan
arrakis:~ #
그런 다음 DHCP로 다시 전환하면 Google에 핑을 보내는 기능이 복원되어야 한다고 생각했습니다.
arrakis:~ #
arrakis:~ # ping www.google.com
ping: unknown host www.google.com
arrakis:~ #
arrakis:~ # ip route
127.0.0.0/8 dev lo scope link
192.168.0.0/24 dev enp5s0 proto kernel scope link src 192.168.0.21
arrakis:~ #
arrakis:~ # ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 50:e5:49:c2:c8:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.21/24 brd 192.168.0.255 scope global enp5s0
valid_lft forever preferred_lft forever
inet6 fe80::52e5:49ff:fec2:c805/64 scope link
valid_lft forever preferred_lft forever
arrakis:~ #
arrakis:~ # ifconfig
enp5s0 Link encap:Ethernet HWaddr 50:E5:49:C2:C8:05
inet addr:192.168.0.21 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::52e5:49ff:fec2:c805/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11178 errors:0 dropped:0 overruns:0 frame:0
TX packets:1490 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:723997 (707.0 Kb) TX bytes:415085 (405.3 Kb)
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:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3248 (3.1 Kb) TX bytes:3248 (3.1 Kb)
arrakis:~ #
당연히 아니..
답변1
출력에서:
arrakis:~ # ip route
127.0.0.0/8 dev lo scope link
192.168.0.0/24 dev enp5s0 proto kernel scope link src 192.168.0.21
arrakis:~ #
기본 경로가 없습니다. 따라서 127.0.0.0/8
(localhost) 또는 (로컬 서브넷) 192.168.0.0/24
의 콘텐츠 에만 액세스할 수 있습니다.
기본 경로를 추가하면 됩니다.