Router DHCP Server, Client, Relay and IPv6 Stateless Autoconfiguration Highlighted

Created Dec 24, 2014 17:17:39Latest reply Sep 30, 2018 19:00:57 4839 3 0 0
 

DHCP server

I should write my method of calculating host addresses and broadcast address here and I call it ABCD way. Just take 10.10.1.129/25 for example.

At first we need to write subnet mask as 255.255.255.128.

A=256-128=128

B=129

C=B/A=128(Get the Integer)(Network address)

D=A+C-1=255(Broadcast address)

Then host addresses will be 10.10.1.129-254

DIY, in order to improve myself and I decide to configure it totally by myself.

Here is my configuration:

#

dhcp enable

#

dhcp server group 1

 dhcp-server 10.10.1.1 1 (I don’t know what I’m doing, probably because I’m not familiar with dhcp CLI and this is totally unnecessary)

#

ip pool 1

 gateway-list 10.10.1.1

network 10.10.1.0 mask 255.255.255.128 //Specify the range of IP addresses that can be dynamically allocated from the global IP address pool.(I just don’t know this kind of thing, so I don’t know how to allocate ip pool to specific network)                                         

 excluded-ip-address 10.10.1.2 //Specify the IP address (10.10.1.2) that cannot be automatically allocated from an IP address pool. ( In order to avoid IP address conflict, I didn’t aware that)

 excluded-ip-address 10.10.1.4 //Specify the IP address (10.10.1.4) that cannot be automatically allocated from an IP address pool.

 lease day 10 hour 12 minute 0

 dns-list 10.10.1.2

 nbns-list 10.10.1.4

 domain-name huawei.com

#

interface GigabitEthernet0/0/0

 ip address 10.10.1.1 255.255.255.128

 dhcp select interface (dhcp select global, the command is used to select global pool, there is no need for me to use dhcp server of specific interface)

#

interface GigabitEthernet0/0/1

 ip address 10.10.1.129 255.255.255.128

 dhcp select interface

 dhcp server lease day 5 hour 0 minute 0

 dhcp server dns-list 10.10.1.2

 dhcp server domain-name huawei.com

In a word, use global pool with specific network, aware excluded-ip-address, which is what I learn from standard answer. At the same time, using dhcp server of specific interface is an alternate way and I can still achieve that.

 

DHCP client

I don’t know the command of interface: IP address dhcp-alloc. This one is easy, so I don't mention it here.

DHCP Relay

Client1 can’t get IP address from RouterB. I use a PC to connect with GE 0/0/1 of Router B, but it can’t get IP address, so I need to check the DHCP server function of Router B.

It turns out that I forget to configure Ethernet 0/0/0 port hybrid pvid vlan 10. Without the command, the client1 can’t ping vlanif 10.

Still it isn’t working. I find it’s caused by routing. So make sure every interface is reachable from other interfaces is really important in the lab. The best way is to configure default route like 0.0.0.0 0.0.0.0 default gateway address.

IPv6 Auto

In this lab, I use my own computer instead for the PC in simulator isn't good enough.  (Cloud to connect my ethernet adaptor. )

There're four IPv6 addresses in total.

1) Automatically configured global unicast IPv6 address, which has the same prefix as the IPv6 address of GE0/0/0 (Stateless Autoconfiguration with RA)

(2) EUI-64 address generated using a MAC address fc01+link-local

(3) Link-local address (only for same local link with prefix FE80::/10+Interface ID. What’s interface ID? EUI-64. My PC’s MAC address is 78:45:C4:0F:66:6C, 78 equals 0111 1000, which needs to change to 0111 1010(7a)(The seventh bit needs to change from 0 to 1), so we get 7A:45:C4:FF:FE:0F:66:6C, finally FE80:: 7A:45:C4:FF:FE:0F:66:6C.

 (4) Automatically generated default gateway address, which is the link-local IPv6 address of the interface directly connecting the PC to the router(The router’s GE 0/0/0’s MAC address is 00e0:fc4e:286e, fe80+02e0:fcfffe4e:286e

   

This article contains more resources

You need to log in to download or view. No account?Register

x
  • x
  • convention:

user_2790689  Expert   Created Dec 25, 2014 10:22:11 Helpful(0) Helpful(0)

Thank you.
  • x
  • convention:

user_113229  Mentor   Created Dec 27, 2014 13:09:04 Helpful(0) Helpful(0)

Reply 2 #

You're welcome.O(∩_∩)O~
  • x
  • convention:

faysalji  Novice   Created Sep 30, 2018 19:00:57 Helpful(0) Helpful(0)

Goood:)
  • x
  • convention:

If you think my post/reply is useful, please click the Helpful button and flag my post as a BEST ANSWER. Thanks

Responses

Reply
You need to log in to reply to the post Login | Register

Notice:To ensure the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but not limited to politically sensitive content, content concerning pornography, gambling, drug abuse and trafficking, content that may disclose or infringe upon others' intellectual properties, including commercial secrets, trade marks, copyrights, and patents, and personal privacy. Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see“ Privacy Policy.”
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Fast reply Scroll to top