Community discussions

MikroTik App
 
User avatar
GreaterTX
just joined
Topic Author
Posts: 22
Joined: Mon Feb 25, 2019 6:47 am

Static IP not working

Tue Nov 16, 2021 6:35 am

I am configuring a 2011UiAS-2HnD using Winbox and quickset

When using the interface and setting the WAN connection to use DHCP the router pulls a DHCP public address no problem. However the router never accepts the static IP address being configured. I am trying using the default factory reset and configuring via Winbox in Quickset.

After configuring with the Static IP information this is the export from Winbox, what is strange is although the IP is showing in Winbox I do not see reference of the actual WAN IP in the exported config. So it seems Winbox is screwing something up maybe? I only see mention of the gateway address

Maybe Winbox is screwing up for some reason and not saving the IP address for the interface? Would that seem to be correct from the posted configuration? The ISP is saying whenever I configure the IP statically the modem isn't showing a device connected. But when changing to DHCP all of the sudden (naturally they see the DHCP request), they then see it connect and pull an IP. So maybe Winbox is not applying the static IP information and thus not bringing the interface "up" when configured for static?


# nov/15/2021 21:24:10 by RouterOS 6.49
# software id = RW1G-J4Q7
#
# model = 2011UiAS-2HnD
# serial number =
/interface bridge
add admin-mac=64:D1:54:MAC auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    disabled=no distance=indoors frequency=auto installation=indoor mode=\
    ap-bridge ssid=MikroTik-MAC wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.2.100-192.168.2.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=defconf
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=ether9
add bridge=bridge comment=defconf interface=ether10
add bridge=bridge comment=defconf interface=sfp1
add bridge=bridge comment=defconf interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.2.1/24 comment=defconf interface=bridge network=192.168.2.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.2.0/24 comment=defconf gateway=192.168.2.1 netmask=24
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,1.0.0.1
/ip dns static
add address=192.168.2.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=\
    invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" \
    connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=\
    out,none out-interface-list=WAN
/ip route
add disabled=yes distance=1 gateway=WANGATEWAYIP.225
/lcd interface pages
set 0 interfaces=sfp1
/system clock
set time-zone-name=America/Phoenix
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
 
holvoetn
Forum Guru
Forum Guru
Posts: 5490
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Static IP not working

Tue Nov 16, 2021 8:18 am

Dynamic entries are not shown in export.

Export and then print of one of my device's addresses. Notice the difference, with print the dynamic entry is shown. With export not.
[xyz@mAPLite92] /ip/address> export
# nov/16/2021 07:16:56 by RouterOS 7.1rc5
# software id = IFN6-V3SY
#
# model = RBmAPL-2nD
# serial number = E0AA0E24540D
/ip address
add address=192.168.92.1/24 comment=defconf interface=bridge network=192.168.92.0
[xyz@mAPLite92] /ip/address> print
Flags: D - DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE
#   ADDRESS          NETWORK       INTERFACE
;;; defconf
0   192.168.92.1/24  192.168.92.0  bridge   
1 D 192.168.2.35/24  192.168.2.0   ether1 
[xyz@mAPLite92] /ip/address> 

Are you sure your ISP allows to set that address statically? I would think not.
Best to leave it as DHCP for that interface.
 
spynappels
Member Candidate
Member Candidate
Posts: 106
Joined: Mon Oct 25, 2021 12:32 pm
Location: Northern Ireland
Contact:

Re: Static IP not working

Tue Nov 16, 2021 9:23 am

As holvoeten said, the fact that your ISP gives you a WAN IP by DHCP is normally a strong indication that you cannot set this as a static. The reason is that unless you have specifically got a static Public IP, your WAN IP can change if the router were to reboot or something, and having the IP set statically would potentially open the way for IP clashes on their network.

Even if you do have a static Public IP, this is often still allocated by DHCP (over PPPoE or whatever) by means of a fixed or static lease on their DHCP server to make it easier to administrate for them.
 
User avatar
GreaterTX
just joined
Topic Author
Posts: 22
Joined: Mon Feb 25, 2019 6:47 am

Re: Static IP not working

Tue Nov 16, 2021 7:58 pm

Yes the ISP supplied the static IP information the DHCP option just gives you a random publicly available IP. But you’re still suppose to set your assigned static if you want to use it.

Their engineering team called me back in the middle of the night and it turns out the one they assigned us supposedly they screwed up and assigned the wrong information and it was unroutable. Hence being unable to access the internet with it.

So they sent me new info to try and I’ll have to give that a go :)

Who is online

Users browsing this forum: codi639, elbob2002, gdanov, Google [Bot], jamesperks, lurker888, nagylzs, pe1chl, sebi099 and 119 guests