Configuration of a layer-3 Cisco switch 1. Start a route on a layer-3 switch. Otherwise, layer-3 switch does not have the routing function switch (config) # ip routing2. Configure the VLAN ip address switch (config) # interface vlan 1 because Layer 3 switches support routing between VLANs, each VLAN can be configured with an ip address www.2cto.com switch (config-if) # ip address 192.168.1.1 255.255.255.0switch (config-if) # no shutdown
3. view the FIB table switch # show ip cef4 and view the adjacent relationship table switch # show adjacency detail 5. Configure the routing interface switch (config-if) on the layer-3 switch) # no switchport (the configuration interface is in Layer 3 mode, which means to cancel the switch interface) 6. configure a static or dynamic ROUTE on a layer-3 switch and configure a ROUTE method on the ROUTE. 7. configure a DHCP relay forwarding switch (cofig) # interface vlan 2 switch (config-if) # ip helper-address 192.168.2.100 ----------------------------------------------------- solve the instance; www.2cto.com
The following configuration command configures a vrodhcp as a DHCP server to dynamically allocate IP addresses to the DHCP client.
Router1 # configure terminal Router1 (config) # service dhcp // enable DHCP service Router1 (config) # ip dhcp pool 172.25.1.0/24 // define the DHCP address pool Router1 (dhcp-config) # network 172.25.1.0 255.255.255.0 // use the network command to define the network address range Router1 (dhcp-config) # default-router 172.25.1.1 // define the gateway address to be allocated
Router1 (dhcp-config) # dns-server 192.168.1.1 configure DNS server Router1 (dhcp-config) # exitRouter1 (config) # ip dhcp excluded-address 172.25.1.1 172.25.1.50 // ip addresses in this range cannot be allocated to the client Router1 (config) # ip dhcp excluded-address 172.25.1.200 172.25.1.255 // ip addresses in this range cannot be allocated to the client Router1 (config) # endRouter1 #