Section 3-2. IP Addressing Services


3-2. IP Addressing & Services

  • Switches use IP addresses and services for management purposes.

  • IP addresses can be set or obtained using Dynamic Host Configuration Protocol (DHCP), BOOTstrap Protocol (BOOTP), or Reverse Address Resolution Protocol (RARP).

  • Gateways, routes to networks, and default routes are established to allow communications with devices that are not local to the management network.

  • Static entries or DNS servers can be used to resolve computer names.

  • Hypertext Transfer Protocol (HTTP) services are available for some switches to provide a configuration interface.

  • Simple Network Management Protocol (SNMP) service allows for switch configuration and management.

Configuring an IP Management Address

IP addresses are used in Layer 2 switches for management purposes only. This step is not required to make the switch operational. If you do not configure an IP address, however, the only way to manage the switch is by using the console connection.

1.

(Optional; recommended) Configure the IP address.

a. Configure the IP address manually:

COS

 set interface sc0 [vlannumber] address mask 

IOS

 (global) interface vlan vlannumber (interface or subinterface) ip address address mask (interface or subinterface) management 


Catalyst switches can have an active management address in only one VLAN. The management command on the Layer 2 IOS switches specifies which VLAN is active. VLAN 1 is the default management VLAN for both IOS and COS switches. On a Layer 2 IOS switch, if VLAN 1 is not the management VLAN, the prompt reads "subinterface."

On COS switches running COS 5.x or above, you can also configure the mask using bitwise or classless interdomain routing (CIDR) notation (for example, set interface sc0 10.1.1.1/24).

To view the IP configuration, use the command show interface for COS devices or show interfaces vlan n (where n is your VLAN number) for IOS devices.

NOTE

This addressing section deals exclusively with Layer 2 management addresses and interfaces only. Layer 3 interfaces are discussed in Chapter 5, "Layer 3 Interface Configuration."

b. (Not recommended) Automatically obtain an IP address.

You can have the switch request an address from a service, such as RARP, BOOTP, or DHCP. This is not recommended because it is conceivable that the address could change for DHCP unless the lease is permanent or static (meaning that the lease never expires or a specific IP address is reserved for the switch MAC). This also means that a change of hardware could create a problem with BOOTP and static DHCP address. Not all switches support all of these services. A COS device requests a RARP and BOOTP/DHCP address upon boot if there is no address configured (which is the default setting). If you want to remove an address and configure the COS switch for automatic IP address resolution, you must set the address to 0.0.0.0 and then reset the switch, assuming that there is a valid RARP or DHCP/BOOTP server available. If you are using a static DCHP entry, BOOTP, or a RARP server, you must know the MAC address used by the switch during the request. You can use the command show module to locate the last address for module 1 (the Supervisor engine).

For Layer 2 IOS switches, you can obtain an address via DHCP/BOOTP if you have configured the device for autoconfig. The command service config enables autoconfig. If automatic configuration is enabled, the switch ignores any manual IP configuration parameters:

COS

 show module set interface SC0 0.0.0.0 reset 

IOS

 (global) service config (privileged exec)reload 


For the COS devices, you can renew or release the DHCP address with the command set interface sc0 dhcp release or set interface sc0 dhcp renew.

NOTE

Service configuration loads a complete configuration for the switch automatically. It is referred to as autoinstall in the router community. Autoconfig also requires that a configuration file be available on a TFTP server for a full configuration. For more details on autoconfig, consult the Cisco web site at www.cisco.com/univercd/cc/td/doc/product/lan/c2900xl/29_35wc/sc/swgsyst.htm#xtocid100303.


Configuring a Default Gateway

Because you might be accessing your switch from various networks throughout your environment, it is important to configure the gateway address or default route to access a Layer 3 device to access other networks.

1.

(Optional; recommended) Configure the default gateway:

COS

 set ip route default gatewayaddress 

IOS

 (global) ip default-gateway gatewayaddress 


The gateway address is the IP address of the Layer 3 interface that is acting as a router for traffic generated by the switch. To view your default gateways, use the command show ip route for COS devices or show ip route default for IOS devices.

NOTE

The option default in the COS configuration is an IP alias and cannot be abbreviated. You can also use 0.0.0.0 instead of the word default.


Setting Up DNS Services or Host Tables

Each Catalyst switch can resolve common names, such as URLs or fully qualified domain names, into IP addresses if the proper IP service is configured. This service is a Domain Name System (DNS) server or a local host table. By default DNS services are enabled on IOS switches, but the server is not specified. On COS switches, you must enable the service and specify the server. To configure the switch for DNS operation, use the following guidelines.

1.

(Optional) Enable the DNS service on the switch:

COS

 set ip dns enable 

IOS

 (global) ip domain-lookup 


This command enables the switch to use DNS for name lookups. The IOS default is for ip domain-lookup to be on.

TIP

If you are not going to use DNS, it is recommended that you disable DNS lookups on IOS switches with the global configuration command no ip domain-lookup. This command prevents the switch from trying to resolve mistyped commands.

2.

(Optional) Define the address of the DNS server:

COS

 set ip dns server serveraddress [primary] 

IOS

[View full width]

 (global) ip name-server serveraddress1  [serveraddress2. . . serveraddress6] 


Use this command to specify the addresses of one or more DNS servers. For COS switches, you can enter up to three different addresses using separate command-line entries. The COS keyword primary specifies the first server that will be queried. If there is no answer, the other two will be checked. For IOS switches, you can specify up to six addresses on a single command-line entry. For IOS switches, the first address is the primary.

-or-

(Optional) Specify host entries for name resolution:

COS

 set ip alias name address 

IOS

 (global) ip host name address 


By specifying the name and address of the device on the switch, the name is resolved in the local table. DNS can be enabled or disabled when using local host names.

Configuring HTTP Services

For IOS switches, an HTTP server can be enabled so that the switch can be managed using a web browser. The web-based graphical user interface (GUI) is a straightforward management option that gives users another configuration option. HTTP server services are not supported across all platforms.

1.

(Optional) Configure HTTP service for switch configuration:

COS

N/A

IOS

 (global) [no] ip http server 


The IOS command ip http server is on by default. You can choose to disable it with the no command.

CAUTION

Starting with Cisco IOS Release 11.3, the HTTP server was enabled by default. Some switches can be vulnerable to a bug (CSCdt93862) that enables users to access the HTTP services at privileged level without being prompted for the password. The initial workaround to this bug was to disable the HTTP services. See www.cisco.com/warp/public/707/IOS-httplevel-pub.html for more information.


Feature Example

This example shows a typical configuration for setting the IP address, gateway, and DNS servers for a switch in an administrative VLAN 986. For the IOS switch, this example disabled the HTTP server service.

An example of the Catalyst OS configuration follows:

 Console (enable)> set interface sc0 986 10.1.1.5/24 Console (enable)> set ip route default 10.1.1.1 Console (enable)> set ip dns enable Console (enable)> set ip dns server 10.1.1.254 

An example of the Supervisor IOS configuration follows:

 Switch(config)#interface vlan 986 Switch(config-subif)#ip address 10.1.1.5 255.255.255.0 Switch(config-subif)#management Switch(config-subif)#ip default-gateway 10.1.1.1 Switch(config)#ip name-server 10.1.1.254 Switch(config)#no ip http server Switch(config)#end Switch(config)#copy running-config startup-config 



Cisco Field Manual. Catalyst Switch Configuration
Cisco Field Manual. Catalyst Switch Configuration
ISBN: 1587050439
EAN: N/A
Year: 2001
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net