Monday, March 24

Install and configure a DHCP server in Windows Server 2008

Installing DHCP

Installing a DHCP server in Windows 2008 is a snap. They created a very simple wizard that walks you through the entire process. Follow me on this journey.
To install a DHCP server from the Control Panel, follow these steps:
  1. From the Start menu, select | Control Panel | Administrative Tools | Server Manager.
  2. Expand and click Roles (Figure A).
  3. Choose Add Roles and follow the wizard by selecting the DHCP role (Figure B).
  4. A new DHCP wizard appears to help you configure a DHCP server.

Figure A

Server Manager

Figure B



Add Roles Wizard
In the previous release of Windows, a wizard did not appear to walk you through creating a DHCP server. Windows Server 2008 has really simplified this process by allowing you to configure a DHCP server in roughly seven steps. Of course, you can still manage your DHCP server from the DHCP Microsoft Management Console (MMC) snap-in or delete and create scopes on the fly.
Let's continue on through the wizard. Your network cards and static IP addresses are automatically detected and you can choose how DHCP will service clients on different subnets, as shown in Figure C.

Figure C



Choose your static IP addresses to service DHCP clients
On the next window (Figure D), you can specify the applicable DNS server(s) to be used with DHCP when an address is assigned. Figure E displays where you would enter the applicable WINS servers if you require it on your network.

Figure D


Enter your DNS server IP address

Figure E



Enter your WINS server IP address

About scopes

When you create a scope, you must select the range of IP addresses and you must specify the appropriate scope options to include. These options are what we were referring to above when we mentioned that you can assign other network information to your clients at the time they are given an IP address.
There are two types of scope options: Global and Scope. Global options are propagated to all the scopes that you create on that DHCP server, while Scope options are only for the individual scope that you are working with.
For example, if you have different scopes for several different subnets and each subnet will have a different default gateway but will share the same DNS servers, you would want to set the DNS servers as a Global option while the default gateways would be set separately in each scope as a Scope option.
On the DHCP scope window, you will create your scope. Depending on the size of your network and the amount of users that will be assigned IP addresses, some thought must be given to the parameters of your scope selections. In my example (Figure F), I created a simple scope.

Figure F


Creating your scope
The subnet type dropdown allows you to choose wireless as well (Figure G). It defaults to 24 hours. If you want to activate the scope when the wizard is complete, click the Activate this scope checkbox. If you leave it empty, you must activate the scope in the DHCP Microsoft Management Console (MMC) snap-in.

Figure G


You can add multiple scopes before continuing the wizard
With Windows Server 2008, if you have a router (Figure H) that supports and is configured to take advantage of IPv6, you can enable this functionality on your network.

Figure H


Enable IPv6 stateless mode

Authorizing the DHCP server and activating scopes

In previous versions of Windows Server, you had to install and configure your DHCP server and then authorize it in the DHCP MMC snap-in. Authorizing your DHCP server allows you to prevent hackers from configuring rogue DHCP servers. In Windows Server 2008, you have the ability to either authorize the server in the Wizard or authorize it after the fact in the DHCP MMC-snap-in (Figure I).

Figure I


Authorizing your DHCP server
You are now ready to review (Figure J) and confirm your settings before applying your DHCP settings (Figure K).

Figure J


Reviewing your DHCP configuration before applying

Figure K


DHCP installation in progress
Once you have installed the DCHP server, you can manage it from the DHCP MMC snap-in (Figure O) located in Administrative tools. On this screen you can create additional exclusions and reservations.

Adding reservations

In addition to specifying exclusions, you can add reservations to your DHCP server. By adding a reservation, you ensure that a machine always receives the same IP address from the DHCP server.
  1. Right-click on Reservations and choose new reservation.
  2. Enter a friendly name for the reservation and the IP address you want to assign to the computer or device.
  3. Enter the MAC address of the computer or device. (For Windows machines, you can find the MAC address by running ipconfig/all from the command prompt of the machine.)
  4. Enter a description and then choose the following reservation type: DHCP, BOOTP (going across a router), or both, as shown in Figure L. Click Add.

Figure L


Adding a reservation

Adding exclusions

In addition to specifying reservations, you can add exclusions to your DHCP server (Figure M). By adding exclusions, you ensure that machines never receive a DHCP lease for that range of IP addresses. This is very useful to block IP addresses for your servers and routers.

Figure M


Adding an exclusion
In order to add Exclusions, right-click on Address Pools and choose New Exclusion Range as shown in Figure N and Figure O.

Figure N



IP address Exclusion range

Figure O

DCHP MMC snap-in

Troubleshooting DHCP


After configuring DHCP, the easiest way to troubleshoot it is to use Ipconfig from a command prompt. To view all TCP/IP information on a machine just type ipconfig/all. To release a DHCP lease, type ipconfig/release; to renew a lease, type ipconfig/renew.

Install and configure a DNS server in Windows Server 2008

Installation

You can install a DNS server from the Control Panel or when promoting a member server to a domain controller (DC) (Figure A). During the promotion, if a DNS server is not found, you will have the option of installing it.

Figure A


Domain controller
To install a DNS server from the Control Panel, follow these steps:
  • From the Start menu, select | Control Panel | Administrative Tools | Server Manager.
  • Expand and click Roles (Figure B).
  • Choose Add Roles and follow the wizard by selecting the DNS role (Figure C).
  • Click Install to install DNS in Windows Server 2008 (Figure D).

Figure B


Expand and click Roles

Figure C


DNS role

Figure D


Install DNS

DNS console and configuration

After installing DNS, you can find the DNS console from Start | All Programs | Administrative Tools | DNS. Windows 2008 provides a wizard to help configure DNS.
When configuring your DNS server, you must be familiar with the following concepts:
  • Forward lookup zone
  • Reverse lookup zone
  • Zone types
A forward lookup zone is simply a way to resolve host names to IP addresses. A reverse lookup zone allows a DNS server to discover the DNS name of the host. Basically, it is the exact opposite of a forward lookup zone. A reverse lookup zone is not required, but it is easy to configure and will allow for your Windows Server 2008 Server to have full DNS functionality.
When selecting a DNS zone type, you have the following options: Active Directory (AD) Integrated, Standard Primary, and Standard Secondary. AD Integrated stores the database information in AD and allows for secure updates to the database file. This option will appear only if AD is configured. If it is configured and you select this option, AD will store and replicate your zone files.
A Standard Primary zone stores the database in a text file. This text file can be shared with other DNS servers that store their information in a text file. Finally, a Standard Secondary zone simply creates a copy of the existing database from another DNS server. This is primarily used for load balancing.
To open the DNS server configuration tool:
  1. Select DNS from the Administrative Tools folder to open the DNS console.
  2. Highlight your computer name and choose Action | Configure a DNS Server... to launch the Configure DNS Server Wizard.
  3. Click Next and choose to configure the following: forward lookup zone, forward and reverse lookup zone, root hints only (Figure E).
  4. Click Next and then click Yes to create a forward lookup zone (Figure F).
  5. Select the appropriate radio button to install the desired Zone Type (Figure G).
  6. Click Next and type the name of the zone you are creating.
  7. Click Next and then click Yes to create a reverse lookup zone.
  8. Repeat Step 5.
  9. Choose whether you want an IPv4 or IPv6 Reverse Lookup Zone (Figure H).
  10. Click Next and enter the information to identify the reverse lookup zone (Figure I).
  11. You can choose to create a new file or use an existing DNS file (Figure J).
  12. On the Dynamic Update window, specify how DNS accepts secure, nonsecure, or no dynamic updates.
  13. If you need to apply a DNS forwarder, you can apply it on the Forwarders window. (Figure K).
  14. Click Finish (Figure L).

Configure

Figure F


Forward lookup zone

Figure G


Desired zone

Figure H


IPv4 or IPv6

Figure I


Reverse lookup zone

Figure J


Choose new or existing DNS file

Figure K


Forwarders window

Figure L

Finish

Managing DNS records

You have now installed and configured your first DNS server, and you're ready to add records to the zone(s) you created. There are various types of DNS records available. Many of them you will never use. We'll be looking at these commonly used DNS records:
  • Start of Authority (SOA)
  • Name Servers
  • Host (A)
  • Pointer (PTR)
  • Canonical Name (CNAME) or Alias
  • Mail Exchange (MX)

Start of Authority (SOA) record

The Start of Authority (SOA) resource record is always first in any standard zone. The Start of Authority (SOA) tab allows you to make any adjustments necessary. You can change the primary server that holds the SOA record, and you can change the person responsible for managing the SOA. Finally, one of the most important features of Windows 2000 is that you can change your DNS server configuration without deleting your zones and having to re-create the wheel (Figure M).

Figure M



Change configuration

Name Servers

Name Servers specify all name servers for a particular domain. You set up all primary and secondary name servers through this record.
To create a Name Server, follow these steps:
  1. Select DNS from the Administrative Tools folder to open the DNS console.
  2. Expand the Forward Lookup Zone.
  3. Right-click on the appropriate domain and choose Properties (Figure N).
  4. Select the Name Servers tab and click Add.
  5. Enter the appropriate FQDN Server name and IP address of the DNS server you want to add.

Figure N


Name Server

Host (A) records

A Host (A) record maps a host name to an IP address. These records help you easily identify another server in a forward lookup zone. Host records improve query performance in multiple-zone environments, and you can also create a Pointer (PTR) record at the same time. A PTR record resolves an IP address to a host name.
To create a Host record:
  1. Select DNS from the Administrative Tools folder to open the DNS console.
  2. Expand the Forward Lookup Zone and click on the folder representing your domain.
  3. From the Action menu, select New Host.
  4. Enter the Name and IP Address of the host you are creating (Figure O).
  5. Select the Create Associated Pointer (PTR) Record check box if you want to create the PTR record at the same time. Otherwise, you can create it later.
  6. Click the Add Host button.

Figure O



A Host (A) record

Pointer (PTR) records

A Pointer (PTR) record creates the appropriate entry in the reverse lookup zone for reverse queries. As you saw in Figure H, you have the option of creating a PTR record when creating a Host record. If you did not choose to create your PTR record at that time, you can do it at any point.
To create a PTR record:
  1. Select DNS from the Administrative Tools folder to open the DNS console.
  2. Choose the reverse lookup zone where you want your PTR record created.
  3. From the Action menu, select New Pointer (Figure P).
  4. Enter the Host IP Number and Host Name.
  5. Click OK.

Figure P


New Pointer

Canonical Name (CNAME) or Alias records

A Canonical Name (CNAME) or Alias record allows a DNS server to have multiple names for a single host. For example, an Alias record can have several records that point to a single server in your environment. This is a common approach if you have both your Web server and your mail server running on the same machine.
To create a DNS Alias:
  1. Select DNS from the Administrative Tools folder to open the DNS console.
  2. Expand the Forward Lookup Zone and highlight the folder representing your domain.
  3. From the Action menu, select New Alias.
  4. Enter your Alias Name (Figure Q).
  5. Enter the fully qualified domain name (FQDN).
  6. Click OK.

Figure Q



Alias Name

Mail Exchange (MX) records

Mail Exchange records help you identify mail servers within a zone in your DNS database. With this feature, you can prioritize which mail servers will receive the highest priority. Creating MX records will help you keep track of the location of all of your mail servers.
To create a Mail Exchange (MX) record:
  1. Select DNS from the Administrative Tools folder to open the DNS console.
  2. Expand the Forward Lookup Zone and highlight the folder representing your domain.
  3. From the Action menu, select New Mail Exchanger.
  4. Enter the Host Or Domain (Figure R).
  5. Enter the Mail Server and Mail Server Priority.
  6. Click OK.

Figure R


Host or Domain

Other new records

You can create many other types of records. For a complete description, choose Action | Other New Records from the DNS console (Figure S). Select the record of your choice and view the description.

Figure S


 Create records from the DNS console

Troubleshooting DNS servers

When troubleshooting DNS servers, the nslookup utility will become your best friend. This utility is easy to use and very versatile. It's a command-line utility that is included within Windows 2008. With nslookup, you can perform query testing of your DNS servers. This information is useful in troubleshooting name resolution problems and debugging other server-related problems. You can access nslookup (Figure T) right from the DNS console.

Figure T



Nslookup utility   
                                                                                                                                        

SRC: Taken from Microsoft 

Friday, March 14

Number Translation using Voice Translation Profiles


Simple Match and Replace

Example 1

This example replaces the first occurrence of the number "123" with "456".
voice translation-rule 1
 rule 1 /123/ /456/  
These are test voice translation-rule examples:
IndianExperts#test voice translation-rule 1 123
Matched with rule 1
Original number: 123    Translated number: 456 
IndianExperts#test voice translation-rule 1 1234
Matched with rule 1
Original number: 1234   Translated number: 4564 
IndianExperts#test voice translation-rule 1 6123
Matched with rule 1
Original number: 6123   Translated number: 6456 
IndianExperts#test voice translation-rule 1 6123123
Matched with rule 1
Original number: 6123123        Translated number: 6456123
Original number type: none      Translated number type: none
Original number plan: none      Translated number plan: none
 
In this example, the rule matches the first occurrence of the number that contains the pattern "123" anywhere in the number. Specifically, you can use the start and end of number indicators. The Example 2 and Example 3 sections show this.

Example 2

This example shows how to replace any occurrence of "123" at the start of a number with "456".
voice translation-rule 1
 rule 1 /^123/ /456/  
These are test voice translation-rule examples.
IndianExperts#test voice translation-rule 1 123 
Matched with rule 1
Original number: 123    Translated number: 456 
IndianExperts#test voice translation-rule 1 1234
Matched with rule 1
Original number: 1234   Translated number: 4564 
IndianExperts#test voice translation-rule 1 6123
6123 Didn't match with any of rules

Example 3

If you want only the match of an exact number, specify both the start and end number indicators:
voice translation-rule 1
 rule 1 /^123$/ /456/  
IndianExperts#test voice translation-rule 1 123 
Matched with rule 1
Original number: 123    Translated number: 456 
IndianExperts#test voice translation-rule 1 1234
1234 Didn't match with any of rules 
IndianExperts#test voice translation-rule 1 6123
6123 Didn't match with any of rules

Pattern Match with Wildcards

These tables define wildcard and wildcard combinations and show some examples.

Example 1

This example replaces any five-digit number that begins with "40" with the number "6666000".
voice translation-rule 1
 rule 1 /^40.../ /6666000/
IndianExperts#test voice translation-rule 1 40123
Matched with rule 1
Original number: 40123    Translated number: 6666000

Example 2

This example replaces all numbers with "5554000".
voice translation-rule 2
 rule 1 /.*/ /5554000/
IndianExperts#test voice translation-rule 2 123
Matched with rule 1
Original number: 123    Translated number: 5554000 
IndianExperts#test voice translation-rule 2 86573
Matched with rule 1
Original number: 86573  Translated number: 5554000 
IndianExperts#test voice translation-rule 2 ""
Matched with rule 1
Original number:   Translated number: 5554000

Example 3

This example replaces all numbers, except null, with "5554000".
voice translation-rule 2
 rule 1 /.+/ /5554000/
IndianExperts#test voice translation-rule 2 123
Matched with rule 1
Original number: 123    Translated number: 5554000 
IndianExperts#test voice translation-rule 2 "" 
 Didn't match with any of rules

Example 4

This example replaces any number that starts with a combination of zeros (0, 00, and so forth) with "909".
voice translation-rule 5
 rule 1 /^0+/ /909/
IndianExperts#test voice translation-rule 5 0123456
Matched with rule 1
Original number: 0123456        Translated number: 909123456 
IndianExperts#test voice translation-rule 5 00123456
Matched with rule 1
Original number: 00123456       Translated number: 909123456 
IndianExperts#test voice translation-rule 5 000123456
Matched with rule 1
Original number: 000123456      Translated number: 909123456 
IndianExperts#test voice translation-rule 5 123456   
123456 Didn't match with any of rules

Number Slice

You can use number slice when you need to copy parts of a matched number across to the replacement number. You slice the matched number into sets that you can keep or ignore.



Generic Example

This example provides a general explanation.
/ (x\) y\ (z\) /  /w\1\2/ 
Split the matched number into three sets of xy, and z. The backward slash (\) indicates the places to slice up the number. The brackets () indicate which sets you want to reuse in the replacement pattern. The w represents additional digits to insert into the replacement number.
·         Set 1 becomes expression x.
·         Set 2 becomes expression z.
·         Expression y is ignored.
The replacement number is a concatenated number: wxz.

Specific Example

This example provides further detail:
voice translation-rule 1
 rule 1 /^\(12\)3\(45\)$/ /6\1\2/
·         Set 1: 12
·         Set 2: 45
·         Ignore: 3
IndianExperts#test voice translation-rule 1 12345
Matched with rule 1
Original number: 12345        Translated number: 61245

Number Type and Plan

You can restrict matches to particular number or plan types. Also, you can alter the replacement plan or type.

Example 1

In this example, if a number starts with "4" and the type is "national", the rule adds "90" as a prefix. If the type is "international", the rule adds "900" as the prefix.
voice translation-rule 7
 rule 1 /^4/ /904/ type national national
 rule 2 /^4/ /9004/ type international international
IndianExperts#test voice translation-rule 7 493456567 type national
Matched with rule 1
Original number: 493456567      Translated number: 90493456567
Original number type: national  Translated number type: national
Original number plan: none      Translated number plan: none
         
IndianExperts#test voice translation-rule 7 493456567 type international
Matched with rule 2
Original number: 493456567              Translated number: 900493456567
Original number type: international     Translated number type: international
Original number plan: none              Translated number plan: none
This is useful when telephone companies (Telcos) remove access codes on national and international numbers. You can add the correct prefix with the number type as a basis.

Example 2

This example changes the number type and plan.
voice translation-rule 8 
 rule 1 /^2\(...$\)/ /01779345\1/ type unknown national plan unknown isdn
This rule matches any four-digit number that starts with "2". The rule removes the "2", adds the number "01779345" as a prefix, and sets the plan to "isdn" and the type to "national".
IndianExperts#test voice translation-rule 8 2001 type unknown plan unknown 
Matched with rule 1
Original number: 2001   Translated number: 01779345001
Original number type: unknown   Translated number type: national
Original number plan: unknown   Translated number plan: isdn

Reject Calls

Use the reject keyword to reject calls that match. This example rejects all calls that start with "234".
rule 1 reject /^234/
IndianExperts#test voice translation-rule 10 1234
1234 Didn't match with any of rules 
IndianExperts#test voice translation-rule 10 2345
 blocked on rule 1

Apply Rules

Voice Translation Rules are applied to Voice Translation Profiles. These profiles are then applied to dial peers or voice ports. Profiles can be applied to VoIP or POTS dial peers or voice ports, and can be applied to inbound or outbound calls. A profile can translate Called, Calling, or Redirecting numbers.

voice translation-rule 3 
 rule 1 /123/ /456/  
voice translation-profile profile1
 translate calling 3  
dial-peer voice 10 pots
 translation-profile outgoing profile1

Truncate Numbers Down to the Last Two Digits

rule 1 /^.*\(..\)/ /\1/

This is a number divided into one set and one ignored statement.

·         Ignored: ^.* None or more digits from the beginning of number
Set 1: .. two digits
The replacement statement specifies Set 1. This rule copies the last two digits of the number.
IndianExperts#test voice translation-rule 9 12345
Matched with rule 1
Original number: 12345    Translated number: 45 
IndianExperts#test voice translation-rule 9 123456
Matched with rule 1
Original number: 123456   Translated number: 56

Remove Unwanted Digits in a Number

This example is useful because certain Telcos have been known to insert hypens into calling party numbers. Since this is against standards, it causes the calling party number to be ignored. The Telco sends the calling numbers in two formats, with one hypen and sometimes with two. Two rules are required in the voice translation rule. Additionally, the first format can have five or six digit numbers after the hypen. You can match both of these conditions using one rule with the '?' character (match none or one occurrence).
Notes on special characters:
·         The hyphen character is used to indicate a range in a match pattern, for example [0-9]. In order to indicate in this rule that you want to match on the hypen character, it is necessary to use the '\' character to escape its meaning. This is because the hyphen character is a special character. The '\-' characters really means hyphen. The trailing '\' indicates that the number is sliced here.
·         If you type ? directly, IOS thinks it is a request for help. You must type Control-V then ?.
voice translation-rule 12
 rule 1 /^\(01...\)\-\(......?$\)/ /\1\2/ 
 rule 2 /^\(0[12]..\)\-\(...\)\-\(....$\)/ /\1\2\3/
Rule 1: The number is sliced into three sequences, with two sets to be kept.
·         Set 1: 01...
Ignore: -
Set 2: ...... or .....
Rule 2: The number is sliced into five sequences with three sets to be kept.
·         Set 1: 0[12]..
Ignore: -
Set 2: ...
Ignore: -
Set 3: ....

IndianExperts#test voice translation-rule 12 "01208-333444"
Matched with rule 1
Original number: 01208-333444   Translated number: 01208333444 
IndianExperts#test voice translation-rule 12 "01208-72345" 
Matched with rule 1
Original number: 01208-72345    Translated number: 0120872345 
IndianExperts#test voice translation-rule 12 "0161-333-4444"
Matched with rule 2
Original number: 0161-333-4444  Translated number: 01613334444 
IndianExperts#test voice translation-rule 12 "0208-123-4567"
Matched with rule 2
Original number: 0208-123-4567  Translated number: 02081234567



My CCIE#53599

My journey started in 2013 when I decided for a CCIE in voice. One never really knows what they are in for when starting down this r...