Friday, June 18, 2010

Configuring your Home Gateway for Qtel ADSL

As a network engineer in Qatar, I do get frequently asked by people to help them with configuring their Home ADSL Gateways (linksys, speedtouch, netgear, D-link...etc.,). Qtel usually provides a Thomson TG585 ADSL Gateway, but sometimes people opt for a different ADSL Gateway to get more features for their home network. Configuring an ADSL gateway can turnout to be a somewhat complicated matter for a non-techie and you will need to know the right values to configure your Gateway so that your ADSL connection works. You could always call Qtel helpline 111, to get the right parameters to configure your home ADSL. Different brands of ADSL gateways will have different configuration web interfaces, I will be using a Linksys WAG200G to explain the configuration. The ADSL Gateway device can be accessed by typing the Gateway IP address in your browser url box (e.g., http://192.168.1.254, varies for device to device) after connecting the gateway to your PC via an Ethernet cable.

VC Settings

  • Encapsulation: Qtel uses both PPPoE and PPPoA type of encapsulation, it depends on the settings on the local DSLAM to which your home is connected to. You could get this information from Qtel or if you are not sure you could try both the settings, it should work in either of these modes. On a Linksys WAG200G Gateway select RFC 2516 PPPoE or RFC 2364 PPPoA from the drop down list.

  • Multiplexing: Select the VC radio button. ADSL/ATM links operates using Virtual Circuits (VC) for traffic flow.

  • QoS Type: Select VBR from the drop down list. Qtel uses Variable Bit Rate (VBR) traffic class which ensures QoS. More specifically the non-real time variant is used, so you might have to configure vbr-nrt on some gateways.

  • Pcr Rate: Peak Cell Rate is a traffic parameter which maximum allowed data rate on an ATM connection. This can be in kbps or cps (cells per second). On the Linksys WAG200G Gateway configure PCR as 2358 cps.

  • Scr Rate: Sustainable Cell Rate is a traffic parameter which limits the average data rate on an ATM connection. This can be in kbps or cps (cells per second). Cells may be dropped if the SCR is violated. On the Linksys WAG200G Gateway configure SCR as 2358 cps(cells per second).

Note: Usually Service Providers give PCR and SCR rate values in kbps, which you might have to convert to cps if your gateway takes these values in cps. Since an ATM cell is 53 bytes i.e., 424 bits, to convert kbps value divide by 424 to get value in cps. eg: 1000kbps = 1000000/424 = 2358cps (round down to a whole number).

  • Autodetect: Select Enable radio button if you want the Gateway to automatically detect the Virtual Circuit VPI and VCI values. Select Disable if you want to enter the Virtual Circuit values manually.

  • Virtual Circuit: Qtel uses the Virtual Circuit 8/35, where VPI is 8 and VCI is 35. Enter this if you have have selected Autodetect as Diable. Virtual Path Identifier (VPI) & Virtual Circuit Identifier together identify the virtual circuit used by the connection.

  • DSL Modulation: Select ADSL2+ from the drop down list.


PPPoE Settings

  • Username: the username is usually a 'p' or 's' followed by your ADSL telephone number. e.g.: p4765432. This information can obtained from Qtel.

  • Password: the default password is qatar12. If you are not sure as to what your password is, call Qtel 111 from your ADSL telephone line and ask Qtel to reset your password which will be qatar12.

Network Address Server Settings (DHCP)


  • DHCP Server: Select the Enable radio button, so that DHCP is enabled and all connected PC's can automatically get an IP address.

  • Static DNS1: 212.77.192.59, this is Qtel DNS Server

  • Static DNS2: 212.77.192.60, this is another Qtel DNS Server

The Static DNS should be enabled so that the connected PC's know where to resolve domain names. DNS is important to resolve website url's to their IP addresses and crucial for your internet to work. If your Gateway requires NAT configuration, go ahead and do it. This is important for translating your single public IP address to multiple private IP addresses.

This is the basic configuration for the ADSL to work. The rest of the configuration is optional and dependent on user requirements.

Monday, June 7, 2010

Implementing Wake-on-LAN in a Cisco Network

Wake-on-LAN or WoL is a clever way of turning on a computer or group of computers by sending a Broadcast Magic Frame over the LAN. The magic frame is send by a WoL Server which runs an application that generates the Magic frame. The computer can be woken up from sleeping, standby, hibernation and shutdown modes as long as the power cable is connected and some power is reserved for the network card to be partly on. The magic packet contains 6 bytes of ones followed by sixteen repetitions of the target computers's 48-bit MAC address. It is typically sent as a UDP datagram on port 1,7 or 9. A Magic packet can originate from the same LAN or over a VPN or even from internet if properly routed.

For WoL to work the computer should support Wake-on-LAN, which is implemented on the motherboard and hence usually set via the BIOS. Some Operating Systems can also control Wake-on-LAN behaviour. Lately laptops powered by the latest Intel chipset allow waking up the machine over wireless also, called Wake-on-Wireless LAN (WoWLAN).

If the WoL Server and the computer to be waken up are on the same LAN, i.e., in the same broadcast domain, no configuration is needed as the WoL Server will broadcast the Magic packet to all the devices in the LAN. If your computers are on a different VLAN from the one on which the WoL Server is sitting, then you need to use the ip helper-address command on the VLAN interface or the Server interface on the switch. The ip helper-address command lets the router interface know that it will be receiving a UDP broadcast from a directly connected client and that it should repackage it as either a directed broadcast to a specific subnet or a unicast to a specific machine.

int fa 1/0/48
description --- Connected to WoL Server ---
ip helper-address 10.10.255.255
switchport mode access
switchport access vlan 20

The ip helper-address helps in fowarding of UDP broadcasts. By default very few number of application ports (like DHCP, TACACS, etc.) are fowarded. Therefore you will need to use the ip forward-protocol global command to specify exactly which types of broadcast packets you would like to have forwarded.

ip forward-protocol udp 7

An ip directed-broadcast command should be applied to the VLAN interface that is expected to receive the directed broadcast from the WoL Server (assuming IP address: 10.11.1.254 for the below example). You should be cautious when ip directed-broadcast is applied on any interface because an incoming unicast packet with a broadcast destination address can explode as broadcast once it reaches the interface. For security concerns ip directed-broadcast command is usually adviced to be used with an access-list so that only the WoL server can send a directed broadcast to the VLAN, using otherwise could make your Cisco devices a target for Smurf and Denial of Service attacks, or maybe even inhibit Smurf attacks on to other networks.
access-list 10 permit 10.11.1.254

int vlan 30
description --- Connected to PCs ---
ip address 10.10.1.1 255.255.0.0
ip directed-broadcast 10

Some WoL Servers are smart enough to send directed broadcasts, then you only have to configure ip directed-broadcast on the VLAN connected to the target PC. Some WoL Servers can unicast magic packets to a specific layer 3 IP address, enabling to execute Wake-on-LAN from an external network like the Internet.

Also note that Cisco VMPS and WoL cannot work together on Cisco devices because unused ports according to Cisco VMPS does not belong to any VLAN as the PC is inactive and hence no Magic packets can reach the PC port.