Disable AP and set static IP



  • And here's the ifconfig output with DHCP:

    
    root@Omega-3DA9:/# ifconfig
    apcli0    Link encap:Ethernet  HWaddr 88:1E:59:01:3D:AB
              inet addr:192.168.5.186  Bcast:192.168.15.255  Mask:255.255.240.0
              inet6 addr: fe80::8a1e:59ff:fe01:3dab/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:1595 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)
    
    br-wlan   Link encap:Ethernet  HWaddr 88:1E:59:01:3D:A9
              inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
              inet6 addr: fe80::8a1e:59ff:fe01:3da9/64 Scope:Link
              inet6 addr: fd1d:48c4:7633::1/60 Scope:Global
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:7305 (7.1 KiB)
    
    eth0      Link encap:Ethernet  HWaddr 88:1E:59:01:3D:AA
              inet6 addr: fe80::8a1e:59ff:fe01:3daa/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:533 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:176870 (172.7 KiB)
              Interrupt:5
    
    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:286 errors:0 dropped:0 overruns:0 frame:0
              TX packets:286 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:20014 (19.5 KiB)  TX bytes:20014 (19.5 KiB)
    
    ra0       Link encap:Ethernet  HWaddr 88:1E:59:01:3D:A9
              inet6 addr: fe80::8a1e:59ff:fe01:3da9/64 Scope:Link
              UP BROADCAST RUNNING 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)
              Interrupt:6
    


  • @drmoeder Please post your ifconfig when using static ip also output of route command.



  • Here are those outputs using static IP.
    I also pinged the gateway at the end

    root@Omega-3DA9:/# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    ping: sendto: Network unreachable
    root@Omega-3DA9:/#
    root@Omega-3DA9:/# traceroute 8.8.8.8
    traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 38 byte packets
     1traceroute: sendto: Network unreachable
    root@Omega-3DA9:/#
    root@Omega-3DA9:/# ifconfig
    apcli0    Link encap:Ethernet  HWaddr 88:1E:59:01:3D:AB
              inet addr:192.168.5.88  Bcast:192.168.15.255  Mask:255.255.240.0
              inet6 addr: fe80::8a1e:59ff:fe01:3dab/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:9316 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)
    
    br-wlan   Link encap:Ethernet  HWaddr 88:1E:59:01:3D:A9
              inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
              inet6 addr: fe80::8a1e:59ff:fe01:3da9/64 Scope:Link
              inet6 addr: fd1d:48c4:7633::1/60 Scope:Global
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:5768 (5.6 KiB)
    
    eth0      Link encap:Ethernet  HWaddr 88:1E:59:01:3D:AA
              inet6 addr: fe80::8a1e:59ff:fe01:3daa/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2929 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:994005 (970.7 KiB)
              Interrupt:5
    
    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:294 errors:0 dropped:0 overruns:0 frame:0
              TX packets:294 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:20510 (20.0 KiB)  TX bytes:20510 (20.0 KiB)
    
    ra0       Link encap:Ethernet  HWaddr 88:1E:59:01:3D:A9
              inet6 addr: fe80::8a1e:59ff:fe01:3da9/64 Scope:Link
              UP BROADCAST RUNNING 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)
              Interrupt:6
    
    root@Omega-3DA9:/# ping 192.168.5.254
    PING 192.168.5.254 (192.168.5.254): 56 data bytes
    64 bytes from 192.168.5.254: seq=0 ttl=64 time=11.243 ms
    64 bytes from 192.168.5.254: seq=1 ttl=64 time=6.952 ms
    64 bytes from 192.168.5.254: seq=2 ttl=64 time=10.411 ms
    64 bytes from 192.168.5.254: seq=3 ttl=64 time=4.754 ms
    64 bytes from 192.168.5.254: seq=4 ttl=64 time=5.466 ms
    
    


  • @drmoeder please add the output of the route command. If you set the static ip to 192.168.5.186 does it work? Not sure if you are behind a firewall



  • The output to traceroute is in there. It says 'Network unreachable'.
    I just tried setting static ip to 192.168.5.186 and that also does NOT work.



  • @drmoeder I'm asking for the output of the "route" command, not "traceroute"



  • Oh sorry my mistake.

    
    root@Omega-3DA9:/# route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.0.0     *               255.255.240.0   U     0      0        0 apcli0
    192.168.3.0     *               255.255.255.0   U     0      0        0 br-wlan
    


  • And with dhcp:

    round-trip min/avg/max = 19.924/24.932/32.018 ms
    root@Omega-3DA9:/# route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         192.168.5.254   0.0.0.0         UG    0      0        0 apcli0
    192.168.0.0     *               255.255.240.0   U     0      0        0 apcli0
    192.168.3.0     *               255.255.255.0   U     0      0        0 br-wlan
    


  • @drmoeder As I expected there is no default route, so you need to add one, add to your network configuration:

    option gateway '192.168.5.254'
    option netmask '255.255.240.0'



  • I thought I had done that. Am I missing something?

    
    root@Omega-3DA9:/etc/config# cat network
    
    config interface 'loopback'
            option ifname 'lo'
            option proto 'static'
            option ipaddr '127.0.0.1'
            option netmask '255.0.0.0'
    
    config globals 'globals'
            option ula_prefix 'fd1d:48c4:7633::/48'
    
    config interface 'wlan'
            option type 'bridge'
            option proto 'static'
            option ipaddr '192.168.3.1'
            option netmask '255.255.255.0'
            option ip6assign '60'
    
    config interface 'wwan'
            option ifname 'apcli0'
            option hostname 'Omega-3DA9'
            option netmask '255.255.240.0'
            option gateway '192.168.5.254'
            option dns '8.8.8.8'
            option ipaddr '192.168.5.186'
            option proto 'static'
    
    config interface 'wan'
            option ifname 'eth0'
            option proto 'dhcp'
    


  • @drmoeder Add the following to your /etc/config/network

    config route 'default'
    option interface 'wwan'
    option gateway '192.168.5.254'
    option target '0.0.0.0'
    option netmask '0.0.0.0'
    option metric '0'

    Then restart.



  • Still no luck.

    
    root@Omega-3DA9:/etc/config# cat network
    
    config interface 'loopback'
            option ifname 'lo'
            option proto 'static'
            option ipaddr '127.0.0.1'
            option netmask '255.0.0.0'
    
    config globals 'globals'
            option ula_prefix 'fd1d:48c4:7633::/48'
    
    config interface 'wlan'
            option type 'bridge'
            option proto 'static'
            option ipaddr '192.168.3.1'
            option netmask '255.255.255.0'
            option ip6assign '60'
    
    config interface 'wwan'
            option ifname 'apcli0'
            option hostname 'Omega-3DA9'
            option proto 'static'
            option ipaddr '192.168.5.88'
            option gateway '192.168.5.254'
            option netmask '255.255.240.0'
            option dns '8.8.8.8'
    
    config interface 'wan'
            option ifname 'eth0'
            option proto 'dhcp'
    
    config route 'default'
            option interface 'wwan'
            option gateway '192.168.5.254'
            option target '0.0.0.0'
            option netmask '0.0.0.0'
            option metric '0'
    
    root@Omega-3DA9:/etc/config# route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.0.0     *               255.255.240.0   U     0      0        0 apcli0
    192.168.3.0     *               255.255.255.0   U     0      0        0 br-wlan
    root@Omega-3DA9:/etc/config# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    ping: sendto: Network unreachable
    


  • @drmoeder try this:

    ip route add default via 192.168.5.254 dev apcli0
    ip route get 8.8.8.8
    ping 8.8.8.8



  • That worked!

    
    root@Omega-3DA9:/etc/config# ip route add default via 192.168.5.254 dev apcli0
    root@Omega-3DA9:/etc/config# ip route get 8.8.8.8
    8.8.8.8 via 192.168.5.254 dev apcli0  src 192.168.5.88
    root@Omega-3DA9:/etc/config# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    64 bytes from 8.8.8.8: seq=0 ttl=117 time=21.440 ms
    64 bytes from 8.8.8.8: seq=1 ttl=117 time=21.110 ms
    64 bytes from 8.8.8.8: seq=2 ttl=117 time=24.762 ms
    64 bytes from 8.8.8.8: seq=3 ttl=117 time=30.374 ms
    64 bytes from 8.8.8.8: seq=4 ttl=117 time=39.886 ms
    ^C
    --- 8.8.8.8 ping statistics ---
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip min/avg/max = 21.110/27.514/39.886 ms
    root@Omega-3DA9:/etc/config# route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         192.168.5.254   0.0.0.0         UG    0      0        0 apcli0
    192.168.0.0     *               255.255.240.0   U     0      0        0 apcli0
    192.168.3.0     *               255.255.255.0   U     0      0        0 br-wlan
    


  • @drmoeder ok but it will stop working when you restart the network, please post your entire /etc/config/network file



  • 
    root@Omega-3DA9:/etc/config# cat network
    
    config interface 'loopback'
            option ifname 'lo'
            option proto 'static'
            option ipaddr '127.0.0.1'
            option netmask '255.0.0.0'
    
    config globals 'globals'
            option ula_prefix 'fd1d:48c4:7633::/48'
    
    config interface 'wlan'
            option type 'bridge'
            option proto 'static'
            option ipaddr '192.168.3.1'
            option netmask '255.255.255.0'
            option ip6assign '60'
    
    config interface 'wwan'
            option ifname 'apcli0'
            option hostname 'Omega-3DA9'
            option proto 'static'
            option ipaddr '192.168.5.88'
            option netmask '255.255.240.0'
            option gateway '192.168.5.254'
            option dns '8.8.8.8'
    
    config interface 'wan'
            option ifname 'eth0'
            option proto 'dhcp'
    
    config route 'default'
            option interface 'wwan'
            option gateway '192.168.5.254'
            option target '0.0.0.0'
            option netmask '0.0.0.0'
            option metric '0'
    
    


  • @drmoeder In the default route, remove target and netmask options. Then use service network restart or reboot and check your routing table again.



  • Not working with those options removed.

    
    
    root@Omega-3DA9:/# route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.0.0     *               255.255.240.0   U     0      0        0 apcli0
    192.168.3.0     *               255.255.255.0   U     0      0        0 br-wlan
    root@Omega-3DA9:/# cd etc/config
    root@Omega-3DA9:/etc/config# cat network
    
    config interface 'loopback'
            option ifname 'lo'
            option proto 'static'
            option ipaddr '127.0.0.1'
            option netmask '255.0.0.0'
    
    config globals 'globals'
            option ula_prefix 'fd1d:48c4:7633::/48'
    
    config interface 'wlan'
            option type 'bridge'
            option proto 'static'
            option ipaddr '192.168.3.1'
            option netmask '255.255.255.0'
            option ip6assign '60'
    
    config interface 'wwan'
            option ifname 'apcli0'
            option hostname 'Omega-3DA9'
            option proto 'static'
            option ipaddr '192.168.5.88'
            option netmask '255.255.240.0'
            option gateway '192.168.5.254'
            option dns '8.8.8.8'
    
    config interface 'wan'
            option ifname 'eth0'
            option proto 'dhcp'
    
    config route 'default'
            option interface 'wwan'
            option gateway '192.168.5.254'
            option metric '0'
    
    root@Omega-3DA9:/etc/config# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    ping: sendto: Network unreachable
    root@Omega-3DA9:/etc/config# route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.0.0     *               255.255.240.0   U     0      0        0 apcli0
    192.168.3.0     *               255.255.255.0   U     0      0        0 br-wlan


  • @drmoeder hmmm not sure why this is not updating the routing table, perhaps someone else has an idea. But here is a workaround for you as I'm going to be offline for the next 24 hours so this will fix the issue for you.

    Put this script in /etc/hotplug.d/iface/40-wwan-up-route:

    #!/bin/sh
    TARGET_INTERFACE="wwan"

    logger -t route "Starting interface hotplug device: ${DEVICE} Action: ${ACTION} Interface: ${INTERFACE}"
    if [ "$ACTION" = "ifup" -a "$INTERFACE" = "$TARGET_INTERFACE" ]; then
    logger -t route "IFUP ${DEVICE}"
    /sbin/ip route add default via 192.168.5.254 dev "${DEVICE}" >/dev/null

    fi

    This scripts runs whenever the interface comes up and adds the route. I just wrote this for you based on another of my scripts so give it a test and let me know how you go. As you can see it logs the activity so if you have any issues post those log entries.



  • That didn't work.
    And I don't know where to retrieve the log from.
    It didn't show up in the command line output


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.