Skip Navigation Links
Exit Print View
| Sun Ethernet Fabric Operating System ### DHCP Administration Guide

Search Scope:

- This Document
- Entire Library

## Acquire an IP Address From a Server Residing Outside the Client Network

In this example, a DHCP relay server is set up using various DHCP server and DHCP relay commands and options from the preceding sections. The example connects port 1 of switch 1 to port 1 of switch 2, and connects port 2 of switch 2 to port 1 of switch 3.

1. Create `vlan 2` in switch 1 with port 1 as the member port. Then, add a route to the `30.0.0.0` network through `20.0.0.2` (switch 2).

       SEFOS# configure terminal
       SEFOS(config)# vlan 2
       SEFOS(config-vlan)# ports extreme-ethernet 0/1
       SEFOS(config-vlan)# exit
       SEFOS(config)# interface vlan 2
       SEFOS(config-if)# shutdown
       SEFOS(config-if)# ip address 20.0.0.1 255.0.0.0
       SEFOS(config-if)# no shutdown
       SEFOS(config-if)# exit
       SEFOS(config)# interface extreme-ethernet 0/1
       SEFOS(config-if)# switchport pvid 2
       SEFOS(config-if)# exit
       SEFOS(config)# ip route 30.0.0.0 255.0.0.0 vlan 2
       SEFOS(config)# end

2. View the VLAN configurations and route configuration.

       SEFOS# show ip interface vlan 2

       vlan2 is up, line protocol is up
       Internet Address is 20.0.0.1/8
       Broadcast Address  20.255.255.255

       SEFOS# show vlan id 2

       Vlan database
       -------------
       Vlan ID             : 2
       Member Ports        : Ex0/1
       Untagged Ports      : None
       Forbidden Ports     : None
       Name                :
       Status              : Permanent
       ----------------------------------------------------

       SEFOS# show ip route

       Codes: C - connected, S - static, R - rip, B - bgp, O - ospf
       C 10.0.0.0/8  is directly connected, vlan1
       C 20.0.0.0/8  is directly connected, vlan2
       S 30.0.0.0/8  is directly connected, vlan2

3. Create `vlan 2` with port 1 as a member port and `vlan 3` with port 2 as a member port in switch 2.

       SEFOS# configure terminal
       SEFOS(config)# vlan 2
       SEFOS(config-vlan)# ports extreme-ethernet 0/1
       SEFOS(config-vlan)# exit
       SEFOS(config)# interface vlan 2
       SEFOS(config-if)# shutdown
       SEFOS(config-if)# ip address 20.0.0.2 255.0.0.0
       SEFOS(config-if)# no shutdown
       SEFOS(config-if)# exit
       SEFOS(config)# interface extreme-ethernet 0/1
       SEFOS(config-if)# switchport pvid 2
       SEFOS(config-if)# exit
       SEFOS(config)# vlan 3
       SEFOS(config-vlan)# ports extreme-ethernet 0/2 untagged extreme-ethernet 0/2
       SEFOS(config-vlan)# exit
       SEFOS(config)# interface vlan 3
       SEFOS(config-if)# shutdown
       SEFOS(config-if)# ip address 30.0.0.2 255.0.0.0
       SEFOS(config-if)# no shutdown
       SEFOS(config-if)# exit
       SEFOS(config)# interface extreme-ethernet 0/2
       SEFOS(config-if)# switchport pvid 3
       SEFOS(config-if)# no shutdown
       SEFOS(config-if)# end
       SEFOS# show vlan id 2

       Vlan database
       -------------
       Vlan ID             : 2
       Member Ports        : Ex0/1
       Untagged Ports      : None
       Forbidden Ports     : None
       Name                :
       Status              : Permanent
       ----------------------------------------------------

       SEFOS# show vlan id 3

       Vlan database
       -------------
       Vlan ID             : 3
       Member Ports        : Ex0/2
       Untagged Ports      : Ex0/2
       Forbidden Ports     : None
       Name                :
       Status              : Permanent
       ----------------------------------------------------

       SEFOS# show ip interface vlan 2

       vlan2 is up, line protocol is up
       Internet Address is 20.0.0.2/8
       Broadcast Address  20.255.255.255

       SEFOS# show ip interface vlan 3

       vlan3 is up, line protocol is up
       Internet Address is 30.0.0.2/8
       Broadcast Address  30.255.255.255

4. Enable the DHCP server in switch 1.

   Since the client is in `vlan 3`, an address pool with the `30.0.0.0` network must be configured in the server.

       SEFOS# configure terminal
       SEFOS(config)# service dhcp-server
       SEFOS(config)# ip dhcp pool 1
       SEFOS(dhcp-config)# network 30.0.0.0
       SEFOS(dhcp-config)# lease 0 0 30
       SEFOS(dhcp-config)# end
       SEFOS# show ip dhcp server information

       DHCP server status              : Enable
       Send Ping Packets               : Disable
       Debug level                     : None
       Server Address Reuse Timeout    : 5 secs
       Next Server Adress              : 0.0.0.0
       Boot file name                  :

       SEFOS# show ip dhcp server pools

       Pool Id                       : 1
       ----------------------------------
       Subnet                        : 30.0.0.0
       Subnet Mask                   : 255.0.0.0
       Lease time                    : 1800 secs
       Utilization threshold         : 75%
       Start Ip                      : 30.0.0.1
       End Ip                        : 30.255.255.255

5. Enable DHCP relay in switch 2.

   This action connects the networks between the client and server.

       SEFOS# configure terminal
       SEFOS(config)# service dhcp-relay
       SEFOS(config)# end
       SEFOS# show ip dhcp relay information

       Dhcp Relay                  : Enabled
       Dhcp Relay Servers only     : Disabled

       DHCP server                 : 0.0.0.0

       Dhcp Relay RAI option       : Disabled
       Debug Level                 : 0x1

       No of Packets inserted RAI option               : 0
       No of Packets inserted circuit ID suboption     : 0
       No of Packets inserted remote ID suboption      : 0
       No of Packets inserted subnet mask suboption    : 0
       No of Packets dropped                           : 0
       No of Packets which did not inserted RAI option : 0

6. Configure the DHCP client.

   This example uses a SPARC computer running Oracle Solaris 10 OS as the DHCP client. The dual 10-Gigabit Ethernet XFR SR network interface card (option X1109A-Z) is installed in the SPARC computer and uses the instance `ixgbe`. The DHCP daemon is active in Oracle Solaris 10 by default, so no DHCP configuration is needed.

7. Use the correct cable to connect a port on the NIC to port 70 of switch 2.

   See Multiple-Switch Configuration. Issue the following commands after connecting the cables. If a different DHCP client is used, follow the appropriate instructions in the administration guide for the client.

       # ifconfig ixgbe1 plumb up
       # ifconfig -a
       lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
               inet 127.0.0.1 netmask ff000000
       e1000g0: flags=1000803<UP,BROADCAST,MULTICAST,IPv4> mtu 1500 index 2
               inet 10.7.58.46 netmask ffffff00 broadcast 10.7.58.255
               ether 0:14:4f:20:f4:cc
       ixgbe1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 12
               inet 0.0.0.0 netmask ff000000
               ether 0:1b:21:4a:6f:fc

8. Execute the DHCP request, and wait 15-20 seconds for the command prompt to return.

       # ifconfig ixgbe1 dhcp

9. Show that IP `30.0.0.1` is assigned to the DHCP client port.

       # ifconfig -a

       lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
                   inet 127.0.0.1 netmask ff000000
       e1000g0: flags=1000803<UP,BROADCAST,MULTICAST,IPv4> mtu 1500 index 2
                   inet 10.7.58.46 netmask ffffff00 broadcast 10.7.58.255
                   ether 0:14:4f:20:f4:cc
       ixgbe1: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 12
                   inet 30.0.0.1 netmask ff000000 broadcast 30.255.255.255
                   ether 0:1b:21:4a:6f:fc

10. Display the IP binding by issuing the following command in switch 1 (DHCP server).

        SEFOS# show ip dhcp server binding

        Ip         Hw           Hw                 Binding    Expire
        Address   Type         Address             State      Time
        -------  -------       ------              --------   ----------
        30.0.0.1 Ethernet   00:1b:21:4a:6f:fc   Assigned   Apr 10 11:39:28 2010

Copyright © 2010, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |