Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Basic configuration commands for dhcp

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Suppose two Cisco routers R1 (server) and R2 (client) are connected

1. Configuration of R1 dhcp service

Dhcp#configure terminal

Dhcp (config) # service dhcp

Dhcp (config) # noip dhcp conflictlogging

Dhcp (config) # ipdhcp pool cisco

Dhcp (dhcp-config) # network 192.168.1.0 255.255.255.0 / / dhcp server to assign

Dhcp (dhcp-config) # default-router 192.168.1.1 / / configure the default gateway

Dhcp (dhcp-config) # dns-server 192.168.1.1 / / configure the dns server

Dhcp (dhcp-config) # exit

Dhcp (dhcp-config) # ip dhcp excluded-address 192.168.1.200192.1681.254 / / configure an address that dhcp does not assign

2. R2 client configuration

In global mode:

R2 (config) # interface f0and0

R2 (config-if) # ip address dhcp / / obtain the ip address from the dhcp server

Basic configuration of dhcp ipv6

1. DHCP automatically obtains the IPv6 address

Configuration of GW:

Ipv6 dhcp poolDHCP-pool

Prefix-delegation pool dhcppool lifetime 1800600 / / call ipv6 localpool and set lifetime

Dns-server 2000::8

Domain-name HelloWord

Ipv6 local pool dhcppool 2001 64 64 / / define the prefix of Ipv6 to be advertised

InterfaceFastEthernet0/0

Ipv6 enable

Ipv6 address 2001::1/64

Ipv6 dhcp server DHCP-pool / / Open ipv6 DHCP on the interface and call the pool

Configuration of PC

InterfaceFastEthernet0/0

Ipv6 enable / / API enables IPV6

Ipv6 dhcp client pd test / / configure DHCP client, and specify that the obtained prefix name is test (locally valid)

Ipv6 address test:: / 64 eui-64 / / use the obtained prefix, plus the EUI64 of this API, to form the interface address

2. Stateless automatic acquisition of ipv6 address

Configuration of GW:

InterfaceFastEthernet0/0

Ipv6 enable

Ipv6 address 2001::1/64

No ipv6 nd suppress-ra

Configuration of PC

InterfaceFastEthernet0/0

Ipv6 enable / / API enables IPV6

Ipv6 address autoconfig

Ipv6 address configuration: manual configuration, dynamic configuration, and dynamic configuration

Stateful address autoconfiguration (Stateful, such as DHCPv6)

Stateless address autoconfiguration (Stateless)

Without a DHCP server, the NDP protocol is used to complete the task of automatic address assignment between the host and the router.

Router Solicitation request and Router Advertisement advertisement messages using the NDP protocol. The former is used for the host to discover the router and urge the router to send Router Advertisement messages to notify the prefix information, and the host completes the automatic configuration of the Ipv6 address according to the received prefix information. By default, ra routing advertisements are turned off and turned on using no ipv6 nd suppress-ra under the interface.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report