RTD Embedded Technologies, Inc.
|
www.rtd.com
50
LAN35MH08HR & LAN35ME08HR User’s Manual
NOTE: The IP address above was chosen for demonstration purposes only.
Users should verify the IP address does not cause a conflict prior to
connecting the switch to the network!
6.8.1
A
DDING A DEFAULT ROUTE VIA
ICLI
In addition to an IP address, it may be necessary to configure a default gateway (default route). If the LAN35Mx08 is only expected to
communicate on the local subnet (in the case of the example above 192.168.0.x), the default gateway is not required. However, for complex
networks with multiple subnets, a route for the default gateway should be specified.
A default gateway may be specified by adding a route for 0.0.0.0/0 with the
ip route
configuration command. The routing table of the switch may
be viewed with the
show ip route
exec command. Refer to the screenshot below for an example. In this case, the default gateway is
192.168.0.1 (consistent with the previous example). All IP traffic which does not match one of the more specific routes will be directed to the
default gateway (e.g. anything not on the local subnet, loopback, or multicast). We use the show command to show haw the command was
implemented.
#
configure terminal<Enter>
(config)#
ip route 0.0.0.0 0.0.0.0 192.168.0.1<Enter>
(config)#
exit<Enter>
#
show ip route<Enter>
0.0.0.0/0 via 192.168.0.1 <UP GATEWAY HW_RT>
127.0.0.1/32 via 127.0.0.1 <UP HOST>
192.168.0.0/24 via interface index 1 <UP HW_RT>
224.0.0.0/4 via 127.0.0.1 <UP>
#
6.9
Common Configuration Task: Configuring a DHCP client with ICLI
Instead of a static IP address (see above), your network may be configured to dynamically assign addresses using DHCP. The LAN35Mx08
supports DHCP client operation. This configuration assumes a DHCP server is present in your network, and is properly configured to serve
addresses to clients. It is up to the user to setup a DHCP server and ensure it is running properly prior to deploying the LAN35Mx08 as a DHCP
client.
The following demonstrates how to configure the VLAN 1 interface for DHCP. The DHCP status may be checked with the exec command
show
ip interface brief
. The IP address displayed in by the show command will be the one assigned by your network DHCP server.
#
configure terminal<Enter>
(config)#
interface vlan 1<Enter>
(config-if-vlan)#
ip address dhcp<Enter>
(config-if-vlan)#
exit<Enter>
(config)#
exit<Enter>
#
show ip interface brief<Enter>
Interface Address Method Status
---------------- -------------------- -------- ------
VLAN 1 10.1.1.91/24 DHCP UP
#
6.10
Common Configuration Task: Configuring a DHCP server with ICLI
For smaller networks, it may be desirable to have the LAN35Mx08 be the DHCP server. In this configuration, any clients that connect to the
LAN35MHx08 will get an IP address delivered to them. Before proceeding, one should make certain that no other DHCP servers are present on
the network. DHCP servers have several settings that may be adjusted. The examples below merely illustrate a common configuration.
The screenshot below demonstrates how to configure the LAN35Mx08 as a DHCP server. Continuing from our previous example, we use the
192.168.0.x subnet. The DHCP pool named TESTPOOL starts at 192.168.0.10, with a reserved IP range from 192.168.0.1-10 to accommodate
any devices that require a static IP. The DHCP server provides a default gateway to the clients (192.168.0.1). It also provides DNS servers to
the clients (8.8.8.8 and 8.8.4.4). DHCP lease time is 1 day. To be a DHCP server, the switch must be configured with a static IP address. In this
case, we use the same static IP address as before (192.168.0.5).
#
configure terminal<Enter>