view · edit · print · history

Static Addressing in FreeSBIE

Introduction

Albeit there is some good information on FreeSBIE Tips and Tricks 1.1 theres a few things they seem to fail to mention for beginners, This should hopefully explain things more simply.

Information you need to set up your network interface Staticly

  • IP Address of Client (Choose one not already in use, This is going to be your IP)
  • Subnet Mask
  • Default Gateway
  • Default Nameserver

Once you get these pieces of information its time to configure the interface you will be using to connect with. I will explain how to use Wireless in FreeSBIE as an example also.

In my Example my Information will be as follows:

    IP Address: 192.168.0.100
    Subnet Mask: 255.255.255.0
    Default Gateway 192.168.0.1
    Default Domain Nameserver: 192.168.0.2

Configure Interface

IMPORTANT If you do not killall dhclient , the IP will keep resetting.
Not sure which Interfaces you have run this:

    # ifconfig -a | grep mtu | awk -F: '{if ($1 != "lo0") print $1;}'

Now Choose Appropriate Interface and begin.
Step 1 This Command will tell interface sis0 to use IP Address 192.168.0.100, It will have a Subnet Broadcast of 192.168.0.255 and will has Subnet Mask 255.255.255.0

    #ifconfig sis0 192.168.0.100 192.168.0.255 255.255.255.0

Step 2 Next we are going to set the local network route

    #route add -net 192.168.0.0 -interface 192.168.0.1

Step 3 Next we set Default Gateway

    #route add -inet 0.0.0.0 192.168.0.1

Step 4 Last but not least we set the DNS Name Server, First check to see if you have /etc/resolv.conf

    # cat /etc/resolv.conf 
      nameserver 192.168.0.1

If it is wrong simply edit /etc/resolv.conf and make the change to 192.168.0.2

    #vi /etc/resolv.conf
    nameserver 192.168.0.2

If you DO NOT have a resolv.conf , it is ok. We will simply create one with this command.

    # echo "nameserver 192.168.0.2" >> /etc/resolv.conf

Check Connectivity Now you should be all set and connect to the internet, but just to test issue:

    #ping -c 4 www.google.com

If you get replies it works great, If not time for some troubleshooting.

Troubleshooting and Quick Tips

To See what your current Default Gateway is use this command:

    #route get 0.0.0.0

If for some reason an old or wrong route is returned from the previous command, delete the route and restart configuring from Step 1.

    #route delete -net 0.0.0.0

Another great way to find out about your default route info is to open to shells, In one:

    Shell1# ping www.google.com

In Shell two use command:

    Shell2# route -n monitor

This should give you some output now in Shell2, you can usually see something unordinary and fix it.

Nixes changes · ALL changes
Page last modified on February 05, 2005, at 05:48 PM