Home > other >  The DHCP relay problem
The DHCP relay problem

Time:10-13


3, the experimental steps
Configure the switch sw1
Sw1 (config) # vlan 10
Sw1 (config) # int vlan 10
Sw1 (config - if) # add 192.168.10.1 IP 255.255.255.0
Sw1 (config - if) # no shut
Sw1 (config - if) # int fa0/10
Sw1 (config - if) # switchport mode access
Sw1 (config - if) # switchport access vlan 10
Sw1 (config) # int fa0/24
Sw1 (config - if) # switchport trunk encapsulation dot1q
Sw1 (config - if) # switchport mode trunk
Sw1 (config) # IP default gateway - 192.168.10.2
Sw1 (config) # IP DHCP pool vlan4
Sw1 (DHCP - config) # network 192.168.4.0 255.255.255.0
Sw1 (DHCP - config) # default - the router 192.168.4.1
Sw1 (DHCP - config) # DNS - server 211.138.180.2
Sw1 (config) # IP DHCP pool vlan5
Sw1 (DHCP - config) # network 192.168.5.0 255.255.255.0
Sw1 (DHCP - config) # default - the router 192.168.5.1
Sw1 (DHCP - config) # DNS - server 211.138.180.2
Sw1 (config) # IP DHCP excluded - address 192.168.4.1 192.168.4.10
Sw1 (config) # IP DHCP excluded - address 192.168.5.1 192.168.5.10
Configure sw2 configuration switches
Sw2 (config) # vlan 4
Sw2 (config) # vlan 5
Sw2 (config) # vlan 10
Sw2 (config) # int vlan 10
Sw2 (config - if) # IP add 192.168.10.2 255.255.255.0
Sw2 (config - if) # no shut
Sw2 (config) # int vlan 4
Sw2 (config - if) # IP add 192.168.4.1 255.255.255.0
Sw2 (config - if) # no shut
Sw2 (config) # int vlan 5
Sw2 (config - if) # IP add 192.168.5.1 255.255.255.0
Sw2 (config - if) # no shut
Sw2 (config) # int fa0/10
Sw2 (config - if) # switchport mode access
Sw2 (config - if) # switchport access vlan 10
Sw2 (config) # int fa0/24
Sw2 (config - if) # switchport trunk encapsulation dot1q
Sw2 (config - if) # switchport mode trunk
Sw2 (config) # int fa0/4
Sw2 (config - if) # switchport mode access
Sw2 (config - if) 4 # switchport access vlan
Sw2 (config) # int fa0/5
Sw2 (config - if) # switchport mode access
Sw2 (config - if) # switchport access vlan 5
Sw2 (config) # int vlan 4
Sw2 (config - if) # IP helper - address 192.168.10.1
Sw2 (config) # int vlan 5
Sw2 (config - if) # IP helper - address 192.168.10.1
Cisco PACKET simulator two 3650 switches
Want to ask next 10 what vlan. I according to the above. The PC still can not automatically obtain IP

CodePudding user response:

SW2 port is not open portfast feature this

CodePudding user response:

Sw1 and sw2 didn't open IP routing
SW2 open IP routing have nothing to say, don't open not routing,
But why need open SW1 I temporarily didn't want to understand, but the result of the test is indeed a SW1 must also open, it is possible that the simulator of bugs,
It's convenient, would use GNS to verify

CodePudding user response:

Why SW1 to also want to open the route

CodePudding user response:

I remember when relay, DHCP after several messages from the DHCP server directly to the DHCP client, so to have client segment routing server end, do not open by, use the default - gateway with the gateway, should be the same,

CodePudding user response:

This is because PacketTracer just a simulator, it will also have a BUG, open GNS verify it difficult?

CodePudding user response:

This is a difficult problem

CodePudding user response:

By open to try,

CodePudding user response:

DHCP relay server back to message is directly back to the client segment, according to the reasonable default gateway can work, but there is a bug is also very normal, advice on sw1 ping 192.168.4.1 or 5.1, if the impassability, DHCP certainly does not work,

CodePudding user response:

By the way, see if IP routing is opened, if you want to the default gateway work, must be no IP routing.
  • Related