Can't connect to router when setting static IP address in FreeBSD

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have a FreeBSD machine that I'm trying to configure with a static IP address, so I added the following lines to the /etc/rc.conf file



ifconfig_wlan0="inet 192.168.0.20 netmask 255.255.255.0"
defaultrouter="192.168.0.10"


after restarting the network service I can no longer connect to the router. If I ping it I get the message host is down. If I set wlan0 to use DHCP in /etc/rc.conf, I can connect to the router fine, but if I try to set a static IP I can't connect. Any idea what I might be doing wrong here?









share







New contributor




KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    I have a FreeBSD machine that I'm trying to configure with a static IP address, so I added the following lines to the /etc/rc.conf file



    ifconfig_wlan0="inet 192.168.0.20 netmask 255.255.255.0"
    defaultrouter="192.168.0.10"


    after restarting the network service I can no longer connect to the router. If I ping it I get the message host is down. If I set wlan0 to use DHCP in /etc/rc.conf, I can connect to the router fine, but if I try to set a static IP I can't connect. Any idea what I might be doing wrong here?









    share







    New contributor




    KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a FreeBSD machine that I'm trying to configure with a static IP address, so I added the following lines to the /etc/rc.conf file



      ifconfig_wlan0="inet 192.168.0.20 netmask 255.255.255.0"
      defaultrouter="192.168.0.10"


      after restarting the network service I can no longer connect to the router. If I ping it I get the message host is down. If I set wlan0 to use DHCP in /etc/rc.conf, I can connect to the router fine, but if I try to set a static IP I can't connect. Any idea what I might be doing wrong here?









      share







      New contributor




      KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have a FreeBSD machine that I'm trying to configure with a static IP address, so I added the following lines to the /etc/rc.conf file



      ifconfig_wlan0="inet 192.168.0.20 netmask 255.255.255.0"
      defaultrouter="192.168.0.10"


      after restarting the network service I can no longer connect to the router. If I ping it I get the message host is down. If I set wlan0 to use DHCP in /etc/rc.conf, I can connect to the router fine, but if I try to set a static IP I can't connect. Any idea what I might be doing wrong here?







      freebsd





      share







      New contributor




      KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 mins ago









      KKloke

      1




      1




      New contributor




      KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      KKloke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          KKloke is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475204%2fcant-connect-to-router-when-setting-static-ip-address-in-freebsd%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          KKloke is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          KKloke is a new contributor. Be nice, and check out our Code of Conduct.












          KKloke is a new contributor. Be nice, and check out our Code of Conduct.











          KKloke is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475204%2fcant-connect-to-router-when-setting-static-ip-address-in-freebsd%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay