1

I'm trying to install vicibox, an OpenSUSE distro which includes Asterisk. The fine manual says to set a static ip address with yast lan.

What's the difference between:

  ││[ ] Change Hostname via DHCP                                                                                                                                               ││ 
  ││[x] Assign Hostname to Loopback IP 

I have my hostname set:

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                                                                         │                                                                                   │││ 
  ││▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ └───────────────────────────────────────────────────────────────────────────────────┘││ 
  │└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘│ 
  │                                                                                                                                                                             │ 
  │                                                                                                                                                                             │ 
  │                    

with good connectivity:

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:~ # 

but want to set the ip address to static:

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                                                                                                                                      │   ││ 
  ││   │                                                                                                                                                                   │   ││ 
  ││   │                                                                                                                                                                   │   ││ 
  ││   │               

yet, as soon as I do so, I lose connectivity:

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:~ # 

why can't I ping Google?

See also:

http://www.vicidial.org/VICIDIALforum/viewtopic.php?f=4&t=34261

----------------------------------------------------------------update

after changing to a static ip address. It's the same ip address as when dynamic.

With static 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:~ # 

and then, switching back to DHCP should, I would think, restore an ability to ping 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:~ # 

apparently not..

  • What is your IP address before you assign it the static IP? – devnull Mar 20 '15 at 5:37
  • Do you have a default route? Please check or include output of ip addr and ip route. – Celada Mar 20 '15 at 5:37
  • @DevNull same ip address before and after – Thufir Mar 20 '15 at 5:50
  • @Celada I updated the question with that information. – Thufir Mar 20 '15 at 5:51
  • page 9 of the manual you referenced, steps 22 through 24, says how to enter the address of your router in the Default IPv4 Gateway field of the Routing tab. What address did you enter? – Mark Plotnick Mar 20 '15 at 17:12
2

From your output:

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:~ # 

You don't have a default route. So you can only reach things on 127.0.0.0/8 (localhost) or 192.168.0.0/24 (the local subnet).

Add a default route and you should be good to go.

  • default route means? from what to what? I understand your words, not so much the output from ip route. – Thufir Mar 20 '15 at 6:18
  • Please start with the Wikipedia page or other information you can find online. – Celada Mar 20 '15 at 6:23
  • 3
    @Celada: I would also suggest: before switching from a DHCP config to a static one, you should be able to provide everything DHCP provides to your server to be network able: IPv4, IPv6, broadcast addresses, routes, DNS, proxies… Else you shouldn't :). – daniel Azuelos Mar 20 '15 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.