Community discussions

MikroTik App
 
someone2
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Sun Jan 07, 2018 9:52 pm

Find the item number

Fri Jan 14, 2022 12:08 am

Hello
I want to disable an ip address based on ether information. For example i want to disable the ip address of ether2. Iknow that i should know the item number of this ip. How can i disable ether 2 ip address with script.
 
Sob
Forum Guru
Forum Guru
Posts: 9120
Joined: Mon Apr 20, 2009 9:11 pm

Re: Find the item number

Fri Jan 14, 2022 1:05 am

/ip address disable [find where interface=ether2]
 
someone2
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Sun Jan 07, 2018 9:52 pm

Re: Find the item number

Fri Jan 14, 2022 9:09 am

Thanks
What about when we want to disable based on ip address. Is this correct?
/ip address disable [find where address=192.168.1.1/24]
 
Sob
Forum Guru
Forum Guru
Posts: 9120
Joined: Mon Apr 20, 2009 9:11 pm

Re: Find the item number

Fri Jan 14, 2022 2:42 pm

That doesn't work, but I had success with quotes:
/ip address disable [find where address="192.168.1.1/24"]
 
someone2
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Sun Jan 07, 2018 9:52 pm

Re: Find the item number

Fri Jan 14, 2022 5:07 pm

I really appreciate it.

Who is online

Users browsing this forum: No registered users and 19 guests