Wednesday, March 2, 2011

"Installing Webmin on CentOs 5"

I just installed the latest version of webmin on my CentOs 5 server. I have not used webmin in about 2 years, I can not believe how much the interface has improved. Webmin is a GUI control panel that lets you administer a Linux box.

Here is all you need to do to get it installed:

This will install some dependencies.
yum -y install perl-Net-SSLeay
Install the system:
cd /usr/src
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.510-1.noarch.rpm
 
rpm -i webmin-1.510-1.noarch.rpm
Once you log in, you will see screens like this, click the image for a larger view:

Congrats to the Webmin team for keeping the product fresh!

Network Troubleshooting Commands

Troubleshooting computer network is one of the most important job description for network administrators, system administrators, network technicians and IT consultants. A computer network may have different types of problems as being infected with viruses and spyware, hacker attacks, can access by unauthorized users and may Connectivity problems due to failure of the faulty network devices or configurations face. The following is a list of basic network troubleshooting commands that are built into the Windows-based operating systems and UNIX etc. The right use of these commands can troubleshooting helps a lot in the diagnosis and solution of problems with your computer network.
PING
Ping is the most important troubleshooting command and checks the connectivity with other computers. For example, your system’s IP address is 10.10.10.10 and your network server’s IP address is 10.10.10.1 and you can check the connection to the server by using the ping command in the following format.
At DOS command prompt, type ping 10.10.10.1 and press Enter
When you receive the response from the server then the connectivity is ok and if you get the error message like this means to get “Request time out” so that there is a problem in connecting to the server.
IPCONFIG
IPconfig is another important command in Windows. It shows the IP address of the computer and it shows the DNS, DHCP, Gateway addresses the network and subnet mask.
At DOS prompt type ipconfig and press Enter to see the IP address of your computer.
inconfig In DOS prompt / all and press Enter to display the detailed information.
NSLOOKUP
NSLOOKUP is a TCP / IP-based command and checks domain name aliases, DNS records, information on the operating system by query the Internet domain name server. You can correct the error with the DNS server on your network
HOST NAME
Hostname command shows you the name of the computer.
At DOS prompt hostname and press Enter
NETSTAT
NETSTAT utility shows a statistical protocols and the current established TCP / IP connections to the computer.
NBTSTAT
NBTSTAT helps to resolve the NetBIOS name resolution problems.
ARP
ARP displays and modifies IP Physical address translation table that is used by the ARP protocols.
FINGER
Finger command is used to retrieve information about a user on a network.
TRACERT
Tracert command is used to determine the path of the remote system. This tool also provides the number of hops and the IP address of each hop. For example, if you see how many hops (routers) are involved to achieve, www.yahoo.com, and what the IP address of each hop is then to use the following command.
At the command prompt, type tracert www.yahoo.com you a list of all the hops and their IP addresses to see.
TRACE ROUTE
Traceroute is a very useful network debugging command and it is in the search for the server slows down the transmission on the Internet and it also shows the distance between the two systems are used.
ROUTE
Route command, you can manually make entries in the routing table.
Hopefully, the above commands will help you diagnose the troubleshooting computer networking problems.

Use Mac's Network Utility to troubleshoot networks

Prepackaged commands

Quick quiz: name the eight operations the Network Utility performs. Many Mac admins won’t even remember that the utility can perform that many functions, much less the actual operations. The actual network tasks and commands that the utility performs are:
  • Info (customizable by specific network interface)
  • Netstat
  • Ping
  • Lookup
  • Traceroute
  • Whois
  • Finger
  • Port Scan
The Info window returns detailed configuration information for a specific network interface. In addition to listing IP address, hardware (MAC) address, link speed and link status, the Info page also lists transfer statistics. The best part, like all the Network Utility tabs, all information is displayed within an easily read GUI.
The Netstat tab displays results from canned Netstat operations, including routing tables, comprehensive network statistics for protocols, multicast information and socket state status. The Netstat data proves helpful when troubleshooting routing issues and network failures by offering route, destination and socket data.
Ping, which tests connectivity and latency, offers just two options: address and number of pings. Techs simply enter the address (either a numeric IP or friendly web address) to test and specify either an unlimited number of pings or a specific limit.

Lookup simplifies testing DNS resolution. Techs enter a numeric or Web address in the provided field, specify the type of information to look up and click the provided button. The command then runs. Among the lookup options are Internet addresses, canonical names, MX records, name servers, and host names, among others.

Traceroute helps identify failures along a route. By tracing the path packets follow to a destination, enterprise administrators can learn where a breakdown is occurring. I’ve solved maddening routing issues with Traceroute’s assistance. I’ve had clients whose attempts to connect to cloud-based servers in Minnesota from Kentucky failed due to bad handoffs by the ISP in Utah. Copying and forwarding the Traceroute screens are what convinced the ISP’s technical staff that the problem was with their network.

Whois assists administrators in determining the owner of registered Web addresses. Besides returning registrar information, Whois searches also display domain expiration dates, name server settings and related information. Multiple Whois databases can be searched, including those maintained by Internic, Network Solutions ,and APNIC.
Finger enables supplying a user account and node address to learn more information about a user account, such as office location, telephone number, or other data. In the Internet’s early days, seeking and obtaining such information was commonly accepted, but latter-day security concerns typically result in finger traffic being blocked by many networks.
The Port Scan tab allows an enterprise administrator to list a specific IP address or site and perform a scan of open ports. To speed results, administrators can also test ports within specific ranges or just a single port using the supplied checkbox option. Such Port Scans can assist staff in ensuring only appropriate ports are enabled, thereby tightening a network’s security configuration.

Quick work of complex commands

The Mac’s Network Utility makes quick work of common, often complex commands. The addition of an easily read GUI makes the Network Utility, and the information it returns, that much more user friendly. Reached from /Applications/Utilities, the Network Utility.app tool assists engineers in diagnosing common network problems and obtaining critical information needed to speed repair.

command for cisco initial configuration

I found the following handy Cisco commands are very useful for initial configuration of Cisco devices.
I always use these commands to configure Cisco devices from fresh configuration.
router> enable
router> configure terminal
router (config)# no ip domain-lookup

The no ip domain-lookup is very useful, what this command does is tell the Cisco device not to do a domain lookup when you mistype something in the CLI. For example if you do this without the no ip domain-lookup:
router# pign
Translating "pign"... domain server (255.255.255.255)
%unknown command or computer name, or unable to find computer address

The Cisco device will try to find the computer name of pign, it doesn't know that you mistyped ping. This process could take a very long time.
If you apply the no ip domain-lookup, the Cisco device won't try to do the domain lookup.
The second command is the alias command. This command makes an alias of a command that you use frequently.
For example you often use the command show ip interface brief, you can make an alias of it to be "ship".

router (config)# alias exec ship show ip interface brief

You configure it by entering alias first, followed by which mode the command resides in - in this example the show command resides in the exec mode - type in the alias for the command, then you enter the full commands that you want to make alias.
Now you just have to type in ship instead of the long show ip interface brief command.

Next command is useful when you connect to the Cisco devices and you need a very long time to configure it.
The Cisco devices have a default time of how long you're allowed to get connected to them. Sometimes you don't want to reconnect again all the time, but mind you that the time limitation is set because of security concern.

router (config)# line vty 0 4
router (config-line)# no exec-timeout

The above commands tell the router to give you all the time that you need when configuring the router from the telnet session, it won't cut your connection. You can also configure it for the console connection.
Last one is my favorite one, you know when you're configuring a Cisco device sometimes you'd get some notifications from the device which is great, it tells you things going on in it.
But it gets annoying when you're trying to configure it and the notifications just cut down your halfway written command.
The following command tells the router to write back the command you entered before the notifications cut it:

router (config)# line vty 0 4
router (config-line)# logging synchronous   

Configure Cisco Aironet in Lab 2

Now it's time to configure Cisco Aironet Wireless Access Point for Cisco home lab.

What I'm going to do first is to configure the connectivity between the Cisco Aironet 1240AG wireless access point to the Cisco 2950 switch.

Here's the closer look of the network diagram of the wireless access point and the switch:


The network will be using VLAN 5 (192.168.5.0 network) as the native VLAN and the rest of the VLANs will be used for the SSIDs.

There's an interface called BVI or Bridge-group Virtual Interface, what this interface does is bridge all of the interfaces in the access point - the wired and wireless interfaces - so you can use the interface BVI IP address to manage all of those interfaces.

In Cisco Aironet 1240AG wireless access points, you have 1 interface fast ethernet port, 1 console port, 1 dot11radio 0 for the 802.11G, and 1 dot11radio 1 for 802.11A.

In this configuration I only going to configure the dot11radio 0 for the 802.11G wireless network since I only have the antennas for the 802.11G.
You can configure both 802.11A and 802.11G if you want.

First we configure the interface BVI 1 IP address:

1240AG> enable
1240AG# configure terminal
1240AG (config)# interface bvi 1
1240AG (config-if)# ip address 192.168.5.3 255.255.255.0
1240AG (config-if)# no shutdown

 
Now set the native VLAN (VLAN 5) to the wireless access point, we have to configure the native VLAN on both of the fastethernet sub interface and the dot11radio 0 sub interface:
1240AG (config)# interface fastethernet 0.5
1240AG (config-if)# encapsulation dot1q 5 native
1240AG (config-if)# interface dot11radio 0.5
1240AG (config-if)# encapsulation dot1q 5 native



Next is to set up the SSID starting from SSID for admin and associate it with VLAN 30.
We need to configure the SSID on the dot11radio 0 interface first then configure the VLAN on the dot11radio 0.30 sub interface and fast ethernet 0.30 sub interface.
Also I set up the SSID for open authentication first.


1240AG (config)# interface dot11radio 0
1240AG (config-if)# ssid ADMIN
1240AG (config-if-ssid)# vlan 30
1240AG (config-if-ssid)# authentication open
1240AG (config-if-ssid)# end
1240AG (config)# interface fastethernet 0.30
1240AG (config-subif)# encapsulation dot1q 30
1240AG (config-subif)# bridge-group 30
1240AG (config-subif)# interface dot11radio 0.30
1240AG (config-subif)# encapsulation dot1q 30
1240AG (config-subif)# bridge-group 30




The bridge-group command allows you to group interfaces and bridge nonrouted traffic among the interfaces.
In this example traffic from dot11radio 0.30 sub interface to fastethernet 0.30 sub interface and vice versa.
Note: If you configure the SSID on the global configuration mode, the SSID will be both in the dot11radio 0 and 1.
Do the same with the SSID for guest and associate it with VLAN 40:


1240AG (config)# interface dot11radio 0
1240AG (config-if)# ssid GUEST
1240AG (config-if-ssid)# vlan 40
1240AG (config-if-ssid)# authentication open
1240AG (config-if-ssid)# end
1240AG (config)# interface fastethernet 0.40
1240AG (config-subif)# encapsulation dot1q 40
1240AG (config-subif)# bridge-group 40
1240AG (config-subif)# interface dot11radio 0.40
1240AG (config-subif)# encapsulation dot1q 40
1240AG (config-subif)# bridge-group 40



Next step is to configure the switch port connected to the wireless access point as a trunk port with native VLAN 5.
I already posted about how to do this on the last post.
Also if you are going to use dynamic IP address, make sure you have configured router as DHCP server that serving clients for VLAN 30 and 40.
Right now if you have no problem pinging the switch and router from the wireless access point, your access point is broadcasting SSID and giving IP address from router for any client joining the SSID.
The SSIDs are not secure since they use open authentication, next time I'll configure it with stronger authentication.

Configure Cisco Aironet in Lab 1

I've configured my Cisco home lab with a router that connects to cable internet and a switch with VLANs.
Now it's time to add a new device to the Cisco home lab, a Cisco Aironet 1240AG wireless access point for wireless connection.

And by the way, the image on the left is not an official logo from Cisco or anything, I just made that up.

I won't configure anything fancy this time, only give basic administration configuration and set up an open SSIDs also associate the SSIDs to VLANs.

Since I want to configure two SSIDs - one is free for all SSID with no authentication and the other one with authentication - for the wireless network, I need to configure additional VLAN on the switch.

I have already the VLAN 30 for the wireless network and want to add VLAN 40, so in total there would be 5 VLANs in my Cisco home network lab.

I made a network diagram with Cisco Aironet 1240AG wireless access point added in the picture below:

So lets start the configuration on the next post, there are some steps to complete this Cisco home lab network diagram if you haven't done so.

Starting from the wireless access point I'm going to configure the basic administration configuration such as the access point's management IP address, SSIDs and associate them to VLANs, optionally configure the authentication security options for the SSIDs, and establish trunk connection to the switch.

For the switch I'll configure VLANs and the trunk connection to the access point and the router.

Wireless home Network

At the last post I talked briefly about the wireless site survey in networking projects.

Now I want to share my view in things that I personally consider in building wireless home network.
The following points are just my considerations, most home or SOHO users just plug their wireless access points, configure them and they just work fine.

Which Standard to Use

Currently there are four common standards for wireless networking, the 802.11a, 802.11b, 802.11g, and the latest one is 802.11n. These standards use unlicensed frequencies meaning they're all free for all to use.

You can use the frequencies for your wireless networks and you can't complain if your neighbors used up all of the frequencies available and interfere with your wireless signal.
Later on this when I talk about the wireless channels in a moment.

802.11a uses the 5GHz operational frequency and has a data rate transfer of 54Mbps. This standard is not too popular anymore because it has a higher frequency meaning it has higher data rates but with shorter range.
The higher the frequency also makes it more easily absorbed by solid objects around it.

802.11b and 802.11g use 2.4GHz operational frequency. Most wireless access points support both the b and g standards since they both use the same frequency they're both interoperable.
The difference is that the 802.11b has data rate transfer of 11Mbps while the 802.11g has 54Mbps.

The latest one is 802.11n, it uses 5GHz and/or 2.4GHz frequencies and in terms of data rate and wireless range, it has biggest data rate the widest range, some vendors claim their 802.11n access points can have data rates up to 114Mbps.

I don't know the truth about that since I don't have any 802.11n devices yet.
For me I just love the sleek looking design of 802.11n wireless router from Linksys.
Cool, gotta have that someday.

Wireless Access Points Locations
Place the access points in locations that you think can reach all the clients in the network. Consider the interferences from microwave oven or cordless phones.
Also keep in mind about objects that can block, absorb or reflect the signals from the access points such as thick wall or metal surfaces.

The further you get from the access points and the more objects standing between you and the access point, the lower data rate you'd get.

Channels to Use

If one wireless access point is enough to cover your clients, check on the wireless channels that are used by access points installed near your network.
If your access point uses the same channel as your neighbor's, they will interfere the wireless signals.
If you're using more than one access points, set them to use different channels.
In 802.11b and g standards, the common channels or the clean channels that you can use are channel 1, 6, and 11. Use one for each of your access point, do not use the same channel if the signals.
What I mean by clean channels is that these channels are not overlapping each other.
The following is the graphical representation of 802.11b and g wireless channels:

The 802.11a offers more clean channels for you to choose. You can see the wireless channels that you can use for 802.11a:


SSID
Service Set Identifier or SSID is like an ID for your wireless network. I'm sure you already know this, to join wireless network you need to know the SSID or you can scan for the SSID and join it.
You can use many available wireless network sniffers to scan the SSID and the wireless channels used by the wireless networks. Some of them you can find at the list here.
Once again not every sniffer works with your wireless network card, check on it before downloading.

You can use any SSID for your wireless network, your name, company name, etc. The reason I brought this up because if you're using the upper end wireless access points like from Cisco, you can have multiple SSID broadcasted from a single wireless access point.
Maybe you need a free for all SSID for your guests, another SSID for your home users or employees, and another one just for you as the admin.
In Cisco, you can tie these SSIDs to VLANs, this can give you flexibility in deciding different security for each SSID, different access list for them, etc.

Wireless Security

Now this is the most important part of all, the wireless security or the encryption method you want to associate with your SSID.
There are some types of wireless network authentication for security from the open authentication that you can apply for guests on your WLAN to the WPA version 2.
There are also WEP that is not so secure nowadays since people can tap on your signals and decrypt them.
Best to say that WPA or WPA2 are more secure to use in your WLAN, you can also use 802.1x security.

Remember that not all hardware or wireless NIC support all authentication, most of them support the WPA authentication so it's more common to use nowadays.