Networking

OpenSolaris - RTL8111/8168B issues

I’ve got an integrated RTL8111 nic which seemed to work fine under opensolaris 2008.11. But if the nic was put under load for a various length of time it seemed to just drop off the network.

At first i thought it was my SMB service dying, but after a quick ping i relised i had lost the entire TCP/IP stack on that particular card. Hmm…

It does come back online if you are patient and wait for about 5mins or so.

Linux - Add DHCP and DNS

How to install DHCP and DNS on Fedora / Centos / Redhat box;

yum -y install dhcp.i386 bind.i386

Set services to auto start using ntsysv – services are called “dhcpd” and “named”.

How to configure dhcp;

nano /etc/dhcpd.conf — configure as per sample provided. The sample is usually located in the same directory. service dhcpd restart - should start without problem if done correctly

Note: dhcp range has to be on the same network as your adapter. You can run dhcpd from the command line to diagnose any issues.

OpenSolaris - Manual Network DNS issue

If you have tried to setup a manual IP on your opensolaris box you may find that DNS is not working as you would expect in some cases. nslookup resolves the name to an ip, but pinging doesnt make it to the box…

How to fix;

Edit your /etc/nsswitch.conf file and add the word “dns” to the hosts and ipnodes lines If you make a backup of /etc/nsswitch.conf you can also just copy /etc/nsswitch.dns over it…

Linux - Wireless networking

if your card is natively supported type ;

iwconfig

iwlist scanning – should also show you the wireless networks that are in range (will work if driver is loaded)

you should see wlan0 if all is good; (grab your wireless details)

iwconfig wlan0 mode managed (should already be in this mode)

there are some cool options here like “secondary” mode which the node acts as a backup master/repeater. “Repeater” - the node forwards packets between other wire-less nodes

Corporate Firewall - SSH and port 443 goodness

Things you’ll need; (basic instructions) SSH - either Linux or Open SSH for windows (set this up first and ensure its working!). I have only used Linux, so i do not know the details of setting up a Open SSH box on windows (good luck).

Router with pinhole or port forwarding abilities. – forward your external 443 port to internal 22 on your SSH box

Putty.exe - use this to test your SSH connection locally (you should be able to connect on port 22 locally or 443 externally)

Remotely Enable Remote Desktop

I work in a lab environment, so most of the windows XP machines i enable remote desktop for easy access. All new machines have remote desktop enabled via group policy.

The GP is located here; (link were appropriate in AD structure)

Computer Configuration, Administrative Templates, Windows Components, Terminal Services, – > Allows users to connect remotely using Terminal Services setting. Enable this.

If you don’t have a domain or don’t have group policy implemented you can still enable remote desktop via the reg command in XP. Here is an example;

Cisco - Switch Reference

Setting up a trunk between switches

Enable Switch to enable mode Configure Terminal Enter global configuration mode

Interface FastEthernet0/1 Entering interface configuration for port 0/1. This is where you pick the port you want to trunk.

Switchport mode trunk Set port to trunking mode.

Switchport trunk encapsulation dot1q Set trunk type to 802.1q. If your switch only supports either ISL or 802.1q, this command does not exist because there is nothing to specify. This command only works when you can choose between the two.

Linux - mapping to a windows share (SMB)

As per below. First you will need to install samba client.

In Fedora / Centos …

yum -y samba-client

then use the mount command to mount the share to a directory… 

mount -t cifs -n //192.168.9.70/software /mnt/sharename -o username=guest,password=

It will be similar in other distros. Remember to create the /mnt/sharename directory before trying to mount any share to the directory. Directories are created like so;

mkdir /mnt/sharename