Community discussions

MikroTik App
 
magitekbay
just joined
Topic Author
Posts: 6
Joined: Sat Aug 21, 2021 2:11 pm

failed to obtain ip address from dhcp server

Fri Dec 16, 2022 9:56 am

hi,
my problem is x520-da2 can not obtain ip address from dhcp server,others are ok.
switch: CRS309-1G-8S+
router: RB5009UG+S+IN
os:routeros 7.6

the switch have downlink ports to connect to x520-da2(uplink name is 3_sfp+_workstation),and uplink ports to connect to router.
btw,switch my CRS309-1G-8S+ from routeros back to swos,everything works fine.
thanks!

CRS309-1G-8S+ config:
# dec/16/2022 15:44:12 by RouterOS 7.6
# software id = xxxxxxx
#
# model = CRS309-1G-8S+
# serial number = xxxxxxx
/interface bridge
add admin-mac=08:55:31:05:81:A3 auto-mac=no comment=defconf name=br-lan
/interface ethernet
set [ find default-name=sfp-sfpplus1 ] name=1_sfp+_router_in
set [ find default-name=sfp-sfpplus3 ] name=3_sfp+_workstation speed=10Gbps
set [ find default-name=sfp-sfpplus5 ] name=5_sfp+_dell-data speed=10Gbps
set [ find default-name=ether1 ] name=9_mgmt
set [ find default-name=sfp-sfpplus7 ] auto-negotiation=no
/interface list
add name=LAN
add name=WAN
add name=MGMT
/interface lte apn
set [ find default=yes ] ip-type=ipv4 use-network-apn=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/port
set 0 name=serial0
/interface bridge port
add bridge=br-lan comment=defconf ingress-filtering=no interface=9_mgmt
add bridge=br-lan comment=defconf ingress-filtering=no interface=sfp-sfpplus2
add bridge=br-lan comment=defconf ingress-filtering=no interface=\
    3_sfp+_workstation
add bridge=br-lan comment=defconf ingress-filtering=no interface=sfp-sfpplus4
add bridge=br-lan comment=defconf ingress-filtering=no interface=\
    5_sfp+_dell-data
add bridge=br-lan comment=defconf ingress-filtering=no interface=sfp-sfpplus6
add bridge=br-lan comment=defconf ingress-filtering=no interface=sfp-sfpplus7
add bridge=br-lan comment=defconf ingress-filtering=no interface=sfp-sfpplus8
add bridge=br-lan ingress-filtering=no interface=1_sfp+_router_in
/ip settings
set max-neighbor-entries=8192
/interface list member
add interface=1_sfp+_router_in list=WAN
add interface=3_sfp+_workstation list=LAN
add interface=9_mgmt list=MGMT
add interface=5_sfp+_dell-data list=LAN
/interface ovpn-server server
set auth=sha1,md5
/ip dhcp-client
add interface=*B
/ip firewall filter
add action=accept chain=input connection-state=established,related,untracked
add action=drop chain=input connection-state=invalid
add action=accept chain=input protocol=icmp
add action=drop chain=input in-interface-list=!LAN
add action=accept chain=forward ipsec-policy=in,ipsec
add action=accept chain=forward ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward connection-state=\
    established,related hw-offload=yes
add action=accept chain=forward connection-state=\
    established,related,untracked
add action=drop chain=forward connection-state=invalid
add action=drop chain=forward connection-nat-state=!dstnat connection-state=\
    new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat ipsec-policy=out,none out-interface-list=\
    WAN
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Asia/Shanghai
/system identity
set name=CRS309-1G-8S+
/system ntp client
set enabled=yes
/system ntp client servers
add address=10.10.0.1
/system routerboard settings
set boot-os=router-os
/system swos
set allow-from-ports=p1,p2,p3,p4,p5,p6,p7,p8,p9 identity=CRS309-1G-8S+ \
    static-ip-address=10.10.0.4
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failed to obtain ip address from dhcp server

Fri Dec 16, 2022 10:05 am

As it happens to be, I had a similar case just this week with ONE laptop not being able to connect anymore to a network.
After investigation I noticed DHCP settings on that device were set to manual instead of automatic (and the wrong IP subnet was used).
Obviously the user did not make that change, as usual :lol:

Already checked that setting on the network device ?
Is it set to automatic ? If you use a manual assigned IP address within the allowed range, does it connect then ?
 
magitekbay
just joined
Topic Author
Posts: 6
Joined: Sat Aug 21, 2021 2:11 pm

Re: failed to obtain ip address from dhcp server

Fri Dec 16, 2022 12:36 pm

As it happens to be, I had a similar case just this week with ONE laptop not being able to connect anymore to a network.
After investigation I noticed DHCP settings on that device were set to manual instead of automatic (and the wrong IP subnet was used).
Obviously the user did not make that change, as usual :lol:

Already checked that setting on the network device ?
Is it set to automatic ? If you use a manual assigned IP address within the allowed range, does it connect then ?
thx,I can confirm enabled dhcp.
Image
Last edited by magitekbay on Fri Dec 16, 2022 1:03 pm, edited 1 time in total.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failed to obtain ip address from dhcp server

Fri Dec 16, 2022 12:43 pm

Image does not load ?

Does it work with a manual assigned IP ?
 
magitekbay
just joined
Topic Author
Posts: 6
Joined: Sat Aug 21, 2021 2:11 pm

Re: failed to obtain ip address from dhcp server

Fri Dec 16, 2022 12:59 pm

Image does not load ?

Does it work with a manual assigned IP ?
oops,I was wrong,It is not fixed,because the os switch to swos before.
now change to routeros,and assigned 10.10.0.22 to adapter,but the connection status is unreachable.
Last edited by magitekbay on Fri Dec 16, 2022 1:27 pm, edited 1 time in total.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failed to obtain ip address from dhcp server

Fri Dec 16, 2022 1:20 pm

Typical typo error :lol:
 
magitekbay
just joined
Topic Author
Posts: 6
Joined: Sat Aug 21, 2021 2:11 pm

Re: failed to obtain ip address from dhcp server  [SOLVED]

Fri Dec 16, 2022 2:22 pm

I forgot to configure lacp,the problem resolved. :D
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failed to obtain ip address from dhcp server

Fri Dec 16, 2022 3:21 pm

It still remains a self-inflicted problem, then.

PS it's not nice to change your post when an answer already has been given ...

Who is online

Users browsing this forum: Ahrefs [Bot], mtkvvv and 41 guests