Archive for the 'Linux' Category
I am working on a SUSE Enterprise Linux Server 10 server today and I have no experience with Novell’s flavor of Linux at all. But, that’s wht Google was created… Google allows admins and non-admins to “fake it till you make it”. And, that, ladies and gentlemen, is exactly what I have done today while working with this SUSE box.
So, my task was to get the box booted up, setup the network configuration, and then turn it back over to another department who will get with the vendor working with this server to complete the configuration. I have setup network configurations in FreeBSD, Red Hat Linux (way back in the day), AIX, Solaris (again, way back in the day), and obviously Windows and Mac OS X. But, I had no idea where SUSE stored it’s network configuration files or what the file format was for setting up the network parameters until today.
I am posting this information for two reasons: 1.) I may need this again someday, and 2.) hopefully it will help someone else out who is just entering into the SUSE arena. Here is what I found out during my research:
The files necessary to setup my network configuration were located in /etc/sysconfig/network. Within this directory are different ifcfg-<interface_name> files, obviously, one for each interface in the machine. Now, most Linux fans would assume that since there was a ifcfg-lo file in this directory for the local loopback interface that there would need to be a ifcfg-eth0 file for the eth0 interface. Well, not so… I don’t guess.
My config file for eth0 was labeled ifcfg-eth-id-00:00:00:00:00:00 where 00:00:00:00:00:00 is the MAC address of the interface I wanted to configure. Since I wanted to create a static configuration, not a DHCP assigned address, I put the following contents in my ifcfg-eth-id-00:00:00:00:00:00 configuration file, again, located within /etc/sysconfig/network:
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='xxx.xxx.xxx.xxx'
MTU=''
NAME='Descriptive Name for Interface'
NETMASK='xxx.xxx.xxx.xxx'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
UNIQUE='<random_stuff_it_appears_maybe_not>'
USERCONTROL='no'
_nm_name='bus-pci-000:01:00.0'
Obviously, you’ll need to set IPADDR to the IP address you want to use for your box/server. The NETMASK also needs to be set correctly. I’m not really sure what the UNIQUE variable is or how it is computed. Maybe someone else can shed some light on this one. And, it appears that the _nm_name is the actual hardware address to your NIC. Again, maybe someone can help me out with the variable as well.
So, once I had that file configured the way I wanted, it was time to set my default route. This was extremely simple. All I had to do was create a file with a name similar to the configuration file we just modified, but instead of using ifcfg-* I used ifroute-*. So, my route configuration file for my eth0 interface was named ifroute-eth-id-00:00:00:00:00:00. Obviously you will need to replace the 00:00:00... with your actual MAC address. Inside the file I put one line and all of my problems were solved. I entered:
default xxx.xxx.xxx.xxx
Make sure you replace xxx.xxx.xxx.xxx with the actual IP address of your network’s gateway. Also, that is a
Once these files were created/modified, I rebooted the server, logged on, and was able to access network resources like it was nobody’s business.
Until next time…
